@integrity-labs/agt-cli 0.28.323 → 0.28.324

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
@@ -38,7 +38,7 @@ import {
38
38
  success,
39
39
  table,
40
40
  warn
41
- } from "../chunk-MLXFGOLB.js";
41
+ } from "../chunk-KHSPRKK2.js";
42
42
  import {
43
43
  AnchorSessionClient,
44
44
  CHANNEL_REGISTRY,
@@ -68,7 +68,7 @@ import {
68
68
  renderTemplate,
69
69
  resolveChannels,
70
70
  serializeManifestForSlackCli
71
- } from "../chunk-JTQ6RYGM.js";
71
+ } from "../chunk-BSTFCC62.js";
72
72
  import "../chunk-XWVM4KPK.js";
73
73
 
74
74
  // src/bin/agt.ts
@@ -4827,7 +4827,7 @@ import { execFileSync, execSync } from "child_process";
4827
4827
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4828
4828
  import chalk18 from "chalk";
4829
4829
  import ora16 from "ora";
4830
- var cliVersion = true ? "0.28.323" : "dev";
4830
+ var cliVersion = true ? "0.28.324" : "dev";
4831
4831
  async function fetchLatestVersion() {
4832
4832
  const host2 = getHost();
4833
4833
  if (!host2) return null;
@@ -5931,7 +5931,7 @@ function handleError(err) {
5931
5931
  }
5932
5932
 
5933
5933
  // src/bin/agt.ts
5934
- var cliVersion2 = true ? "0.28.323" : "dev";
5934
+ var cliVersion2 = true ? "0.28.324" : "dev";
5935
5935
  var program = new Command();
5936
5936
  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");
5937
5937
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -6733,9 +6733,10 @@ function resolveDmTarget(target, agent, people) {
6733
6733
  detail: `person ${effectivePersonId.person_id} not present in resolver people map`
6734
6734
  };
6735
6735
  }
6736
- const FALLBACK_ORDER = ["slack", "telegram"];
6736
+ const reachable = (m) => agent.dm_capable_mediums.includes(m) && personHasMedium(person, m);
6737
6737
  const preferredMedium = target.medium === "auto" ? null : target.medium;
6738
- const chosenMedium = preferredMedium ? agent.dm_capable_mediums.includes(preferredMedium) && personHasMedium(person, preferredMedium) ? preferredMedium : null : FALLBACK_ORDER.find((m) => agent.dm_capable_mediums.includes(m) && personHasMedium(person, m)) ?? null;
6738
+ const usePreferred = target.follow_reports_to ? person.preferred_channel : null;
6739
+ const chosenMedium = preferredMedium ? reachable(preferredMedium) ? preferredMedium : null : autoMediumOrder(usePreferred).find(reachable) ?? null;
6739
6740
  if (!chosenMedium) {
6740
6741
  return {
6741
6742
  ok: false,
@@ -6778,6 +6779,13 @@ function personHasMedium(person, medium) {
6778
6779
  return Boolean(person.slack_user_id);
6779
6780
  return Boolean(person.telegram_chat_id);
6780
6781
  }
6782
+ function autoMediumOrder(preferred) {
6783
+ const FALLBACK_ORDER = ["slack", "telegram"];
6784
+ if (preferred === "slack" || preferred === "telegram") {
6785
+ return [preferred, ...FALLBACK_ORDER.filter((m) => m !== preferred)];
6786
+ }
6787
+ return FALLBACK_ORDER;
6788
+ }
6781
6789
  function isResolveError(v) {
6782
6790
  return "ok" in v && v.ok === false;
6783
6791
  }
@@ -9902,8 +9910,19 @@ function getProjectDir(codeName) {
9902
9910
  }
9903
9911
 
9904
9912
  export {
9913
+ isUnsetTimezone,
9914
+ resolveAgentTimezone,
9915
+ wrapScheduledTaskPrompt,
9916
+ buildScheduledTaskContextBlocks,
9905
9917
  DEFAULT_FRAMEWORK,
9906
9918
  isDeprecatedFramework,
9919
+ registerFramework,
9920
+ getFramework,
9921
+ MAX_AVATAR_ENV_URL_BYTES,
9922
+ resolveAvatarEnvUrl,
9923
+ INTEGRATION_REGISTRY,
9924
+ getIntegration,
9925
+ OAUTH_PROVIDERS,
9907
9926
  formatActorId,
9908
9927
  isSelfCompletion,
9909
9928
  classifyActor,
@@ -9928,30 +9947,19 @@ export {
9928
9947
  renderTemplate,
9929
9948
  DEPLOYMENT_TEMPLATES,
9930
9949
  getTemplate,
9931
- registerFramework,
9932
- getFramework,
9933
- MAX_AVATAR_ENV_URL_BYTES,
9934
- resolveAvatarEnvUrl,
9935
9950
  StreamEncoder,
9936
- OAUTH_PROVIDERS,
9937
9951
  worseConnectivityOutcome,
9938
9952
  resolveConnectivityProbe,
9939
9953
  probeMcpHttp,
9940
9954
  probeComposioAccount,
9941
9955
  probeComposioMcpToolCall,
9942
9956
  probeHttpProvider,
9943
- INTEGRATION_REGISTRY,
9944
- getIntegration,
9945
9957
  AnchorSessionClient,
9946
9958
  isOnboardingArea,
9947
9959
  describeOnboardingChannel,
9948
9960
  coerceOnboardingState,
9949
- isUnsetTimezone,
9950
- resolveAgentTimezone,
9951
9961
  laneTagFragment,
9952
9962
  detectDrift,
9953
- wrapScheduledTaskPrompt,
9954
- buildScheduledTaskContextBlocks,
9955
9963
  SUPPRESS_SENTINEL,
9956
9964
  classifyOutput,
9957
9965
  isVacuousDeliverReason,
@@ -10032,4 +10040,4 @@ export {
10032
10040
  stopAllSessionsAndWait,
10033
10041
  getProjectDir
10034
10042
  };
10035
- //# sourceMappingURL=chunk-JTQ6RYGM.js.map
10043
+ //# sourceMappingURL=chunk-BSTFCC62.js.map