@integrity-labs/agt-cli 0.28.1041 → 0.28.1042

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-7ORA3ZVJ.js";
43
+ } from "../chunk-JPE2SHWA.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
47
47
  readDirectChatSessionState
48
- } from "../chunk-OHT4PWAK.js";
48
+ } from "../chunk-JGPCLZFP.js";
49
49
  import {
50
50
  AnchorSessionClient,
51
51
  CHANNEL_REGISTRY,
@@ -5474,7 +5474,7 @@ import { execFileSync, execSync } from "child_process";
5474
5474
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5475
5475
  import chalk18 from "chalk";
5476
5476
  import ora16 from "ora";
5477
- var cliVersion = true ? "0.28.1041" : "dev";
5477
+ var cliVersion = true ? "0.28.1042" : "dev";
5478
5478
  async function fetchLatestVersion() {
5479
5479
  const host2 = getHost();
5480
5480
  if (!host2) return null;
@@ -6734,7 +6734,7 @@ function handleError(err) {
6734
6734
  }
6735
6735
 
6736
6736
  // src/bin/agt.ts
6737
- var cliVersion2 = true ? "0.28.1041" : "dev";
6737
+ var cliVersion2 = true ? "0.28.1042" : "dev";
6738
6738
  var program = new Command();
6739
6739
  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");
6740
6740
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -3722,12 +3722,51 @@ function roleFromAuthComponent(value) {
3722
3722
  // src/lib/project-claude-settings.ts
3723
3723
  import { existsSync as existsSync5, mkdirSync as mkdirSync5, readFileSync as readFileSync6, renameSync as renameSync2, unlinkSync, writeFileSync as writeFileSync4 } from "fs";
3724
3724
  import { join as join6 } from "path";
3725
+
3726
+ // ../../packages/core/dist/provisioning/frameworks/claudecode/deny-permissions.js
3727
+ var SECRETS_DENY_PERMISSIONS = [
3728
+ // Read blocks
3729
+ "Read(**/.env*)",
3730
+ "Read(**/.dev.vars*)",
3731
+ "Read(**/*.pem)",
3732
+ "Read(**/*.key)",
3733
+ "Read(**/secrets/**)",
3734
+ "Read(**/credentials/**)",
3735
+ "Read(**/credentials.json)",
3736
+ "Read(**/.aws/**)",
3737
+ // gcloud stores ADC + cached access/refresh tokens under ~/.config/gcloud/
3738
+ // (application_default_credentials.json, credentials.db, access_tokens.db).
3739
+ // Brokered GCP access flows via CLOUDSDK_AUTH_ACCESS_TOKEN env, never these
3740
+ // files, so denying reads here is the GCP analogue of the .aws/ block.
3741
+ "Read(**/.config/gcloud/**)",
3742
+ "Read(**/.ssh/**)",
3743
+ "Read(**/config/database.yml)",
3744
+ "Read(**/config/credentials.json)",
3745
+ "Read(**/.npmrc)",
3746
+ "Read(**/.pypirc)",
3747
+ // Write blocks
3748
+ "Write(**/.env*)",
3749
+ "Write(**/secrets/**)",
3750
+ "Write(**/.ssh/**)"
3751
+ ];
3752
+ var CLAUDE_ARTIFACT_TOOLS_DENY = [
3753
+ "Artifact",
3754
+ "ArtifactComments",
3755
+ "ArtifactData"
3756
+ ];
3757
+ var PLATFORM_DENY_PERMISSIONS = [
3758
+ ...SECRETS_DENY_PERMISSIONS,
3759
+ ...CLAUDE_ARTIFACT_TOOLS_DENY
3760
+ ];
3761
+
3762
+ // src/lib/project-claude-settings.ts
3725
3763
  function writeProjectClaudeSettings(args) {
3726
3764
  const { projectDir, managed } = args;
3765
+ const deny = args.deny ?? PLATFORM_DENY_PERMISSIONS;
3727
3766
  const path = join6(projectDir, ".claude", "settings.json");
3728
3767
  try {
3729
3768
  const fileExists = existsSync5(path);
3730
- if (Object.keys(managed).length === 0 && !fileExists) return { kind: "noop" };
3769
+ if (Object.keys(managed).length === 0 && deny.length === 0 && !fileExists) return { kind: "noop" };
3731
3770
  let existing = {};
3732
3771
  let backup = null;
3733
3772
  if (fileExists) {
@@ -3750,6 +3789,16 @@ function writeProjectClaudeSettings(args) {
3750
3789
  if (key in managed) next[key] = managed[key];
3751
3790
  else delete next[key];
3752
3791
  }
3792
+ let denyAdded = false;
3793
+ if (deny.length > 0) {
3794
+ const perms = next["permissions"] !== null && typeof next["permissions"] === "object" && !Array.isArray(next["permissions"]) ? { ...next["permissions"] } : {};
3795
+ const current = Array.isArray(perms["deny"]) ? perms["deny"].filter((d) => typeof d === "string") : [];
3796
+ const merged = [...current];
3797
+ for (const rule of deny) if (!merged.includes(rule)) merged.push(rule);
3798
+ denyAdded = merged.length !== current.length || !Array.isArray(perms["deny"]);
3799
+ perms["deny"] = merged;
3800
+ next["permissions"] = perms;
3801
+ }
3753
3802
  if (Object.keys(next).length === 0) {
3754
3803
  if (backup) return { kind: "recovered", path, backup, rewritten: false };
3755
3804
  if (fileExists) {
@@ -3766,7 +3815,11 @@ function writeProjectClaudeSettings(args) {
3766
3815
  mkdirSync5(join6(projectDir, ".claude"), { recursive: true });
3767
3816
  writeFileSync4(path, serialized, { mode: 384 });
3768
3817
  if (backup) return { kind: "recovered", path, backup, rewritten: true };
3769
- return { kind: "written", path, keys: Object.keys(managed) };
3818
+ return {
3819
+ kind: "written",
3820
+ path,
3821
+ keys: [...Object.keys(managed), ...denyAdded ? ["permissions.deny"] : []]
3822
+ };
3770
3823
  } catch (err) {
3771
3824
  return { kind: "failed", path, error: err instanceof Error ? err.message : String(err) };
3772
3825
  }
@@ -5803,6 +5856,7 @@ function getProjectDir(codeName) {
5803
5856
  }
5804
5857
 
5805
5858
  export {
5859
+ PLATFORM_DENY_PERMISSIONS,
5806
5860
  agentTmpDirFor,
5807
5861
  buildRemoteMcpEntry,
5808
5862
  buildLiveHeaderRemoteMcpProxyEntry,
@@ -5930,4 +5984,4 @@ export {
5930
5984
  stopAllSessionsAndWait,
5931
5985
  getProjectDir
5932
5986
  };
5933
- //# sourceMappingURL=chunk-OHT4PWAK.js.map
5987
+ //# sourceMappingURL=chunk-JGPCLZFP.js.map