@maximoai/maximo-syntax-cli 0.1.33 → 0.1.35

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +817 -509
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -124000,7 +124000,7 @@ var init_metadata = __esm(() => {
124000
124000
  isMaximoAiAuth: isMaximoAISubscriber(),
124001
124001
  version: "99.0.0",
124002
124002
  versionBase: getVersionBase(),
124003
- buildTime: "2026-08-13T12:57:41.293Z",
124003
+ buildTime: "2026-08-15T17:39:50.605Z",
124004
124004
  deploymentEnvironment: env3.detectDeploymentEnvironment(),
124005
124005
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
124006
124006
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -263697,10 +263697,496 @@ var init_registerFrontmatterHooks = __esm(() => {
263697
263697
  init_sessionHooks();
263698
263698
  });
263699
263699
 
263700
+ // src/utils/model/check1mAccess.ts
263701
+ function isExtraUsageEnabled() {
263702
+ const reason = getGlobalConfig().cachedExtraUsageDisabledReason;
263703
+ if (reason === undefined) {
263704
+ return false;
263705
+ }
263706
+ if (reason === null) {
263707
+ return true;
263708
+ }
263709
+ switch (reason) {
263710
+ case "out_of_credits":
263711
+ return true;
263712
+ case "overage_not_provisioned":
263713
+ case "org_level_disabled":
263714
+ case "org_level_disabled_until":
263715
+ case "seat_tier_level_disabled":
263716
+ case "member_level_disabled":
263717
+ case "seat_tier_zero_credit_limit":
263718
+ case "group_zero_credit_limit":
263719
+ case "member_zero_credit_limit":
263720
+ case "org_service_level_disabled":
263721
+ case "org_service_zero_credit_limit":
263722
+ case "no_limits_configured":
263723
+ case "unknown":
263724
+ return false;
263725
+ default:
263726
+ return false;
263727
+ }
263728
+ }
263729
+ function checkOpus1mAccess() {
263730
+ if (is1mContextDisabled()) {
263731
+ return false;
263732
+ }
263733
+ if (isMaximoAISubscriber()) {
263734
+ return isExtraUsageEnabled();
263735
+ }
263736
+ return true;
263737
+ }
263738
+ function checkSonnet1mAccess() {
263739
+ if (is1mContextDisabled()) {
263740
+ return false;
263741
+ }
263742
+ if (isMaximoAISubscriber()) {
263743
+ return isExtraUsageEnabled();
263744
+ }
263745
+ return true;
263746
+ }
263747
+ var init_check1mAccess = __esm(() => {
263748
+ init_auth2();
263749
+ init_config2();
263750
+ init_context();
263751
+ });
263752
+
263753
+ // src/utils/model/modelOptions.ts
263754
+ function getDefaultOptionForUser(fastMode = false) {
263755
+ if (process.env.USER_TYPE === "ant") {
263756
+ const currentModel = renderDefaultModelSetting(getDefaultMainLoopModelSetting());
263757
+ return {
263758
+ value: null,
263759
+ label: "Default (recommended)",
263760
+ description: `Use the default model for Ants (currently ${currentModel})`,
263761
+ descriptionForModel: `Default model (currently ${currentModel})`
263762
+ };
263763
+ }
263764
+ if (isMaximoAISubscriber()) {
263765
+ return {
263766
+ value: null,
263767
+ label: "Default (recommended)",
263768
+ description: getMaximoAiUserDefaultModelDescription(fastMode)
263769
+ };
263770
+ }
263771
+ const is3P = getAPIProvider() !== "firstParty";
263772
+ return {
263773
+ value: null,
263774
+ label: "Default (recommended)",
263775
+ description: `Use the default model (currently ${renderDefaultModelSetting(getDefaultMainLoopModelSetting())})${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`
263776
+ };
263777
+ }
263778
+ function getCustomSonnetOption() {
263779
+ const is3P = getAPIProvider() !== "firstParty";
263780
+ const customSonnetModel = process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;
263781
+ if (is3P && customSonnetModel) {
263782
+ const is1m = has1mContext(customSonnetModel);
263783
+ return {
263784
+ value: "sonnet",
263785
+ label: process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_NAME ?? customSonnetModel,
263786
+ description: process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION ?? `Custom Sonnet model${is1m ? " (1M context)" : ""}`,
263787
+ descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION ?? `Custom Sonnet model${is1m ? " with 1M context" : ""}`} (${customSonnetModel})`
263788
+ };
263789
+ }
263790
+ }
263791
+ function getSonnet46Option() {
263792
+ const is3P = getAPIProvider() !== "firstParty";
263793
+ return {
263794
+ value: is3P ? getModelStrings2().sonnet46 : "sonnet",
263795
+ label: "Sonnet",
263796
+ description: `Sonnet 4.6 · Best for everyday tasks${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`,
263797
+ descriptionForModel: "Sonnet 4.6 - best for everyday tasks. Generally recommended for most coding tasks"
263798
+ };
263799
+ }
263800
+ function getCustomOpusOption() {
263801
+ const is3P = getAPIProvider() !== "firstParty";
263802
+ const customOpusModel = process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;
263803
+ if (is3P && customOpusModel) {
263804
+ const is1m = has1mContext(customOpusModel);
263805
+ return {
263806
+ value: "opus",
263807
+ label: process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_NAME ?? customOpusModel,
263808
+ description: process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ?? `Custom Opus model${is1m ? " (1M context)" : ""}`,
263809
+ descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ?? `Custom Opus model${is1m ? " with 1M context" : ""}`} (${customOpusModel})`
263810
+ };
263811
+ }
263812
+ }
263813
+ function getOpus41Option() {
263814
+ return {
263815
+ value: "opus",
263816
+ label: "Opus 4.1",
263817
+ description: `Opus 4.1 · Legacy`,
263818
+ descriptionForModel: "Opus 4.1 - legacy version"
263819
+ };
263820
+ }
263821
+ function getOpus46Option(fastMode = false) {
263822
+ const is3P = getAPIProvider() !== "firstParty";
263823
+ return {
263824
+ value: is3P ? getModelStrings2().opus46 : "opus",
263825
+ label: "Opus",
263826
+ description: `Opus 4.6 · Most capable for complex work${getOpus46PricingSuffix(fastMode)}`,
263827
+ descriptionForModel: "Opus 4.6 - most capable for complex work"
263828
+ };
263829
+ }
263830
+ function getSonnet46_1MOption() {
263831
+ const is3P = getAPIProvider() !== "firstParty";
263832
+ return {
263833
+ value: is3P ? getModelStrings2().sonnet46 + "[1m]" : "sonnet[1m]",
263834
+ label: "Sonnet (1M context)",
263835
+ description: `Sonnet 4.6 for long sessions${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`,
263836
+ descriptionForModel: "Sonnet 4.6 with 1M context window - for long sessions with large codebases"
263837
+ };
263838
+ }
263839
+ function getOpus46_1MOption(fastMode = false) {
263840
+ const is3P = getAPIProvider() !== "firstParty";
263841
+ return {
263842
+ value: is3P ? getModelStrings2().opus46 + "[1m]" : "opus[1m]",
263843
+ label: "Opus (1M context)",
263844
+ description: `Opus 4.6 for long sessions${getOpus46PricingSuffix(fastMode)}`,
263845
+ descriptionForModel: "Opus 4.6 with 1M context window - for long sessions with large codebases"
263846
+ };
263847
+ }
263848
+ function getCustomHaikuOption() {
263849
+ const is3P = getAPIProvider() !== "firstParty";
263850
+ const customHaikuModel = process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;
263851
+ if (is3P && customHaikuModel) {
263852
+ return {
263853
+ value: "haiku",
263854
+ label: process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME ?? customHaikuModel,
263855
+ description: process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION ?? "Custom Haiku model",
263856
+ descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION ?? "Custom Haiku model"} (${customHaikuModel})`
263857
+ };
263858
+ }
263859
+ }
263860
+ function getHaiku45Option() {
263861
+ const is3P = getAPIProvider() !== "firstParty";
263862
+ return {
263863
+ value: "haiku",
263864
+ label: "Haiku",
263865
+ description: `Haiku 4.5 · Fastest for quick answers${is3P ? "" : ` · ${formatModelPricing(COST_HAIKU_45)}`}`,
263866
+ descriptionForModel: "Haiku 4.5 - fastest for quick answers. Lower cost but less capable than Sonnet 4.6."
263867
+ };
263868
+ }
263869
+ function getHaiku35Option() {
263870
+ const is3P = getAPIProvider() !== "firstParty";
263871
+ return {
263872
+ value: "haiku",
263873
+ label: "Haiku",
263874
+ description: `Haiku 3.5 for simple tasks${is3P ? "" : ` · ${formatModelPricing(COST_HAIKU_35)}`}`,
263875
+ descriptionForModel: "Haiku 3.5 - faster and lower cost, but less capable than Sonnet. Use for simple tasks."
263876
+ };
263877
+ }
263878
+ function getHaikuOption() {
263879
+ const haikuModel = getDefaultHaikuModel();
263880
+ return haikuModel === getModelStrings2().haiku45 ? getHaiku45Option() : getHaiku35Option();
263881
+ }
263882
+ function getMaxOpusOption(fastMode = false) {
263883
+ return {
263884
+ value: "opus",
263885
+ label: "Opus",
263886
+ description: `Opus 4.6 · Most capable for complex work${fastMode ? getOpus46PricingSuffix(true) : ""}`
263887
+ };
263888
+ }
263889
+ function getMaxSonnet46_1MOption() {
263890
+ const is3P = getAPIProvider() !== "firstParty";
263891
+ const billingInfo = isMaximoAISubscriber() ? " · Billed as extra usage" : "";
263892
+ return {
263893
+ value: "sonnet[1m]",
263894
+ label: "Sonnet (1M context)",
263895
+ description: `Sonnet 4.6 with 1M context${billingInfo}${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`
263896
+ };
263897
+ }
263898
+ function getMaxOpus46_1MOption(fastMode = false) {
263899
+ const billingInfo = isMaximoAISubscriber() ? " · Billed as extra usage" : "";
263900
+ return {
263901
+ value: "opus[1m]",
263902
+ label: "Opus (1M context)",
263903
+ description: `Opus 4.6 with 1M context${billingInfo}${getOpus46PricingSuffix(fastMode)}`
263904
+ };
263905
+ }
263906
+ function getMergedOpus1MOption(fastMode = false) {
263907
+ const is3P = getAPIProvider() !== "firstParty";
263908
+ return {
263909
+ value: is3P ? getModelStrings2().opus46 + "[1m]" : "opus[1m]",
263910
+ label: "Opus (1M context)",
263911
+ description: `Opus 4.6 with 1M context · Most capable for complex work${!is3P && fastMode ? getOpus46PricingSuffix(fastMode) : ""}`,
263912
+ descriptionForModel: "Opus 4.6 with 1M context - most capable for complex work"
263913
+ };
263914
+ }
263915
+ function getOpusPlanOption() {
263916
+ return {
263917
+ value: "opusplan",
263918
+ label: "Opus Plan Mode",
263919
+ description: "Use Opus 4.6 in plan mode, Sonnet 4.6 otherwise"
263920
+ };
263921
+ }
263922
+ function getCodexPlanOption() {
263923
+ return {
263924
+ value: "codexplan",
263925
+ label: "Codex Plan",
263926
+ description: "GPT-5.4 on the Codex backend with high reasoning"
263927
+ };
263928
+ }
263929
+ function getCodexSparkOption() {
263930
+ return {
263931
+ value: "codexspark",
263932
+ label: "Codex Spark",
263933
+ description: "GPT-5.3 Codex Spark on the Codex backend for fast tool loops"
263934
+ };
263935
+ }
263936
+ function getModelOptionsBase(fastMode = false) {
263937
+ if (process.env.USER_TYPE === "ant") {
263938
+ const antModelOptions = getAntModels().map((m) => ({
263939
+ value: m.alias,
263940
+ label: m.label,
263941
+ description: m.description ?? `[ANT-ONLY] ${m.label} (${m.model})`
263942
+ }));
263943
+ return [
263944
+ getDefaultOptionForUser(),
263945
+ ...antModelOptions,
263946
+ getMergedOpus1MOption(fastMode),
263947
+ getSonnet46Option(),
263948
+ getSonnet46_1MOption(),
263949
+ getHaiku45Option()
263950
+ ];
263951
+ }
263952
+ if (isMaximoAISubscriber()) {
263953
+ if (isMaxSubscriber() || isTeamPremiumSubscriber()) {
263954
+ const premiumOptions = [getDefaultOptionForUser(fastMode)];
263955
+ if (!isOpus1mMergeEnabled() && checkOpus1mAccess()) {
263956
+ premiumOptions.push(getMaxOpus46_1MOption(fastMode));
263957
+ }
263958
+ premiumOptions.push(MaxSonnet46Option);
263959
+ if (checkSonnet1mAccess()) {
263960
+ premiumOptions.push(getMaxSonnet46_1MOption());
263961
+ }
263962
+ premiumOptions.push(MaxHaiku45Option);
263963
+ return premiumOptions;
263964
+ }
263965
+ const standardOptions = [getDefaultOptionForUser(fastMode)];
263966
+ if (checkSonnet1mAccess()) {
263967
+ standardOptions.push(getMaxSonnet46_1MOption());
263968
+ }
263969
+ if (isOpus1mMergeEnabled()) {
263970
+ standardOptions.push(getMergedOpus1MOption(fastMode));
263971
+ } else {
263972
+ standardOptions.push(getMaxOpusOption(fastMode));
263973
+ if (checkOpus1mAccess()) {
263974
+ standardOptions.push(getMaxOpus46_1MOption(fastMode));
263975
+ }
263976
+ }
263977
+ standardOptions.push(MaxHaiku45Option);
263978
+ return standardOptions;
263979
+ }
263980
+ if (getAPIProvider() === "firstParty") {
263981
+ const payg1POptions = [getDefaultOptionForUser(fastMode)];
263982
+ if (checkSonnet1mAccess()) {
263983
+ payg1POptions.push(getSonnet46_1MOption());
263984
+ }
263985
+ if (isOpus1mMergeEnabled()) {
263986
+ payg1POptions.push(getMergedOpus1MOption(fastMode));
263987
+ } else {
263988
+ payg1POptions.push(getOpus46Option(fastMode));
263989
+ if (checkOpus1mAccess()) {
263990
+ payg1POptions.push(getOpus46_1MOption(fastMode));
263991
+ }
263992
+ }
263993
+ payg1POptions.push(getHaiku45Option());
263994
+ return payg1POptions;
263995
+ }
263996
+ const payg3pOptions = [getDefaultOptionForUser(fastMode)];
263997
+ if (getAPIProvider() === "openai") {
263998
+ payg3pOptions.push(getCodexPlanOption(), getCodexSparkOption());
263999
+ }
264000
+ const customSonnet = getCustomSonnetOption();
264001
+ if (customSonnet !== undefined) {
264002
+ payg3pOptions.push(customSonnet);
264003
+ } else {
264004
+ payg3pOptions.push(getSonnet46Option());
264005
+ if (checkSonnet1mAccess()) {
264006
+ payg3pOptions.push(getSonnet46_1MOption());
264007
+ }
264008
+ }
264009
+ const customOpus = getCustomOpusOption();
264010
+ if (customOpus !== undefined) {
264011
+ payg3pOptions.push(customOpus);
264012
+ } else {
264013
+ payg3pOptions.push(getOpus41Option());
264014
+ payg3pOptions.push(getOpus46Option(fastMode));
264015
+ if (checkOpus1mAccess()) {
264016
+ payg3pOptions.push(getOpus46_1MOption(fastMode));
264017
+ }
264018
+ }
264019
+ const customHaiku = getCustomHaikuOption();
264020
+ if (customHaiku !== undefined) {
264021
+ payg3pOptions.push(customHaiku);
264022
+ } else {
264023
+ payg3pOptions.push(getHaikuOption());
264024
+ }
264025
+ return payg3pOptions;
264026
+ }
264027
+ function getModelFamilyInfo(model) {
264028
+ const canonical = getCanonicalName(model);
264029
+ if (canonical.includes("claude-sonnet-4-6") || canonical.includes("claude-sonnet-4-5") || canonical.includes("claude-sonnet-4-") || canonical.includes("claude-3-7-sonnet") || canonical.includes("claude-3-5-sonnet")) {
264030
+ const currentName = getMarketingNameForModel(getDefaultSonnetModel());
264031
+ if (currentName) {
264032
+ return { alias: "Sonnet", currentVersionName: currentName };
264033
+ }
264034
+ }
264035
+ if (canonical.includes("claude-opus-4")) {
264036
+ const currentName = getMarketingNameForModel(getDefaultOpusModel());
264037
+ if (currentName) {
264038
+ return { alias: "Opus", currentVersionName: currentName };
264039
+ }
264040
+ }
264041
+ if (canonical.includes("claude-haiku") || canonical.includes("claude-3-5-haiku")) {
264042
+ const currentName = getMarketingNameForModel(getDefaultHaikuModel());
264043
+ if (currentName) {
264044
+ return { alias: "Haiku", currentVersionName: currentName };
264045
+ }
264046
+ }
264047
+ return null;
264048
+ }
264049
+ function getKnownModelOption(model) {
264050
+ const marketingName = getMarketingNameForModel(model);
264051
+ if (!marketingName)
264052
+ return null;
264053
+ const familyInfo = getModelFamilyInfo(model);
264054
+ if (!familyInfo) {
264055
+ return {
264056
+ value: model,
264057
+ label: marketingName,
264058
+ description: model
264059
+ };
264060
+ }
264061
+ if (marketingName !== familyInfo.currentVersionName) {
264062
+ return {
264063
+ value: model,
264064
+ label: marketingName,
264065
+ description: `Newer version available · select ${familyInfo.alias} for ${familyInfo.currentVersionName}`
264066
+ };
264067
+ }
264068
+ return {
264069
+ value: model,
264070
+ label: marketingName,
264071
+ description: model
264072
+ };
264073
+ }
264074
+ async function getModelOptionsAsync(fastMode = false) {
264075
+ const maximoOptions = await getMaximoModelOptions();
264076
+ if (maximoOptions) {
264077
+ return filterModelOptionsByAllowlist([
264078
+ getDefaultOptionForUser(fastMode),
264079
+ ...maximoOptions
264080
+ ]);
264081
+ }
264082
+ return getModelOptionsBase(fastMode);
264083
+ }
264084
+ function getModelOptions(fastMode = false) {
264085
+ const maximoOptions = getCachedMaximoModelOptions();
264086
+ if (maximoOptions) {
264087
+ return filterModelOptionsByAllowlist([
264088
+ getDefaultOptionForUser(fastMode),
264089
+ ...maximoOptions
264090
+ ]);
264091
+ }
264092
+ const options2 = getModelOptionsBase(fastMode);
264093
+ const envCustomModel = process.env.ANTHROPIC_CUSTOM_MODEL_OPTION;
264094
+ if (envCustomModel && !options2.some((existing) => existing.value === envCustomModel)) {
264095
+ options2.push({
264096
+ value: envCustomModel,
264097
+ label: process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_NAME ?? envCustomModel,
264098
+ description: process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION ?? `Custom model (${envCustomModel})`
264099
+ });
264100
+ }
264101
+ for (const opt of getGlobalConfig().additionalModelOptionsCache ?? []) {
264102
+ if (!options2.some((existing) => existing.value === opt.value)) {
264103
+ options2.push(opt);
264104
+ }
264105
+ }
264106
+ let customModel = null;
264107
+ const currentMainLoopModel = getUserSpecifiedModelSetting();
264108
+ const initialMainLoopModel = getInitialMainLoopModel();
264109
+ if (currentMainLoopModel !== undefined && currentMainLoopModel !== null) {
264110
+ customModel = currentMainLoopModel;
264111
+ } else if (initialMainLoopModel !== null) {
264112
+ customModel = initialMainLoopModel;
264113
+ }
264114
+ if (customModel === null || options2.some((opt) => opt.value === customModel)) {
264115
+ return filterModelOptionsByAllowlist(options2);
264116
+ } else if (customModel === "opusplan") {
264117
+ return filterModelOptionsByAllowlist([...options2, getOpusPlanOption()]);
264118
+ } else if (customModel === "codexplan") {
264119
+ return filterModelOptionsByAllowlist([...options2, getCodexPlanOption()]);
264120
+ } else if (customModel === "codexspark") {
264121
+ return filterModelOptionsByAllowlist([...options2, getCodexSparkOption()]);
264122
+ } else if (customModel === "opus" && getAPIProvider() === "firstParty") {
264123
+ return filterModelOptionsByAllowlist([
264124
+ ...options2,
264125
+ getMaxOpusOption(fastMode)
264126
+ ]);
264127
+ } else if (customModel === "opus[1m]" && getAPIProvider() === "firstParty") {
264128
+ return filterModelOptionsByAllowlist([
264129
+ ...options2,
264130
+ getMergedOpus1MOption(fastMode)
264131
+ ]);
264132
+ } else {
264133
+ const knownOption = getKnownModelOption(customModel);
264134
+ if (knownOption) {
264135
+ options2.push(knownOption);
264136
+ } else {
264137
+ options2.push({
264138
+ value: customModel,
264139
+ label: customModel,
264140
+ description: "Custom model"
264141
+ });
264142
+ }
264143
+ return filterModelOptionsByAllowlist(options2);
264144
+ }
264145
+ }
264146
+ function filterModelOptionsByAllowlist(options2) {
264147
+ const settings = getSettings_DEPRECATED() || {};
264148
+ if (!settings.availableModels) {
264149
+ return options2;
264150
+ }
264151
+ return options2.filter((opt) => opt.value === null || opt.value !== null && isModelAllowed(opt.value));
264152
+ }
264153
+ var MaxSonnet46Option, MaxHaiku45Option;
264154
+ var init_modelOptions = __esm(() => {
264155
+ init_state();
264156
+ init_antModels();
264157
+ init_auth2();
264158
+ init_modelStrings();
264159
+ init_modelCost();
264160
+ init_settings2();
264161
+ init_check1mAccess();
264162
+ init_providers();
264163
+ init_modelAllowlist();
264164
+ init_model();
264165
+ init_context();
264166
+ init_config2();
264167
+ init_maximoModels();
264168
+ MaxSonnet46Option = {
264169
+ value: "sonnet",
264170
+ label: "Sonnet",
264171
+ description: "Sonnet 4.6 · Best for everyday tasks"
264172
+ };
264173
+ MaxHaiku45Option = {
264174
+ value: "haiku",
264175
+ label: "Haiku",
264176
+ description: "Haiku 4.5 · Fastest for quick answers"
264177
+ };
264178
+ });
264179
+
263700
264180
  // src/utils/model/agent.ts
263701
264181
  function getDefaultSubagentModel() {
263702
264182
  return "inherit";
263703
264183
  }
264184
+ function isInheritAgentModel(value) {
264185
+ if (!value)
264186
+ return true;
264187
+ const normalized = value.trim().toLowerCase();
264188
+ return normalized === "inherit" || normalized === "parent" || normalized === "same";
264189
+ }
263704
264190
  function getAgentModel(agentModel, parentModel, toolSpecifiedModel, permissionMode) {
263705
264191
  if (process.env.MAXIMO_SYNTAX_SUBAGENT_MODEL) {
263706
264192
  return parseUserSpecifiedModel(process.env.MAXIMO_SYNTAX_SUBAGENT_MODEL);
@@ -263714,7 +264200,7 @@ function getAgentModel(agentModel, parentModel, toolSpecifiedModel, permissionMo
263714
264200
  }
263715
264201
  return resolvedModel;
263716
264202
  };
263717
- if (toolSpecifiedModel) {
264203
+ if (toolSpecifiedModel && !isInheritAgentModel(toolSpecifiedModel)) {
263718
264204
  if (aliasMatchesParentTier(toolSpecifiedModel, parentModel)) {
263719
264205
  return parentModel;
263720
264206
  }
@@ -263756,7 +264242,29 @@ function getAgentModelDisplay(model) {
263756
264242
  return capitalize(model);
263757
264243
  }
263758
264244
  function getAgentModelOptions() {
263759
- return [
264245
+ const options2 = [
264246
+ {
264247
+ value: "inherit",
264248
+ label: "Inherit from parent",
264249
+ description: "Use the same model as the main conversation"
264250
+ }
264251
+ ];
264252
+ const seen = new Set(["inherit"]);
264253
+ try {
264254
+ for (const option of getModelOptions()) {
264255
+ if (typeof option.value !== "string" || !option.value.trim())
264256
+ continue;
264257
+ if (seen.has(option.value))
264258
+ continue;
264259
+ seen.add(option.value);
264260
+ options2.push({
264261
+ value: option.value,
264262
+ label: option.label,
264263
+ description: option.description
264264
+ });
264265
+ }
264266
+ } catch {}
264267
+ const aliasFallbacks = [
263760
264268
  {
263761
264269
  value: "sonnet",
263762
264270
  label: "Sonnet",
@@ -263771,13 +264279,13 @@ function getAgentModelOptions() {
263771
264279
  value: "haiku",
263772
264280
  label: "Haiku",
263773
264281
  description: "Fast and efficient for simple tasks"
263774
- },
263775
- {
263776
- value: "inherit",
263777
- label: "Inherit from parent",
263778
- description: "Use the same model as the main conversation"
263779
264282
  }
263780
264283
  ];
264284
+ for (const alias of aliasFallbacks) {
264285
+ if (!seen.has(alias.value))
264286
+ options2.push(alias);
264287
+ }
264288
+ return options2;
263781
264289
  }
263782
264290
  var AGENT_MODEL_OPTIONS;
263783
264291
  var init_agent = __esm(() => {
@@ -263785,6 +264293,7 @@ var init_agent = __esm(() => {
263785
264293
  init_aliases();
263786
264294
  init_bedrock();
263787
264295
  init_model();
264296
+ init_modelOptions();
263788
264297
  init_providers();
263789
264298
  AGENT_MODEL_OPTIONS = [...MODEL_ALIASES, "inherit"];
263790
264299
  });
@@ -267250,59 +267759,6 @@ var init_AssistantRedactedThinkingMessage = __esm(() => {
267250
267759
  jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
267251
267760
  });
267252
267761
 
267253
- // src/utils/model/check1mAccess.ts
267254
- function isExtraUsageEnabled() {
267255
- const reason = getGlobalConfig().cachedExtraUsageDisabledReason;
267256
- if (reason === undefined) {
267257
- return false;
267258
- }
267259
- if (reason === null) {
267260
- return true;
267261
- }
267262
- switch (reason) {
267263
- case "out_of_credits":
267264
- return true;
267265
- case "overage_not_provisioned":
267266
- case "org_level_disabled":
267267
- case "org_level_disabled_until":
267268
- case "seat_tier_level_disabled":
267269
- case "member_level_disabled":
267270
- case "seat_tier_zero_credit_limit":
267271
- case "group_zero_credit_limit":
267272
- case "member_zero_credit_limit":
267273
- case "org_service_level_disabled":
267274
- case "org_service_zero_credit_limit":
267275
- case "no_limits_configured":
267276
- case "unknown":
267277
- return false;
267278
- default:
267279
- return false;
267280
- }
267281
- }
267282
- function checkOpus1mAccess() {
267283
- if (is1mContextDisabled()) {
267284
- return false;
267285
- }
267286
- if (isMaximoAISubscriber()) {
267287
- return isExtraUsageEnabled();
267288
- }
267289
- return true;
267290
- }
267291
- function checkSonnet1mAccess() {
267292
- if (is1mContextDisabled()) {
267293
- return false;
267294
- }
267295
- if (isMaximoAISubscriber()) {
267296
- return isExtraUsageEnabled();
267297
- }
267298
- return true;
267299
- }
267300
- var init_check1mAccess = __esm(() => {
267301
- init_auth2();
267302
- init_config2();
267303
- init_context();
267304
- });
267305
-
267306
267762
  // src/utils/model/contextWindowUpgradeCheck.ts
267307
267763
  function getAvailableUpgrade() {
267308
267764
  const currentModelSetting = getUserSpecifiedModelSetting();
@@ -276790,7 +277246,7 @@ import { access as access3, writeFile as writeFile13 } from "fs/promises";
276790
277246
  import { homedir as homedir22 } from "os";
276791
277247
  import { join as join65 } from "path";
276792
277248
  function getCurrentRealVersion() {
276793
- return "0.1.33";
277249
+ return "0.1.35";
276794
277250
  }
276795
277251
  async function getRolloutConfig() {
276796
277252
  try {
@@ -300396,6 +300852,7 @@ async function* runAgent({
300396
300852
  useExactTools,
300397
300853
  worktreePath,
300398
300854
  description,
300855
+ effort,
300399
300856
  transcriptSubdir,
300400
300857
  onQueryProgress
300401
300858
  }) {
@@ -300458,7 +300915,8 @@ async function* runAgent({
300458
300915
  }
300459
300916
  };
300460
300917
  }
300461
- const effortValue = agentDefinition.effort !== undefined ? agentDefinition.effort : state.effortValue;
300918
+ const requestedEffort = effort !== undefined ? effort : agentDefinition.effort !== undefined ? agentDefinition.effort : state.effortValue;
300919
+ const effortValue = resolveAppliedEffort(resolvedAgentModel, requestedEffort);
300462
300920
  if (toolPermissionContext === state.toolPermissionContext && effortValue === state.effortValue) {
300463
300921
  return state;
300464
300922
  }
@@ -300722,6 +301180,7 @@ var init_runAgent = __esm(() => {
300722
301180
  init_hooks5();
300723
301181
  init_messages3();
300724
301182
  init_agent();
301183
+ init_effort();
300725
301184
  init_sessionStorage();
300726
301185
  init_pluginOnlyPolicy();
300727
301186
  init_perfettoTracing();
@@ -350526,433 +350985,6 @@ var init_ExitWorktreeTool = __esm(() => {
350526
350985
  // src/tools/ConfigTool/constants.ts
350527
350986
  var CONFIG_TOOL_NAME = "Config";
350528
350987
 
350529
- // src/utils/model/modelOptions.ts
350530
- function getDefaultOptionForUser(fastMode = false) {
350531
- if (process.env.USER_TYPE === "ant") {
350532
- const currentModel = renderDefaultModelSetting(getDefaultMainLoopModelSetting());
350533
- return {
350534
- value: null,
350535
- label: "Default (recommended)",
350536
- description: `Use the default model for Ants (currently ${currentModel})`,
350537
- descriptionForModel: `Default model (currently ${currentModel})`
350538
- };
350539
- }
350540
- if (isMaximoAISubscriber()) {
350541
- return {
350542
- value: null,
350543
- label: "Default (recommended)",
350544
- description: getMaximoAiUserDefaultModelDescription(fastMode)
350545
- };
350546
- }
350547
- const is3P = getAPIProvider() !== "firstParty";
350548
- return {
350549
- value: null,
350550
- label: "Default (recommended)",
350551
- description: `Use the default model (currently ${renderDefaultModelSetting(getDefaultMainLoopModelSetting())})${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`
350552
- };
350553
- }
350554
- function getCustomSonnetOption() {
350555
- const is3P = getAPIProvider() !== "firstParty";
350556
- const customSonnetModel = process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;
350557
- if (is3P && customSonnetModel) {
350558
- const is1m = has1mContext(customSonnetModel);
350559
- return {
350560
- value: "sonnet",
350561
- label: process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_NAME ?? customSonnetModel,
350562
- description: process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION ?? `Custom Sonnet model${is1m ? " (1M context)" : ""}`,
350563
- descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION ?? `Custom Sonnet model${is1m ? " with 1M context" : ""}`} (${customSonnetModel})`
350564
- };
350565
- }
350566
- }
350567
- function getSonnet46Option() {
350568
- const is3P = getAPIProvider() !== "firstParty";
350569
- return {
350570
- value: is3P ? getModelStrings2().sonnet46 : "sonnet",
350571
- label: "Sonnet",
350572
- description: `Sonnet 4.6 · Best for everyday tasks${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`,
350573
- descriptionForModel: "Sonnet 4.6 - best for everyday tasks. Generally recommended for most coding tasks"
350574
- };
350575
- }
350576
- function getCustomOpusOption() {
350577
- const is3P = getAPIProvider() !== "firstParty";
350578
- const customOpusModel = process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;
350579
- if (is3P && customOpusModel) {
350580
- const is1m = has1mContext(customOpusModel);
350581
- return {
350582
- value: "opus",
350583
- label: process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_NAME ?? customOpusModel,
350584
- description: process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ?? `Custom Opus model${is1m ? " (1M context)" : ""}`,
350585
- descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ?? `Custom Opus model${is1m ? " with 1M context" : ""}`} (${customOpusModel})`
350586
- };
350587
- }
350588
- }
350589
- function getOpus41Option() {
350590
- return {
350591
- value: "opus",
350592
- label: "Opus 4.1",
350593
- description: `Opus 4.1 · Legacy`,
350594
- descriptionForModel: "Opus 4.1 - legacy version"
350595
- };
350596
- }
350597
- function getOpus46Option(fastMode = false) {
350598
- const is3P = getAPIProvider() !== "firstParty";
350599
- return {
350600
- value: is3P ? getModelStrings2().opus46 : "opus",
350601
- label: "Opus",
350602
- description: `Opus 4.6 · Most capable for complex work${getOpus46PricingSuffix(fastMode)}`,
350603
- descriptionForModel: "Opus 4.6 - most capable for complex work"
350604
- };
350605
- }
350606
- function getSonnet46_1MOption() {
350607
- const is3P = getAPIProvider() !== "firstParty";
350608
- return {
350609
- value: is3P ? getModelStrings2().sonnet46 + "[1m]" : "sonnet[1m]",
350610
- label: "Sonnet (1M context)",
350611
- description: `Sonnet 4.6 for long sessions${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`,
350612
- descriptionForModel: "Sonnet 4.6 with 1M context window - for long sessions with large codebases"
350613
- };
350614
- }
350615
- function getOpus46_1MOption(fastMode = false) {
350616
- const is3P = getAPIProvider() !== "firstParty";
350617
- return {
350618
- value: is3P ? getModelStrings2().opus46 + "[1m]" : "opus[1m]",
350619
- label: "Opus (1M context)",
350620
- description: `Opus 4.6 for long sessions${getOpus46PricingSuffix(fastMode)}`,
350621
- descriptionForModel: "Opus 4.6 with 1M context window - for long sessions with large codebases"
350622
- };
350623
- }
350624
- function getCustomHaikuOption() {
350625
- const is3P = getAPIProvider() !== "firstParty";
350626
- const customHaikuModel = process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;
350627
- if (is3P && customHaikuModel) {
350628
- return {
350629
- value: "haiku",
350630
- label: process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME ?? customHaikuModel,
350631
- description: process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION ?? "Custom Haiku model",
350632
- descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION ?? "Custom Haiku model"} (${customHaikuModel})`
350633
- };
350634
- }
350635
- }
350636
- function getHaiku45Option() {
350637
- const is3P = getAPIProvider() !== "firstParty";
350638
- return {
350639
- value: "haiku",
350640
- label: "Haiku",
350641
- description: `Haiku 4.5 · Fastest for quick answers${is3P ? "" : ` · ${formatModelPricing(COST_HAIKU_45)}`}`,
350642
- descriptionForModel: "Haiku 4.5 - fastest for quick answers. Lower cost but less capable than Sonnet 4.6."
350643
- };
350644
- }
350645
- function getHaiku35Option() {
350646
- const is3P = getAPIProvider() !== "firstParty";
350647
- return {
350648
- value: "haiku",
350649
- label: "Haiku",
350650
- description: `Haiku 3.5 for simple tasks${is3P ? "" : ` · ${formatModelPricing(COST_HAIKU_35)}`}`,
350651
- descriptionForModel: "Haiku 3.5 - faster and lower cost, but less capable than Sonnet. Use for simple tasks."
350652
- };
350653
- }
350654
- function getHaikuOption() {
350655
- const haikuModel = getDefaultHaikuModel();
350656
- return haikuModel === getModelStrings2().haiku45 ? getHaiku45Option() : getHaiku35Option();
350657
- }
350658
- function getMaxOpusOption(fastMode = false) {
350659
- return {
350660
- value: "opus",
350661
- label: "Opus",
350662
- description: `Opus 4.6 · Most capable for complex work${fastMode ? getOpus46PricingSuffix(true) : ""}`
350663
- };
350664
- }
350665
- function getMaxSonnet46_1MOption() {
350666
- const is3P = getAPIProvider() !== "firstParty";
350667
- const billingInfo = isMaximoAISubscriber() ? " · Billed as extra usage" : "";
350668
- return {
350669
- value: "sonnet[1m]",
350670
- label: "Sonnet (1M context)",
350671
- description: `Sonnet 4.6 with 1M context${billingInfo}${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`
350672
- };
350673
- }
350674
- function getMaxOpus46_1MOption(fastMode = false) {
350675
- const billingInfo = isMaximoAISubscriber() ? " · Billed as extra usage" : "";
350676
- return {
350677
- value: "opus[1m]",
350678
- label: "Opus (1M context)",
350679
- description: `Opus 4.6 with 1M context${billingInfo}${getOpus46PricingSuffix(fastMode)}`
350680
- };
350681
- }
350682
- function getMergedOpus1MOption(fastMode = false) {
350683
- const is3P = getAPIProvider() !== "firstParty";
350684
- return {
350685
- value: is3P ? getModelStrings2().opus46 + "[1m]" : "opus[1m]",
350686
- label: "Opus (1M context)",
350687
- description: `Opus 4.6 with 1M context · Most capable for complex work${!is3P && fastMode ? getOpus46PricingSuffix(fastMode) : ""}`,
350688
- descriptionForModel: "Opus 4.6 with 1M context - most capable for complex work"
350689
- };
350690
- }
350691
- function getOpusPlanOption() {
350692
- return {
350693
- value: "opusplan",
350694
- label: "Opus Plan Mode",
350695
- description: "Use Opus 4.6 in plan mode, Sonnet 4.6 otherwise"
350696
- };
350697
- }
350698
- function getCodexPlanOption() {
350699
- return {
350700
- value: "codexplan",
350701
- label: "Codex Plan",
350702
- description: "GPT-5.4 on the Codex backend with high reasoning"
350703
- };
350704
- }
350705
- function getCodexSparkOption() {
350706
- return {
350707
- value: "codexspark",
350708
- label: "Codex Spark",
350709
- description: "GPT-5.3 Codex Spark on the Codex backend for fast tool loops"
350710
- };
350711
- }
350712
- function getModelOptionsBase(fastMode = false) {
350713
- if (process.env.USER_TYPE === "ant") {
350714
- const antModelOptions = getAntModels().map((m) => ({
350715
- value: m.alias,
350716
- label: m.label,
350717
- description: m.description ?? `[ANT-ONLY] ${m.label} (${m.model})`
350718
- }));
350719
- return [
350720
- getDefaultOptionForUser(),
350721
- ...antModelOptions,
350722
- getMergedOpus1MOption(fastMode),
350723
- getSonnet46Option(),
350724
- getSonnet46_1MOption(),
350725
- getHaiku45Option()
350726
- ];
350727
- }
350728
- if (isMaximoAISubscriber()) {
350729
- if (isMaxSubscriber() || isTeamPremiumSubscriber()) {
350730
- const premiumOptions = [getDefaultOptionForUser(fastMode)];
350731
- if (!isOpus1mMergeEnabled() && checkOpus1mAccess()) {
350732
- premiumOptions.push(getMaxOpus46_1MOption(fastMode));
350733
- }
350734
- premiumOptions.push(MaxSonnet46Option);
350735
- if (checkSonnet1mAccess()) {
350736
- premiumOptions.push(getMaxSonnet46_1MOption());
350737
- }
350738
- premiumOptions.push(MaxHaiku45Option);
350739
- return premiumOptions;
350740
- }
350741
- const standardOptions = [getDefaultOptionForUser(fastMode)];
350742
- if (checkSonnet1mAccess()) {
350743
- standardOptions.push(getMaxSonnet46_1MOption());
350744
- }
350745
- if (isOpus1mMergeEnabled()) {
350746
- standardOptions.push(getMergedOpus1MOption(fastMode));
350747
- } else {
350748
- standardOptions.push(getMaxOpusOption(fastMode));
350749
- if (checkOpus1mAccess()) {
350750
- standardOptions.push(getMaxOpus46_1MOption(fastMode));
350751
- }
350752
- }
350753
- standardOptions.push(MaxHaiku45Option);
350754
- return standardOptions;
350755
- }
350756
- if (getAPIProvider() === "firstParty") {
350757
- const payg1POptions = [getDefaultOptionForUser(fastMode)];
350758
- if (checkSonnet1mAccess()) {
350759
- payg1POptions.push(getSonnet46_1MOption());
350760
- }
350761
- if (isOpus1mMergeEnabled()) {
350762
- payg1POptions.push(getMergedOpus1MOption(fastMode));
350763
- } else {
350764
- payg1POptions.push(getOpus46Option(fastMode));
350765
- if (checkOpus1mAccess()) {
350766
- payg1POptions.push(getOpus46_1MOption(fastMode));
350767
- }
350768
- }
350769
- payg1POptions.push(getHaiku45Option());
350770
- return payg1POptions;
350771
- }
350772
- const payg3pOptions = [getDefaultOptionForUser(fastMode)];
350773
- if (getAPIProvider() === "openai") {
350774
- payg3pOptions.push(getCodexPlanOption(), getCodexSparkOption());
350775
- }
350776
- const customSonnet = getCustomSonnetOption();
350777
- if (customSonnet !== undefined) {
350778
- payg3pOptions.push(customSonnet);
350779
- } else {
350780
- payg3pOptions.push(getSonnet46Option());
350781
- if (checkSonnet1mAccess()) {
350782
- payg3pOptions.push(getSonnet46_1MOption());
350783
- }
350784
- }
350785
- const customOpus = getCustomOpusOption();
350786
- if (customOpus !== undefined) {
350787
- payg3pOptions.push(customOpus);
350788
- } else {
350789
- payg3pOptions.push(getOpus41Option());
350790
- payg3pOptions.push(getOpus46Option(fastMode));
350791
- if (checkOpus1mAccess()) {
350792
- payg3pOptions.push(getOpus46_1MOption(fastMode));
350793
- }
350794
- }
350795
- const customHaiku = getCustomHaikuOption();
350796
- if (customHaiku !== undefined) {
350797
- payg3pOptions.push(customHaiku);
350798
- } else {
350799
- payg3pOptions.push(getHaikuOption());
350800
- }
350801
- return payg3pOptions;
350802
- }
350803
- function getModelFamilyInfo(model) {
350804
- const canonical = getCanonicalName(model);
350805
- if (canonical.includes("claude-sonnet-4-6") || canonical.includes("claude-sonnet-4-5") || canonical.includes("claude-sonnet-4-") || canonical.includes("claude-3-7-sonnet") || canonical.includes("claude-3-5-sonnet")) {
350806
- const currentName = getMarketingNameForModel(getDefaultSonnetModel());
350807
- if (currentName) {
350808
- return { alias: "Sonnet", currentVersionName: currentName };
350809
- }
350810
- }
350811
- if (canonical.includes("claude-opus-4")) {
350812
- const currentName = getMarketingNameForModel(getDefaultOpusModel());
350813
- if (currentName) {
350814
- return { alias: "Opus", currentVersionName: currentName };
350815
- }
350816
- }
350817
- if (canonical.includes("claude-haiku") || canonical.includes("claude-3-5-haiku")) {
350818
- const currentName = getMarketingNameForModel(getDefaultHaikuModel());
350819
- if (currentName) {
350820
- return { alias: "Haiku", currentVersionName: currentName };
350821
- }
350822
- }
350823
- return null;
350824
- }
350825
- function getKnownModelOption(model) {
350826
- const marketingName = getMarketingNameForModel(model);
350827
- if (!marketingName)
350828
- return null;
350829
- const familyInfo = getModelFamilyInfo(model);
350830
- if (!familyInfo) {
350831
- return {
350832
- value: model,
350833
- label: marketingName,
350834
- description: model
350835
- };
350836
- }
350837
- if (marketingName !== familyInfo.currentVersionName) {
350838
- return {
350839
- value: model,
350840
- label: marketingName,
350841
- description: `Newer version available · select ${familyInfo.alias} for ${familyInfo.currentVersionName}`
350842
- };
350843
- }
350844
- return {
350845
- value: model,
350846
- label: marketingName,
350847
- description: model
350848
- };
350849
- }
350850
- async function getModelOptionsAsync(fastMode = false) {
350851
- const maximoOptions = await getMaximoModelOptions();
350852
- if (maximoOptions) {
350853
- return filterModelOptionsByAllowlist([
350854
- getDefaultOptionForUser(fastMode),
350855
- ...maximoOptions
350856
- ]);
350857
- }
350858
- return getModelOptionsBase(fastMode);
350859
- }
350860
- function getModelOptions(fastMode = false) {
350861
- const maximoOptions = getCachedMaximoModelOptions();
350862
- if (maximoOptions) {
350863
- return filterModelOptionsByAllowlist([
350864
- getDefaultOptionForUser(fastMode),
350865
- ...maximoOptions
350866
- ]);
350867
- }
350868
- const options2 = getModelOptionsBase(fastMode);
350869
- const envCustomModel = process.env.ANTHROPIC_CUSTOM_MODEL_OPTION;
350870
- if (envCustomModel && !options2.some((existing) => existing.value === envCustomModel)) {
350871
- options2.push({
350872
- value: envCustomModel,
350873
- label: process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_NAME ?? envCustomModel,
350874
- description: process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION ?? `Custom model (${envCustomModel})`
350875
- });
350876
- }
350877
- for (const opt of getGlobalConfig().additionalModelOptionsCache ?? []) {
350878
- if (!options2.some((existing) => existing.value === opt.value)) {
350879
- options2.push(opt);
350880
- }
350881
- }
350882
- let customModel = null;
350883
- const currentMainLoopModel = getUserSpecifiedModelSetting();
350884
- const initialMainLoopModel = getInitialMainLoopModel();
350885
- if (currentMainLoopModel !== undefined && currentMainLoopModel !== null) {
350886
- customModel = currentMainLoopModel;
350887
- } else if (initialMainLoopModel !== null) {
350888
- customModel = initialMainLoopModel;
350889
- }
350890
- if (customModel === null || options2.some((opt) => opt.value === customModel)) {
350891
- return filterModelOptionsByAllowlist(options2);
350892
- } else if (customModel === "opusplan") {
350893
- return filterModelOptionsByAllowlist([...options2, getOpusPlanOption()]);
350894
- } else if (customModel === "codexplan") {
350895
- return filterModelOptionsByAllowlist([...options2, getCodexPlanOption()]);
350896
- } else if (customModel === "codexspark") {
350897
- return filterModelOptionsByAllowlist([...options2, getCodexSparkOption()]);
350898
- } else if (customModel === "opus" && getAPIProvider() === "firstParty") {
350899
- return filterModelOptionsByAllowlist([
350900
- ...options2,
350901
- getMaxOpusOption(fastMode)
350902
- ]);
350903
- } else if (customModel === "opus[1m]" && getAPIProvider() === "firstParty") {
350904
- return filterModelOptionsByAllowlist([
350905
- ...options2,
350906
- getMergedOpus1MOption(fastMode)
350907
- ]);
350908
- } else {
350909
- const knownOption = getKnownModelOption(customModel);
350910
- if (knownOption) {
350911
- options2.push(knownOption);
350912
- } else {
350913
- options2.push({
350914
- value: customModel,
350915
- label: customModel,
350916
- description: "Custom model"
350917
- });
350918
- }
350919
- return filterModelOptionsByAllowlist(options2);
350920
- }
350921
- }
350922
- function filterModelOptionsByAllowlist(options2) {
350923
- const settings = getSettings_DEPRECATED() || {};
350924
- if (!settings.availableModels) {
350925
- return options2;
350926
- }
350927
- return options2.filter((opt) => opt.value === null || opt.value !== null && isModelAllowed(opt.value));
350928
- }
350929
- var MaxSonnet46Option, MaxHaiku45Option;
350930
- var init_modelOptions = __esm(() => {
350931
- init_state();
350932
- init_antModels();
350933
- init_auth2();
350934
- init_modelStrings();
350935
- init_modelCost();
350936
- init_settings2();
350937
- init_check1mAccess();
350938
- init_providers();
350939
- init_modelAllowlist();
350940
- init_model();
350941
- init_context();
350942
- init_config2();
350943
- init_maximoModels();
350944
- MaxSonnet46Option = {
350945
- value: "sonnet",
350946
- label: "Sonnet",
350947
- description: "Sonnet 4.6 · Best for everyday tasks"
350948
- };
350949
- MaxHaiku45Option = {
350950
- value: "haiku",
350951
- label: "Haiku",
350952
- description: "Haiku 4.5 · Fastest for quick answers"
350953
- };
350954
- });
350955
-
350956
350988
  // src/voice/voiceModeEnabled.ts
350957
350989
  var init_voiceModeEnabled = __esm(() => {
350958
350990
  init_growthbook();
@@ -354280,6 +354312,219 @@ var init_tools2 = __esm(() => {
354280
354312
  TOOL_PRESETS = ["default"];
354281
354313
  });
354282
354314
 
354315
+ // src/tools/AgentTool/agentToolParams.ts
354316
+ function firstNonEmptyString(...values2) {
354317
+ for (const value of values2) {
354318
+ if (typeof value !== "string")
354319
+ continue;
354320
+ const trimmed = value.trim();
354321
+ if (trimmed && !SENTINEL_STRINGS.has(trimmed.toLowerCase())) {
354322
+ return trimmed;
354323
+ }
354324
+ }
354325
+ return;
354326
+ }
354327
+ function sanitizeOptionalArg(value) {
354328
+ if (value === undefined || value === null)
354329
+ return;
354330
+ if (typeof value === "number" && Number.isFinite(value)) {
354331
+ return String(value);
354332
+ }
354333
+ if (typeof value !== "string")
354334
+ return;
354335
+ const trimmed = value.trim();
354336
+ if (!trimmed || SENTINEL_STRINGS.has(trimmed.toLowerCase())) {
354337
+ return;
354338
+ }
354339
+ return trimmed;
354340
+ }
354341
+ function deriveAgentDescription(prompt) {
354342
+ const words = prompt.replace(/\s+/g, " ").trim().split(" ").filter(Boolean);
354343
+ const title = words.slice(0, 5).join(" ");
354344
+ if (!title)
354345
+ return "Sub-agent task";
354346
+ return title.length > 60 ? `${title.slice(0, 57)}…` : title;
354347
+ }
354348
+ function normalizeIsolation(value) {
354349
+ if (value === undefined || value === null || value === false) {
354350
+ return;
354351
+ }
354352
+ if (value === true)
354353
+ return "worktree";
354354
+ if (typeof value !== "string")
354355
+ return;
354356
+ const normalized = value.trim().toLowerCase();
354357
+ if (!normalized || SHARED_ISOLATION_STRINGS.has(normalized)) {
354358
+ return;
354359
+ }
354360
+ if (WORKTREE_ISOLATION_STRINGS.has(normalized))
354361
+ return "worktree";
354362
+ if (normalized === "remote")
354363
+ return "remote";
354364
+ return;
354365
+ }
354366
+ function normalizeEffortInput(value) {
354367
+ return parseEffortValue(sanitizeOptionalArg(value) ?? value);
354368
+ }
354369
+ function coerceBoolean(value) {
354370
+ if (typeof value === "boolean")
354371
+ return value;
354372
+ if (typeof value === "string") {
354373
+ const normalized = value.trim().toLowerCase();
354374
+ if (normalized === "true" || normalized === "1" || normalized === "yes") {
354375
+ return true;
354376
+ }
354377
+ if (normalized === "false" || normalized === "0" || normalized === "no") {
354378
+ return false;
354379
+ }
354380
+ }
354381
+ return;
354382
+ }
354383
+ function normalizeAgentToolInput(value) {
354384
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
354385
+ return value;
354386
+ }
354387
+ const input = value;
354388
+ const out = { ...input };
354389
+ const prompt = firstNonEmptyString(out.prompt, out.task, out.instruction, out.goal, out.query);
354390
+ if (prompt)
354391
+ out.prompt = prompt;
354392
+ const description = firstNonEmptyString(out.description, out.title, out.summary, typeof out.name === "string" && out.team_name == null ? out.name : undefined);
354393
+ if (description) {
354394
+ out.description = description;
354395
+ } else if (prompt) {
354396
+ out.description = deriveAgentDescription(prompt);
354397
+ }
354398
+ if (out.run_in_background == null && out.background != null) {
354399
+ const background = coerceBoolean(out.background);
354400
+ if (background !== undefined)
354401
+ out.run_in_background = background;
354402
+ }
354403
+ const runInBackground = coerceBoolean(out.run_in_background);
354404
+ if (runInBackground !== undefined)
354405
+ out.run_in_background = runInBackground;
354406
+ if ("isolation" in out) {
354407
+ const isolation = normalizeIsolation(out.isolation);
354408
+ if (isolation)
354409
+ out.isolation = isolation;
354410
+ else
354411
+ delete out.isolation;
354412
+ }
354413
+ if ("model" in out) {
354414
+ const model = sanitizeOptionalArg(out.model);
354415
+ if (!model || isInheritAgentModel(model))
354416
+ delete out.model;
354417
+ else
354418
+ out.model = model;
354419
+ }
354420
+ if ("effort" in out) {
354421
+ const effort = normalizeEffortInput(out.effort);
354422
+ if (effort === undefined)
354423
+ delete out.effort;
354424
+ else
354425
+ out.effort = typeof effort === "number" ? String(effort) : effort;
354426
+ }
354427
+ delete out.background;
354428
+ delete out.task;
354429
+ delete out.instruction;
354430
+ delete out.goal;
354431
+ delete out.query;
354432
+ delete out.title;
354433
+ delete out.summary;
354434
+ return out;
354435
+ }
354436
+ function listSubagentModelSlugs() {
354437
+ return listSubagentDelegationCatalog().map((entry) => entry.slug);
354438
+ }
354439
+ function listSubagentDelegationCatalog() {
354440
+ const entries = [
354441
+ { slug: "inherit", efforts: [] }
354442
+ ];
354443
+ const seen = new Set(["inherit"]);
354444
+ const add = (slug) => {
354445
+ const trimmed = slug.trim();
354446
+ if (!trimmed || seen.has(trimmed))
354447
+ return;
354448
+ seen.add(trimmed);
354449
+ const config2 = getCachedMaximoModelEffortConfig(trimmed);
354450
+ const supported = config2?.supportedEfforts?.length ? config2.supportedEfforts : getSupportedEffortLevelsForModel(trimmed);
354451
+ entries.push({
354452
+ slug: trimmed,
354453
+ efforts: supported ? [...supported] : [],
354454
+ ...config2?.defaultEffort ? { defaultEffort: config2.defaultEffort } : {}
354455
+ });
354456
+ };
354457
+ try {
354458
+ for (const option of getModelOptions()) {
354459
+ if (typeof option.value === "string")
354460
+ add(option.value);
354461
+ }
354462
+ } catch {}
354463
+ return entries;
354464
+ }
354465
+ function formatSubagentModelList(slugs) {
354466
+ if (slugs.length === 0)
354467
+ return "inherit, or any available model slug";
354468
+ const shown = slugs.slice(0, 24);
354469
+ const extra = slugs.length - shown.length;
354470
+ return extra > 0 ? `${shown.join(", ")}, and ${extra} more` : shown.join(", ");
354471
+ }
354472
+ function formatSubagentDelegationCatalog(entries, limit = 40) {
354473
+ const models = entries.filter((entry) => entry.slug !== "inherit");
354474
+ if (models.length === 0) {
354475
+ return "The live provider catalog is not loaded yet. Omit `model` and `effort` to inherit the parent conversation, or pass a known slug from this session.";
354476
+ }
354477
+ const shown = entries.slice(0, limit);
354478
+ const extra = entries.length - shown.length;
354479
+ const lines = shown.map((entry) => {
354480
+ if (entry.slug === "inherit") {
354481
+ return "- inherit — use the parent conversation model and effort";
354482
+ }
354483
+ if (entry.efforts.length === 0) {
354484
+ return `- ${entry.slug} — omit effort (no advertised effort levels)`;
354485
+ }
354486
+ const defaultSuffix = entry.defaultEffort ? ` (default ${entry.defaultEffort})` : "";
354487
+ return `- ${entry.slug} — efforts: ${entry.efforts.join(", ")}${defaultSuffix}`;
354488
+ });
354489
+ if (extra > 0) {
354490
+ lines.push(`- …and ${extra} more slugs from the same provider catalog`);
354491
+ }
354492
+ return lines.join(`
354493
+ `);
354494
+ }
354495
+ var SENTINEL_STRINGS, SHARED_ISOLATION_STRINGS, WORKTREE_ISOLATION_STRINGS;
354496
+ var init_agentToolParams = __esm(() => {
354497
+ init_maximoModels();
354498
+ init_effort();
354499
+ init_agent();
354500
+ init_modelOptions();
354501
+ SENTINEL_STRINGS = new Set([
354502
+ "",
354503
+ "null",
354504
+ "none",
354505
+ "undefined",
354506
+ "n/a",
354507
+ "na"
354508
+ ]);
354509
+ SHARED_ISOLATION_STRINGS = new Set([
354510
+ "none",
354511
+ "null",
354512
+ "undefined",
354513
+ "false",
354514
+ "shared",
354515
+ "default",
354516
+ "off",
354517
+ "disabled"
354518
+ ]);
354519
+ WORKTREE_ISOLATION_STRINGS = new Set([
354520
+ "worktree",
354521
+ "work-tree",
354522
+ "work_tree",
354523
+ "isolated",
354524
+ "isolate"
354525
+ ]);
354526
+ });
354527
+
354283
354528
  // src/utils/swarm/It2SetupPrompt.tsx
354284
354529
  function It2SetupPrompt(t0) {
354285
354530
  const $2 = import_react_compiler_runtime121.c(44);
@@ -355485,6 +355730,53 @@ Forks are cheap because they share your prompt cache. Don't set \`model\` on a f
355485
355730
 
355486
355731
  **Writing a fork prompt.** Since the fork inherits your context, the prompt is a *directive* — what to do, not what the situation is. Be specific about scope: what's in, what's out, what another agent is handling. Don't re-explain background.
355487
355732
  ` : "";
355733
+ try {
355734
+ await getModelOptionsAsync();
355735
+ } catch {}
355736
+ const availableModels = formatSubagentModelList(listSubagentModelSlugs());
355737
+ const catalogText = formatSubagentDelegationCatalog(listSubagentDelegationCatalog());
355738
+ const requiredCallShapeSection = `
355739
+
355740
+ ## Required call shape
355741
+
355742
+ Every ${AGENT_TOOL_NAME} call MUST include both:
355743
+ - \`description\`: a short 3-5 word title shown in the UI (for example "Analyze video style")
355744
+ - \`prompt\`: the full task for the subagent
355745
+
355746
+ A call that omits \`description\` or \`prompt\` is rejected. Do not start the subagent and "fill those in later".
355747
+
355748
+ Optional but supported on every spawn:
355749
+ - \`subagent_type\`: one of the types listed above. If omitted, ${forkEnabled ? "a fork of yourself is created" : "the general-purpose agent is used"}.
355750
+ - \`model\`: an exact slug from the live catalog below, a family alias (\`sonnet\`, \`opus\`, \`haiku\`), or \`inherit\`. Do not invent slugs. Omit to inherit the parent model. Compact list: ${availableModels}.
355751
+ - \`effort\`: a level listed for that model in the catalog (plus display aliases like Extra High). Omit to inherit the parent effort. Never pass an effort the chosen model does not list.
355752
+ - \`isolation\`: \`"none"\` (default, shared workspace) or \`"worktree"\` (isolated git worktree). Never pass any other value. \`"none"\` is valid and means "do not isolate".
355753
+ - \`run_in_background\`: \`true\` to return immediately and get a completion notification later.
355754
+
355755
+ ## Live model and effort catalog
355756
+
355757
+ This is the same provider catalog the CLI uses for \`/model\` and \`/effort\`. Use these exact \`model\` slugs and only the efforts listed on that row:
355758
+
355759
+ ${catalogText}
355760
+
355761
+ Example of a correct call:
355762
+
355763
+ ${AGENT_TOOL_NAME}({
355764
+ description: "Analyze video style",
355765
+ prompt: "Inspect the extracted frames and write a concise style report. Include palette, motion, typography, and camera language.",
355766
+ subagent_type: "general-purpose",
355767
+ isolation: "none"
355768
+ })
355769
+
355770
+ To pin a different model or effort:
355771
+
355772
+ ${AGENT_TOOL_NAME}({
355773
+ description: "Deep code review",
355774
+ prompt: "Review src/auth for token handling bugs. Report file paths and line numbers. Do not edit files.",
355775
+ subagent_type: "general-purpose",
355776
+ model: "inherit",
355777
+ effort: "high"
355778
+ })
355779
+ `;
355488
355780
  const writingThePromptSection = `
355489
355781
 
355490
355782
  ## Writing the prompt
@@ -355583,7 +355875,9 @@ The ${AGENT_TOOL_NAME} tool launches specialized agents (subprocesses) that auto
355583
355875
 
355584
355876
  ${agentListSection}
355585
355877
 
355586
- ${forkEnabled ? `When using the ${AGENT_TOOL_NAME} tool, specify a subagent_type to use a specialized agent, or omit it to fork yourself — a fork inherits your full conversation context.` : `When using the ${AGENT_TOOL_NAME} tool, specify a subagent_type parameter to select which agent type to use. If omitted, the general-purpose agent is used.`}`;
355878
+ ${forkEnabled ? `When using the ${AGENT_TOOL_NAME} tool, specify a subagent_type to use a specialized agent, or omit it to fork yourself — a fork inherits your full conversation context.` : `When using the ${AGENT_TOOL_NAME} tool, specify a subagent_type parameter to select which agent type to use. If omitted, the general-purpose agent is used.`}
355879
+
355880
+ Always pass both \`description\` (3-5 word title) and \`prompt\` (full task). You may set \`model\` to any available model slug and \`effort\` to any effort that model supports; omit them to inherit the parent. \`isolation\` accepts only \`"none"\` (default, shared workspace) or \`"worktree"\`.`;
355587
355881
  if (isCoordinator) {
355588
355882
  return shared2;
355589
355883
  }
@@ -355612,10 +355906,11 @@ Usage notes:
355612
355906
  - Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, web fetches, etc.)${forkEnabled ? "" : ", since it is not aware of the user's intent"}
355613
355907
  - If the agent description mentions that it should be used proactively, then you should try your best to use it without the user having to ask for it first. Use your judgement.
355614
355908
  - If the user specifies that they want you to run agents "in parallel", you MUST send a single message with multiple ${AGENT_TOOL_NAME} tool use content blocks. For example, if you need to launch both a build-validator agent and a test-runner agent in parallel, send a single message with both tool calls.
355615
- - You can optionally set \`isolation: "worktree"\` to run the agent in a temporary git worktree, giving it an isolated copy of the repository. The worktree is automatically cleaned up if the agent makes no changes; if changes are made, the worktree path and branch are returned in the result.${process.env.USER_TYPE === "ant" ? `
355909
+ - You can optionally set \`model\` to any available model slug listed above (or \`inherit\`) and \`effort\` to any effort that model supports. Omit both to inherit the parent conversation's model and effort.
355910
+ - You can optionally set \`isolation: "none"\` (default, shared workspace) or \`isolation: "worktree"\` to run the agent in a temporary git worktree, giving it an isolated copy of the repository. The worktree is automatically cleaned up if the agent makes no changes; if changes are made, the worktree path and branch are returned in the result. Do not pass any isolation value other than \`"none"\` or \`"worktree"\`.${process.env.USER_TYPE === "ant" ? `
355616
355911
  - You can set \`isolation: "remote"\` to run the agent in a remote CCR environment. This is always a background task; you'll be notified when it completes. Use for long-running tasks that need a fresh sandbox.` : ""}${isInProcessTeammate() ? `
355617
355912
  - The run_in_background, name, team_name, and mode parameters are not available in this context. Only synchronous subagents are supported.` : isTeammate() ? `
355618
- - The name, team_name, and mode parameters are not available in this context — teammates cannot spawn other teammates. Omit them to spawn a subagent.` : ""}${whenToForkSection}${writingThePromptSection}
355913
+ - The name, team_name, and mode parameters are not available in this context — teammates cannot spawn other teammates. Omit them to spawn a subagent.` : ""}${whenToForkSection}${requiredCallShapeSection}${writingThePromptSection}
355619
355914
 
355620
355915
  ${forkEnabled ? forkExamples : currentExamples}`;
355621
355916
  }
@@ -355624,11 +355919,13 @@ var init_prompt20 = __esm(() => {
355624
355919
  init_auth2();
355625
355920
  init_embeddedTools();
355626
355921
  init_envUtils();
355922
+ init_modelOptions();
355627
355923
  init_teammate();
355628
355924
  init_teammateContext();
355629
355925
  init_prompt2();
355630
355926
  init_prompt3();
355631
355927
  init_constants3();
355928
+ init_agentToolParams();
355632
355929
  init_forkSubagent();
355633
355930
  });
355634
355931
 
@@ -355668,6 +355965,8 @@ var init_AgentTool = __esm(() => {
355668
355965
  init_errors();
355669
355966
  init_messages3();
355670
355967
  init_agent();
355968
+ init_modelAllowlist();
355969
+ init_agentToolParams();
355671
355970
  init_PermissionMode();
355672
355971
  init_permissions2();
355673
355972
  init_sdkEventQueue();
@@ -355695,10 +355994,11 @@ var init_AgentTool = __esm(() => {
355695
355994
  jsx_runtime151 = __toESM(require_jsx_runtime(), 1);
355696
355995
  isBackgroundTasksDisabled2 = isEnvTruthy(process.env.MAXIMO_SYNTAX_DISABLE_BACKGROUND_TASKS);
355697
355996
  baseInputSchema = lazySchema(() => exports_external.object({
355698
- description: exports_external.string().describe("A short (3-5 word) description of the task"),
355699
- prompt: exports_external.string().describe("The task for the agent to perform"),
355700
- subagent_type: exports_external.string().optional().describe("The type of specialized agent to use for this task"),
355701
- model: exports_external.enum(["sonnet", "opus", "haiku"]).optional().describe("Optional model override for this agent. Takes precedence over the agent definition's model frontmatter. If omitted, uses the agent definition's model, or inherits from the parent."),
355997
+ description: exports_external.string().describe("A short (3-5 word) title for the task. Required. Shown in the UI as the subagent name."),
355998
+ prompt: exports_external.string().describe("The full task for the agent to perform. Required. The subagent starts with zero conversation context, so include everything it needs."),
355999
+ subagent_type: exports_external.string().optional().describe("The type of specialized agent to use for this task. Built-in types include general-purpose, Explore, and Plan when enabled. If omitted, the general-purpose agent is used (or a fork, when forking is enabled)."),
356000
+ model: exports_external.string().optional().describe(`Optional model slug for this subagent. Pass an exact slug from the live catalog in this tool's description, a family alias (sonnet, opus, haiku), or "inherit". If omitted, uses the agent definition's model or inherits the parent. Do not invent slugs.`),
356001
+ effort: exports_external.string().optional().describe("Optional reasoning effort for this subagent. Pass a level listed for the chosen model in this tool's live catalog (minimal, low, medium, high, xhigh, max, ultra — plus Extra High / extra_high aliases). If omitted, inherits the parent effort or the agent definition's effort. Unsupported levels are clamped to that model's catalog."),
355702
356002
  run_in_background: exports_external.boolean().optional().describe("Set to true to run this agent in the background. You will be notified when it completes.")
355703
356003
  }));
355704
356004
  fullInputSchema2 = lazySchema(() => {
@@ -355708,7 +356008,7 @@ var init_AgentTool = __esm(() => {
355708
356008
  mode: permissionModeSchema().optional().describe('Permission mode for spawned teammate (e.g., "plan" to require plan approval).')
355709
356009
  });
355710
356010
  return baseInputSchema().merge(multiAgentInputSchema).extend({
355711
- isolation: exports_external.enum(["worktree"]).optional().describe('Isolation mode. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo.'),
356011
+ isolation: exports_external.enum(["none", "worktree"]).optional().describe('Isolation mode. "none" (default) shares the parent workspace. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo. Do not pass any other value.'),
355712
356012
  cwd: exports_external.string().optional().describe('Absolute path to run the agent in. Overrides the working directory for all filesystem and shell operations within this agent. Mutually exclusive with isolation: "worktree".')
355713
356013
  });
355714
356014
  });
@@ -355716,9 +356016,10 @@ var init_AgentTool = __esm(() => {
355716
356016
  const schema = fullInputSchema2().omit({
355717
356017
  cwd: true
355718
356018
  });
355719
- return isBackgroundTasksDisabled2 || isForkSubagentEnabled() ? schema.omit({
356019
+ const gated = isBackgroundTasksDisabled2 || isForkSubagentEnabled() ? schema.omit({
355720
356020
  run_in_background: true
355721
356021
  }) : schema;
356022
+ return exports_external.preprocess(normalizeAgentToolInput, gated);
355722
356023
  });
355723
356024
  outputSchema31 = lazySchema(() => {
355724
356025
  const syncOutputSchema = agentToolResultSchema().extend({
@@ -355776,6 +356077,7 @@ var init_AgentTool = __esm(() => {
355776
356077
  subagent_type,
355777
356078
  description,
355778
356079
  model: modelParam,
356080
+ effort: effortParam,
355779
356081
  run_in_background,
355780
356082
  name,
355781
356083
  team_name,
@@ -355785,6 +356087,8 @@ var init_AgentTool = __esm(() => {
355785
356087
  }, toolUseContext, canUseTool, assistantMessage, onProgress) {
355786
356088
  const startTime2 = Date.now();
355787
356089
  const model = isCoordinatorMode() ? undefined : modelParam;
356090
+ const requestedEffort = isCoordinatorMode() ? undefined : normalizeEffortInput(effortParam);
356091
+ const requestedIsolation = isolation === "none" ? undefined : isolation;
355788
356092
  const appState = toolUseContext.getAppState();
355789
356093
  const permissionMode = appState.toolPermissionContext.mode;
355790
356094
  const rootSetAppState = toolUseContext.setAppStateForTasks ?? toolUseContext.setAppState;
@@ -355891,6 +356195,9 @@ var init_AgentTool = __esm(() => {
355891
356195
  setAgentColor(selectedAgent.agentType, selectedAgent.color);
355892
356196
  }
355893
356197
  const resolvedAgentModel = getAgentModel(selectedAgent.model, toolUseContext.options.mainLoopModel, isForkPath ? undefined : model, permissionMode);
356198
+ if (model && !isModelAllowed(resolvedAgentModel)) {
356199
+ throw new Error(`Model '${model}' is not available. Available models: ${formatSubagentModelList(listSubagentModelSlugs())}.`);
356200
+ }
355894
356201
  logEvent("tengu_agent_tool_selected", {
355895
356202
  agent_type: selectedAgent.agentType,
355896
356203
  model: resolvedAgentModel,
@@ -355901,7 +356208,7 @@ var init_AgentTool = __esm(() => {
355901
356208
  is_async: (run_in_background === true || selectedAgent.background === true) && !isBackgroundTasksDisabled2,
355902
356209
  is_fork: isForkPath
355903
356210
  });
355904
- const effectiveIsolation = isolation ?? selectedAgent.isolation;
356211
+ const effectiveIsolation = requestedIsolation ?? selectedAgent.isolation;
355905
356212
  if (false) {}
355906
356213
  let enhancedSystemPrompt;
355907
356214
  let forkParentSystemPrompt;
@@ -355990,7 +356297,8 @@ var init_AgentTool = __esm(() => {
355990
356297
  useExactTools: true
355991
356298
  },
355992
356299
  worktreePath: worktreeInfo?.worktreePath,
355993
- description
356300
+ description,
356301
+ effort: requestedEffort
355994
356302
  };
355995
356303
  const cwdOverridePath = cwd2 ?? worktreeInfo?.worktreePath;
355996
356304
  const wrapWithCwd = (fn) => cwdOverridePath ? runWithCwdOverride(cwdOverridePath, fn) : fn();
@@ -366440,7 +366748,7 @@ function getAnthropicEnvMetadata() {
366440
366748
  function getBuildAgeMinutes() {
366441
366749
  if (false)
366442
366750
  ;
366443
- const buildTime = new Date("2026-08-13T12:57:41.293Z").getTime();
366751
+ const buildTime = new Date("2026-08-15T17:39:50.605Z").getTime();
366444
366752
  if (isNaN(buildTime))
366445
366753
  return;
366446
366754
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -432518,7 +432826,7 @@ function getRecentActivitySync() {
432518
432826
  return cachedActivity;
432519
432827
  }
432520
432828
  function getLogoDisplayData() {
432521
- const version2 = process.env.DEMO_VERSION ?? "0.1.33" ?? "99.0.0";
432829
+ const version2 = process.env.DEMO_VERSION ?? "0.1.35" ?? "99.0.0";
432522
432830
  const serverUrl = getDirectConnectServerUrl();
432523
432831
  const displayPath = process.env.DEMO_VERSION ? "/code/maximo" : getDisplayPath(getCwd());
432524
432832
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -461983,7 +462291,7 @@ var init_bridge_kick = __esm(() => {
461983
462291
  var call57 = async () => {
461984
462292
  return {
461985
462293
  type: "text",
461986
- value: `${"99.0.0"} (built ${"2026-08-13T12:57:41.293Z"})`
462294
+ value: `${"99.0.0"} (built ${"2026-08-15T17:39:50.605Z"})`
461987
462295
  };
461988
462296
  }, version2, version_default;
461989
462297
  var init_version = __esm(() => {
@@ -481866,7 +482174,7 @@ function getUsingYourToolsSection(enabledTools) {
481866
482174
  `);
481867
482175
  }
481868
482176
  function getAgentToolSection() {
481869
- return isForkSubagentEnabled() ? `Calling ${AGENT_TOOL_NAME} without a subagent_type creates a fork, which runs in the background and keeps its tool output out of your context — so you can keep chatting with the user while it works. Reach for it when research or multi-step implementation work would otherwise fill your context with raw output you won't need again. **If you ARE the fork** — execute directly; do not re-delegate.` : `Use the ${AGENT_TOOL_NAME} tool with specialized agents when the task at hand matches the agent's description. Subagents are valuable for parallelizing independent queries or for protecting the main context window from excessive results, but they should not be used excessively when not needed. Importantly, avoid duplicating work that subagents are already doing - if you delegate research to a subagent, do not also perform the same searches yourself.`;
482177
+ return isForkSubagentEnabled() ? `Calling ${AGENT_TOOL_NAME} without a subagent_type creates a fork, which runs in the background and keeps its tool output out of your context — so you can keep chatting with the user while it works. Reach for it when research or multi-step implementation work would otherwise fill your context with raw output you won't need again. **If you ARE the fork** — execute directly; do not re-delegate.` : `Use the ${AGENT_TOOL_NAME} tool with specialized agents when the task at hand matches the agent's description. Subagents are valuable for parallelizing independent queries or for protecting the main context window from excessive results, but they should not be used excessively when not needed. Importantly, avoid duplicating work that subagents are already doing - if you delegate research to a subagent, do not also perform the same searches yourself. Every ${AGENT_TOOL_NAME} call must include \`description\` (3-5 word title) and \`prompt\` (full task). You may set \`model\` to any available model slug and \`effort\` to any effort that model supports; omit them to inherit the parent. \`isolation\` is \`"none"\` (default) or \`"worktree"\` — never any other value.`;
481870
482178
  }
481871
482179
  function getDiscoverSkillsGuidance() {
481872
482180
  if (false) {}
@@ -536515,7 +536823,7 @@ function SetupRow({ children }) {
536515
536823
  }
536516
536824
  function WelcomeV2() {
536517
536825
  const { columns } = useTerminalSize();
536518
- const version3 = "0.1.33";
536826
+ const version3 = "0.1.35";
536519
536827
  const width = Math.max(48, Math.min(columns || 92, 92));
536520
536828
  const stacked = width < OCTOPUS_COMPACT_WIDTH + 42;
536521
536829
  return /* @__PURE__ */ jsx_runtime479.jsx(ThemedBox_default, {
@@ -556451,7 +556759,7 @@ Usage: maximo --remote "your task description"`, () => gracefulShutdown(1));
556451
556759
  pendingHookMessages
556452
556760
  }, renderAndRun);
556453
556761
  }
556454
- }).version("0.1.33 (Maximo Syntax)", "-v, --version", "Output the version number");
556762
+ }).version("0.1.35 (Maximo Syntax)", "-v, --version", "Output the version number");
556455
556763
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
556456
556764
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
556457
556765
  if (canUserConfigureAdvisor()) {
@@ -556990,7 +557298,7 @@ function validateProviderEnvOrExit() {
556990
557298
  async function main2() {
556991
557299
  const args = process.argv.slice(2);
556992
557300
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
556993
- console.log(`${"0.1.33"} (Maximo Syntax)`);
557301
+ console.log(`${"0.1.35"} (Maximo Syntax)`);
556994
557302
  return;
556995
557303
  }
556996
557304
  validateProviderEnvOrExit();
@@ -557067,4 +557375,4 @@ async function main2() {
557067
557375
  }
557068
557376
  main2();
557069
557377
 
557070
- //# debugId=A40DFA0841863D9C64756E2164756E21
557378
+ //# debugId=2CD0260EB03346DE64756E2164756E21