@integrity-labs/agt-cli 0.28.710 → 0.28.712

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,10 +40,10 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-FDI4N2HO.js";
43
+ } from "../chunk-4OXDKMGC.js";
44
44
  import {
45
45
  readDirectChatSessionState
46
- } from "../chunk-SR2HUGEA.js";
46
+ } from "../chunk-F6AZ6KPI.js";
47
47
  import {
48
48
  AnchorSessionClient,
49
49
  CHANNEL_REGISTRY,
@@ -4909,7 +4909,7 @@ import { execFileSync, execSync } from "child_process";
4909
4909
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4910
4910
  import chalk18 from "chalk";
4911
4911
  import ora16 from "ora";
4912
- var cliVersion = true ? "0.28.710" : "dev";
4912
+ var cliVersion = true ? "0.28.712" : "dev";
4913
4913
  async function fetchLatestVersion() {
4914
4914
  const host2 = getHost();
4915
4915
  if (!host2) return null;
@@ -6089,7 +6089,7 @@ function handleError(err) {
6089
6089
  }
6090
6090
 
6091
6091
  // src/bin/agt.ts
6092
- var cliVersion2 = true ? "0.28.710" : "dev";
6092
+ var cliVersion2 = true ? "0.28.712" : "dev";
6093
6093
  var program = new Command();
6094
6094
  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");
6095
6095
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -12,7 +12,7 @@ import {
12
12
  parseEnvFileEntries,
13
13
  parseEnvIntegrations,
14
14
  shellQuote
15
- } from "./chunk-SR2HUGEA.js";
15
+ } from "./chunk-F6AZ6KPI.js";
16
16
  import {
17
17
  BIND_FAILURE_QUARANTINE_THRESHOLD,
18
18
  INTEGRATIONS_SECTION_END,
@@ -2060,9 +2060,38 @@ function resolveBrokerAgentId(codeName, fallback) {
2060
2060
  return fallback;
2061
2061
  return void 0;
2062
2062
  }
2063
+ function ensureWorkspaceTrusted(projectDir) {
2064
+ const configPath = join3(homedir3(), ".claude.json");
2065
+ try {
2066
+ let config = {};
2067
+ if (existsSync4(configPath)) {
2068
+ const raw = readFileSync4(configPath, "utf-8");
2069
+ if (raw.trim()) {
2070
+ config = JSON.parse(raw);
2071
+ }
2072
+ }
2073
+ const projects = config["projects"] ?? {};
2074
+ const entry = projects[projectDir] ?? {};
2075
+ if (entry["hasTrustDialogAccepted"] === true)
2076
+ return;
2077
+ entry["hasTrustDialogAccepted"] = true;
2078
+ projects[projectDir] = entry;
2079
+ config["projects"] = projects;
2080
+ const tmpPath = `${configPath}.agt-${process.pid}.tmp`;
2081
+ writeFileSync4(tmpPath, `${JSON.stringify(config, null, 2)}
2082
+ `, { mode: 384 });
2083
+ renameSync4(tmpPath, configPath);
2084
+ process.stderr.write(`[workspace-trust] [accepted] project=${projectDir}
2085
+ `);
2086
+ } catch (err) {
2087
+ process.stderr.write(`[workspace-trust] [ensure-failed] project=${projectDir} error=${err.message} \u2014 the first session may block on the workspace-trust prompt and respawn until a human answers it
2088
+ `);
2089
+ }
2090
+ }
2063
2091
  function deployArtifactsToProject(codeName, provisionDir) {
2064
2092
  const projectDir = getProjectDir(codeName);
2065
2093
  mkdirSync3(projectDir, { recursive: true });
2094
+ ensureWorkspaceTrusted(projectDir);
2066
2095
  try {
2067
2096
  mkdirSync3(getScratchDir(codeName), { recursive: true });
2068
2097
  mkdirSync3(getAgentTmpDir(codeName), { recursive: true });
@@ -6396,7 +6425,7 @@ function exchangeFailureKind(err) {
6396
6425
  }
6397
6426
 
6398
6427
  // src/lib/api-client.ts
6399
- var agtCliVersion = true ? "0.28.710" : "dev";
6428
+ var agtCliVersion = true ? "0.28.712" : "dev";
6400
6429
  var lastConfigHash = null;
6401
6430
  function setConfigHash(hash) {
6402
6431
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -10137,4 +10166,4 @@ export {
10137
10166
  managerInstallSystemUnitCommand,
10138
10167
  managerUninstallSystemUnitCommand
10139
10168
  };
10140
- //# sourceMappingURL=chunk-FDI4N2HO.js.map
10169
+ //# sourceMappingURL=chunk-4OXDKMGC.js.map