@integrity-labs/agt-cli 0.28.869 → 0.28.871

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.
@@ -90,8 +90,16 @@ gh api repos/OWNER/NAME/contents/CLAUDE.md?ref=HEAD_SHA --jq .content
90
90
  gh api repos/OWNER/NAME/contents/docs/reference/review-rules.md?ref=HEAD_SHA --jq .content
91
91
  ```
92
92
 
93
- Both are base64; decode them. Both may 404, which is fine and normal most
94
- repos have neither.
93
+ Both are base64; decode them. **Issue both requests before you begin step 4
94
+ this is not optional.** Either may 404, which is fine and normal: most repos
95
+ have neither.
96
+
97
+ Record which happened, because "absent" and "never asked" are different facts
98
+ and the artefact cannot tell them apart on its own. `rulesFile` is the path when
99
+ the fetch returned content (at either ref), and `null` **only after you have
100
+ actually observed a 404 at both**. If you did not issue the request, the review is `incomplete` with that as
101
+ the reason — a review conducted without rules it never looked for must not be
102
+ filed as though the rules were absent.
95
103
 
96
104
  Where `review-rules.md` exists it **outranks your priors**: a rule saying "this
97
105
  is deliberate here, do not flag it" exists because a reviewer already raised
@@ -99,9 +107,25 @@ that exact thing and a human said no. Where it does not exist, review anyway and
99
107
  say so in your summary — a repo without one gets a generic review, which is
100
108
  worth having and worth labelling as such.
101
109
 
102
- Pin both reads to `HEAD_SHA`. Reading the default branch's rules against a
110
+ Pin both reads to `HEAD_SHA` first. Reading the default branch's rules against a
103
111
  branch's code compares the change to something it was never written against.
104
112
 
113
+ **If `review-rules.md` 404s at `HEAD_SHA`, retry it at the default branch, and
114
+ record which ref supplied it.** A branch cut before the rules file landed — or
115
+ simply never merged forward — has no copy of it at its own head, and that is the
116
+ common case, not the rare one: measured 2026-09-08, **8 of the 12 newest open
117
+ PRs** 404 on it. Pinning alone therefore withholds the corpus from most reviews
118
+ precisely while it is newest. Rules describe the repo's current standards rather
119
+ than the branch's snapshot, so the fallback is sound; what would not be sound is
120
+ applying them without saying so. Set `rulesRef` to `"head"` or `"default"`
121
+ alongside `rulesFile`.
122
+
123
+ Do NOT pipe or redirect these commands. Use `--jq` on the `gh` call itself and
124
+ read the output directly. A reviewer runs unattended under a tool allowlist
125
+ narrow enough that it cannot post to GitHub, and `gh … | jq` or `gh … > file`
126
+ is a compound command that such an allowlist rejects — so composing a shell
127
+ pipeline costs you turns and buys nothing.
128
+
105
129
  ## 4. Review
106
130
 
107
131
  Prioritise, in this order:
@@ -157,6 +181,7 @@ directory (create it if absent):
157
181
  "head": "abc123def456",
158
182
  "reviewedAt": "2026-09-07T00:00:00Z",
159
183
  "rulesFile": "docs/reference/review-rules.md",
184
+ "rulesRef": "head",
160
185
  "status": "reviewed",
161
186
  "findings": [
162
187
  {
package/dist/bin/agt.js CHANGED
@@ -40,12 +40,12 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-SJW4JNJQ.js";
43
+ } from "../chunk-74PZNNGN.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
47
47
  readDirectChatSessionState
48
- } from "../chunk-EK7QNCEO.js";
48
+ } from "../chunk-QYI3M3WC.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-EOEAZDKE.js";
82
+ } from "../chunk-XK54CUEP.js";
83
83
  import "../chunk-XWVM4KPK.js";
84
84
 
85
85
  // src/bin/agt.ts
@@ -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.869" : "dev";
5470
+ var cliVersion = true ? "0.28.871" : "dev";
5471
5471
  async function fetchLatestVersion() {
5472
5472
  const host2 = getHost();
5473
5473
  if (!host2) return null;
@@ -6658,7 +6658,7 @@ function handleError(err) {
6658
6658
  }
6659
6659
 
6660
6660
  // src/bin/agt.ts
6661
- var cliVersion2 = true ? "0.28.869" : "dev";
6661
+ var cliVersion2 = true ? "0.28.871" : "dev";
6662
6662
  var program = new Command();
6663
6663
  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");
6664
6664
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -16,7 +16,7 @@ import {
16
16
  parseEnvIntegrations,
17
17
  shellQuote,
18
18
  summarizeUnanswerablePane
19
- } from "./chunk-EK7QNCEO.js";
19
+ } from "./chunk-QYI3M3WC.js";
20
20
  import {
21
21
  BIND_FAILURE_QUARANTINE_THRESHOLD,
22
22
  INTEGRATIONS_SECTION_END,
@@ -76,7 +76,7 @@ import {
76
76
  sessionTranscriptDir,
77
77
  worseConnectivityOutcome,
78
78
  wrapScheduledTaskPrompt
79
- } from "./chunk-EOEAZDKE.js";
79
+ } from "./chunk-XK54CUEP.js";
80
80
  import {
81
81
  parsePsRows
82
82
  } from "./chunk-XWVM4KPK.js";
@@ -3341,7 +3341,50 @@ function provisionIsolationHook(codeName, agentId) {
3341
3341
  const hookScriptPath = join4(claudeDir, "agt-isolation-hook.sh");
3342
3342
  const hookScript = [
3343
3343
  "#!/bin/bash",
3344
- "# Auto-generated by Augmented \u2014 prevents cross-agent file access.",
3344
+ "# Auto-generated by Augmented.",
3345
+ "#",
3346
+ "# WHAT THIS IS: a guard against ACCIDENTS. It catches an agent that reaches",
3347
+ "# for another agent's directory by mistake, and it says so in isolation.log.",
3348
+ "#",
3349
+ "# WHAT THIS IS NOT: a confidentiality boundary. ENG-10266 settled this",
3350
+ "# explicitly, and the reasons are structural rather than fixable here:",
3351
+ "#",
3352
+ "# 1. THE SUBJECT CAN REWRITE THIS FILE. Every agent runs as uid=0, and this",
3353
+ "# script and the settings.local.json that registers it both live inside",
3354
+ "# the agent directory this hook constrains. An ordinary file write",
3355
+ "# disables it. Moving the file elsewhere does not help: a root process",
3356
+ "# on a shared filesystem reaches wherever it is put.",
3357
+ "#",
3358
+ "# 2. IT MATCHES RAW PRE-EXPANSION TEXT, and that fails in BOTH directions",
3359
+ "# depending on WHERE the expansion sits. The two cases are different and",
3360
+ "# worth keeping apart:",
3361
+ "#",
3362
+ "# HIDDEN BASE -> under-blocks (the hole). If the expansion hides the base",
3363
+ "# path itself, the literal text this greps for never appears, the branch",
3364
+ "# exits 0, and the shell expands afterwards. Verified:",
3365
+ "# ~/.augmented/<other>/x does not fire, proceeds",
3366
+ "# $HOME/.augmented/<other>/x does not fire, proceeds",
3367
+ "# The platform's own CLAUDE.md documents working paths in tilde form, so",
3368
+ "# the spelling agents are taught is the spelling this cannot see.",
3369
+ "#",
3370
+ "# EXPANSION AFTER THE BASE -> over-blocks (a false positive). The literal",
3371
+ "# base IS present, so the branch fires, takes the unexpanded token as the",
3372
+ "# agent segment, finds it in no allowlist, and refuses. Verified:",
3373
+ "# /root/.augmented/$CN/x fires, AGENT_DIR=[$CN] -> BLOCK",
3374
+ "# /root/.augmented/${VAR}/x fires, AGENT_DIR=[${VAR}] -> BLOCK",
3375
+ "# This refuses commands that were going nowhere near another agent.",
3376
+ "#",
3377
+ "# 3. IT OVER-BLOCKS ON PUNCTUATION TOO. [^/]+ does not stop at a shell",
3378
+ "# metacharacter, so `ls /root/.augmented/<self> && echo hi` yields an",
3379
+ "# AGENT_DIR of `<self> && echo hi`, which matches no allowlist entry and",
3380
+ "# is refused. Agents have been blocked from their OWN directories this",
3381
+ "# way, repeatedly. Check isolation.log before reading an entry as an",
3382
+ "# attempted breach: most of them are not.",
3383
+ "#",
3384
+ "# Real isolation between co-located agents needs OS enforcement - a uid per",
3385
+ "# agent, a mount namespace, or a container per agent (ENG-4745, ENG-6633).",
3386
+ "# Do not treat a passing hook as evidence that separation exists.",
3387
+ "#",
3345
3388
  "# Exit 0 = allow, Exit 2 = block (with stderr message shown to agent)",
3346
3389
  "set -euo pipefail",
3347
3390
  "INPUT=$(cat)",
@@ -6728,7 +6771,7 @@ function exchangeFailureKind(err) {
6728
6771
  }
6729
6772
 
6730
6773
  // src/lib/api-client.ts
6731
- var agtCliVersion = true ? "0.28.869" : "dev";
6774
+ var agtCliVersion = true ? "0.28.871" : "dev";
6732
6775
  var lastConfigHash = null;
6733
6776
  function setConfigHash(hash) {
6734
6777
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -11338,4 +11381,4 @@ export {
11338
11381
  managerInstallSystemUnitCommand,
11339
11382
  managerUninstallSystemUnitCommand
11340
11383
  };
11341
- //# sourceMappingURL=chunk-SJW4JNJQ.js.map
11384
+ //# sourceMappingURL=chunk-74PZNNGN.js.map