@integrity-labs/agt-cli 0.28.972 → 0.28.974

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.
@@ -33024,21 +33024,80 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
33024
33024
  // ancestors too - a wider style mutation than intended, for a probe whose
33025
33025
  // result the caller then rejects anyway.
33026
33026
  function textNodeAtPointThrough(x,y,target){
33027
+ return throughOverlays(x,y,target,function(){ return textNodeAtPoint(x,y); });
33028
+ }
33029
+ // Run probe() with everything stacked IN FRONT of target muted for pointer
33030
+ // hit-testing, then restore it. Shared by the text-node probe above and the
33031
+ // caret placement below (ENG-10632), so there is one overlay-muting path.
33032
+ // A target that is not in the hit stack (or no elementsFromPoint at all) runs
33033
+ // the probe unmuted, for the reason given on textNodeAtPointThrough.
33034
+ function throughOverlays(x,y,target,probe){
33027
33035
  var stack;
33028
- try{ stack=document.elementsFromPoint(x,y)||[]; }catch(e){ return textNodeAtPoint(x,y); }
33036
+ try{ stack=document.elementsFromPoint(x,y)||[]; }catch(e){ return probe(); }
33029
33037
  var cut=-1, i;
33030
- for(i=0;i<stack.length;i++){ if(stack[i]===target){ cut=i; break; } }
33031
- if(cut<0) return textNodeAtPoint(x,y);
33038
+ for(i=0;i<stack.length;i++){ if(stack[i]===target || (target && target.contains && stack[i] && stack[i].nodeType && target.contains(stack[i]))){ cut=i; break; } }
33039
+ if(cut<0) return probe();
33032
33040
  var muted=[];
33033
33041
  for(i=0;i<cut;i++){
33034
33042
  muted.push([stack[i], stack[i].style ? stack[i].style.pointerEvents : '']);
33035
33043
  try{ stack[i].style.pointerEvents='none'; }catch(e){}
33036
33044
  }
33037
- try{ return textNodeAtPoint(x,y); }
33045
+ try{ return probe(); }
33038
33046
  finally{
33039
33047
  for(i=0;i<muted.length;i++){ try{ muted[i][0].style.pointerEvents=muted[i][1]||''; }catch(e){} }
33040
33048
  }
33041
33049
  }
33050
+ // ENG-10632: is this pointer event aimed INSIDE the open editor?
33051
+ //
33052
+ // 'direct' - the event's own target is the editor or inside it (no overlay).
33053
+ // 'through' - the target is something laid over the editor (a deck click
33054
+ // zone), but the editor is in the hit stack under the pointer.
33055
+ // null - no edit is open, or the press is genuinely elsewhere.
33056
+ //
33057
+ // WHY NOT e.target ALONE. That is exactly the ENG-8477 blind spot: a pointer
33058
+ // event targets the HIT-TEST result, and a deck's full-viewport zones win the
33059
+ // hit test, so e.target is the zone for every press on slide text. ENG-8477
33060
+ // fixed the click that OPENS an editor this way and left the guards that
33061
+ // protect an OPEN editor keyed on e.target, so the second click - the one that
33062
+ // places the caret - was handed to the zone and paged the slide.
33063
+ //
33064
+ // A keydown is different: it targets the FOCUSED element, so the ENG-8500 key
33065
+ // guard's e.target test is correct and stays as it is.
33066
+ function pointInEditor(e){
33067
+ if(!editing || !e) return null;
33068
+ var t=e.target;
33069
+ if(t===editing || (editing.contains && t && t.nodeType && editing.contains(t))) return 'direct';
33070
+ if(typeof e.clientX!=='number' || typeof e.clientY!=='number') return null;
33071
+ var stack;
33072
+ try{ stack=document.elementsFromPoint(e.clientX, e.clientY)||[]; }catch(err){ return null; }
33073
+ for(var i=0;i<stack.length;i++){
33074
+ var n=stack[i];
33075
+ if(n===editing || (editing.contains && n && n.nodeType && editing.contains(n))) return 'through';
33076
+ }
33077
+ return null;
33078
+ }
33079
+ // ENG-10632: put the caret where the viewer pressed, as the browser would have
33080
+ // if nothing covered the editor. The browser's own caret placement goes to the
33081
+ // topmost element, which is the overlay, so it places nothing in the text.
33082
+ // Returns true when a caret was placed inside the editor.
33083
+ function placeCaretAtPointThrough(x,y,el){
33084
+ return throughOverlays(x,y,el,function(){
33085
+ try{
33086
+ var node=null, offset=0, r=null;
33087
+ if(document.caretRangeFromPoint){
33088
+ r=document.caretRangeFromPoint(x,y);
33089
+ if(r){ node=r.startContainer; offset=r.startOffset||0; }
33090
+ } else if(document.caretPositionFromPoint){
33091
+ var p=document.caretPositionFromPoint(x,y);
33092
+ if(p){ node=p.offsetNode; offset=p.offset||0; }
33093
+ }
33094
+ if(!node || !(node===el || (el.contains && el.contains(node.nodeType===3 ? node.parentNode||node.parentElement : node)))) return false;
33095
+ if(!r){ r=document.createRange(); r.setStart(node, offset); r.collapse(true); }
33096
+ var s=document.getSelection(); s.removeAllRanges(); s.addRange(r);
33097
+ return true;
33098
+ }catch(err){ return false; }
33099
+ });
33100
+ }
33042
33101
  // Index of a text node among its parent's child TEXT nodes, in order - the same
33043
33102
  // counting the server uses to re-locate it in source_html (ENG-6856).
33044
33103
  function textIndexOf(container, tn){
@@ -33046,6 +33105,13 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
33046
33105
  for(var k=0;k<ns.length;k++){ if(ns[k].nodeType===3){ i++; if(ns[k]===tn) return i; } }
33047
33106
  return -1;
33048
33107
  }
33108
+ function keepCaretIn(el){
33109
+ try{
33110
+ var s=document.getSelection(), n=s && s.rangeCount ? s.anchorNode : null;
33111
+ if(n && (n===el || (el.contains && el.contains(n.nodeType===3 ? n.parentNode : n)))) return;
33112
+ }catch(err){}
33113
+ placeCaretEnd(el);
33114
+ }
33049
33115
  function placeCaretEnd(el){ try{ var r=document.createRange(); r.selectNodeContents(el); r.collapse(false); var s=document.getSelection(); s.removeAllRanges(); s.addRange(r); }catch(e){} }
33050
33116
  // The Save/Cancel toolbar anchored above el. Shared by whole-element edits
33051
33117
  // (startEdit) and per-text-node edits (startEditTextNode).
@@ -33255,9 +33321,35 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
33255
33321
  // press that lands inside the editor. A press anywhere else is the viewer
33256
33322
  // leaving, and the artefact keeps it.
33257
33323
  window.addEventListener('pointerdown', function(e){
33258
- if(!editing) return;
33259
- var t=e.target;
33260
- if(t!==editing && !(editing.contains && t && t.nodeType && editing.contains(t))) return;
33324
+ // ENG-10632: "inside the editor" is decided through the hit stack, not from
33325
+ // e.target, which a deck's click zone always wins. See pointInEditor.
33326
+ var where=pointInEditor(e);
33327
+ if(!where) return;
33328
+ e.stopImmediatePropagation();
33329
+ if(where==='through'){
33330
+ // The overlay is the browser's hit target, so its default action would
33331
+ // move focus off the editor and place no caret in the text. Take both over.
33332
+ try{ e.preventDefault(); }catch(err){}
33333
+ try{ editing.focus(); }catch(err){}
33334
+ // The press is suppressed either way, so a probe that cannot resolve a
33335
+ // point inside the editor must not leave it without a caret: keep one the
33336
+ // editor already holds, otherwise put it at the end of the text.
33337
+ if(!placeCaretAtPointThrough(e.clientX, e.clientY, editing)) keepCaretIn(editing);
33338
+ }
33339
+ }, true);
33340
+ // ENG-10632: the same press also arrives as mousedown and click, and the deck
33341
+ // can page on either. Only a press that went THROUGH an overlay into the open
33342
+ // editor is swallowed; a direct press keeps its native behaviour (caret,
33343
+ // drag-select), and a press anywhere else is the viewer leaving and is left to
33344
+ // the artefact.
33345
+ window.addEventListener('mousedown', function(e){
33346
+ if(pointInEditor(e)!=='through') return;
33347
+ try{ e.preventDefault(); }catch(err){}
33348
+ e.stopImmediatePropagation();
33349
+ }, true);
33350
+ window.addEventListener('click', function(e){
33351
+ if(pointInEditor(e)!=='through') return;
33352
+ try{ e.preventDefault(); }catch(err){}
33261
33353
  e.stopImmediatePropagation();
33262
33354
  }, true);
33263
33355
  // ENG-8477: the hover affordance has the same blind spot as the click did -
@@ -33044,21 +33044,80 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
33044
33044
  // ancestors too - a wider style mutation than intended, for a probe whose
33045
33045
  // result the caller then rejects anyway.
33046
33046
  function textNodeAtPointThrough(x,y,target){
33047
+ return throughOverlays(x,y,target,function(){ return textNodeAtPoint(x,y); });
33048
+ }
33049
+ // Run probe() with everything stacked IN FRONT of target muted for pointer
33050
+ // hit-testing, then restore it. Shared by the text-node probe above and the
33051
+ // caret placement below (ENG-10632), so there is one overlay-muting path.
33052
+ // A target that is not in the hit stack (or no elementsFromPoint at all) runs
33053
+ // the probe unmuted, for the reason given on textNodeAtPointThrough.
33054
+ function throughOverlays(x,y,target,probe){
33047
33055
  var stack;
33048
- try{ stack=document.elementsFromPoint(x,y)||[]; }catch(e){ return textNodeAtPoint(x,y); }
33056
+ try{ stack=document.elementsFromPoint(x,y)||[]; }catch(e){ return probe(); }
33049
33057
  var cut=-1, i;
33050
- for(i=0;i<stack.length;i++){ if(stack[i]===target){ cut=i; break; } }
33051
- if(cut<0) return textNodeAtPoint(x,y);
33058
+ for(i=0;i<stack.length;i++){ if(stack[i]===target || (target && target.contains && stack[i] && stack[i].nodeType && target.contains(stack[i]))){ cut=i; break; } }
33059
+ if(cut<0) return probe();
33052
33060
  var muted=[];
33053
33061
  for(i=0;i<cut;i++){
33054
33062
  muted.push([stack[i], stack[i].style ? stack[i].style.pointerEvents : '']);
33055
33063
  try{ stack[i].style.pointerEvents='none'; }catch(e){}
33056
33064
  }
33057
- try{ return textNodeAtPoint(x,y); }
33065
+ try{ return probe(); }
33058
33066
  finally{
33059
33067
  for(i=0;i<muted.length;i++){ try{ muted[i][0].style.pointerEvents=muted[i][1]||''; }catch(e){} }
33060
33068
  }
33061
33069
  }
33070
+ // ENG-10632: is this pointer event aimed INSIDE the open editor?
33071
+ //
33072
+ // 'direct' - the event's own target is the editor or inside it (no overlay).
33073
+ // 'through' - the target is something laid over the editor (a deck click
33074
+ // zone), but the editor is in the hit stack under the pointer.
33075
+ // null - no edit is open, or the press is genuinely elsewhere.
33076
+ //
33077
+ // WHY NOT e.target ALONE. That is exactly the ENG-8477 blind spot: a pointer
33078
+ // event targets the HIT-TEST result, and a deck's full-viewport zones win the
33079
+ // hit test, so e.target is the zone for every press on slide text. ENG-8477
33080
+ // fixed the click that OPENS an editor this way and left the guards that
33081
+ // protect an OPEN editor keyed on e.target, so the second click - the one that
33082
+ // places the caret - was handed to the zone and paged the slide.
33083
+ //
33084
+ // A keydown is different: it targets the FOCUSED element, so the ENG-8500 key
33085
+ // guard's e.target test is correct and stays as it is.
33086
+ function pointInEditor(e){
33087
+ if(!editing || !e) return null;
33088
+ var t=e.target;
33089
+ if(t===editing || (editing.contains && t && t.nodeType && editing.contains(t))) return 'direct';
33090
+ if(typeof e.clientX!=='number' || typeof e.clientY!=='number') return null;
33091
+ var stack;
33092
+ try{ stack=document.elementsFromPoint(e.clientX, e.clientY)||[]; }catch(err){ return null; }
33093
+ for(var i=0;i<stack.length;i++){
33094
+ var n=stack[i];
33095
+ if(n===editing || (editing.contains && n && n.nodeType && editing.contains(n))) return 'through';
33096
+ }
33097
+ return null;
33098
+ }
33099
+ // ENG-10632: put the caret where the viewer pressed, as the browser would have
33100
+ // if nothing covered the editor. The browser's own caret placement goes to the
33101
+ // topmost element, which is the overlay, so it places nothing in the text.
33102
+ // Returns true when a caret was placed inside the editor.
33103
+ function placeCaretAtPointThrough(x,y,el){
33104
+ return throughOverlays(x,y,el,function(){
33105
+ try{
33106
+ var node=null, offset=0, r=null;
33107
+ if(document.caretRangeFromPoint){
33108
+ r=document.caretRangeFromPoint(x,y);
33109
+ if(r){ node=r.startContainer; offset=r.startOffset||0; }
33110
+ } else if(document.caretPositionFromPoint){
33111
+ var p=document.caretPositionFromPoint(x,y);
33112
+ if(p){ node=p.offsetNode; offset=p.offset||0; }
33113
+ }
33114
+ if(!node || !(node===el || (el.contains && el.contains(node.nodeType===3 ? node.parentNode||node.parentElement : node)))) return false;
33115
+ if(!r){ r=document.createRange(); r.setStart(node, offset); r.collapse(true); }
33116
+ var s=document.getSelection(); s.removeAllRanges(); s.addRange(r);
33117
+ return true;
33118
+ }catch(err){ return false; }
33119
+ });
33120
+ }
33062
33121
  // Index of a text node among its parent's child TEXT nodes, in order - the same
33063
33122
  // counting the server uses to re-locate it in source_html (ENG-6856).
33064
33123
  function textIndexOf(container, tn){
@@ -33066,6 +33125,13 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
33066
33125
  for(var k=0;k<ns.length;k++){ if(ns[k].nodeType===3){ i++; if(ns[k]===tn) return i; } }
33067
33126
  return -1;
33068
33127
  }
33128
+ function keepCaretIn(el){
33129
+ try{
33130
+ var s=document.getSelection(), n=s && s.rangeCount ? s.anchorNode : null;
33131
+ if(n && (n===el || (el.contains && el.contains(n.nodeType===3 ? n.parentNode : n)))) return;
33132
+ }catch(err){}
33133
+ placeCaretEnd(el);
33134
+ }
33069
33135
  function placeCaretEnd(el){ try{ var r=document.createRange(); r.selectNodeContents(el); r.collapse(false); var s=document.getSelection(); s.removeAllRanges(); s.addRange(r); }catch(e){} }
33070
33136
  // The Save/Cancel toolbar anchored above el. Shared by whole-element edits
33071
33137
  // (startEdit) and per-text-node edits (startEditTextNode).
@@ -33275,9 +33341,35 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
33275
33341
  // press that lands inside the editor. A press anywhere else is the viewer
33276
33342
  // leaving, and the artefact keeps it.
33277
33343
  window.addEventListener('pointerdown', function(e){
33278
- if(!editing) return;
33279
- var t=e.target;
33280
- if(t!==editing && !(editing.contains && t && t.nodeType && editing.contains(t))) return;
33344
+ // ENG-10632: "inside the editor" is decided through the hit stack, not from
33345
+ // e.target, which a deck's click zone always wins. See pointInEditor.
33346
+ var where=pointInEditor(e);
33347
+ if(!where) return;
33348
+ e.stopImmediatePropagation();
33349
+ if(where==='through'){
33350
+ // The overlay is the browser's hit target, so its default action would
33351
+ // move focus off the editor and place no caret in the text. Take both over.
33352
+ try{ e.preventDefault(); }catch(err){}
33353
+ try{ editing.focus(); }catch(err){}
33354
+ // The press is suppressed either way, so a probe that cannot resolve a
33355
+ // point inside the editor must not leave it without a caret: keep one the
33356
+ // editor already holds, otherwise put it at the end of the text.
33357
+ if(!placeCaretAtPointThrough(e.clientX, e.clientY, editing)) keepCaretIn(editing);
33358
+ }
33359
+ }, true);
33360
+ // ENG-10632: the same press also arrives as mousedown and click, and the deck
33361
+ // can page on either. Only a press that went THROUGH an overlay into the open
33362
+ // editor is swallowed; a direct press keeps its native behaviour (caret,
33363
+ // drag-select), and a press anywhere else is the viewer leaving and is left to
33364
+ // the artefact.
33365
+ window.addEventListener('mousedown', function(e){
33366
+ if(pointInEditor(e)!=='through') return;
33367
+ try{ e.preventDefault(); }catch(err){}
33368
+ e.stopImmediatePropagation();
33369
+ }, true);
33370
+ window.addEventListener('click', function(e){
33371
+ if(pointInEditor(e)!=='through') return;
33372
+ try{ e.preventDefault(); }catch(err){}
33281
33373
  e.stopImmediatePropagation();
33282
33374
  }, true);
33283
33375
  // ENG-8477: the hover affordance has the same blind spot as the click did -
@@ -62,8 +62,8 @@ import {
62
62
  writeDirectChatSessionState,
63
63
  writeEgressAllowlist,
64
64
  writePersistentClaudeWrapper
65
- } from "./chunk-J7J3JWZ3.js";
66
- import "./chunk-O3VCRRUF.js";
65
+ } from "./chunk-PHPOHMSK.js";
66
+ import "./chunk-HRHDATT5.js";
67
67
  import "./chunk-DHWNVVX4.js";
68
68
  import "./chunk-XWVM4KPK.js";
69
69
  export {
@@ -131,4 +131,4 @@ export {
131
131
  writeEgressAllowlist,
132
132
  writePersistentClaudeWrapper
133
133
  };
134
- //# sourceMappingURL=persistent-session-24ZIVLH3.js.map
134
+ //# sourceMappingURL=persistent-session-YJJXZSUE.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-J7J3JWZ3.js";
4
- import "./chunk-O3VCRRUF.js";
3
+ } from "./chunk-PHPOHMSK.js";
4
+ import "./chunk-HRHDATT5.js";
5
5
  import "./chunk-DHWNVVX4.js";
6
6
  import "./chunk-XWVM4KPK.js";
7
7
 
@@ -800,4 +800,4 @@ export {
800
800
  readAndResetSlackReplyBindingClassifications,
801
801
  readAndResetSlackReplyTargetClassifications
802
802
  };
803
- //# sourceMappingURL=responsiveness-probe-7KOUL2XK.js.map
803
+ //# sourceMappingURL=responsiveness-probe-SQZGSNVI.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sessionTranscriptDir
3
- } from "./chunk-O3VCRRUF.js";
3
+ } from "./chunk-HRHDATT5.js";
4
4
 
5
5
  // src/lib/session-auth-dead.ts
6
6
  import { closeSync, openSync, readSync, readdirSync, statSync } from "fs";
@@ -203,4 +203,4 @@ export {
203
203
  decideSessionAuthState,
204
204
  probeSessionAuth
205
205
  };
206
- //# sourceMappingURL=session-auth-dead-BQVFVWZM.js.map
206
+ //# sourceMappingURL=session-auth-dead-7OLNDHJC.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.972",
3
+ "version": "0.28.974",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {