@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.
package/dist/bin/agt.js CHANGED
@@ -40,12 +40,12 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-TJXGP5XV.js";
43
+ } from "../chunk-3PYNSD4I.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
47
47
  readDirectChatSessionState
48
- } from "../chunk-J7J3JWZ3.js";
48
+ } from "../chunk-PHPOHMSK.js";
49
49
  import {
50
50
  AnchorSessionClient,
51
51
  CHANNEL_REGISTRY,
@@ -79,7 +79,7 @@ import {
79
79
  serializeManifestForSlackCli,
80
80
  sessionFileExists,
81
81
  sessionTranscriptDir
82
- } from "../chunk-O3VCRRUF.js";
82
+ } from "../chunk-HRHDATT5.js";
83
83
  import "../chunk-DHWNVVX4.js";
84
84
  import "../chunk-XWVM4KPK.js";
85
85
 
@@ -5471,7 +5471,7 @@ import { execFileSync, execSync } from "child_process";
5471
5471
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5472
5472
  import chalk18 from "chalk";
5473
5473
  import ora16 from "ora";
5474
- var cliVersion = true ? "0.28.972" : "dev";
5474
+ var cliVersion = true ? "0.28.974" : "dev";
5475
5475
  async function fetchLatestVersion() {
5476
5476
  const host2 = getHost();
5477
5477
  if (!host2) return null;
@@ -6731,7 +6731,7 @@ function handleError(err) {
6731
6731
  }
6732
6732
 
6733
6733
  // src/bin/agt.ts
6734
- var cliVersion2 = true ? "0.28.972" : "dev";
6734
+ var cliVersion2 = true ? "0.28.974" : "dev";
6735
6735
  var program = new Command();
6736
6736
  program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
6737
6737
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -14,7 +14,7 @@ import {
14
14
  parseEnvFileEntries,
15
15
  parseEnvIntegrations,
16
16
  shellQuote
17
- } from "./chunk-J7J3JWZ3.js";
17
+ } from "./chunk-PHPOHMSK.js";
18
18
  import {
19
19
  BIND_FAILURE_QUARANTINE_THRESHOLD,
20
20
  INTEGRATIONS_SECTION_END,
@@ -74,7 +74,7 @@ import {
74
74
  sessionTranscriptDir,
75
75
  worseConnectivityOutcome,
76
76
  wrapScheduledTaskPrompt
77
- } from "./chunk-O3VCRRUF.js";
77
+ } from "./chunk-HRHDATT5.js";
78
78
  import {
79
79
  classifyUnanswerablePane,
80
80
  summarizeUnanswerablePane
@@ -6967,7 +6967,7 @@ function exchangeFailureKind(err) {
6967
6967
  }
6968
6968
 
6969
6969
  // src/lib/api-client.ts
6970
- var agtCliVersion = true ? "0.28.972" : "dev";
6970
+ var agtCliVersion = true ? "0.28.974" : "dev";
6971
6971
  var lastConfigHash = null;
6972
6972
  function setConfigHash(hash) {
6973
6973
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -11709,4 +11709,4 @@ export {
11709
11709
  managerInstallSystemUnitCommand,
11710
11710
  managerUninstallSystemUnitCommand
11711
11711
  };
11712
- //# sourceMappingURL=chunk-TJXGP5XV.js.map
11712
+ //# sourceMappingURL=chunk-3PYNSD4I.js.map
@@ -9884,21 +9884,80 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
9884
9884
  // ancestors too - a wider style mutation than intended, for a probe whose
9885
9885
  // result the caller then rejects anyway.
9886
9886
  function textNodeAtPointThrough(x,y,target){
9887
+ return throughOverlays(x,y,target,function(){ return textNodeAtPoint(x,y); });
9888
+ }
9889
+ // Run probe() with everything stacked IN FRONT of target muted for pointer
9890
+ // hit-testing, then restore it. Shared by the text-node probe above and the
9891
+ // caret placement below (ENG-10632), so there is one overlay-muting path.
9892
+ // A target that is not in the hit stack (or no elementsFromPoint at all) runs
9893
+ // the probe unmuted, for the reason given on textNodeAtPointThrough.
9894
+ function throughOverlays(x,y,target,probe){
9887
9895
  var stack;
9888
- try{ stack=document.elementsFromPoint(x,y)||[]; }catch(e){ return textNodeAtPoint(x,y); }
9896
+ try{ stack=document.elementsFromPoint(x,y)||[]; }catch(e){ return probe(); }
9889
9897
  var cut=-1, i;
9890
- for(i=0;i<stack.length;i++){ if(stack[i]===target){ cut=i; break; } }
9891
- if(cut<0) return textNodeAtPoint(x,y);
9898
+ 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; } }
9899
+ if(cut<0) return probe();
9892
9900
  var muted=[];
9893
9901
  for(i=0;i<cut;i++){
9894
9902
  muted.push([stack[i], stack[i].style ? stack[i].style.pointerEvents : '']);
9895
9903
  try{ stack[i].style.pointerEvents='none'; }catch(e){}
9896
9904
  }
9897
- try{ return textNodeAtPoint(x,y); }
9905
+ try{ return probe(); }
9898
9906
  finally{
9899
9907
  for(i=0;i<muted.length;i++){ try{ muted[i][0].style.pointerEvents=muted[i][1]||''; }catch(e){} }
9900
9908
  }
9901
9909
  }
9910
+ // ENG-10632: is this pointer event aimed INSIDE the open editor?
9911
+ //
9912
+ // 'direct' - the event's own target is the editor or inside it (no overlay).
9913
+ // 'through' - the target is something laid over the editor (a deck click
9914
+ // zone), but the editor is in the hit stack under the pointer.
9915
+ // null - no edit is open, or the press is genuinely elsewhere.
9916
+ //
9917
+ // WHY NOT e.target ALONE. That is exactly the ENG-8477 blind spot: a pointer
9918
+ // event targets the HIT-TEST result, and a deck's full-viewport zones win the
9919
+ // hit test, so e.target is the zone for every press on slide text. ENG-8477
9920
+ // fixed the click that OPENS an editor this way and left the guards that
9921
+ // protect an OPEN editor keyed on e.target, so the second click - the one that
9922
+ // places the caret - was handed to the zone and paged the slide.
9923
+ //
9924
+ // A keydown is different: it targets the FOCUSED element, so the ENG-8500 key
9925
+ // guard's e.target test is correct and stays as it is.
9926
+ function pointInEditor(e){
9927
+ if(!editing || !e) return null;
9928
+ var t=e.target;
9929
+ if(t===editing || (editing.contains && t && t.nodeType && editing.contains(t))) return 'direct';
9930
+ if(typeof e.clientX!=='number' || typeof e.clientY!=='number') return null;
9931
+ var stack;
9932
+ try{ stack=document.elementsFromPoint(e.clientX, e.clientY)||[]; }catch(err){ return null; }
9933
+ for(var i=0;i<stack.length;i++){
9934
+ var n=stack[i];
9935
+ if(n===editing || (editing.contains && n && n.nodeType && editing.contains(n))) return 'through';
9936
+ }
9937
+ return null;
9938
+ }
9939
+ // ENG-10632: put the caret where the viewer pressed, as the browser would have
9940
+ // if nothing covered the editor. The browser's own caret placement goes to the
9941
+ // topmost element, which is the overlay, so it places nothing in the text.
9942
+ // Returns true when a caret was placed inside the editor.
9943
+ function placeCaretAtPointThrough(x,y,el){
9944
+ return throughOverlays(x,y,el,function(){
9945
+ try{
9946
+ var node=null, offset=0, r=null;
9947
+ if(document.caretRangeFromPoint){
9948
+ r=document.caretRangeFromPoint(x,y);
9949
+ if(r){ node=r.startContainer; offset=r.startOffset||0; }
9950
+ } else if(document.caretPositionFromPoint){
9951
+ var p=document.caretPositionFromPoint(x,y);
9952
+ if(p){ node=p.offsetNode; offset=p.offset||0; }
9953
+ }
9954
+ if(!node || !(node===el || (el.contains && el.contains(node.nodeType===3 ? node.parentNode||node.parentElement : node)))) return false;
9955
+ if(!r){ r=document.createRange(); r.setStart(node, offset); r.collapse(true); }
9956
+ var s=document.getSelection(); s.removeAllRanges(); s.addRange(r);
9957
+ return true;
9958
+ }catch(err){ return false; }
9959
+ });
9960
+ }
9902
9961
  // Index of a text node among its parent's child TEXT nodes, in order - the same
9903
9962
  // counting the server uses to re-locate it in source_html (ENG-6856).
9904
9963
  function textIndexOf(container, tn){
@@ -9906,6 +9965,13 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
9906
9965
  for(var k=0;k<ns.length;k++){ if(ns[k].nodeType===3){ i++; if(ns[k]===tn) return i; } }
9907
9966
  return -1;
9908
9967
  }
9968
+ function keepCaretIn(el){
9969
+ try{
9970
+ var s=document.getSelection(), n=s && s.rangeCount ? s.anchorNode : null;
9971
+ if(n && (n===el || (el.contains && el.contains(n.nodeType===3 ? n.parentNode : n)))) return;
9972
+ }catch(err){}
9973
+ placeCaretEnd(el);
9974
+ }
9909
9975
  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){} }
9910
9976
  // The Save/Cancel toolbar anchored above el. Shared by whole-element edits
9911
9977
  // (startEdit) and per-text-node edits (startEditTextNode).
@@ -10115,9 +10181,35 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
10115
10181
  // press that lands inside the editor. A press anywhere else is the viewer
10116
10182
  // leaving, and the artefact keeps it.
10117
10183
  window.addEventListener('pointerdown', function(e){
10118
- if(!editing) return;
10119
- var t=e.target;
10120
- if(t!==editing && !(editing.contains && t && t.nodeType && editing.contains(t))) return;
10184
+ // ENG-10632: "inside the editor" is decided through the hit stack, not from
10185
+ // e.target, which a deck's click zone always wins. See pointInEditor.
10186
+ var where=pointInEditor(e);
10187
+ if(!where) return;
10188
+ e.stopImmediatePropagation();
10189
+ if(where==='through'){
10190
+ // The overlay is the browser's hit target, so its default action would
10191
+ // move focus off the editor and place no caret in the text. Take both over.
10192
+ try{ e.preventDefault(); }catch(err){}
10193
+ try{ editing.focus(); }catch(err){}
10194
+ // The press is suppressed either way, so a probe that cannot resolve a
10195
+ // point inside the editor must not leave it without a caret: keep one the
10196
+ // editor already holds, otherwise put it at the end of the text.
10197
+ if(!placeCaretAtPointThrough(e.clientX, e.clientY, editing)) keepCaretIn(editing);
10198
+ }
10199
+ }, true);
10200
+ // ENG-10632: the same press also arrives as mousedown and click, and the deck
10201
+ // can page on either. Only a press that went THROUGH an overlay into the open
10202
+ // editor is swallowed; a direct press keeps its native behaviour (caret,
10203
+ // drag-select), and a press anywhere else is the viewer leaving and is left to
10204
+ // the artefact.
10205
+ window.addEventListener('mousedown', function(e){
10206
+ if(pointInEditor(e)!=='through') return;
10207
+ try{ e.preventDefault(); }catch(err){}
10208
+ e.stopImmediatePropagation();
10209
+ }, true);
10210
+ window.addEventListener('click', function(e){
10211
+ if(pointInEditor(e)!=='through') return;
10212
+ try{ e.preventDefault(); }catch(err){}
10121
10213
  e.stopImmediatePropagation();
10122
10214
  }, true);
10123
10215
  // ENG-8477: the hover affordance has the same blind spot as the click did -
@@ -15087,4 +15179,4 @@ export {
15087
15179
  peekCurrentSession,
15088
15180
  readDailySessionPin
15089
15181
  };
15090
- //# sourceMappingURL=chunk-O3VCRRUF.js.map
15182
+ //# sourceMappingURL=chunk-HRHDATT5.js.map