@integrity-labs/agt-cli 0.28.973 → 0.28.975

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.
@@ -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 -
@@ -39099,11 +39191,18 @@ var FLAG_REGISTRY = [
39099
39191
  },
39100
39192
  {
39101
39193
  key: "ip-allowlist-enforce-admin-debug",
39102
- description: "ENG-10594 - whether the IP allowlist on the admin-debug surface (/admin/debug/*, including the deliberately unauthenticated POST /admin/debug/token that exchanges a tlk_ key) REFUSES, or merely observes. OFF (default) = shadow: every request is still evaluated and logged with verdict=admit or verdict=would-refuse, and nothing is ever rejected. ON = a caller whose platform-attested source address is outside AGT_IP_ALLOWLIST_ADMIN_DEBUG gets a bare 403. THE SSM PARAMETER IS A SECOND LEVER AND BOTH ARE NEEDED: with the list unset this flag does nothing, because an unconfigured allowlist admits everyone by design. Arm in that order - populate the list, read the shadow logs until the would-refuse set is understood, then flip this. Deliberately global (evaluated with an empty context): the middleware runs BEFORE authentication, so there is no verified org to scope by, and taking one from an unverified request would let a caller choose its own enforcement posture. Separate from the mcp flag on purpose - see that entry.",
39194
+ description: "ENG-10594 - whether the IP allowlist on the admin-debug surface (/admin/debug/*, including the deliberately unauthenticated POST /admin/debug/token that exchanges a tlk_ key) REFUSES, or merely observes. OFF (default) = shadow: every request is still evaluated and logged with verdict=admit or verdict=would-refuse, and nothing is ever rejected. ON = a caller whose platform-attested source address is outside AGT_IP_ALLOWLIST_ADMIN_DEBUG gets a bare 403. THE SSM PARAMETER IS A SECOND LEVER AND BOTH ARE NEEDED: with the list unset this flag does nothing, because an unconfigured allowlist admits everyone by design. Arm in that order - populate the list, read the shadow logs until the would-refuse set is understood, then flip this. Deliberately global (evaluated with an empty context): the middleware runs BEFORE authentication, so there is no verified org to scope by, and taking one from an unverified request would let a caller choose its own enforcement posture. There is deliberately NO counterpart flag for the per-agent MCP surface: that one is shadow-only structurally (its ENFORCE_FLAG entry is null), so arming this one does not and cannot arm that one. See the comment below this entry for why.",
39103
39195
  flagType: "boolean",
39104
- // Shadow. The measurement comes first: nobody yet knows the real set of
39105
- // staff addresses, and arming against a guess locks you out of the very
39106
- // tool you would use to diagnose the lockout.
39196
+ // Shadow. The measurement comes first - and ENG-10664 corrected what the
39197
+ // measurement is OF. This comment used to say "nobody yet knows the real set
39198
+ // of staff addresses": there is no such set. Measured over 48h, all 315
39199
+ // requests to this surface came from ONE address, the agt-hosts AZ-2a NAT
39200
+ // EIP - an AGENT calling the debug_* tools, not a person. The decided policy
39201
+ // is that it stays that way (admin-debug is only ever reached from our own
39202
+ // NAT gateways). So the pre-arm check is not "does my laptop appear" but
39203
+ // "is every NAT EIP in the list", because an AZ whose NAT has not yet
39204
+ // carried a debug_* call is absent from the log and would be refused the
39205
+ // instant this flips. See docs/runbooks/ip-allowlist-rollout.md step 3.
39107
39206
  defaultValue: false,
39108
39207
  // Arming it changes who can reach production diagnostics. Worth one
39109
39208
  // confirmation.
@@ -39118,20 +39217,34 @@ var FLAG_REGISTRY = [
39118
39217
  // ENFORCE_FLAG (packages/api/src/middleware/ip-allowlist.ts) is null, so no
39119
39218
  // flag is consulted and no flag flip can arm it.
39120
39219
  //
39121
- // Why it is not simply a second flag defaulting false: most of that surface's
39122
- // callers have no allowlistable address at all. Per ADR-0032 only hosts in the
39123
- // agt-hosts account egress through stable NAT EIPs; a host with
39124
- // provision_source `self` or `customer-ec2`, or any BYO account, egresses from
39125
- // an address the control plane cannot know. Arming against that population
39126
- // black-holes a customer's whole fleet, and per
39127
- // docs/runbooks/composio-allowlist-rollout.md this class of change has no
39220
+ // Why it is not simply a second flag defaulting false (CORRECTED, ENG-10664):
39221
+ //
39222
+ // This comment used to say the callers are agent HOSTS, most of which have no
39223
+ // allowlistable address per ADR-0032. That is the wrong caller. Agent hosts do
39224
+ // not call this surface at all: its handler's first act is
39225
+ // validateMcpAccessToken() against `mcp_oauth_tokens` (routes/mcp.ts:87, token
39226
+ // check at :91), so a host JWT is rejected outright - routes/host-runtime.ts
39227
+ // :33421 says so in as many words, which is why the ENG-4724 /host/* twins
39228
+ // exist. The caller set is remote MCP OAuth clients, structurally.
39229
+ //
39230
+ // The conclusion is unchanged and ONLY the reason has moved. Allowlisting this
39231
+ // surface would mean pinning a THIRD PARTY's egress ranges rather than our own
39232
+ // NAT EIPs - a different control, a different owner, a different failure mode:
39233
+ // they move a range and agent MCP access breaks with no signal on our side.
39234
+ // Per docs/runbooks/composio-allowlist-rollout.md this class of change has no
39128
39235
  // fleet-level undo. A flag would leave that one toggle away during an
39129
39236
  // incident, from someone who had just armed the admin-debug surface and
39130
39237
  // reasonably assumed the pair moved together. Requiring a code change puts
39131
39238
  // review in front of an irreversible action, which is the right price.
39132
39239
  //
39133
- // If the shadow data ever shows the population IS allowlistable, adding the
39134
- // flag here and a key in ENFORCE_FLAG is a small, deliberate diff.
39240
+ // Keeping the false rationale would have been worse than having none: a reader
39241
+ // who checked it would find it does not hold and might "fix" it by adding the
39242
+ // flag. That is the failure this rewrite exists to prevent.
39243
+ //
39244
+ // If we ever DECIDE to take on that third-party dependency deliberately,
39245
+ // adding the flag here and a key in ENFORCE_FLAG is a small diff - but it is a
39246
+ // decision to own someone else's egress, not a discovery that the population
39247
+ // was allowlistable all along.
39135
39248
  ];
39136
39249
  var REGISTRY_BY_KEY = new Map(FLAG_REGISTRY.map((definition) => [definition.key, definition]));
39137
39250
 
@@ -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-YBDGTOXI.js";
66
+ import "./chunk-VRYNZ3G5.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-S32WR3KK.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-YBDGTOXI.js";
4
+ import "./chunk-VRYNZ3G5.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-NSH4R5RH.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sessionTranscriptDir
3
- } from "./chunk-O3VCRRUF.js";
3
+ } from "./chunk-VRYNZ3G5.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-A5RJASLW.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.973",
3
+ "version": "0.28.975",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {