@integrity-labs/agt-cli 0.28.323 → 0.28.325

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.
@@ -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