@aiden-ade/sandbox-agent 0.1.55 → 0.1.56
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/index.cjs +447 -214
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -17536,7 +17536,7 @@ function collapseModelIdToBase(modelId) {
|
|
|
17536
17536
|
return parsed.baseId;
|
|
17537
17537
|
}
|
|
17538
17538
|
|
|
17539
|
-
// ../shared/dist/
|
|
17539
|
+
// ../shared/dist/agent-selection/catalog/models/claude.js
|
|
17540
17540
|
var CLAUDE_5_EFFORT_LEVELS = CLAUDE_EFFORT_LEVELS;
|
|
17541
17541
|
var AVAILABLE_MODELS = [
|
|
17542
17542
|
{
|
|
@@ -17577,7 +17577,9 @@ var CLAUDE_CLI_SEED_MODELS = [
|
|
|
17577
17577
|
capabilities: { contextWindows: [], effortLevels: [] }
|
|
17578
17578
|
}
|
|
17579
17579
|
];
|
|
17580
|
-
|
|
17580
|
+
|
|
17581
|
+
// ../shared/dist/agent-selection/catalog/models/cursor.js
|
|
17582
|
+
var CLAUDE_5_EFFORT_LEVELS2 = CLAUDE_EFFORT_LEVELS;
|
|
17581
17583
|
var CURSOR_AGENT_MODELS = [
|
|
17582
17584
|
{ id: "auto", name: "Auto" },
|
|
17583
17585
|
{ id: "composer-2.5-fast", name: "Composer 2.5 Fast" },
|
|
@@ -17587,22 +17589,22 @@ var CURSOR_AGENT_MODELS = [
|
|
|
17587
17589
|
{
|
|
17588
17590
|
id: "claude-opus-4-8",
|
|
17589
17591
|
name: "Opus 4.8 1M",
|
|
17590
|
-
capabilities: { contextWindows: ["1m"], effortLevels:
|
|
17592
|
+
capabilities: { contextWindows: ["1m"], effortLevels: CLAUDE_5_EFFORT_LEVELS2 }
|
|
17591
17593
|
},
|
|
17592
17594
|
{
|
|
17593
17595
|
id: "claude-opus-4-8-thinking",
|
|
17594
17596
|
name: "Opus 4.8 1M Thinking",
|
|
17595
|
-
capabilities: { contextWindows: ["1m"], effortLevels:
|
|
17597
|
+
capabilities: { contextWindows: ["1m"], effortLevels: CLAUDE_5_EFFORT_LEVELS2 }
|
|
17596
17598
|
},
|
|
17597
17599
|
{
|
|
17598
17600
|
id: "claude-sonnet-5",
|
|
17599
17601
|
name: "Sonnet 5",
|
|
17600
|
-
capabilities: { contextWindows: ["200k", "1m"], effortLevels:
|
|
17602
|
+
capabilities: { contextWindows: ["200k", "1m"], effortLevels: CLAUDE_5_EFFORT_LEVELS2 }
|
|
17601
17603
|
},
|
|
17602
17604
|
{
|
|
17603
17605
|
id: "claude-sonnet-5-thinking",
|
|
17604
17606
|
name: "Sonnet 5 Thinking",
|
|
17605
|
-
capabilities: { contextWindows: ["1m"], effortLevels:
|
|
17607
|
+
capabilities: { contextWindows: ["1m"], effortLevels: CLAUDE_5_EFFORT_LEVELS2 }
|
|
17606
17608
|
},
|
|
17607
17609
|
{ id: "claude-4.6-sonnet", name: "Sonnet 4.6 1M" },
|
|
17608
17610
|
{
|
|
@@ -17616,12 +17618,12 @@ var CURSOR_AGENT_MODELS = [
|
|
|
17616
17618
|
{
|
|
17617
17619
|
id: "claude-fable-5",
|
|
17618
17620
|
name: "Fable 5 1M",
|
|
17619
|
-
capabilities: { contextWindows: ["1m"], effortLevels:
|
|
17621
|
+
capabilities: { contextWindows: ["1m"], effortLevels: CLAUDE_5_EFFORT_LEVELS2 }
|
|
17620
17622
|
},
|
|
17621
17623
|
{
|
|
17622
17624
|
id: "claude-fable-5-thinking",
|
|
17623
17625
|
name: "Fable 5 1M Thinking",
|
|
17624
|
-
capabilities: { contextWindows: ["1m"], effortLevels:
|
|
17626
|
+
capabilities: { contextWindows: ["1m"], effortLevels: CLAUDE_5_EFFORT_LEVELS2 }
|
|
17625
17627
|
},
|
|
17626
17628
|
{
|
|
17627
17629
|
id: "gpt-5.3-codex",
|
|
@@ -17654,10 +17656,173 @@ var CURSOR_AGENT_MODELS = [
|
|
|
17654
17656
|
{ id: "gemini-3-flash", name: "Gemini 3 Flash" },
|
|
17655
17657
|
{ id: "grok-4.5-fast", name: "Grok 4.5 Fast" }
|
|
17656
17658
|
];
|
|
17657
|
-
|
|
17658
|
-
|
|
17659
|
-
|
|
17660
|
-
|
|
17659
|
+
function getCursorModelCollapseKey(modelId) {
|
|
17660
|
+
const parsed = parseModelEffortSuffix(modelId);
|
|
17661
|
+
if (parsed.fast && !parsed.effort)
|
|
17662
|
+
return modelId.trim();
|
|
17663
|
+
return parsed.baseId;
|
|
17664
|
+
}
|
|
17665
|
+
function getCursorCatalogCollapseKey(modelId) {
|
|
17666
|
+
const trimmed = modelId.trim();
|
|
17667
|
+
if (trimmed.endsWith("-medium-thinking")) {
|
|
17668
|
+
return trimmed.slice(0, -"-medium-thinking".length);
|
|
17669
|
+
}
|
|
17670
|
+
let key = getCursorModelCollapseKey(trimmed);
|
|
17671
|
+
if (key.endsWith("-thinking")) {
|
|
17672
|
+
key = getCursorModelCollapseKey(key.slice(0, -"-thinking".length));
|
|
17673
|
+
}
|
|
17674
|
+
return key;
|
|
17675
|
+
}
|
|
17676
|
+
function mergeContextWindows(existing, discovered) {
|
|
17677
|
+
const merged = /* @__PURE__ */ new Set([...existing ?? [], ...discovered ?? []]);
|
|
17678
|
+
return Array.from(merged);
|
|
17679
|
+
}
|
|
17680
|
+
function mergeModelCapabilities(preferred, other) {
|
|
17681
|
+
const contextWindows = mergeContextWindows(preferred.capabilities?.contextWindows, other.capabilities?.contextWindows);
|
|
17682
|
+
const effortLevels = mergeEffortLevels(preferred.capabilities?.effortLevels, new Set(other.capabilities?.effortLevels ?? []));
|
|
17683
|
+
if (contextWindows.length === 0 && effortLevels.length === 0)
|
|
17684
|
+
return preferred;
|
|
17685
|
+
return {
|
|
17686
|
+
...preferred,
|
|
17687
|
+
capabilities: {
|
|
17688
|
+
contextWindows,
|
|
17689
|
+
effortLevels,
|
|
17690
|
+
...preferred.capabilities?.defaultContext ? { defaultContext: preferred.capabilities.defaultContext } : {},
|
|
17691
|
+
...preferred.capabilities?.defaultEffort ? { defaultEffort: preferred.capabilities.defaultEffort } : {},
|
|
17692
|
+
...preferred.capabilities?.supportsAttachments !== void 0 ? { supportsAttachments: preferred.capabilities.supportsAttachments } : {}
|
|
17693
|
+
}
|
|
17694
|
+
};
|
|
17695
|
+
}
|
|
17696
|
+
function collapseCursorCatalogModels(catalogModels) {
|
|
17697
|
+
const mergedByKey = /* @__PURE__ */ new Map();
|
|
17698
|
+
for (const model of catalogModels) {
|
|
17699
|
+
const key = getCursorCatalogCollapseKey(model.id);
|
|
17700
|
+
const canonical = key === model.id ? model : { ...model, id: key };
|
|
17701
|
+
const existing = mergedByKey.get(key);
|
|
17702
|
+
if (!existing) {
|
|
17703
|
+
mergedByKey.set(key, canonical);
|
|
17704
|
+
continue;
|
|
17705
|
+
}
|
|
17706
|
+
const preferred = existing.id.endsWith("-thinking") ? canonical : existing;
|
|
17707
|
+
const secondary = preferred === existing ? canonical : existing;
|
|
17708
|
+
mergedByKey.set(key, mergeModelCapabilities(preferred, secondary));
|
|
17709
|
+
}
|
|
17710
|
+
const seen = /* @__PURE__ */ new Set();
|
|
17711
|
+
const result = [];
|
|
17712
|
+
for (const model of catalogModels) {
|
|
17713
|
+
const key = getCursorCatalogCollapseKey(model.id);
|
|
17714
|
+
if (seen.has(key))
|
|
17715
|
+
continue;
|
|
17716
|
+
seen.add(key);
|
|
17717
|
+
result.push(mergedByKey.get(key));
|
|
17718
|
+
}
|
|
17719
|
+
return result;
|
|
17720
|
+
}
|
|
17721
|
+
function collapseCursorDiscoveredModelIds(modelIds) {
|
|
17722
|
+
const keys = /* @__PURE__ */ new Set();
|
|
17723
|
+
for (const id of modelIds) {
|
|
17724
|
+
const trimmed = id.trim();
|
|
17725
|
+
if (trimmed)
|
|
17726
|
+
keys.add(getCursorModelCollapseKey(trimmed));
|
|
17727
|
+
}
|
|
17728
|
+
return Array.from(keys);
|
|
17729
|
+
}
|
|
17730
|
+
function mergeEffortLevels(existing, discovered) {
|
|
17731
|
+
const merged = new Set(existing ?? []);
|
|
17732
|
+
for (const level of discovered)
|
|
17733
|
+
merged.add(level);
|
|
17734
|
+
return orderEffortLevels(merged);
|
|
17735
|
+
}
|
|
17736
|
+
function orderEffortLevels(levels) {
|
|
17737
|
+
const set2 = levels instanceof Set ? levels : new Set(levels);
|
|
17738
|
+
return EFFORT_LEVELS.filter((level) => set2.has(level));
|
|
17739
|
+
}
|
|
17740
|
+
function lookupKnownModelCapabilities(modelId) {
|
|
17741
|
+
for (const catalog of [AVAILABLE_MODELS, CURSOR_AGENT_MODELS]) {
|
|
17742
|
+
const capabilities = catalog.find((model) => model.id === modelId)?.capabilities;
|
|
17743
|
+
if (capabilities?.effortLevels?.length)
|
|
17744
|
+
return capabilities;
|
|
17745
|
+
}
|
|
17746
|
+
return void 0;
|
|
17747
|
+
}
|
|
17748
|
+
function inferSlugModelCapabilities(providerKind, modelId) {
|
|
17749
|
+
const id = modelId.trim();
|
|
17750
|
+
if (!id)
|
|
17751
|
+
return void 0;
|
|
17752
|
+
const known = lookupKnownModelCapabilities(id);
|
|
17753
|
+
if (known)
|
|
17754
|
+
return known;
|
|
17755
|
+
if (providerKind === "codex_app_server") {
|
|
17756
|
+
if (id === "gpt-5.5") {
|
|
17757
|
+
return { contextWindows: ["1m"], effortLevels: GPT_5_5_EFFORT_LEVELS };
|
|
17758
|
+
}
|
|
17759
|
+
if (id === "gpt-5.4" || id === "gpt-5.4-mini") {
|
|
17760
|
+
return { contextWindows: [], effortLevels: GPT_5_4_EFFORT_LEVELS };
|
|
17761
|
+
}
|
|
17762
|
+
if (/^gpt-5\.6-/.test(id)) {
|
|
17763
|
+
const hasUltra = id.includes("-sol") || id.includes("-terra");
|
|
17764
|
+
return {
|
|
17765
|
+
contextWindows: [],
|
|
17766
|
+
effortLevels: hasUltra ? GPT_5_6_ULTRA_EFFORT_LEVELS : GPT_5_6_EFFORT_LEVELS
|
|
17767
|
+
};
|
|
17768
|
+
}
|
|
17769
|
+
if (id.includes("codex") || /^gpt-5\.[0-3]/.test(id)) {
|
|
17770
|
+
return { contextWindows: [], effortLevels: CODEX_5X_EFFORT_LEVELS };
|
|
17771
|
+
}
|
|
17772
|
+
return void 0;
|
|
17773
|
+
}
|
|
17774
|
+
if (providerKind === "claude_cli") {
|
|
17775
|
+
if (id === "haiku" || id.startsWith("claude-haiku-")) {
|
|
17776
|
+
return { contextWindows: ["200k"], effortLevels: [] };
|
|
17777
|
+
}
|
|
17778
|
+
if (id === "claude-opus-4-8") {
|
|
17779
|
+
return { contextWindows: ["200k", "1m"], effortLevels: CLAUDE_EFFORT_LEVELS };
|
|
17780
|
+
}
|
|
17781
|
+
if (id === "sonnet" || id === "opus" || id === "fable" || /^claude-(sonnet|opus|fable)-/.test(id)) {
|
|
17782
|
+
return { contextWindows: ["200k", "1m"], effortLevels: CLAUDE_EFFORT_LEVELS };
|
|
17783
|
+
}
|
|
17784
|
+
return void 0;
|
|
17785
|
+
}
|
|
17786
|
+
return void 0;
|
|
17787
|
+
}
|
|
17788
|
+
|
|
17789
|
+
// ../shared/dist/agent-selection/catalog/models/antigravity.js
|
|
17790
|
+
var ANTIGRAVITY_CLI_SEED_MODELS = [{ id: "", name: "CLI default" }];
|
|
17791
|
+
var ANTIGRAVITY_EFFORT_SUFFIX = /\s+\((High|Medium|Low|Max|Minimal)\)$/i;
|
|
17792
|
+
var ANTIGRAVITY_EFFORT_BY_LABEL = {
|
|
17793
|
+
High: "high",
|
|
17794
|
+
Medium: "medium",
|
|
17795
|
+
Low: "low",
|
|
17796
|
+
Max: "max",
|
|
17797
|
+
Minimal: "minimal"
|
|
17798
|
+
};
|
|
17799
|
+
function parseAntigravityModelId(modelId) {
|
|
17800
|
+
const trimmed = modelId.trim();
|
|
17801
|
+
const parenMatch = trimmed.match(ANTIGRAVITY_EFFORT_SUFFIX);
|
|
17802
|
+
if (parenMatch) {
|
|
17803
|
+
const effort = ANTIGRAVITY_EFFORT_BY_LABEL[parenMatch[1]] ?? null;
|
|
17804
|
+
return { baseId: trimmed.replace(ANTIGRAVITY_EFFORT_SUFFIX, ""), effort };
|
|
17805
|
+
}
|
|
17806
|
+
const dashParsed = parseModelEffortSuffix(trimmed);
|
|
17807
|
+
return { baseId: dashParsed.baseId, effort: dashParsed.effort };
|
|
17808
|
+
}
|
|
17809
|
+
function getAntigravityModelCollapseKey(modelId) {
|
|
17810
|
+
return parseAntigravityModelId(modelId).baseId;
|
|
17811
|
+
}
|
|
17812
|
+
function collapseAntigravityDiscoveredModelIds(modelIds) {
|
|
17813
|
+
const keys = /* @__PURE__ */ new Set();
|
|
17814
|
+
for (const id of modelIds) {
|
|
17815
|
+
const trimmed = id.trim();
|
|
17816
|
+
if (trimmed)
|
|
17817
|
+
keys.add(getAntigravityModelCollapseKey(trimmed));
|
|
17818
|
+
}
|
|
17819
|
+
return Array.from(keys);
|
|
17820
|
+
}
|
|
17821
|
+
|
|
17822
|
+
// ../shared/dist/agent-selection/catalog/models/codex.js
|
|
17823
|
+
var CODEX_APP_SERVER_MODELS = [];
|
|
17824
|
+
|
|
17825
|
+
// ../shared/dist/agent-selection/catalog/models/copilot.js
|
|
17661
17826
|
var COPILOT_CLI_MODELS = [
|
|
17662
17827
|
{ id: "auto", name: "Auto" },
|
|
17663
17828
|
{
|
|
@@ -17732,6 +17897,35 @@ var COPILOT_CLI_MODELS = [
|
|
|
17732
17897
|
{ id: "gemini-3.5-flash", name: "Gemini 3.5 Flash" },
|
|
17733
17898
|
{ id: "kimi-k2.7-code", name: "Kimi K2.7 Code" }
|
|
17734
17899
|
];
|
|
17900
|
+
|
|
17901
|
+
// ../shared/dist/agent-selection/catalog/models/droid.js
|
|
17902
|
+
var DROID_CLI_MODELS = [
|
|
17903
|
+
{ id: "claude-opus-4-8", name: "Claude Opus 4.8" },
|
|
17904
|
+
{ id: "claude-haiku-4-5-20251001", name: "Claude Haiku 4.5" },
|
|
17905
|
+
{ id: "gpt-5.3-codex", name: "GPT-5.3 Codex" },
|
|
17906
|
+
{ id: "gpt-5.2-codex", name: "GPT-5.2 Codex" },
|
|
17907
|
+
{ id: "gpt-5.4-mini", name: "GPT-5.4 Mini" },
|
|
17908
|
+
{ id: "gemini-3-pro-preview", name: "Antigravity 3 Pro" },
|
|
17909
|
+
{ id: "gemini-3-flash-preview", name: "Antigravity 3 Flash" },
|
|
17910
|
+
{ id: "glm-4.7", name: "GLM 4.7" },
|
|
17911
|
+
{ id: "kimi-k2.5", name: "Kimi k2.5" }
|
|
17912
|
+
];
|
|
17913
|
+
|
|
17914
|
+
// ../shared/dist/agent-selection/catalog/models/grok.js
|
|
17915
|
+
var GROK_CLI_MODELS = [
|
|
17916
|
+
{ id: "grok-4.5", name: "Grok 4.5" },
|
|
17917
|
+
{ id: "grok-composer-2.5-fast", name: "Composer 2.5 Fast" }
|
|
17918
|
+
];
|
|
17919
|
+
|
|
17920
|
+
// ../shared/dist/agent-selection/catalog/models/kimi.js
|
|
17921
|
+
var KIMI_CLI_MODELS = [
|
|
17922
|
+
{ id: "kimi-latest", name: "Kimi Latest" },
|
|
17923
|
+
{ id: "kimi-k2.6", name: "Kimi K2.6" },
|
|
17924
|
+
{ id: "kimi-k2.6-thinking", name: "Kimi K2.6 Thinking" },
|
|
17925
|
+
{ id: "kimi-code/kimi-for-coding", name: "Kimi Code" }
|
|
17926
|
+
];
|
|
17927
|
+
|
|
17928
|
+
// ../shared/dist/agent-selection/catalog/models/opencode.js
|
|
17735
17929
|
var OPENCODE_PAID_MODEL = {
|
|
17736
17930
|
billing: "paid",
|
|
17737
17931
|
capabilities: { contextWindows: [], effortLevels: [] }
|
|
@@ -17809,187 +18003,8 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
17809
18003
|
{ id: "opencode/qwen3.6-plus", name: "Qwen3.6 Plus", ...OPENCODE_PAID_MODEL },
|
|
17810
18004
|
{ id: "opencode/qwen3.5-plus", name: "Qwen3.5 Plus", ...OPENCODE_PAID_MODEL }
|
|
17811
18005
|
];
|
|
17812
|
-
var PROVIDER_MODELS = {
|
|
17813
|
-
claude_cli: CLAUDE_CLI_SEED_MODELS,
|
|
17814
|
-
codex_app_server: [],
|
|
17815
|
-
copilot_cli: COPILOT_CLI_MODELS,
|
|
17816
|
-
cursor_agent_cli: CURSOR_AGENT_MODELS,
|
|
17817
|
-
antigravity_cli: ANTIGRAVITY_CLI_SEED_MODELS,
|
|
17818
|
-
opencode_cli: OPENCODE_ZEN_MODELS,
|
|
17819
|
-
// Server transport dispatches the same "opencode" binary/models as opencode_cli —
|
|
17820
|
-
// share the catalog reference rather than duplicating it.
|
|
17821
|
-
opencode_serve: OPENCODE_ZEN_MODELS,
|
|
17822
|
-
droid_cli: [
|
|
17823
|
-
{ id: "claude-opus-4-8", name: "Claude Opus 4.8" },
|
|
17824
|
-
{ id: "claude-haiku-4-5-20251001", name: "Claude Haiku 4.5" },
|
|
17825
|
-
{ id: "gpt-5.3-codex", name: "GPT-5.3 Codex" },
|
|
17826
|
-
{ id: "gpt-5.2-codex", name: "GPT-5.2 Codex" },
|
|
17827
|
-
{ id: "gpt-5.4-mini", name: "GPT-5.4 Mini" },
|
|
17828
|
-
{ id: "gemini-3-pro-preview", name: "Antigravity 3 Pro" },
|
|
17829
|
-
{ id: "gemini-3-flash-preview", name: "Antigravity 3 Flash" },
|
|
17830
|
-
{ id: "glm-4.7", name: "GLM 4.7" },
|
|
17831
|
-
{ id: "kimi-k2.5", name: "Kimi k2.5" }
|
|
17832
|
-
],
|
|
17833
|
-
kimi_cli: [
|
|
17834
|
-
{ id: "kimi-latest", name: "Kimi Latest" },
|
|
17835
|
-
{ id: "kimi-k2.6", name: "Kimi K2.6" },
|
|
17836
|
-
{ id: "kimi-k2.6-thinking", name: "Kimi K2.6 Thinking" },
|
|
17837
|
-
{ id: "kimi-code/kimi-for-coding", name: "Kimi Code" }
|
|
17838
|
-
],
|
|
17839
|
-
grok_cli: GROK_CLI_MODELS,
|
|
17840
|
-
supatest_cli: [
|
|
17841
|
-
{ id: "small", name: "Small" },
|
|
17842
|
-
{ id: "medium", name: "Medium" },
|
|
17843
|
-
{ id: "premium", name: "Premium" },
|
|
17844
|
-
{ id: "claude-sonnet-4-5", name: "Sonnet 4.5" },
|
|
17845
|
-
{ id: "claude-opus-4-5", name: "Opus 4.5" },
|
|
17846
|
-
{ id: "claude-haiku-4-5", name: "Haiku 4.5" }
|
|
17847
|
-
],
|
|
17848
|
-
generic_cli: []
|
|
17849
|
-
};
|
|
17850
|
-
function findModelDef(providerKind, modelId) {
|
|
17851
|
-
if (!modelId)
|
|
17852
|
-
return void 0;
|
|
17853
|
-
if (providerKind) {
|
|
17854
|
-
const fromProvider = PROVIDER_MODELS[providerKind]?.find((m) => m.id === modelId);
|
|
17855
|
-
if (fromProvider)
|
|
17856
|
-
return fromProvider;
|
|
17857
|
-
}
|
|
17858
|
-
return AVAILABLE_MODELS.find((m) => m.id === modelId);
|
|
17859
|
-
}
|
|
17860
|
-
|
|
17861
|
-
// ../shared/dist/cursor-agent-models.js
|
|
17862
|
-
function getCursorModelCollapseKey(modelId) {
|
|
17863
|
-
const parsed = parseModelEffortSuffix(modelId);
|
|
17864
|
-
if (parsed.fast && !parsed.effort)
|
|
17865
|
-
return modelId.trim();
|
|
17866
|
-
return parsed.baseId;
|
|
17867
|
-
}
|
|
17868
|
-
function getCursorCatalogCollapseKey(modelId) {
|
|
17869
|
-
const trimmed = modelId.trim();
|
|
17870
|
-
if (trimmed.endsWith("-medium-thinking")) {
|
|
17871
|
-
return trimmed.slice(0, -"-medium-thinking".length);
|
|
17872
|
-
}
|
|
17873
|
-
let key = getCursorModelCollapseKey(trimmed);
|
|
17874
|
-
if (key.endsWith("-thinking")) {
|
|
17875
|
-
key = getCursorModelCollapseKey(key.slice(0, -"-thinking".length));
|
|
17876
|
-
}
|
|
17877
|
-
return key;
|
|
17878
|
-
}
|
|
17879
|
-
function mergeContextWindows(existing, discovered) {
|
|
17880
|
-
const merged = /* @__PURE__ */ new Set([...existing ?? [], ...discovered ?? []]);
|
|
17881
|
-
return Array.from(merged);
|
|
17882
|
-
}
|
|
17883
|
-
function mergeModelCapabilities(preferred, other) {
|
|
17884
|
-
const contextWindows = mergeContextWindows(preferred.capabilities?.contextWindows, other.capabilities?.contextWindows);
|
|
17885
|
-
const effortLevels = mergeEffortLevels(preferred.capabilities?.effortLevels, new Set(other.capabilities?.effortLevels ?? []));
|
|
17886
|
-
if (contextWindows.length === 0 && effortLevels.length === 0)
|
|
17887
|
-
return preferred;
|
|
17888
|
-
return {
|
|
17889
|
-
...preferred,
|
|
17890
|
-
capabilities: {
|
|
17891
|
-
contextWindows,
|
|
17892
|
-
effortLevels,
|
|
17893
|
-
...preferred.capabilities?.defaultContext ? { defaultContext: preferred.capabilities.defaultContext } : {},
|
|
17894
|
-
...preferred.capabilities?.defaultEffort ? { defaultEffort: preferred.capabilities.defaultEffort } : {},
|
|
17895
|
-
...preferred.capabilities?.supportsAttachments !== void 0 ? { supportsAttachments: preferred.capabilities.supportsAttachments } : {}
|
|
17896
|
-
}
|
|
17897
|
-
};
|
|
17898
|
-
}
|
|
17899
|
-
function collapseCursorCatalogModels(catalogModels) {
|
|
17900
|
-
const mergedByKey = /* @__PURE__ */ new Map();
|
|
17901
|
-
for (const model of catalogModels) {
|
|
17902
|
-
const key = getCursorCatalogCollapseKey(model.id);
|
|
17903
|
-
const canonical = key === model.id ? model : { ...model, id: key };
|
|
17904
|
-
const existing = mergedByKey.get(key);
|
|
17905
|
-
if (!existing) {
|
|
17906
|
-
mergedByKey.set(key, canonical);
|
|
17907
|
-
continue;
|
|
17908
|
-
}
|
|
17909
|
-
const preferred = existing.id.endsWith("-thinking") ? canonical : existing;
|
|
17910
|
-
const secondary = preferred === existing ? canonical : existing;
|
|
17911
|
-
mergedByKey.set(key, mergeModelCapabilities(preferred, secondary));
|
|
17912
|
-
}
|
|
17913
|
-
const seen = /* @__PURE__ */ new Set();
|
|
17914
|
-
const result = [];
|
|
17915
|
-
for (const model of catalogModels) {
|
|
17916
|
-
const key = getCursorCatalogCollapseKey(model.id);
|
|
17917
|
-
if (seen.has(key))
|
|
17918
|
-
continue;
|
|
17919
|
-
seen.add(key);
|
|
17920
|
-
result.push(mergedByKey.get(key));
|
|
17921
|
-
}
|
|
17922
|
-
return result;
|
|
17923
|
-
}
|
|
17924
|
-
function collapseCursorDiscoveredModelIds(modelIds) {
|
|
17925
|
-
const keys = /* @__PURE__ */ new Set();
|
|
17926
|
-
for (const id of modelIds) {
|
|
17927
|
-
const trimmed = id.trim();
|
|
17928
|
-
if (trimmed)
|
|
17929
|
-
keys.add(getCursorModelCollapseKey(trimmed));
|
|
17930
|
-
}
|
|
17931
|
-
return Array.from(keys);
|
|
17932
|
-
}
|
|
17933
|
-
function mergeEffortLevels(existing, discovered) {
|
|
17934
|
-
const merged = new Set(existing ?? []);
|
|
17935
|
-
for (const level of discovered)
|
|
17936
|
-
merged.add(level);
|
|
17937
|
-
return orderEffortLevels(merged);
|
|
17938
|
-
}
|
|
17939
|
-
function orderEffortLevels(levels) {
|
|
17940
|
-
const set2 = levels instanceof Set ? levels : new Set(levels);
|
|
17941
|
-
return EFFORT_LEVELS.filter((level) => set2.has(level));
|
|
17942
|
-
}
|
|
17943
|
-
function lookupKnownModelCapabilities(modelId) {
|
|
17944
|
-
for (const catalog of [AVAILABLE_MODELS, CURSOR_AGENT_MODELS]) {
|
|
17945
|
-
const capabilities = catalog.find((model) => model.id === modelId)?.capabilities;
|
|
17946
|
-
if (capabilities?.effortLevels?.length)
|
|
17947
|
-
return capabilities;
|
|
17948
|
-
}
|
|
17949
|
-
return void 0;
|
|
17950
|
-
}
|
|
17951
|
-
function inferSlugModelCapabilities(providerKind, modelId) {
|
|
17952
|
-
const id = modelId.trim();
|
|
17953
|
-
if (!id)
|
|
17954
|
-
return void 0;
|
|
17955
|
-
const known = lookupKnownModelCapabilities(id);
|
|
17956
|
-
if (known)
|
|
17957
|
-
return known;
|
|
17958
|
-
if (providerKind === "codex_app_server") {
|
|
17959
|
-
if (id === "gpt-5.5") {
|
|
17960
|
-
return { contextWindows: ["1m"], effortLevels: GPT_5_5_EFFORT_LEVELS };
|
|
17961
|
-
}
|
|
17962
|
-
if (id === "gpt-5.4" || id === "gpt-5.4-mini") {
|
|
17963
|
-
return { contextWindows: [], effortLevels: GPT_5_4_EFFORT_LEVELS };
|
|
17964
|
-
}
|
|
17965
|
-
if (/^gpt-5\.6-/.test(id)) {
|
|
17966
|
-
const hasUltra = id.includes("-sol") || id.includes("-terra");
|
|
17967
|
-
return {
|
|
17968
|
-
contextWindows: [],
|
|
17969
|
-
effortLevels: hasUltra ? GPT_5_6_ULTRA_EFFORT_LEVELS : GPT_5_6_EFFORT_LEVELS
|
|
17970
|
-
};
|
|
17971
|
-
}
|
|
17972
|
-
if (id.includes("codex") || /^gpt-5\.[0-3]/.test(id)) {
|
|
17973
|
-
return { contextWindows: [], effortLevels: CODEX_5X_EFFORT_LEVELS };
|
|
17974
|
-
}
|
|
17975
|
-
return void 0;
|
|
17976
|
-
}
|
|
17977
|
-
if (providerKind === "claude_cli") {
|
|
17978
|
-
if (id === "haiku" || id.startsWith("claude-haiku-")) {
|
|
17979
|
-
return { contextWindows: ["200k"], effortLevels: [] };
|
|
17980
|
-
}
|
|
17981
|
-
if (id === "claude-opus-4-8") {
|
|
17982
|
-
return { contextWindows: ["200k", "1m"], effortLevels: CLAUDE_EFFORT_LEVELS };
|
|
17983
|
-
}
|
|
17984
|
-
if (id === "sonnet" || id === "opus" || id === "fable" || /^claude-(sonnet|opus|fable)-/.test(id)) {
|
|
17985
|
-
return { contextWindows: ["200k", "1m"], effortLevels: CLAUDE_EFFORT_LEVELS };
|
|
17986
|
-
}
|
|
17987
|
-
return void 0;
|
|
17988
|
-
}
|
|
17989
|
-
return void 0;
|
|
17990
|
-
}
|
|
17991
18006
|
|
|
17992
|
-
// ../shared/dist/
|
|
18007
|
+
// ../shared/dist/agent-selection/catalog/models/picker-fallback.js
|
|
17993
18008
|
var CLAUDE_5_EFFORT = [
|
|
17994
18009
|
"minimal",
|
|
17995
18010
|
"low",
|
|
@@ -18062,12 +18077,10 @@ var COPILOT_CLI_PICKER_FALLBACK_MODELS = COPILOT_FALLBACK_IDS.map((id) => {
|
|
|
18062
18077
|
const fromCatalog = COPILOT_CLI_MODELS.find((model) => model.id === id);
|
|
18063
18078
|
if (!fromCatalog)
|
|
18064
18079
|
return { id, name: id };
|
|
18065
|
-
const inferred = id.startsWith("gpt-") ? inferSlugModelCapabilities("codex_app_server", id) : inferSlugModelCapabilities("claude_cli", id
|
|
18080
|
+
const inferred = id.startsWith("gpt-") ? inferSlugModelCapabilities("codex_app_server", id) : inferSlugModelCapabilities("claude_cli", id);
|
|
18066
18081
|
return inferred ? { ...fromCatalog, capabilities: inferred } : fromCatalog;
|
|
18067
18082
|
});
|
|
18068
|
-
var DROID_CLI_PICKER_FALLBACK_MODELS = [
|
|
18069
|
-
...PROVIDER_MODELS.droid_cli ?? []
|
|
18070
|
-
];
|
|
18083
|
+
var DROID_CLI_PICKER_FALLBACK_MODELS = [...DROID_CLI_MODELS];
|
|
18071
18084
|
var KIMI_CLI_PICKER_FALLBACK_MODELS = [
|
|
18072
18085
|
{ id: "kimi-latest", name: "Kimi Latest" },
|
|
18073
18086
|
{ id: "kimi-k2.6", name: "Kimi K2.6", capabilities: caps(CLAUDE_5_EFFORT) },
|
|
@@ -18102,8 +18115,178 @@ function getProviderPickerFallbackModels(providerKind) {
|
|
|
18102
18115
|
return PROVIDER_PICKER_FALLBACK_MODELS[providerKind] ?? [];
|
|
18103
18116
|
}
|
|
18104
18117
|
|
|
18118
|
+
// ../shared/dist/agent-selection/catalog/models/supatest.js
|
|
18119
|
+
var SUPATEST_CLI_MODELS = [
|
|
18120
|
+
{ id: "small", name: "Small" },
|
|
18121
|
+
{ id: "medium", name: "Medium" },
|
|
18122
|
+
{ id: "premium", name: "Premium" },
|
|
18123
|
+
{ id: "claude-sonnet-4-5", name: "Sonnet 4.5" },
|
|
18124
|
+
{ id: "claude-opus-4-5", name: "Opus 4.5" },
|
|
18125
|
+
{ id: "claude-haiku-4-5", name: "Haiku 4.5" }
|
|
18126
|
+
];
|
|
18127
|
+
|
|
18128
|
+
// ../shared/dist/agent-selection/catalog/models/index.js
|
|
18129
|
+
var PROVIDER_MODELS = {
|
|
18130
|
+
claude_cli: CLAUDE_CLI_SEED_MODELS,
|
|
18131
|
+
codex_app_server: CODEX_APP_SERVER_MODELS,
|
|
18132
|
+
copilot_cli: COPILOT_CLI_MODELS,
|
|
18133
|
+
cursor_agent_cli: CURSOR_AGENT_MODELS,
|
|
18134
|
+
antigravity_cli: ANTIGRAVITY_CLI_SEED_MODELS,
|
|
18135
|
+
opencode_cli: OPENCODE_ZEN_MODELS,
|
|
18136
|
+
// Server transport dispatches the same "opencode" binary/models as opencode_cli —
|
|
18137
|
+
// share the catalog reference rather than duplicating it.
|
|
18138
|
+
opencode_serve: OPENCODE_ZEN_MODELS,
|
|
18139
|
+
droid_cli: DROID_CLI_MODELS,
|
|
18140
|
+
kimi_cli: KIMI_CLI_MODELS,
|
|
18141
|
+
grok_cli: GROK_CLI_MODELS,
|
|
18142
|
+
supatest_cli: SUPATEST_CLI_MODELS,
|
|
18143
|
+
generic_cli: []
|
|
18144
|
+
};
|
|
18145
|
+
function findModelDef(providerKind, modelId) {
|
|
18146
|
+
if (!modelId)
|
|
18147
|
+
return void 0;
|
|
18148
|
+
if (providerKind) {
|
|
18149
|
+
const fromProvider = PROVIDER_MODELS[providerKind]?.find((m) => m.id === modelId);
|
|
18150
|
+
if (fromProvider)
|
|
18151
|
+
return fromProvider;
|
|
18152
|
+
}
|
|
18153
|
+
return AVAILABLE_MODELS.find((m) => m.id === modelId);
|
|
18154
|
+
}
|
|
18155
|
+
function catalogProviderFor(providerKind) {
|
|
18156
|
+
return providerKind === "opencode_serve" ? "opencode_cli" : providerKind;
|
|
18157
|
+
}
|
|
18158
|
+
function providerCatalogModels(providerKind) {
|
|
18159
|
+
const catalogProvider = catalogProviderFor(providerKind);
|
|
18160
|
+
const curated = getProviderPickerFallbackModels(catalogProvider);
|
|
18161
|
+
const staticCatalog = PROVIDER_MODELS[catalogProvider] ?? [];
|
|
18162
|
+
if (staticCatalog.length === 0)
|
|
18163
|
+
return curated;
|
|
18164
|
+
const hasConcreteModel = staticCatalog.some((model) => model.id.trim());
|
|
18165
|
+
if (!hasConcreteModel && curated.length > 0)
|
|
18166
|
+
return curated;
|
|
18167
|
+
return staticCatalog;
|
|
18168
|
+
}
|
|
18169
|
+
|
|
18170
|
+
// ../shared/dist/agent-selection/catalog/providers.js
|
|
18171
|
+
var PROVIDERS = [
|
|
18172
|
+
{
|
|
18173
|
+
kind: "claude_cli",
|
|
18174
|
+
label: "Claude Code",
|
|
18175
|
+
selectable: true,
|
|
18176
|
+
localOnly: false,
|
|
18177
|
+
cloudNative: false,
|
|
18178
|
+
workflowEligible: true
|
|
18179
|
+
},
|
|
18180
|
+
{
|
|
18181
|
+
kind: "codex_app_server",
|
|
18182
|
+
label: "Codex",
|
|
18183
|
+
selectable: true,
|
|
18184
|
+
localOnly: false,
|
|
18185
|
+
cloudNative: true,
|
|
18186
|
+
// Codex runs through the managed cloud workflow path, not the user-managed
|
|
18187
|
+
// one, so it is deliberately absent from the workflow picker.
|
|
18188
|
+
workflowEligible: false
|
|
18189
|
+
},
|
|
18190
|
+
{
|
|
18191
|
+
kind: "copilot_cli",
|
|
18192
|
+
label: "GitHub Copilot",
|
|
18193
|
+
selectable: true,
|
|
18194
|
+
localOnly: false,
|
|
18195
|
+
cloudNative: false,
|
|
18196
|
+
workflowEligible: true
|
|
18197
|
+
},
|
|
18198
|
+
{
|
|
18199
|
+
kind: "cursor_agent_cli",
|
|
18200
|
+
label: "Cursor Agent",
|
|
18201
|
+
selectable: true,
|
|
18202
|
+
localOnly: false,
|
|
18203
|
+
cloudNative: false,
|
|
18204
|
+
workflowEligible: true
|
|
18205
|
+
},
|
|
18206
|
+
{
|
|
18207
|
+
kind: "droid_cli",
|
|
18208
|
+
label: "Droid",
|
|
18209
|
+
selectable: true,
|
|
18210
|
+
localOnly: false,
|
|
18211
|
+
cloudNative: false,
|
|
18212
|
+
workflowEligible: true
|
|
18213
|
+
},
|
|
18214
|
+
{
|
|
18215
|
+
kind: "antigravity_cli",
|
|
18216
|
+
label: "Antigravity",
|
|
18217
|
+
selectable: true,
|
|
18218
|
+
localOnly: false,
|
|
18219
|
+
cloudNative: false,
|
|
18220
|
+
workflowEligible: true
|
|
18221
|
+
},
|
|
18222
|
+
{
|
|
18223
|
+
kind: "grok_cli",
|
|
18224
|
+
label: "Grok Build",
|
|
18225
|
+
selectable: true,
|
|
18226
|
+
localOnly: false,
|
|
18227
|
+
cloudNative: false,
|
|
18228
|
+
workflowEligible: true
|
|
18229
|
+
},
|
|
18230
|
+
{
|
|
18231
|
+
kind: "kimi_cli",
|
|
18232
|
+
label: "Kimi",
|
|
18233
|
+
selectable: true,
|
|
18234
|
+
localOnly: false,
|
|
18235
|
+
cloudNative: false,
|
|
18236
|
+
workflowEligible: true
|
|
18237
|
+
},
|
|
18238
|
+
// Only the server transport is user-selectable — it's a strict superset of what
|
|
18239
|
+
// opencode_cli can do (subagent visibility, permission notices, session reuse),
|
|
18240
|
+
// matching how Claude Code/Codex are presented as one option each.
|
|
18241
|
+
{
|
|
18242
|
+
kind: "opencode_serve",
|
|
18243
|
+
label: "OpenCode",
|
|
18244
|
+
selectable: true,
|
|
18245
|
+
localOnly: false,
|
|
18246
|
+
cloudNative: false,
|
|
18247
|
+
workflowEligible: true
|
|
18248
|
+
},
|
|
18249
|
+
{
|
|
18250
|
+
kind: "supatest_cli",
|
|
18251
|
+
label: "Supatest CLI",
|
|
18252
|
+
selectable: true,
|
|
18253
|
+
localOnly: true,
|
|
18254
|
+
cloudNative: false,
|
|
18255
|
+
workflowEligible: false
|
|
18256
|
+
},
|
|
18257
|
+
// opencode_cli stays fully wired for dispatch (base-machine-agent.ts) and as the
|
|
18258
|
+
// OpenCode model catalog source, purely so already-existing opencode_cli sessions
|
|
18259
|
+
// and workflows keep working. It is deliberately not offered for new selection.
|
|
18260
|
+
{
|
|
18261
|
+
kind: "opencode_cli",
|
|
18262
|
+
label: "OpenCode",
|
|
18263
|
+
selectable: false,
|
|
18264
|
+
localOnly: false,
|
|
18265
|
+
cloudNative: false,
|
|
18266
|
+
workflowEligible: true
|
|
18267
|
+
}
|
|
18268
|
+
];
|
|
18269
|
+
var SELECTABLE_PROVIDERS = PROVIDERS.filter((provider) => provider.selectable);
|
|
18270
|
+
var PROVIDER_BY_KIND = new Map(PROVIDERS.map((provider) => [provider.kind, provider]));
|
|
18271
|
+
var WORKFLOW_ELIGIBLE_PROVIDER_KINDS = PROVIDERS.filter((provider) => provider.workflowEligible).map((provider) => provider.kind);
|
|
18272
|
+
|
|
18105
18273
|
// ../shared/dist/runtime-discovered-models.js
|
|
18106
18274
|
var OPENCODE_ZEN_MODEL_BY_ID = new Map(OPENCODE_ZEN_MODELS.map((model) => [model.id, model]));
|
|
18275
|
+
var DROID_MODEL_ID_PATTERN = /^(?:claude-(?:sonnet|opus|haiku|fable)-[a-z0-9][a-z0-9.-]*|gpt-[a-z0-9][a-z0-9.-]*|gemini-[a-z0-9][a-z0-9.-]*|glm-[a-z0-9][a-z0-9.-]*|kimi-[a-z0-9][a-z0-9.-]*)$/i;
|
|
18276
|
+
function isValidDroidModelId(modelId) {
|
|
18277
|
+
const trimmed = modelId.trim();
|
|
18278
|
+
if (!trimmed || trimmed.length > 80)
|
|
18279
|
+
return false;
|
|
18280
|
+
if (/[\s│║╔╚═|]/.test(trimmed))
|
|
18281
|
+
return false;
|
|
18282
|
+
if (/^(tip|usage|error|warning|droid|skills|mcps|agents\.md|trust this)/i.test(trimmed)) {
|
|
18283
|
+
return false;
|
|
18284
|
+
}
|
|
18285
|
+
if (/^v\d+\.\d+/.test(trimmed))
|
|
18286
|
+
return false;
|
|
18287
|
+
return DROID_MODEL_ID_PATTERN.test(trimmed);
|
|
18288
|
+
}
|
|
18289
|
+
var SLUG_DISCOVERY_PROVIDERS = /* @__PURE__ */ new Set(["claude_cli", "codex_app_server"]);
|
|
18107
18290
|
var DISCOVERY_SEED_PROVIDERS = /* @__PURE__ */ new Set([
|
|
18108
18291
|
"claude_cli",
|
|
18109
18292
|
"codex_app_server",
|
|
@@ -18116,30 +18299,50 @@ var DISCOVERY_SEED_PROVIDERS = /* @__PURE__ */ new Set([
|
|
|
18116
18299
|
"copilot_cli",
|
|
18117
18300
|
"droid_cli"
|
|
18118
18301
|
]);
|
|
18119
|
-
|
|
18120
|
-
const catalogProvider = providerKind === "opencode_serve" ? "opencode_cli" : providerKind;
|
|
18121
|
-
const fallback = getProviderPickerFallbackModels(catalogProvider);
|
|
18122
|
-
const staticCatalog = PROVIDER_MODELS[catalogProvider] ?? [];
|
|
18123
|
-
if (staticCatalog.length === 0) {
|
|
18124
|
-
return fallback;
|
|
18125
|
-
}
|
|
18126
|
-
const hasConcreteModel = staticCatalog.some((model) => model.id.trim());
|
|
18127
|
-
if (!hasConcreteModel && fallback.length > 0) {
|
|
18128
|
-
return fallback;
|
|
18129
|
-
}
|
|
18130
|
-
return staticCatalog;
|
|
18131
|
-
}
|
|
18132
|
-
var PROVIDER_MODEL_INFERENCE_IDS = Object.keys(PROVIDER_MODELS).filter((providerId) => providerId !== "antigravity_cli");
|
|
18302
|
+
var baseCatalogForProvider = providerCatalogModels;
|
|
18133
18303
|
function catalogModelsForProvider(providerKind, modelsFromConfig) {
|
|
18134
18304
|
const catalog = baseCatalogForProvider(providerKind);
|
|
18135
18305
|
if (!modelsFromConfig)
|
|
18136
18306
|
return [...catalog];
|
|
18137
18307
|
if (DISCOVERY_SEED_PROVIDERS.has(providerKind)) {
|
|
18138
18308
|
const configById = new Map(modelsFromConfig.map((model) => [model.id, model]));
|
|
18139
|
-
|
|
18309
|
+
const merged = catalog.map((entry) => configById.get(entry.id) ?? entry);
|
|
18310
|
+
const spineIds = new Set(catalog.map((entry) => entry.id));
|
|
18311
|
+
for (const entry of modelsFromConfig) {
|
|
18312
|
+
if (spineIds.has(entry.id))
|
|
18313
|
+
continue;
|
|
18314
|
+
const collapsesOntoSpine = collapseDiscoveredModelIdsForProvider(providerKind, [
|
|
18315
|
+
entry.id
|
|
18316
|
+
]).some((base) => spineIds.has(base));
|
|
18317
|
+
if (collapsesOntoSpine)
|
|
18318
|
+
continue;
|
|
18319
|
+
merged.push(entry);
|
|
18320
|
+
}
|
|
18321
|
+
return merged;
|
|
18140
18322
|
}
|
|
18141
18323
|
return [...modelsFromConfig];
|
|
18142
18324
|
}
|
|
18325
|
+
function collapseDiscoveredModelIdsForProvider(providerKind, discoveredModelIds) {
|
|
18326
|
+
if (providerKind === "cursor_agent_cli" || SLUG_DISCOVERY_PROVIDERS.has(providerKind)) {
|
|
18327
|
+
return collapseCursorDiscoveredModelIds(discoveredModelIds);
|
|
18328
|
+
}
|
|
18329
|
+
if (providerKind === "antigravity_cli") {
|
|
18330
|
+
return collapseAntigravityDiscoveredModelIds(discoveredModelIds);
|
|
18331
|
+
}
|
|
18332
|
+
if (providerKind === "droid_cli") {
|
|
18333
|
+
return discoveredModelIds.map((id) => id.trim()).filter(isValidDroidModelId);
|
|
18334
|
+
}
|
|
18335
|
+
if (providerKind === "opencode_cli" || providerKind === "opencode_serve") {
|
|
18336
|
+
const keys = /* @__PURE__ */ new Set();
|
|
18337
|
+
for (const id of discoveredModelIds) {
|
|
18338
|
+
const trimmed = id.trim();
|
|
18339
|
+
if (trimmed.startsWith("opencode/"))
|
|
18340
|
+
keys.add(collapseModelIdToBase(trimmed));
|
|
18341
|
+
}
|
|
18342
|
+
return Array.from(keys);
|
|
18343
|
+
}
|
|
18344
|
+
return discoveredModelIds.map((id) => id.trim()).filter(Boolean);
|
|
18345
|
+
}
|
|
18143
18346
|
|
|
18144
18347
|
// ../agent-core/dist/index.js
|
|
18145
18348
|
var import_crypto = require("crypto");
|
|
@@ -25904,7 +26107,7 @@ function expandSkillInvocationPrompt(text, cwd, home = (0, import_os9.homedir)()
|
|
|
25904
26107
|
].join("\n")
|
|
25905
26108
|
};
|
|
25906
26109
|
}
|
|
25907
|
-
var DROID_DEFAULT_MODEL = "claude-opus-4-
|
|
26110
|
+
var DROID_DEFAULT_MODEL = "claude-opus-4-8";
|
|
25908
26111
|
var AGENT_ACTIVITY_HEARTBEAT_MS = 1e4;
|
|
25909
26112
|
function normalizeBackendKind(kind) {
|
|
25910
26113
|
if (kind === "codex") return "codex_app_server";
|
|
@@ -51111,7 +51314,7 @@ var SuspensionDetector = class {
|
|
|
51111
51314
|
};
|
|
51112
51315
|
|
|
51113
51316
|
// src/version.ts
|
|
51114
|
-
var AGENT_VERSION = "0.1.
|
|
51317
|
+
var AGENT_VERSION = "0.1.56";
|
|
51115
51318
|
|
|
51116
51319
|
// src/workspace-relocation.ts
|
|
51117
51320
|
var import_node_child_process6 = require("child_process");
|
|
@@ -52838,6 +53041,29 @@ async function refreshProviderVersions() {
|
|
|
52838
53041
|
})
|
|
52839
53042
|
);
|
|
52840
53043
|
}
|
|
53044
|
+
var providerAuthCache = /* @__PURE__ */ new Map();
|
|
53045
|
+
async function refreshProviderAuthStates(providers = [...DISCOVERABLE_PROVIDER_KINDS]) {
|
|
53046
|
+
const env = getDaemonCliEnvironment();
|
|
53047
|
+
await Promise.allSettled(
|
|
53048
|
+
providers.map(async (provider) => {
|
|
53049
|
+
const executable = resolveProviderCliCommand(provider, env);
|
|
53050
|
+
if (!executable) {
|
|
53051
|
+
providerAuthCache.delete(provider);
|
|
53052
|
+
return;
|
|
53053
|
+
}
|
|
53054
|
+
const result = await preflightProviderAuth({ backendKind: provider, executable, env });
|
|
53055
|
+
if (result.status === "unknown") {
|
|
53056
|
+
providerAuthCache.delete(provider);
|
|
53057
|
+
return;
|
|
53058
|
+
}
|
|
53059
|
+
providerAuthCache.set(provider, {
|
|
53060
|
+
status: result.status,
|
|
53061
|
+
...result.message ? { message: result.message } : {},
|
|
53062
|
+
checkedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
53063
|
+
});
|
|
53064
|
+
})
|
|
53065
|
+
);
|
|
53066
|
+
}
|
|
52841
53067
|
function refreshSingleProviderModels(provider, executable, env) {
|
|
52842
53068
|
if (!supportsProviderModelDiscovery(provider)) return Promise.resolve();
|
|
52843
53069
|
const cacheKey = providerModelCacheKey(provider, executable);
|
|
@@ -52869,6 +53095,7 @@ async function refreshProviderModels(providers = DISCOVERABLE_PROVIDER_KINDS) {
|
|
|
52869
53095
|
async function scanAgentCapabilities(providers = [...DISCOVERABLE_PROVIDER_KINDS]) {
|
|
52870
53096
|
await refreshProviderVersions();
|
|
52871
53097
|
await refreshProviderModels(providers);
|
|
53098
|
+
await refreshProviderAuthStates(providers);
|
|
52872
53099
|
return discoverCapabilities();
|
|
52873
53100
|
}
|
|
52874
53101
|
async function printScanModels(args) {
|
|
@@ -52921,12 +53148,18 @@ function discoverCapabilities() {
|
|
|
52921
53148
|
}
|
|
52922
53149
|
const version2 = providerVersionCache.get(provider);
|
|
52923
53150
|
const models = executable ? providerModelCache.get(providerModelCacheKey(provider, executable)) ?? [] : [];
|
|
53151
|
+
const auth2 = available ? providerAuthCache.get(provider) : void 0;
|
|
52924
53152
|
return {
|
|
52925
53153
|
provider,
|
|
52926
53154
|
available,
|
|
52927
53155
|
...version2 ? { version: version2 } : {},
|
|
52928
53156
|
models,
|
|
52929
|
-
lastCheckedAt: now
|
|
53157
|
+
lastCheckedAt: now,
|
|
53158
|
+
...auth2 ? {
|
|
53159
|
+
authStatus: auth2.status,
|
|
53160
|
+
...auth2.message ? { authMessage: auth2.message } : {},
|
|
53161
|
+
authCheckedAt: auth2.checkedAt
|
|
53162
|
+
} : {}
|
|
52930
53163
|
};
|
|
52931
53164
|
}),
|
|
52932
53165
|
hasGit: Boolean(resolveCliExecutable("git", env)),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiden-ade/sandbox-agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.56",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Alan agent runtime — cloud sandbox and local daemon (alan-agent CLI)",
|
|
6
6
|
"bin": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"tsup": "^8.5.1",
|
|
24
24
|
"tsx": "^4.19.0",
|
|
25
25
|
"typescript": "~5.9.3",
|
|
26
|
-
"@alan-ai/
|
|
27
|
-
"@alan-ai/
|
|
26
|
+
"@alan-ai/agent-core": "0.1.0",
|
|
27
|
+
"@alan-ai/shared": "0.1.0"
|
|
28
28
|
},
|
|
29
29
|
"deprecated": "Use @alan-ai-hq/agent-manager instead.",
|
|
30
30
|
"scripts": {
|