@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.
- package/dist/bin/agt.js +5 -5
- package/dist/{chunk-FTEQGZHK.js → chunk-KUSBSYQA.js} +4 -4
- package/dist/{chunk-O3VCRRUF.js → chunk-VRYNZ3G5.js} +134 -21
- package/dist/{chunk-O3VCRRUF.js.map → chunk-VRYNZ3G5.js.map} +1 -1
- package/dist/{chunk-J7J3JWZ3.js → chunk-YBDGTOXI.js} +2 -2
- package/dist/{claude-pair-runtime-JT5WNC3G.js → claude-pair-runtime-FYEBDP2M.js} +2 -2
- package/dist/lib/manager-worker.js +14 -14
- package/dist/mcp/direct-chat-channel.js +161 -22
- package/dist/mcp/index.js +133 -20
- package/dist/mcp/origami.js +133 -20
- package/dist/mcp/slack-channel.js +133 -20
- package/dist/mcp/telegram-channel.js +133 -20
- package/dist/{persistent-session-24ZIVLH3.js → persistent-session-S32WR3KK.js} +3 -3
- package/dist/{responsiveness-probe-7KOUL2XK.js → responsiveness-probe-NSH4R5RH.js} +3 -3
- package/dist/{session-auth-dead-BQVFVWZM.js → session-auth-dead-A5RJASLW.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-FTEQGZHK.js.map → chunk-KUSBSYQA.js.map} +0 -0
- /package/dist/{chunk-J7J3JWZ3.js.map → chunk-YBDGTOXI.js.map} +0 -0
- /package/dist/{claude-pair-runtime-JT5WNC3G.js.map → claude-pair-runtime-FYEBDP2M.js.map} +0 -0
- /package/dist/{persistent-session-24ZIVLH3.js.map → persistent-session-S32WR3KK.js.map} +0 -0
- /package/dist/{responsiveness-probe-7KOUL2XK.js.map → responsiveness-probe-NSH4R5RH.js.map} +0 -0
- /package/dist/{session-auth-dead-BQVFVWZM.js.map → session-auth-dead-A5RJASLW.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,12 +40,12 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-KUSBSYQA.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
47
47
|
readDirectChatSessionState
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-YBDGTOXI.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-
|
|
82
|
+
} from "../chunk-VRYNZ3G5.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.
|
|
5474
|
+
var cliVersion = true ? "0.28.975" : "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.
|
|
6734
|
+
var cliVersion2 = true ? "0.28.975" : "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-
|
|
17
|
+
} from "./chunk-YBDGTOXI.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-
|
|
77
|
+
} from "./chunk-VRYNZ3G5.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.
|
|
6970
|
+
var agtCliVersion = true ? "0.28.975" : "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-
|
|
11712
|
+
//# sourceMappingURL=chunk-KUSBSYQA.js.map
|
|
@@ -7378,11 +7378,18 @@ var FLAG_REGISTRY = [
|
|
|
7378
7378
|
},
|
|
7379
7379
|
{
|
|
7380
7380
|
key: "ip-allowlist-enforce-admin-debug",
|
|
7381
|
-
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.
|
|
7381
|
+
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.",
|
|
7382
7382
|
flagType: "boolean",
|
|
7383
|
-
// Shadow. The measurement comes first
|
|
7384
|
-
//
|
|
7385
|
-
//
|
|
7383
|
+
// Shadow. The measurement comes first - and ENG-10664 corrected what the
|
|
7384
|
+
// measurement is OF. This comment used to say "nobody yet knows the real set
|
|
7385
|
+
// of staff addresses": there is no such set. Measured over 48h, all 315
|
|
7386
|
+
// requests to this surface came from ONE address, the agt-hosts AZ-2a NAT
|
|
7387
|
+
// EIP - an AGENT calling the debug_* tools, not a person. The decided policy
|
|
7388
|
+
// is that it stays that way (admin-debug is only ever reached from our own
|
|
7389
|
+
// NAT gateways). So the pre-arm check is not "does my laptop appear" but
|
|
7390
|
+
// "is every NAT EIP in the list", because an AZ whose NAT has not yet
|
|
7391
|
+
// carried a debug_* call is absent from the log and would be refused the
|
|
7392
|
+
// instant this flips. See docs/runbooks/ip-allowlist-rollout.md step 3.
|
|
7386
7393
|
defaultValue: false,
|
|
7387
7394
|
// Arming it changes who can reach production diagnostics. Worth one
|
|
7388
7395
|
// confirmation.
|
|
@@ -7397,20 +7404,34 @@ var FLAG_REGISTRY = [
|
|
|
7397
7404
|
// ENFORCE_FLAG (packages/api/src/middleware/ip-allowlist.ts) is null, so no
|
|
7398
7405
|
// flag is consulted and no flag flip can arm it.
|
|
7399
7406
|
//
|
|
7400
|
-
// Why it is not simply a second flag defaulting false
|
|
7401
|
-
//
|
|
7402
|
-
//
|
|
7403
|
-
//
|
|
7404
|
-
//
|
|
7405
|
-
//
|
|
7406
|
-
//
|
|
7407
|
+
// Why it is not simply a second flag defaulting false (CORRECTED, ENG-10664):
|
|
7408
|
+
//
|
|
7409
|
+
// This comment used to say the callers are agent HOSTS, most of which have no
|
|
7410
|
+
// allowlistable address per ADR-0032. That is the wrong caller. Agent hosts do
|
|
7411
|
+
// not call this surface at all: its handler's first act is
|
|
7412
|
+
// validateMcpAccessToken() against `mcp_oauth_tokens` (routes/mcp.ts:87, token
|
|
7413
|
+
// check at :91), so a host JWT is rejected outright - routes/host-runtime.ts
|
|
7414
|
+
// :33421 says so in as many words, which is why the ENG-4724 /host/* twins
|
|
7415
|
+
// exist. The caller set is remote MCP OAuth clients, structurally.
|
|
7416
|
+
//
|
|
7417
|
+
// The conclusion is unchanged and ONLY the reason has moved. Allowlisting this
|
|
7418
|
+
// surface would mean pinning a THIRD PARTY's egress ranges rather than our own
|
|
7419
|
+
// NAT EIPs - a different control, a different owner, a different failure mode:
|
|
7420
|
+
// they move a range and agent MCP access breaks with no signal on our side.
|
|
7421
|
+
// Per docs/runbooks/composio-allowlist-rollout.md this class of change has no
|
|
7407
7422
|
// fleet-level undo. A flag would leave that one toggle away during an
|
|
7408
7423
|
// incident, from someone who had just armed the admin-debug surface and
|
|
7409
7424
|
// reasonably assumed the pair moved together. Requiring a code change puts
|
|
7410
7425
|
// review in front of an irreversible action, which is the right price.
|
|
7411
7426
|
//
|
|
7412
|
-
//
|
|
7413
|
-
//
|
|
7427
|
+
// Keeping the false rationale would have been worse than having none: a reader
|
|
7428
|
+
// who checked it would find it does not hold and might "fix" it by adding the
|
|
7429
|
+
// flag. That is the failure this rewrite exists to prevent.
|
|
7430
|
+
//
|
|
7431
|
+
// If we ever DECIDE to take on that third-party dependency deliberately,
|
|
7432
|
+
// adding the flag here and a key in ENFORCE_FLAG is a small diff - but it is a
|
|
7433
|
+
// decision to own someone else's egress, not a discovery that the population
|
|
7434
|
+
// was allowlistable all along.
|
|
7414
7435
|
];
|
|
7415
7436
|
var REGISTRY_BY_KEY = new Map(FLAG_REGISTRY.map((definition) => [definition.key, definition]));
|
|
7416
7437
|
function getFlagDefinition(key) {
|
|
@@ -9884,21 +9905,80 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
|
|
|
9884
9905
|
// ancestors too - a wider style mutation than intended, for a probe whose
|
|
9885
9906
|
// result the caller then rejects anyway.
|
|
9886
9907
|
function textNodeAtPointThrough(x,y,target){
|
|
9908
|
+
return throughOverlays(x,y,target,function(){ return textNodeAtPoint(x,y); });
|
|
9909
|
+
}
|
|
9910
|
+
// Run probe() with everything stacked IN FRONT of target muted for pointer
|
|
9911
|
+
// hit-testing, then restore it. Shared by the text-node probe above and the
|
|
9912
|
+
// caret placement below (ENG-10632), so there is one overlay-muting path.
|
|
9913
|
+
// A target that is not in the hit stack (or no elementsFromPoint at all) runs
|
|
9914
|
+
// the probe unmuted, for the reason given on textNodeAtPointThrough.
|
|
9915
|
+
function throughOverlays(x,y,target,probe){
|
|
9887
9916
|
var stack;
|
|
9888
|
-
try{ stack=document.elementsFromPoint(x,y)||[]; }catch(e){ return
|
|
9917
|
+
try{ stack=document.elementsFromPoint(x,y)||[]; }catch(e){ return probe(); }
|
|
9889
9918
|
var cut=-1, i;
|
|
9890
|
-
for(i=0;i<stack.length;i++){ if(stack[i]===target){ cut=i; break; } }
|
|
9891
|
-
if(cut<0) return
|
|
9919
|
+
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; } }
|
|
9920
|
+
if(cut<0) return probe();
|
|
9892
9921
|
var muted=[];
|
|
9893
9922
|
for(i=0;i<cut;i++){
|
|
9894
9923
|
muted.push([stack[i], stack[i].style ? stack[i].style.pointerEvents : '']);
|
|
9895
9924
|
try{ stack[i].style.pointerEvents='none'; }catch(e){}
|
|
9896
9925
|
}
|
|
9897
|
-
try{ return
|
|
9926
|
+
try{ return probe(); }
|
|
9898
9927
|
finally{
|
|
9899
9928
|
for(i=0;i<muted.length;i++){ try{ muted[i][0].style.pointerEvents=muted[i][1]||''; }catch(e){} }
|
|
9900
9929
|
}
|
|
9901
9930
|
}
|
|
9931
|
+
// ENG-10632: is this pointer event aimed INSIDE the open editor?
|
|
9932
|
+
//
|
|
9933
|
+
// 'direct' - the event's own target is the editor or inside it (no overlay).
|
|
9934
|
+
// 'through' - the target is something laid over the editor (a deck click
|
|
9935
|
+
// zone), but the editor is in the hit stack under the pointer.
|
|
9936
|
+
// null - no edit is open, or the press is genuinely elsewhere.
|
|
9937
|
+
//
|
|
9938
|
+
// WHY NOT e.target ALONE. That is exactly the ENG-8477 blind spot: a pointer
|
|
9939
|
+
// event targets the HIT-TEST result, and a deck's full-viewport zones win the
|
|
9940
|
+
// hit test, so e.target is the zone for every press on slide text. ENG-8477
|
|
9941
|
+
// fixed the click that OPENS an editor this way and left the guards that
|
|
9942
|
+
// protect an OPEN editor keyed on e.target, so the second click - the one that
|
|
9943
|
+
// places the caret - was handed to the zone and paged the slide.
|
|
9944
|
+
//
|
|
9945
|
+
// A keydown is different: it targets the FOCUSED element, so the ENG-8500 key
|
|
9946
|
+
// guard's e.target test is correct and stays as it is.
|
|
9947
|
+
function pointInEditor(e){
|
|
9948
|
+
if(!editing || !e) return null;
|
|
9949
|
+
var t=e.target;
|
|
9950
|
+
if(t===editing || (editing.contains && t && t.nodeType && editing.contains(t))) return 'direct';
|
|
9951
|
+
if(typeof e.clientX!=='number' || typeof e.clientY!=='number') return null;
|
|
9952
|
+
var stack;
|
|
9953
|
+
try{ stack=document.elementsFromPoint(e.clientX, e.clientY)||[]; }catch(err){ return null; }
|
|
9954
|
+
for(var i=0;i<stack.length;i++){
|
|
9955
|
+
var n=stack[i];
|
|
9956
|
+
if(n===editing || (editing.contains && n && n.nodeType && editing.contains(n))) return 'through';
|
|
9957
|
+
}
|
|
9958
|
+
return null;
|
|
9959
|
+
}
|
|
9960
|
+
// ENG-10632: put the caret where the viewer pressed, as the browser would have
|
|
9961
|
+
// if nothing covered the editor. The browser's own caret placement goes to the
|
|
9962
|
+
// topmost element, which is the overlay, so it places nothing in the text.
|
|
9963
|
+
// Returns true when a caret was placed inside the editor.
|
|
9964
|
+
function placeCaretAtPointThrough(x,y,el){
|
|
9965
|
+
return throughOverlays(x,y,el,function(){
|
|
9966
|
+
try{
|
|
9967
|
+
var node=null, offset=0, r=null;
|
|
9968
|
+
if(document.caretRangeFromPoint){
|
|
9969
|
+
r=document.caretRangeFromPoint(x,y);
|
|
9970
|
+
if(r){ node=r.startContainer; offset=r.startOffset||0; }
|
|
9971
|
+
} else if(document.caretPositionFromPoint){
|
|
9972
|
+
var p=document.caretPositionFromPoint(x,y);
|
|
9973
|
+
if(p){ node=p.offsetNode; offset=p.offset||0; }
|
|
9974
|
+
}
|
|
9975
|
+
if(!node || !(node===el || (el.contains && el.contains(node.nodeType===3 ? node.parentNode||node.parentElement : node)))) return false;
|
|
9976
|
+
if(!r){ r=document.createRange(); r.setStart(node, offset); r.collapse(true); }
|
|
9977
|
+
var s=document.getSelection(); s.removeAllRanges(); s.addRange(r);
|
|
9978
|
+
return true;
|
|
9979
|
+
}catch(err){ return false; }
|
|
9980
|
+
});
|
|
9981
|
+
}
|
|
9902
9982
|
// Index of a text node among its parent's child TEXT nodes, in order - the same
|
|
9903
9983
|
// counting the server uses to re-locate it in source_html (ENG-6856).
|
|
9904
9984
|
function textIndexOf(container, tn){
|
|
@@ -9906,6 +9986,13 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
|
|
|
9906
9986
|
for(var k=0;k<ns.length;k++){ if(ns[k].nodeType===3){ i++; if(ns[k]===tn) return i; } }
|
|
9907
9987
|
return -1;
|
|
9908
9988
|
}
|
|
9989
|
+
function keepCaretIn(el){
|
|
9990
|
+
try{
|
|
9991
|
+
var s=document.getSelection(), n=s && s.rangeCount ? s.anchorNode : null;
|
|
9992
|
+
if(n && (n===el || (el.contains && el.contains(n.nodeType===3 ? n.parentNode : n)))) return;
|
|
9993
|
+
}catch(err){}
|
|
9994
|
+
placeCaretEnd(el);
|
|
9995
|
+
}
|
|
9909
9996
|
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
9997
|
// The Save/Cancel toolbar anchored above el. Shared by whole-element edits
|
|
9911
9998
|
// (startEdit) and per-text-node edits (startEditTextNode).
|
|
@@ -10115,9 +10202,35 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
|
|
|
10115
10202
|
// press that lands inside the editor. A press anywhere else is the viewer
|
|
10116
10203
|
// leaving, and the artefact keeps it.
|
|
10117
10204
|
window.addEventListener('pointerdown', function(e){
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
|
|
10205
|
+
// ENG-10632: "inside the editor" is decided through the hit stack, not from
|
|
10206
|
+
// e.target, which a deck's click zone always wins. See pointInEditor.
|
|
10207
|
+
var where=pointInEditor(e);
|
|
10208
|
+
if(!where) return;
|
|
10209
|
+
e.stopImmediatePropagation();
|
|
10210
|
+
if(where==='through'){
|
|
10211
|
+
// The overlay is the browser's hit target, so its default action would
|
|
10212
|
+
// move focus off the editor and place no caret in the text. Take both over.
|
|
10213
|
+
try{ e.preventDefault(); }catch(err){}
|
|
10214
|
+
try{ editing.focus(); }catch(err){}
|
|
10215
|
+
// The press is suppressed either way, so a probe that cannot resolve a
|
|
10216
|
+
// point inside the editor must not leave it without a caret: keep one the
|
|
10217
|
+
// editor already holds, otherwise put it at the end of the text.
|
|
10218
|
+
if(!placeCaretAtPointThrough(e.clientX, e.clientY, editing)) keepCaretIn(editing);
|
|
10219
|
+
}
|
|
10220
|
+
}, true);
|
|
10221
|
+
// ENG-10632: the same press also arrives as mousedown and click, and the deck
|
|
10222
|
+
// can page on either. Only a press that went THROUGH an overlay into the open
|
|
10223
|
+
// editor is swallowed; a direct press keeps its native behaviour (caret,
|
|
10224
|
+
// drag-select), and a press anywhere else is the viewer leaving and is left to
|
|
10225
|
+
// the artefact.
|
|
10226
|
+
window.addEventListener('mousedown', function(e){
|
|
10227
|
+
if(pointInEditor(e)!=='through') return;
|
|
10228
|
+
try{ e.preventDefault(); }catch(err){}
|
|
10229
|
+
e.stopImmediatePropagation();
|
|
10230
|
+
}, true);
|
|
10231
|
+
window.addEventListener('click', function(e){
|
|
10232
|
+
if(pointInEditor(e)!=='through') return;
|
|
10233
|
+
try{ e.preventDefault(); }catch(err){}
|
|
10121
10234
|
e.stopImmediatePropagation();
|
|
10122
10235
|
}, true);
|
|
10123
10236
|
// ENG-8477: the hover affordance has the same blind spot as the click did -
|
|
@@ -15087,4 +15200,4 @@ export {
|
|
|
15087
15200
|
peekCurrentSession,
|
|
15088
15201
|
readDailySessionPin
|
|
15089
15202
|
};
|
|
15090
|
-
//# sourceMappingURL=chunk-
|
|
15203
|
+
//# sourceMappingURL=chunk-VRYNZ3G5.js.map
|