@integrity-labs/agt-cli 0.28.934 → 0.28.936
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,7 +40,7 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-LN64VNHI.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5467
5467
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5468
5468
|
import chalk18 from "chalk";
|
|
5469
5469
|
import ora16 from "ora";
|
|
5470
|
-
var cliVersion = true ? "0.28.
|
|
5470
|
+
var cliVersion = true ? "0.28.936" : "dev";
|
|
5471
5471
|
async function fetchLatestVersion() {
|
|
5472
5472
|
const host2 = getHost();
|
|
5473
5473
|
if (!host2) return null;
|
|
@@ -6727,7 +6727,7 @@ function handleError(err) {
|
|
|
6727
6727
|
}
|
|
6728
6728
|
|
|
6729
6729
|
// src/bin/agt.ts
|
|
6730
|
-
var cliVersion2 = true ? "0.28.
|
|
6730
|
+
var cliVersion2 = true ? "0.28.936" : "dev";
|
|
6731
6731
|
var program = new Command();
|
|
6732
6732
|
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");
|
|
6733
6733
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -3389,7 +3389,10 @@ function provisionIsolationHook(codeName, agentId) {
|
|
|
3389
3389
|
"# segment now stops at whitespace and shell metacharacters, so",
|
|
3390
3390
|
"# `cd <base>/<self> && ls x 2>/dev/null` is no longer read as an agent",
|
|
3391
3391
|
"# named `<self> && ls x 2>`. Check isolation.log before reading an entry",
|
|
3392
|
-
"# as an attempted breach all the same
|
|
3392
|
+
"# as an attempted breach all the same - and since CS-1691 the log says",
|
|
3393
|
+
"# which is which: BLOCKED is a resolved reach into another agent, and",
|
|
3394
|
+
"# REFUSED is a path nothing could resolve before execution (a glob, a",
|
|
3395
|
+
"# variable), which fires on an agent own directory routinely.",
|
|
3393
3396
|
"#",
|
|
3394
3397
|
"# Real isolation between co-located agents needs OS enforcement - a uid per",
|
|
3395
3398
|
"# agent, a mount namespace, or a container per agent (ENG-4745, ENG-6633).",
|
|
@@ -3439,8 +3442,20 @@ function provisionIsolationHook(codeName, agentId) {
|
|
|
3439
3442
|
"# for an accident-guard; not something to lean on as a boundary.",
|
|
3440
3443
|
`OWN_REAL=$(basename -- "$(realpath -m -- "$AUGMENTED_BASE/${codeName}" 2>/dev/null || printf '%s' "${codeName}")")`,
|
|
3441
3444
|
"",
|
|
3445
|
+
"# CS-1691: TWO verbs, because this log is the only audit surface the guard",
|
|
3446
|
+
"# has and it used to write both cases in the same words.",
|
|
3447
|
+
"# BLOCKED - a RESOLVED path into another agent directory. A real reach.",
|
|
3448
|
+
"# REFUSED - the path could not be resolved before execution (a glob, an",
|
|
3449
|
+
"# unexpanded variable). Refusing is correct, since nothing here",
|
|
3450
|
+
"# can know where it points - but it is NOT evidence of an",
|
|
3451
|
+
"# attempt, and it fires on an agent OWN directory routinely: a",
|
|
3452
|
+
"# glob over the base matches every sibling and the agent too.",
|
|
3453
|
+
"# Measured before this split: 3 of one agent 5 entries, and 36 of another",
|
|
3454
|
+
"# 36, were REFUSED-class while reading as BLOCKED. `grep BLOCKED` now",
|
|
3455
|
+
'# answers "has anything actually reached across", which is the question',
|
|
3456
|
+
"# people were already using this file to ask.",
|
|
3442
3457
|
"deny() {",
|
|
3443
|
-
' echo "$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
3458
|
+
' echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) $1 $2" >> "$LOG_FILE" 2>/dev/null || true',
|
|
3444
3459
|
` echo "Access denied: you cannot access other agents' directories." >&2`,
|
|
3445
3460
|
" exit 2",
|
|
3446
3461
|
"}",
|
|
@@ -3532,8 +3547,10 @@ function provisionIsolationHook(codeName, agentId) {
|
|
|
3532
3547
|
" # Refuse a path INTO the segment, a segment that is a directory (an",
|
|
3533
3548
|
" # agent dir named with no trailing slash), or one still to be expanded.",
|
|
3534
3549
|
" # A plain file at the base, such as manager.log, is not an agent.",
|
|
3535
|
-
' if
|
|
3536
|
-
' deny "bash targeting $AUGMENTED_BASE/$AGENT_DIR"',
|
|
3550
|
+
' if has_expansion "$AGENT_DIR"; then',
|
|
3551
|
+
' deny REFUSED "bash targeting $AUGMENTED_BASE/$AGENT_DIR"',
|
|
3552
|
+
' elif [ "$REST" != "$AGENT_DIR" ] || [ -d "$AUGMENTED_BASE/$AGENT_DIR" ]; then',
|
|
3553
|
+
' deny BLOCKED "bash targeting $AUGMENTED_BASE/$AGENT_DIR"',
|
|
3537
3554
|
" fi",
|
|
3538
3555
|
" fi",
|
|
3539
3556
|
' done <<< "$OCCURRENCES"',
|
|
@@ -3546,8 +3563,10 @@ function provisionIsolationHook(codeName, agentId) {
|
|
|
3546
3563
|
' PREST=${POCC#"$CLAUDE_PROJECTS_BASE"/}',
|
|
3547
3564
|
" PROJ_DIR=${PREST%/}",
|
|
3548
3565
|
' case "$PROJ_DIR" in .|..) continue ;; esac',
|
|
3549
|
-
' if
|
|
3550
|
-
' deny "bash targeting $CLAUDE_PROJECTS_BASE/$PROJ_DIR"',
|
|
3566
|
+
' if has_expansion "$PROJ_DIR"; then',
|
|
3567
|
+
' deny REFUSED "bash targeting $CLAUDE_PROJECTS_BASE/$PROJ_DIR"',
|
|
3568
|
+
' elif other_agent_project "$PROJ_DIR"; then',
|
|
3569
|
+
' deny BLOCKED "bash targeting $CLAUDE_PROJECTS_BASE/$PROJ_DIR"',
|
|
3551
3570
|
" fi",
|
|
3552
3571
|
' done <<< "$POCCURRENCES"',
|
|
3553
3572
|
" exit 0",
|
|
@@ -3573,15 +3592,19 @@ function provisionIsolationHook(codeName, agentId) {
|
|
|
3573
3592
|
' local REST=${P#"$CANON_BASE"/}',
|
|
3574
3593
|
" local AGENT_DIR=${REST%%/*}",
|
|
3575
3594
|
` if [ "$AGENT_DIR" != "${codeName}" ]${idAllowClause} && [ "$AGENT_DIR" != "$OWN_REAL" ] && [ "$AGENT_DIR" != "_mcp" ]; then`,
|
|
3576
|
-
' if
|
|
3577
|
-
' deny "$TOOL on $P"',
|
|
3595
|
+
' if has_expansion "$AGENT_DIR"; then',
|
|
3596
|
+
' deny REFUSED "$TOOL on $P"',
|
|
3597
|
+
' elif [ "$REST" != "$AGENT_DIR" ] || [ -d "$CANON_BASE/$AGENT_DIR" ]; then',
|
|
3598
|
+
' deny BLOCKED "$TOOL on $P"',
|
|
3578
3599
|
" fi",
|
|
3579
3600
|
" fi ;;",
|
|
3580
3601
|
` "$CANON_PROJECTS"/?*)`,
|
|
3581
3602
|
' local PREST=${P#"$CANON_PROJECTS"/}',
|
|
3582
3603
|
" local PROJ_DIR=${PREST%%/*}",
|
|
3583
|
-
' if
|
|
3584
|
-
' deny "$TOOL on $P"',
|
|
3604
|
+
' if has_expansion "$PROJ_DIR"; then',
|
|
3605
|
+
' deny REFUSED "$TOOL on $P"',
|
|
3606
|
+
' elif other_agent_project "$PROJ_DIR"; then',
|
|
3607
|
+
' deny BLOCKED "$TOOL on $P"',
|
|
3585
3608
|
" fi ;;",
|
|
3586
3609
|
" esac",
|
|
3587
3610
|
" return 0",
|
|
@@ -6942,7 +6965,7 @@ function exchangeFailureKind(err) {
|
|
|
6942
6965
|
}
|
|
6943
6966
|
|
|
6944
6967
|
// src/lib/api-client.ts
|
|
6945
|
-
var agtCliVersion = true ? "0.28.
|
|
6968
|
+
var agtCliVersion = true ? "0.28.936" : "dev";
|
|
6946
6969
|
var lastConfigHash = null;
|
|
6947
6970
|
function setConfigHash(hash) {
|
|
6948
6971
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -11567,4 +11590,4 @@ export {
|
|
|
11567
11590
|
managerInstallSystemUnitCommand,
|
|
11568
11591
|
managerUninstallSystemUnitCommand
|
|
11569
11592
|
};
|
|
11570
|
-
//# sourceMappingURL=chunk-
|
|
11593
|
+
//# sourceMappingURL=chunk-LN64VNHI.js.map
|