@integrity-labs/agt-cli 0.28.826 → 0.28.827

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-JO7QTVLM.js";
43
+ } from "../chunk-VOQ25S2E.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
47
47
  readDirectChatSessionState
48
- } from "../chunk-Q3JUZZDB.js";
48
+ } from "../chunk-6HTCP6D5.js";
49
49
  import {
50
50
  AnchorSessionClient,
51
51
  CHANNEL_REGISTRY,
@@ -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.826" : "dev";
5470
+ var cliVersion = true ? "0.28.827" : "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.826" : "dev";
6661
+ var cliVersion2 = true ? "0.28.827" : "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) => {
@@ -3522,11 +3522,24 @@ function failoverRestartNotice(input) {
3522
3522
  if (!entry) return null;
3523
3523
  const fromRole = roleFromAuthComponent(entry.from);
3524
3524
  const toRole = roleFromAuthComponent(entry.to);
3525
- if (fromRole === toRole) return null;
3526
- const model = input.policy ? modelEnvForRole(input.policy, toRole).ANTHROPIC_MODEL : void 0;
3527
- const onto = model ? `${toRole} model provider (${model})` : `${toRole} model provider`;
3528
- const direction = toRole === "primary" ? `Your manager is switching you back to your ${onto}.` : `Your manager is switching you to your ${onto} \u2014 this policy has failed over.`;
3529
- return `${direction} Claude Code applies the provider and model at launch, so your session will restart shortly to make the switch.`;
3525
+ if (fromRole !== toRole) {
3526
+ const model = input.currentModel;
3527
+ const onto = model ? `${toRole} model provider (${model})` : `${toRole} model provider`;
3528
+ const direction = toRole === "primary" ? `Your manager is switching you back to your ${onto}.` : `Your manager is switching you to your ${onto} \u2014 this policy has failed over.`;
3529
+ return {
3530
+ reason: "failover",
3531
+ text: `${direction} Claude Code applies the provider and model at launch, so your session will restart shortly to make the switch.`
3532
+ };
3533
+ }
3534
+ const { previousModel, currentModel } = input;
3535
+ if (!previousModel || !currentModel || previousModel === currentModel) return null;
3536
+ return {
3537
+ reason: "model-change",
3538
+ text: `Your model was changed to ${currentModel}. Claude Code applies the model at launch, so your session will restart shortly to make the switch.`
3539
+ };
3540
+ }
3541
+ function policyResolvedModel(input) {
3542
+ return resolveModelPolicySpawnEnv(input).modelEnv.ANTHROPIC_MODEL;
3530
3543
  }
3531
3544
  function roleFromAuthComponent(value) {
3532
3545
  const at = value.lastIndexOf("/");
@@ -5261,6 +5274,7 @@ export {
5261
5274
  modelPolicyAuthComponent,
5262
5275
  modelPolicyEgressDomains,
5263
5276
  failoverRestartNotice,
5277
+ policyResolvedModel,
5264
5278
  resolveOAuthCredAction,
5265
5279
  resolveClaudeBinary,
5266
5280
  isolationMode,
@@ -5312,4 +5326,4 @@ export {
5312
5326
  stopAllSessionsAndWait,
5313
5327
  getProjectDir
5314
5328
  };
5315
- //# sourceMappingURL=chunk-Q3JUZZDB.js.map
5329
+ //# sourceMappingURL=chunk-6HTCP6D5.js.map