@integrity-labs/agt-cli 0.28.521 → 0.28.523
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/bin/agt.js +4 -4
- package/dist/{chunk-UAHIRLPO.js → chunk-HERASX7X.js} +3 -3
- package/dist/{chunk-STNEJC5S.js → chunk-LBSV575W.js} +196 -2
- package/dist/chunk-LBSV575W.js.map +1 -0
- package/dist/{claude-pair-runtime-PFMWZ66R.js → claude-pair-runtime-KEG2LDMH.js} +2 -2
- package/dist/lib/manager-worker.js +10 -10
- package/dist/mcp/direct-chat-channel.js +168 -1
- package/dist/mcp/origami.js +168 -1
- package/dist/mcp/remote-oauth-proxy.js +87 -12
- package/dist/mcp/slack-channel.js +168 -1
- package/dist/mcp/telegram-channel.js +168 -1
- package/dist/{persistent-session-DNENZXT4.js → persistent-session-OT66RBK5.js} +2 -2
- package/dist/{responsiveness-probe-V7CP5ML3.js → responsiveness-probe-KW7KQJUY.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-STNEJC5S.js.map +0 -1
- /package/dist/{chunk-UAHIRLPO.js.map → chunk-HERASX7X.js.map} +0 -0
- /package/dist/{claude-pair-runtime-PFMWZ66R.js.map → claude-pair-runtime-KEG2LDMH.js.map} +0 -0
- /package/dist/{persistent-session-DNENZXT4.js.map → persistent-session-OT66RBK5.js.map} +0 -0
- /package/dist/{responsiveness-probe-V7CP5ML3.js.map → responsiveness-probe-KW7KQJUY.js.map} +0 -0
|
@@ -32362,6 +32362,11 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
|
|
|
32362
32362
|
var commentEnabled = false; // armed when the viewer may comment (ENG-6847 right-click)
|
|
32363
32363
|
var editing = null; // the element currently in edit mode
|
|
32364
32364
|
var bar = null; // the Save/Cancel toolbar
|
|
32365
|
+
// ENG-8477: the viewer has explicitly turned editing ON from the shell. Only
|
|
32366
|
+
// then does the bridge look underneath the artefact's own overlays. See the
|
|
32367
|
+
// long note on the window-capture click handler for why this is a mode and
|
|
32368
|
+
// not just always-on.
|
|
32369
|
+
var editMode = false;
|
|
32365
32370
|
|
|
32366
32371
|
// Element-child indices from <body> down to el. Counts ELEMENT children only
|
|
32367
32372
|
// (children, not childNodes), matching how the server walks source_html; our
|
|
@@ -32416,6 +32421,55 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
|
|
|
32416
32421
|
return null;
|
|
32417
32422
|
}catch(e){ return null; }
|
|
32418
32423
|
}
|
|
32424
|
+
// ENG-8477: the topmost element under the pointer that we could actually edit,
|
|
32425
|
+
// looking THROUGH anything the artefact has laid over its own content.
|
|
32426
|
+
//
|
|
32427
|
+
// elementsFromPoint returns the full hit stack, front to back. We walk it from
|
|
32428
|
+
// the front and take the first genuinely editable element, skipping our own
|
|
32429
|
+
// injected UI. An artefact overlay is skipped for free: it is an empty div, so
|
|
32430
|
+
// editable() rejects it on the text check and we keep walking.
|
|
32431
|
+
//
|
|
32432
|
+
// Returns null when there is nothing editable under the pointer at all, which
|
|
32433
|
+
// is the signal to leave the click completely alone.
|
|
32434
|
+
function editableAtPoint(x,y){
|
|
32435
|
+
var stack;
|
|
32436
|
+
try{ stack=document.elementsFromPoint(x,y)||[]; }catch(e){ return null; }
|
|
32437
|
+
for(var i=0;i<stack.length;i++){
|
|
32438
|
+
var el=stack[i];
|
|
32439
|
+
if(!el || el.nodeType!==1) continue;
|
|
32440
|
+
if(el.closest && el.closest('[data-al-noedit]')) continue; // our toolbar, not content
|
|
32441
|
+
if(editable(el)||inlineOnlyEditable(el)) return el;
|
|
32442
|
+
}
|
|
32443
|
+
return null;
|
|
32444
|
+
}
|
|
32445
|
+
// The caret probe (caretRangeFromPoint) reports on the TOPMOST element at the
|
|
32446
|
+
// point, so an overlay swallows it exactly as it swallows the click - it hands
|
|
32447
|
+
// back the overlay div, not the text underneath. Neutralise everything stacked
|
|
32448
|
+
// above the target for the length of the probe, then put it back. The restore
|
|
32449
|
+
// is in a finally and runs before the browser can paint, so nothing flickers
|
|
32450
|
+
// and no artefact state is left modified.
|
|
32451
|
+
// This re-queries elementsFromPoint rather than reusing the caller's stack, so
|
|
32452
|
+
// target is NOT guaranteed to still be in it. Find target's index first and
|
|
32453
|
+
// mute only the prefix in front of it: a not-found target must fall back to the
|
|
32454
|
+
// plain probe, because muting the whole stack would neutralise target and its
|
|
32455
|
+
// ancestors too - a wider style mutation than intended, for a probe whose
|
|
32456
|
+
// result the caller then rejects anyway.
|
|
32457
|
+
function textNodeAtPointThrough(x,y,target){
|
|
32458
|
+
var stack;
|
|
32459
|
+
try{ stack=document.elementsFromPoint(x,y)||[]; }catch(e){ return textNodeAtPoint(x,y); }
|
|
32460
|
+
var cut=-1, i;
|
|
32461
|
+
for(i=0;i<stack.length;i++){ if(stack[i]===target){ cut=i; break; } }
|
|
32462
|
+
if(cut<0) return textNodeAtPoint(x,y);
|
|
32463
|
+
var muted=[];
|
|
32464
|
+
for(i=0;i<cut;i++){
|
|
32465
|
+
muted.push([stack[i], stack[i].style ? stack[i].style.pointerEvents : '']);
|
|
32466
|
+
try{ stack[i].style.pointerEvents='none'; }catch(e){}
|
|
32467
|
+
}
|
|
32468
|
+
try{ return textNodeAtPoint(x,y); }
|
|
32469
|
+
finally{
|
|
32470
|
+
for(i=0;i<muted.length;i++){ try{ muted[i][0].style.pointerEvents=muted[i][1]||''; }catch(e){} }
|
|
32471
|
+
}
|
|
32472
|
+
}
|
|
32419
32473
|
// Index of a text node among its parent's child TEXT nodes, in order - the same
|
|
32420
32474
|
// counting the server uses to re-locate it in source_html (ENG-6856).
|
|
32421
32475
|
function textIndexOf(container, tn){
|
|
@@ -32525,6 +32579,105 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
|
|
|
32525
32579
|
e.preventDefault(); e.stopPropagation(); startEditTextNode(tn, el);
|
|
32526
32580
|
}
|
|
32527
32581
|
}, true);
|
|
32582
|
+
// ENG-8477: reach content the artefact covers with its OWN overlay.
|
|
32583
|
+
//
|
|
32584
|
+
// A deck built from the canonical template lays two full-viewport click zones
|
|
32585
|
+
// over its slides (.clickzone, position:fixed, z-index:40) to page forward and
|
|
32586
|
+
// back. The template's own comment says it plainly: "the click zones sit above
|
|
32587
|
+
// slide content by design, so any interactive element inside a slide needs
|
|
32588
|
+
// position:relative + a higher z-index to stay clickable". Slide TEXT is not an
|
|
32589
|
+
// interactive element and never gets one.
|
|
32590
|
+
//
|
|
32591
|
+
// So every click a viewer aimed at a paragraph landed on #zone-prev/#zone-next.
|
|
32592
|
+
// The handler above read e.target, got an empty div, editable() rejected it on
|
|
32593
|
+
// the text check, and no editor opened - while the zone's own handler paged the
|
|
32594
|
+
// deck. A single-page artefact has no zones and the identical bridge works
|
|
32595
|
+
// perfectly on it, which is precisely why editing "works in web page formats
|
|
32596
|
+
// but not decks". Verified on real published content, not just the template.
|
|
32597
|
+
//
|
|
32598
|
+
// Why a MODE rather than always-on. One press cannot mean both "page the deck"
|
|
32599
|
+
// and "edit this text". The zones are the deck's primary navigation, so
|
|
32600
|
+
// silently stealing clicks from them would trade one broken gesture for
|
|
32601
|
+
// another. The shell gives an armed viewer an explicit Edit-text toggle; until
|
|
32602
|
+
// they turn it on, every line below is inert and the artefact behaves exactly
|
|
32603
|
+
// as it does today. Anonymous viewers never arm at all.
|
|
32604
|
+
//
|
|
32605
|
+
// Why window + capture. Same phase argument as ENG-8500: the artefact's script
|
|
32606
|
+
// is appended before the bridge, so registration order cannot be won, but the
|
|
32607
|
+
// capture path runs window -> document -> ... -> target and therefore beats a
|
|
32608
|
+
// handler bound to the zone itself no matter when it was registered.
|
|
32609
|
+
// stopImmediatePropagation then keeps the deck from also paging.
|
|
32610
|
+
//
|
|
32611
|
+
// Deliberately general: nothing here knows about .clickzone or any class name.
|
|
32612
|
+
// It fixes any artefact that covers its own content.
|
|
32613
|
+
window.addEventListener('click', function(e){
|
|
32614
|
+
if(!editEnabled || !editMode || editing) return;
|
|
32615
|
+
var sel=document.getSelection(); if(sel && String(sel).trim()) return; // selection => comment flow
|
|
32616
|
+
var t=e.target;
|
|
32617
|
+
// Our own toolbar (Save/Cancel) must keep its clicks.
|
|
32618
|
+
if(t && t.closest && t.closest('[data-al-noedit]')) return;
|
|
32619
|
+
// Already directly on editable content: the document-level handler above
|
|
32620
|
+
// covers it, and duplicating the work here would start the edit twice.
|
|
32621
|
+
if(editable(t)||inlineOnlyEditable(t)) return;
|
|
32622
|
+
var el=editableAtPoint(e.clientX, e.clientY);
|
|
32623
|
+
// Nothing editable under the pointer - leave the click completely alone so
|
|
32624
|
+
// click-to-page still works while the viewer is moving between slides.
|
|
32625
|
+
if(!el) return;
|
|
32626
|
+
// Suppress ONLY once an edit is actually starting. Suppressing up front left
|
|
32627
|
+
// the inline-only fallback below as a dead click: no editor opened AND the
|
|
32628
|
+
// deck could not page, because the event was already stopped.
|
|
32629
|
+
if(editable(el)){ e.preventDefault(); e.stopImmediatePropagation(); startEdit(el); return; }
|
|
32630
|
+
var tn=textNodeAtPointThrough(e.clientX, e.clientY, el);
|
|
32631
|
+
if(tn && tn.parentElement===el && (tn.nodeValue||'').trim()){
|
|
32632
|
+
e.preventDefault(); e.stopImmediatePropagation(); startEditTextNode(tn, el); return;
|
|
32633
|
+
}
|
|
32634
|
+
// An inline-only container whose exact text run we could not resolve (no
|
|
32635
|
+
// caret API, or the point fell between runs). Editing the whole container
|
|
32636
|
+
// would flatten its nested markup, so leave the click to the artefact and
|
|
32637
|
+
// let it page as it normally would.
|
|
32638
|
+
}, true);
|
|
32639
|
+
// ENG-8477: the same deck template pulls focus back to the document on every
|
|
32640
|
+
// pointer press, to keep its arrow keys working when the iframe loses focus:
|
|
32641
|
+
//
|
|
32642
|
+
// function grabFocus(){ try{ window.focus(); document.body.focus(); }catch(e){} }
|
|
32643
|
+
// addEventListener('pointerdown', grabFocus);
|
|
32644
|
+
//
|
|
32645
|
+
// A bare addEventListener at artefact top level is window + bubble phase, so a
|
|
32646
|
+
// window CAPTURE listener still gets there first. Without this guard, clicking
|
|
32647
|
+
// into an open editor to place the caret hands focus straight to <body> and the
|
|
32648
|
+
// viewer cannot type - a second, independent breaker that would have survived
|
|
32649
|
+
// the overlay fix on its own.
|
|
32650
|
+
//
|
|
32651
|
+
// Scoped as tightly as it can be: only while an edit is open, and only for a
|
|
32652
|
+
// press that lands inside the editor. A press anywhere else is the viewer
|
|
32653
|
+
// leaving, and the artefact keeps it.
|
|
32654
|
+
window.addEventListener('pointerdown', function(e){
|
|
32655
|
+
if(!editing) return;
|
|
32656
|
+
var t=e.target;
|
|
32657
|
+
if(t!==editing && !(editing.contains && t && t.nodeType && editing.contains(t))) return;
|
|
32658
|
+
e.stopImmediatePropagation();
|
|
32659
|
+
}, true);
|
|
32660
|
+
// ENG-8477: the hover affordance has the same blind spot as the click did -
|
|
32661
|
+
// mouseover reports the overlay, so a viewer in edit mode would get no cue that
|
|
32662
|
+
// slide text can be edited at all. Probing the stack on every mousemove would
|
|
32663
|
+
// be wasteful, so this only runs in edit mode, only when the direct target is
|
|
32664
|
+
// not already editable (that case the mouseover handler above still covers),
|
|
32665
|
+
// and no more than once per ~80ms.
|
|
32666
|
+
var hoverProbeAt=0, hoverEl=null;
|
|
32667
|
+
function clearDeepHover(){
|
|
32668
|
+
if(hoverEl && hoverEl!==editing && hoverEl.__alHover){ try{ hoverEl.style.outline=''; }catch(e){} hoverEl.__alHover=0; }
|
|
32669
|
+
hoverEl=null;
|
|
32670
|
+
}
|
|
32671
|
+
document.addEventListener('mousemove', function(e){
|
|
32672
|
+
if(!editEnabled || !editMode || editing){ clearDeepHover(); return; }
|
|
32673
|
+
var t=e.target;
|
|
32674
|
+
if(editable(t)||inlineOnlyEditable(t)){ clearDeepHover(); return; }
|
|
32675
|
+
var now=Date.now(); if(now-hoverProbeAt<80) return; hoverProbeAt=now;
|
|
32676
|
+
var el=editableAtPoint(e.clientX, e.clientY);
|
|
32677
|
+
if(el===hoverEl) return;
|
|
32678
|
+
clearDeepHover();
|
|
32679
|
+
if(el){ try{ el.style.outline=el.style.outline||'1px dashed rgba(110,231,183,.6)'; }catch(e){} el.__alHover=1; hoverEl=el; }
|
|
32680
|
+
});
|
|
32528
32681
|
// ENG-8500: while the inline editor is focused, the artefact's OWN keyboard
|
|
32529
32682
|
// handlers must not see the keystroke.
|
|
32530
32683
|
//
|
|
@@ -32616,6 +32769,13 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
|
|
|
32616
32769
|
var d=e.data; if(!d || d['${MARKUP_CONTROL_MARKER}']!==true) return;
|
|
32617
32770
|
if(d.type==='enable-edit'){ editEnabled=true; }
|
|
32618
32771
|
else if(d.type==='enable-comment'){ commentEnabled=true; }
|
|
32772
|
+
// ENG-8477: the viewer toggled Edit text in the shell. Turning it OFF must
|
|
32773
|
+
// also close anything open and drop the hover cue, or the artefact is left
|
|
32774
|
+
// wearing our outlines with no way to clear them.
|
|
32775
|
+
else if(d.type==='set-edit-mode'){
|
|
32776
|
+
editMode = !!d.on;
|
|
32777
|
+
if(!editMode){ if(editing) endEdit(false); clearDeepHover(); }
|
|
32778
|
+
}
|
|
32619
32779
|
else if(d.type==='edit-result'){
|
|
32620
32780
|
if(d.ok){ /* republish hot-swaps the iframe; nothing to do */ }
|
|
32621
32781
|
else { /* leave the (now non-editable) text; the published version is the source of truth */ }
|
|
@@ -32658,7 +32818,14 @@ var REMOTE_MCP_PROXY_ENV = {
|
|
|
32658
32818
|
authHeader: "AGT_REMOTE_MCP_AUTH_HEADER",
|
|
32659
32819
|
extraHeaders: "AGT_REMOTE_MCP_EXTRA_HEADERS",
|
|
32660
32820
|
toolAllowlist: "AGT_REMOTE_MCP_TOOL_ALLOWLIST",
|
|
32661
|
-
preEnableToolsets: "AGT_REMOTE_MCP_PREENABLE_TOOLSETS"
|
|
32821
|
+
preEnableToolsets: "AGT_REMOTE_MCP_PREENABLE_TOOLSETS",
|
|
32822
|
+
// ENG-8512: per-provider argument rules. A `tools/call` carrying a value we
|
|
32823
|
+
// KNOW the remote accepts and silently ignores is refused before it is
|
|
32824
|
+
// forwarded, rather than returning a 200 that every layer above records as
|
|
32825
|
+
// success. Deliberately NOT in REMOTE_MCP_AUTH_ENV_KEYS: it shapes which calls
|
|
32826
|
+
// we forward, not what an outbound request looks like, so the probe (which
|
|
32827
|
+
// never issues a tools/call) has nothing to reconstruct from it.
|
|
32828
|
+
argRejects: "AGT_REMOTE_MCP_ARG_REJECTS"
|
|
32662
32829
|
};
|
|
32663
32830
|
var REMOTE_MCP_AUTH_ENV_KEYS = [
|
|
32664
32831
|
REMOTE_MCP_PROXY_ENV.tokenVar,
|
|
@@ -32688,6 +32688,11 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
|
|
|
32688
32688
|
var commentEnabled = false; // armed when the viewer may comment (ENG-6847 right-click)
|
|
32689
32689
|
var editing = null; // the element currently in edit mode
|
|
32690
32690
|
var bar = null; // the Save/Cancel toolbar
|
|
32691
|
+
// ENG-8477: the viewer has explicitly turned editing ON from the shell. Only
|
|
32692
|
+
// then does the bridge look underneath the artefact's own overlays. See the
|
|
32693
|
+
// long note on the window-capture click handler for why this is a mode and
|
|
32694
|
+
// not just always-on.
|
|
32695
|
+
var editMode = false;
|
|
32691
32696
|
|
|
32692
32697
|
// Element-child indices from <body> down to el. Counts ELEMENT children only
|
|
32693
32698
|
// (children, not childNodes), matching how the server walks source_html; our
|
|
@@ -32742,6 +32747,55 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
|
|
|
32742
32747
|
return null;
|
|
32743
32748
|
}catch(e){ return null; }
|
|
32744
32749
|
}
|
|
32750
|
+
// ENG-8477: the topmost element under the pointer that we could actually edit,
|
|
32751
|
+
// looking THROUGH anything the artefact has laid over its own content.
|
|
32752
|
+
//
|
|
32753
|
+
// elementsFromPoint returns the full hit stack, front to back. We walk it from
|
|
32754
|
+
// the front and take the first genuinely editable element, skipping our own
|
|
32755
|
+
// injected UI. An artefact overlay is skipped for free: it is an empty div, so
|
|
32756
|
+
// editable() rejects it on the text check and we keep walking.
|
|
32757
|
+
//
|
|
32758
|
+
// Returns null when there is nothing editable under the pointer at all, which
|
|
32759
|
+
// is the signal to leave the click completely alone.
|
|
32760
|
+
function editableAtPoint(x,y){
|
|
32761
|
+
var stack;
|
|
32762
|
+
try{ stack=document.elementsFromPoint(x,y)||[]; }catch(e){ return null; }
|
|
32763
|
+
for(var i=0;i<stack.length;i++){
|
|
32764
|
+
var el=stack[i];
|
|
32765
|
+
if(!el || el.nodeType!==1) continue;
|
|
32766
|
+
if(el.closest && el.closest('[data-al-noedit]')) continue; // our toolbar, not content
|
|
32767
|
+
if(editable(el)||inlineOnlyEditable(el)) return el;
|
|
32768
|
+
}
|
|
32769
|
+
return null;
|
|
32770
|
+
}
|
|
32771
|
+
// The caret probe (caretRangeFromPoint) reports on the TOPMOST element at the
|
|
32772
|
+
// point, so an overlay swallows it exactly as it swallows the click - it hands
|
|
32773
|
+
// back the overlay div, not the text underneath. Neutralise everything stacked
|
|
32774
|
+
// above the target for the length of the probe, then put it back. The restore
|
|
32775
|
+
// is in a finally and runs before the browser can paint, so nothing flickers
|
|
32776
|
+
// and no artefact state is left modified.
|
|
32777
|
+
// This re-queries elementsFromPoint rather than reusing the caller's stack, so
|
|
32778
|
+
// target is NOT guaranteed to still be in it. Find target's index first and
|
|
32779
|
+
// mute only the prefix in front of it: a not-found target must fall back to the
|
|
32780
|
+
// plain probe, because muting the whole stack would neutralise target and its
|
|
32781
|
+
// ancestors too - a wider style mutation than intended, for a probe whose
|
|
32782
|
+
// result the caller then rejects anyway.
|
|
32783
|
+
function textNodeAtPointThrough(x,y,target){
|
|
32784
|
+
var stack;
|
|
32785
|
+
try{ stack=document.elementsFromPoint(x,y)||[]; }catch(e){ return textNodeAtPoint(x,y); }
|
|
32786
|
+
var cut=-1, i;
|
|
32787
|
+
for(i=0;i<stack.length;i++){ if(stack[i]===target){ cut=i; break; } }
|
|
32788
|
+
if(cut<0) return textNodeAtPoint(x,y);
|
|
32789
|
+
var muted=[];
|
|
32790
|
+
for(i=0;i<cut;i++){
|
|
32791
|
+
muted.push([stack[i], stack[i].style ? stack[i].style.pointerEvents : '']);
|
|
32792
|
+
try{ stack[i].style.pointerEvents='none'; }catch(e){}
|
|
32793
|
+
}
|
|
32794
|
+
try{ return textNodeAtPoint(x,y); }
|
|
32795
|
+
finally{
|
|
32796
|
+
for(i=0;i<muted.length;i++){ try{ muted[i][0].style.pointerEvents=muted[i][1]||''; }catch(e){} }
|
|
32797
|
+
}
|
|
32798
|
+
}
|
|
32745
32799
|
// Index of a text node among its parent's child TEXT nodes, in order - the same
|
|
32746
32800
|
// counting the server uses to re-locate it in source_html (ENG-6856).
|
|
32747
32801
|
function textIndexOf(container, tn){
|
|
@@ -32851,6 +32905,105 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
|
|
|
32851
32905
|
e.preventDefault(); e.stopPropagation(); startEditTextNode(tn, el);
|
|
32852
32906
|
}
|
|
32853
32907
|
}, true);
|
|
32908
|
+
// ENG-8477: reach content the artefact covers with its OWN overlay.
|
|
32909
|
+
//
|
|
32910
|
+
// A deck built from the canonical template lays two full-viewport click zones
|
|
32911
|
+
// over its slides (.clickzone, position:fixed, z-index:40) to page forward and
|
|
32912
|
+
// back. The template's own comment says it plainly: "the click zones sit above
|
|
32913
|
+
// slide content by design, so any interactive element inside a slide needs
|
|
32914
|
+
// position:relative + a higher z-index to stay clickable". Slide TEXT is not an
|
|
32915
|
+
// interactive element and never gets one.
|
|
32916
|
+
//
|
|
32917
|
+
// So every click a viewer aimed at a paragraph landed on #zone-prev/#zone-next.
|
|
32918
|
+
// The handler above read e.target, got an empty div, editable() rejected it on
|
|
32919
|
+
// the text check, and no editor opened - while the zone's own handler paged the
|
|
32920
|
+
// deck. A single-page artefact has no zones and the identical bridge works
|
|
32921
|
+
// perfectly on it, which is precisely why editing "works in web page formats
|
|
32922
|
+
// but not decks". Verified on real published content, not just the template.
|
|
32923
|
+
//
|
|
32924
|
+
// Why a MODE rather than always-on. One press cannot mean both "page the deck"
|
|
32925
|
+
// and "edit this text". The zones are the deck's primary navigation, so
|
|
32926
|
+
// silently stealing clicks from them would trade one broken gesture for
|
|
32927
|
+
// another. The shell gives an armed viewer an explicit Edit-text toggle; until
|
|
32928
|
+
// they turn it on, every line below is inert and the artefact behaves exactly
|
|
32929
|
+
// as it does today. Anonymous viewers never arm at all.
|
|
32930
|
+
//
|
|
32931
|
+
// Why window + capture. Same phase argument as ENG-8500: the artefact's script
|
|
32932
|
+
// is appended before the bridge, so registration order cannot be won, but the
|
|
32933
|
+
// capture path runs window -> document -> ... -> target and therefore beats a
|
|
32934
|
+
// handler bound to the zone itself no matter when it was registered.
|
|
32935
|
+
// stopImmediatePropagation then keeps the deck from also paging.
|
|
32936
|
+
//
|
|
32937
|
+
// Deliberately general: nothing here knows about .clickzone or any class name.
|
|
32938
|
+
// It fixes any artefact that covers its own content.
|
|
32939
|
+
window.addEventListener('click', function(e){
|
|
32940
|
+
if(!editEnabled || !editMode || editing) return;
|
|
32941
|
+
var sel=document.getSelection(); if(sel && String(sel).trim()) return; // selection => comment flow
|
|
32942
|
+
var t=e.target;
|
|
32943
|
+
// Our own toolbar (Save/Cancel) must keep its clicks.
|
|
32944
|
+
if(t && t.closest && t.closest('[data-al-noedit]')) return;
|
|
32945
|
+
// Already directly on editable content: the document-level handler above
|
|
32946
|
+
// covers it, and duplicating the work here would start the edit twice.
|
|
32947
|
+
if(editable(t)||inlineOnlyEditable(t)) return;
|
|
32948
|
+
var el=editableAtPoint(e.clientX, e.clientY);
|
|
32949
|
+
// Nothing editable under the pointer - leave the click completely alone so
|
|
32950
|
+
// click-to-page still works while the viewer is moving between slides.
|
|
32951
|
+
if(!el) return;
|
|
32952
|
+
// Suppress ONLY once an edit is actually starting. Suppressing up front left
|
|
32953
|
+
// the inline-only fallback below as a dead click: no editor opened AND the
|
|
32954
|
+
// deck could not page, because the event was already stopped.
|
|
32955
|
+
if(editable(el)){ e.preventDefault(); e.stopImmediatePropagation(); startEdit(el); return; }
|
|
32956
|
+
var tn=textNodeAtPointThrough(e.clientX, e.clientY, el);
|
|
32957
|
+
if(tn && tn.parentElement===el && (tn.nodeValue||'').trim()){
|
|
32958
|
+
e.preventDefault(); e.stopImmediatePropagation(); startEditTextNode(tn, el); return;
|
|
32959
|
+
}
|
|
32960
|
+
// An inline-only container whose exact text run we could not resolve (no
|
|
32961
|
+
// caret API, or the point fell between runs). Editing the whole container
|
|
32962
|
+
// would flatten its nested markup, so leave the click to the artefact and
|
|
32963
|
+
// let it page as it normally would.
|
|
32964
|
+
}, true);
|
|
32965
|
+
// ENG-8477: the same deck template pulls focus back to the document on every
|
|
32966
|
+
// pointer press, to keep its arrow keys working when the iframe loses focus:
|
|
32967
|
+
//
|
|
32968
|
+
// function grabFocus(){ try{ window.focus(); document.body.focus(); }catch(e){} }
|
|
32969
|
+
// addEventListener('pointerdown', grabFocus);
|
|
32970
|
+
//
|
|
32971
|
+
// A bare addEventListener at artefact top level is window + bubble phase, so a
|
|
32972
|
+
// window CAPTURE listener still gets there first. Without this guard, clicking
|
|
32973
|
+
// into an open editor to place the caret hands focus straight to <body> and the
|
|
32974
|
+
// viewer cannot type - a second, independent breaker that would have survived
|
|
32975
|
+
// the overlay fix on its own.
|
|
32976
|
+
//
|
|
32977
|
+
// Scoped as tightly as it can be: only while an edit is open, and only for a
|
|
32978
|
+
// press that lands inside the editor. A press anywhere else is the viewer
|
|
32979
|
+
// leaving, and the artefact keeps it.
|
|
32980
|
+
window.addEventListener('pointerdown', function(e){
|
|
32981
|
+
if(!editing) return;
|
|
32982
|
+
var t=e.target;
|
|
32983
|
+
if(t!==editing && !(editing.contains && t && t.nodeType && editing.contains(t))) return;
|
|
32984
|
+
e.stopImmediatePropagation();
|
|
32985
|
+
}, true);
|
|
32986
|
+
// ENG-8477: the hover affordance has the same blind spot as the click did -
|
|
32987
|
+
// mouseover reports the overlay, so a viewer in edit mode would get no cue that
|
|
32988
|
+
// slide text can be edited at all. Probing the stack on every mousemove would
|
|
32989
|
+
// be wasteful, so this only runs in edit mode, only when the direct target is
|
|
32990
|
+
// not already editable (that case the mouseover handler above still covers),
|
|
32991
|
+
// and no more than once per ~80ms.
|
|
32992
|
+
var hoverProbeAt=0, hoverEl=null;
|
|
32993
|
+
function clearDeepHover(){
|
|
32994
|
+
if(hoverEl && hoverEl!==editing && hoverEl.__alHover){ try{ hoverEl.style.outline=''; }catch(e){} hoverEl.__alHover=0; }
|
|
32995
|
+
hoverEl=null;
|
|
32996
|
+
}
|
|
32997
|
+
document.addEventListener('mousemove', function(e){
|
|
32998
|
+
if(!editEnabled || !editMode || editing){ clearDeepHover(); return; }
|
|
32999
|
+
var t=e.target;
|
|
33000
|
+
if(editable(t)||inlineOnlyEditable(t)){ clearDeepHover(); return; }
|
|
33001
|
+
var now=Date.now(); if(now-hoverProbeAt<80) return; hoverProbeAt=now;
|
|
33002
|
+
var el=editableAtPoint(e.clientX, e.clientY);
|
|
33003
|
+
if(el===hoverEl) return;
|
|
33004
|
+
clearDeepHover();
|
|
33005
|
+
if(el){ try{ el.style.outline=el.style.outline||'1px dashed rgba(110,231,183,.6)'; }catch(e){} el.__alHover=1; hoverEl=el; }
|
|
33006
|
+
});
|
|
32854
33007
|
// ENG-8500: while the inline editor is focused, the artefact's OWN keyboard
|
|
32855
33008
|
// handlers must not see the keystroke.
|
|
32856
33009
|
//
|
|
@@ -32942,6 +33095,13 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
|
|
|
32942
33095
|
var d=e.data; if(!d || d['${MARKUP_CONTROL_MARKER}']!==true) return;
|
|
32943
33096
|
if(d.type==='enable-edit'){ editEnabled=true; }
|
|
32944
33097
|
else if(d.type==='enable-comment'){ commentEnabled=true; }
|
|
33098
|
+
// ENG-8477: the viewer toggled Edit text in the shell. Turning it OFF must
|
|
33099
|
+
// also close anything open and drop the hover cue, or the artefact is left
|
|
33100
|
+
// wearing our outlines with no way to clear them.
|
|
33101
|
+
else if(d.type==='set-edit-mode'){
|
|
33102
|
+
editMode = !!d.on;
|
|
33103
|
+
if(!editMode){ if(editing) endEdit(false); clearDeepHover(); }
|
|
33104
|
+
}
|
|
32945
33105
|
else if(d.type==='edit-result'){
|
|
32946
33106
|
if(d.ok){ /* republish hot-swaps the iframe; nothing to do */ }
|
|
32947
33107
|
else { /* leave the (now non-editable) text; the published version is the source of truth */ }
|
|
@@ -32984,7 +33144,14 @@ var REMOTE_MCP_PROXY_ENV = {
|
|
|
32984
33144
|
authHeader: "AGT_REMOTE_MCP_AUTH_HEADER",
|
|
32985
33145
|
extraHeaders: "AGT_REMOTE_MCP_EXTRA_HEADERS",
|
|
32986
33146
|
toolAllowlist: "AGT_REMOTE_MCP_TOOL_ALLOWLIST",
|
|
32987
|
-
preEnableToolsets: "AGT_REMOTE_MCP_PREENABLE_TOOLSETS"
|
|
33147
|
+
preEnableToolsets: "AGT_REMOTE_MCP_PREENABLE_TOOLSETS",
|
|
33148
|
+
// ENG-8512: per-provider argument rules. A `tools/call` carrying a value we
|
|
33149
|
+
// KNOW the remote accepts and silently ignores is refused before it is
|
|
33150
|
+
// forwarded, rather than returning a 200 that every layer above records as
|
|
33151
|
+
// success. Deliberately NOT in REMOTE_MCP_AUTH_ENV_KEYS: it shapes which calls
|
|
33152
|
+
// we forward, not what an outbound request looks like, so the probe (which
|
|
33153
|
+
// never issues a tools/call) has nothing to reconstruct from it.
|
|
33154
|
+
argRejects: "AGT_REMOTE_MCP_ARG_REJECTS"
|
|
32988
33155
|
};
|
|
32989
33156
|
var REMOTE_MCP_AUTH_ENV_KEYS = [
|
|
32990
33157
|
REMOTE_MCP_PROXY_ENV.tokenVar,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
writeDirectChatSessionState,
|
|
38
38
|
writeEgressAllowlist,
|
|
39
39
|
writePersistentClaudeWrapper
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-LBSV575W.js";
|
|
41
41
|
import "./chunk-XWVM4KPK.js";
|
|
42
42
|
export {
|
|
43
43
|
EGRESS_BASELINE_DOMAINS,
|
|
@@ -79,4 +79,4 @@ export {
|
|
|
79
79
|
writeEgressAllowlist,
|
|
80
80
|
writePersistentClaudeWrapper
|
|
81
81
|
};
|
|
82
|
-
//# sourceMappingURL=persistent-session-
|
|
82
|
+
//# sourceMappingURL=persistent-session-OT66RBK5.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LBSV575W.js";
|
|
4
4
|
import "./chunk-XWVM4KPK.js";
|
|
5
5
|
|
|
6
6
|
// src/lib/responsiveness-probe.ts
|
|
@@ -662,4 +662,4 @@ export {
|
|
|
662
662
|
readAndResetSlackReplyBindingClassifications,
|
|
663
663
|
readAndResetSlackReplyTargetClassifications
|
|
664
664
|
};
|
|
665
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
665
|
+
//# sourceMappingURL=responsiveness-probe-KW7KQJUY.js.map
|