@gokulvenkatareddy/cortex 0.1.15 → 0.1.17
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/cli.mjs +147 -27
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -15205,6 +15205,24 @@ async function buildLaunchEnv(options) {
|
|
|
15205
15205
|
delete env2.CODEX_ACCOUNT_ID;
|
|
15206
15206
|
return env2;
|
|
15207
15207
|
}
|
|
15208
|
+
if (options.profile === "nvidia") {
|
|
15209
|
+
env2.CORTEX_USE_OPENAI = "1";
|
|
15210
|
+
env2.OPENAI_BASE_URL = persistedEnv.OPENAI_BASE_URL || processEnv.NVIDIA_BASE_URL || "https://integrate.api.nvidia.com/v1";
|
|
15211
|
+
env2.OPENAI_MODEL = persistedEnv.OPENAI_MODEL || processEnv.NVIDIA_MODEL || "meta/llama-3.1-405b-instruct";
|
|
15212
|
+
env2.OPENAI_API_KEY = persistedEnv.OPENAI_API_KEY || processEnv.NVIDIA_API_KEY;
|
|
15213
|
+
return env2;
|
|
15214
|
+
}
|
|
15215
|
+
if (options.profile === "groq") {
|
|
15216
|
+
env2.CORTEX_USE_OPENAI = "1";
|
|
15217
|
+
env2.OPENAI_BASE_URL = persistedEnv.OPENAI_BASE_URL || processEnv.GROQ_BASE_URL || "https://api.groq.com/openai/v1";
|
|
15218
|
+
env2.OPENAI_MODEL = persistedEnv.OPENAI_MODEL || processEnv.GROQ_MODEL || "llama-3.1-70b-versatile";
|
|
15219
|
+
env2.OPENAI_API_KEY = persistedEnv.OPENAI_API_KEY || processEnv.GROQ_API_KEY;
|
|
15220
|
+
return env2;
|
|
15221
|
+
}
|
|
15222
|
+
if (options.profile === "anthropic") {
|
|
15223
|
+
env2.ANTHROPIC_API_KEY = persistedEnv.OPENAI_API_KEY || processEnv.ANTHROPIC_API_KEY;
|
|
15224
|
+
return env2;
|
|
15225
|
+
}
|
|
15208
15226
|
if (options.profile === "atomic-chat") {
|
|
15209
15227
|
const getAtomicChatBaseUrl = options.getAtomicChatChatBaseUrl ?? (() => "http://127.0.0.1:1337/v1");
|
|
15210
15228
|
const resolveModel = options.resolveAtomicChatDefaultModel ?? (async () => null);
|
|
@@ -274319,29 +274337,39 @@ function ProviderChooser({
|
|
|
274319
274337
|
const summary = buildCurrentProviderSummary();
|
|
274320
274338
|
const options2 = [
|
|
274321
274339
|
{
|
|
274322
|
-
label: "
|
|
274323
|
-
value: "
|
|
274324
|
-
description: "
|
|
274340
|
+
label: "NVIDIA",
|
|
274341
|
+
value: "nvidia",
|
|
274342
|
+
description: "Use NVIDIA NIMs with an API key"
|
|
274325
274343
|
},
|
|
274326
274344
|
{
|
|
274327
|
-
label: "
|
|
274328
|
-
value: "
|
|
274329
|
-
description: "Use
|
|
274345
|
+
label: "Hugging Face",
|
|
274346
|
+
value: "huggingface",
|
|
274347
|
+
description: "Use Hugging Face Inference Endpoints"
|
|
274330
274348
|
},
|
|
274331
274349
|
{
|
|
274332
|
-
label: "
|
|
274350
|
+
label: "Groq",
|
|
274351
|
+
value: "groq",
|
|
274352
|
+
description: "Use Groq Cloud with an API key"
|
|
274353
|
+
},
|
|
274354
|
+
{
|
|
274355
|
+
label: "Cloud (Claude)",
|
|
274356
|
+
value: "anthropic",
|
|
274357
|
+
description: "Use Anthropic API directly with an API key"
|
|
274358
|
+
},
|
|
274359
|
+
{
|
|
274360
|
+
label: "OpenAI",
|
|
274333
274361
|
value: "openai",
|
|
274334
|
-
description: "GPT-4o
|
|
274362
|
+
description: "Use OpenAI GPT-4o and similar models"
|
|
274335
274363
|
},
|
|
274336
274364
|
{
|
|
274337
274365
|
label: "Gemini",
|
|
274338
274366
|
value: "gemini",
|
|
274339
|
-
description: "Use Google Gemini with API key
|
|
274367
|
+
description: "Use Google Gemini with API key"
|
|
274340
274368
|
},
|
|
274341
274369
|
{
|
|
274342
|
-
label: "
|
|
274343
|
-
value: "
|
|
274344
|
-
description: "Use
|
|
274370
|
+
label: "Ollama",
|
|
274371
|
+
value: "ollama",
|
|
274372
|
+
description: "Use a local Ollama model (no key needed)"
|
|
274345
274373
|
}
|
|
274346
274374
|
];
|
|
274347
274375
|
if (summary.savedProfileLabel !== "none") {
|
|
@@ -274812,10 +274840,14 @@ function ProviderWizard({
|
|
|
274812
274840
|
case "choose":
|
|
274813
274841
|
return /* @__PURE__ */ jsx_dev_runtime67.jsxDEV(ProviderChooser, {
|
|
274814
274842
|
onChoose: (value) => {
|
|
274815
|
-
if (value === "
|
|
274816
|
-
setStep({ name: "
|
|
274817
|
-
} else if (value === "
|
|
274818
|
-
setStep({ name: "
|
|
274843
|
+
if (value === "nvidia") {
|
|
274844
|
+
setStep({ name: "nvidia-key" });
|
|
274845
|
+
} else if (value === "huggingface") {
|
|
274846
|
+
setStep({ name: "huggingface-key" });
|
|
274847
|
+
} else if (value === "groq") {
|
|
274848
|
+
setStep({ name: "groq-key" });
|
|
274849
|
+
} else if (value === "anthropic") {
|
|
274850
|
+
setStep({ name: "anthropic-key" });
|
|
274819
274851
|
} else if (value === "openai") {
|
|
274820
274852
|
setStep({
|
|
274821
274853
|
name: "openai-key",
|
|
@@ -274823,6 +274855,8 @@ function ProviderWizard({
|
|
|
274823
274855
|
});
|
|
274824
274856
|
} else if (value === "gemini") {
|
|
274825
274857
|
setStep({ name: "gemini-auth-method" });
|
|
274858
|
+
} else if (value === "ollama") {
|
|
274859
|
+
setStep({ name: "ollama-detect" });
|
|
274826
274860
|
} else if (value === "clear") {
|
|
274827
274861
|
const filePath = deleteProfileFile();
|
|
274828
274862
|
onDone(`Removed saved provider profile at ${filePath}. Restart CORTEX to go back to normal startup.`, {
|
|
@@ -275063,6 +275097,88 @@ function ProviderWizard({
|
|
|
275063
275097
|
onBack: () => setStep({ name: "choose" }),
|
|
275064
275098
|
onCancel: () => onDone()
|
|
275065
275099
|
}, undefined, false, undefined, this);
|
|
275100
|
+
case "nvidia-key":
|
|
275101
|
+
return /* @__PURE__ */ jsx_dev_runtime67.jsxDEV(TextEntryDialog, {
|
|
275102
|
+
resetStateKey: step.name,
|
|
275103
|
+
title: "NVIDIA setup",
|
|
275104
|
+
description: "Enter your NVIDIA API key.",
|
|
275105
|
+
initialValue: "",
|
|
275106
|
+
placeholder: "nvapi-...",
|
|
275107
|
+
mask: "*",
|
|
275108
|
+
onSubmit: (value) => {
|
|
275109
|
+
const env4 = buildOpenAIProfileEnv({
|
|
275110
|
+
goal: normalizeRecommendationGoal(null),
|
|
275111
|
+
apiKey: value.trim(),
|
|
275112
|
+
baseUrl: "https://integrate.api.nvidia.com/v1",
|
|
275113
|
+
model: "meta/llama-3.1-405b-instruct",
|
|
275114
|
+
processEnv: {}
|
|
275115
|
+
});
|
|
275116
|
+
if (env4) {
|
|
275117
|
+
finishProfileSave(onDone, "nvidia", env4);
|
|
275118
|
+
}
|
|
275119
|
+
},
|
|
275120
|
+
onCancel: () => setStep({ name: "choose" })
|
|
275121
|
+
}, undefined, false, undefined, this);
|
|
275122
|
+
case "groq-key":
|
|
275123
|
+
return /* @__PURE__ */ jsx_dev_runtime67.jsxDEV(TextEntryDialog, {
|
|
275124
|
+
resetStateKey: step.name,
|
|
275125
|
+
title: "Groq setup",
|
|
275126
|
+
description: "Enter your Groq API key.",
|
|
275127
|
+
initialValue: "",
|
|
275128
|
+
placeholder: "gsk_...",
|
|
275129
|
+
mask: "*",
|
|
275130
|
+
onSubmit: (value) => {
|
|
275131
|
+
const env4 = buildOpenAIProfileEnv({
|
|
275132
|
+
goal: normalizeRecommendationGoal(null),
|
|
275133
|
+
apiKey: value.trim(),
|
|
275134
|
+
baseUrl: "https://api.groq.com/openai/v1",
|
|
275135
|
+
model: "llama-3.1-70b-versatile",
|
|
275136
|
+
processEnv: {}
|
|
275137
|
+
});
|
|
275138
|
+
if (env4) {
|
|
275139
|
+
finishProfileSave(onDone, "groq", env4);
|
|
275140
|
+
}
|
|
275141
|
+
},
|
|
275142
|
+
onCancel: () => setStep({ name: "choose" })
|
|
275143
|
+
}, undefined, false, undefined, this);
|
|
275144
|
+
case "huggingface-key":
|
|
275145
|
+
return /* @__PURE__ */ jsx_dev_runtime67.jsxDEV(TextEntryDialog, {
|
|
275146
|
+
resetStateKey: step.name,
|
|
275147
|
+
title: "Hugging Face setup",
|
|
275148
|
+
description: "Enter your Hugging Face Token.",
|
|
275149
|
+
initialValue: "",
|
|
275150
|
+
placeholder: "hf_...",
|
|
275151
|
+
mask: "*",
|
|
275152
|
+
onSubmit: (value) => {
|
|
275153
|
+
const env4 = buildOpenAIProfileEnv({
|
|
275154
|
+
goal: normalizeRecommendationGoal(null),
|
|
275155
|
+
apiKey: value.trim(),
|
|
275156
|
+
baseUrl: "https://router.huggingface.co/v1",
|
|
275157
|
+
model: "zai-org/GLM-5:together",
|
|
275158
|
+
processEnv: {}
|
|
275159
|
+
});
|
|
275160
|
+
if (env4) {
|
|
275161
|
+
finishProfileSave(onDone, "huggingface", env4);
|
|
275162
|
+
}
|
|
275163
|
+
},
|
|
275164
|
+
onCancel: () => setStep({ name: "choose" })
|
|
275165
|
+
}, undefined, false, undefined, this);
|
|
275166
|
+
case "anthropic-key":
|
|
275167
|
+
return /* @__PURE__ */ jsx_dev_runtime67.jsxDEV(TextEntryDialog, {
|
|
275168
|
+
resetStateKey: step.name,
|
|
275169
|
+
title: "Anthropic setup",
|
|
275170
|
+
description: "Enter your Anthropic API key.",
|
|
275171
|
+
initialValue: "",
|
|
275172
|
+
placeholder: "sk-ant-...",
|
|
275173
|
+
mask: "*",
|
|
275174
|
+
onSubmit: (value) => {
|
|
275175
|
+
const env4 = {
|
|
275176
|
+
OPENAI_API_KEY: value.trim()
|
|
275177
|
+
};
|
|
275178
|
+
finishProfileSave(onDone, "anthropic", env4);
|
|
275179
|
+
},
|
|
275180
|
+
onCancel: () => setStep({ name: "choose" })
|
|
275181
|
+
}, undefined, false, undefined, this);
|
|
275066
275182
|
}
|
|
275067
275183
|
}
|
|
275068
275184
|
var React25, jsx_dev_runtime67, call2 = async (onDone, _context, args) => {
|
|
@@ -362738,7 +362854,7 @@ function getCORTEXEnvMetadata() {
|
|
|
362738
362854
|
function getBuildAgeMinutes() {
|
|
362739
362855
|
if (false)
|
|
362740
362856
|
;
|
|
362741
|
-
const buildTime = new Date("2026-05-
|
|
362857
|
+
const buildTime = new Date("2026-05-07T13:17:53.280Z").getTime();
|
|
362742
362858
|
if (isNaN(buildTime))
|
|
362743
362859
|
return;
|
|
362744
362860
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -375550,6 +375666,10 @@ function extractTag(html2, tagName) {
|
|
|
375550
375666
|
return null;
|
|
375551
375667
|
}
|
|
375552
375668
|
function isNotEmptyMessage(message) {
|
|
375669
|
+
if (!message)
|
|
375670
|
+
return false;
|
|
375671
|
+
if (!message.type)
|
|
375672
|
+
return false;
|
|
375553
375673
|
if (message.type === "progress" || message.type === "attachment" || message.type === "system") {
|
|
375554
375674
|
return true;
|
|
375555
375675
|
}
|
|
@@ -392421,7 +392541,7 @@ function buildPrimarySection() {
|
|
|
392421
392541
|
}, undefined, false, undefined, this);
|
|
392422
392542
|
return [{
|
|
392423
392543
|
label: "Version",
|
|
392424
|
-
value: "0.1.
|
|
392544
|
+
value: "0.1.17"
|
|
392425
392545
|
}, {
|
|
392426
392546
|
label: "Session name",
|
|
392427
392547
|
value: nameValue
|
|
@@ -430302,7 +430422,7 @@ var import_react_compiler_runtime199, React86, import_react151, jsx_dev_runtime2
|
|
|
430302
430422
|
columns
|
|
430303
430423
|
} = useTerminalSize();
|
|
430304
430424
|
const toggleShowAllShortcut = useShortcutDisplay("transcript:toggleShowAll", "Transcript", "Ctrl+E");
|
|
430305
|
-
const normalizedMessages = import_react151.useMemo(() => normalizeMessages(messages).filter(isNotEmptyMessage), [messages]);
|
|
430425
|
+
const normalizedMessages = import_react151.useMemo(() => normalizeMessages(messages.filter(Boolean)).filter(isNotEmptyMessage), [messages]);
|
|
430306
430426
|
const isStreamingThinkingVisible = import_react151.useMemo(() => {
|
|
430307
430427
|
if (!streamingThinking)
|
|
430308
430428
|
return false;
|
|
@@ -459112,7 +459232,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
459112
459232
|
var call60 = async () => {
|
|
459113
459233
|
return {
|
|
459114
459234
|
type: "text",
|
|
459115
|
-
value: `${"99.0.0"} (built ${"2026-05-
|
|
459235
|
+
value: `${"99.0.0"} (built ${"2026-05-07T13:17:53.280Z"})`
|
|
459116
459236
|
};
|
|
459117
459237
|
}, version2, version_default;
|
|
459118
459238
|
var init_version = __esm(() => {
|
|
@@ -549821,7 +549941,7 @@ function WelcomeV2() {
|
|
|
549821
549941
|
dimColor: true,
|
|
549822
549942
|
children: [
|
|
549823
549943
|
"v",
|
|
549824
|
-
"0.1.
|
|
549944
|
+
"0.1.17",
|
|
549825
549945
|
" "
|
|
549826
549946
|
]
|
|
549827
549947
|
}, undefined, true, undefined, this)
|
|
@@ -550021,7 +550141,7 @@ function WelcomeV2() {
|
|
|
550021
550141
|
dimColor: true,
|
|
550022
550142
|
children: [
|
|
550023
550143
|
"v",
|
|
550024
|
-
"0.1.
|
|
550144
|
+
"0.1.17",
|
|
550025
550145
|
" "
|
|
550026
550146
|
]
|
|
550027
550147
|
}, undefined, true, undefined, this)
|
|
@@ -550247,7 +550367,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
550247
550367
|
dimColor: true,
|
|
550248
550368
|
children: [
|
|
550249
550369
|
"v",
|
|
550250
|
-
"0.1.
|
|
550370
|
+
"0.1.17",
|
|
550251
550371
|
" "
|
|
550252
550372
|
]
|
|
550253
550373
|
}, undefined, true, undefined, this);
|
|
@@ -550501,7 +550621,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
550501
550621
|
dimColor: true,
|
|
550502
550622
|
children: [
|
|
550503
550623
|
"v",
|
|
550504
|
-
"0.1.
|
|
550624
|
+
"0.1.17",
|
|
550505
550625
|
" "
|
|
550506
550626
|
]
|
|
550507
550627
|
}, undefined, true, undefined, this);
|
|
@@ -553626,7 +553746,7 @@ Usage: cortex --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
553626
553746
|
pendingHookMessages
|
|
553627
553747
|
}, renderAndRun);
|
|
553628
553748
|
}
|
|
553629
|
-
}).version("0.1.
|
|
553749
|
+
}).version("0.1.17 (CORTEX)", "-v, --version", "Output the version number");
|
|
553630
553750
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
553631
553751
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
553632
553752
|
if (canUserConfigureAdvisor()) {
|
|
@@ -554214,7 +554334,7 @@ if (false) {}
|
|
|
554214
554334
|
async function main2() {
|
|
554215
554335
|
const args = process.argv.slice(2);
|
|
554216
554336
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
554217
|
-
const v = typeof MACRO !== "undefined" ? "0.1.
|
|
554337
|
+
const v = typeof MACRO !== "undefined" ? "0.1.17" : "99.0.0-dev";
|
|
554218
554338
|
console.log(`${v} (CORTEX)`);
|
|
554219
554339
|
return;
|
|
554220
554340
|
}
|
|
@@ -554398,4 +554518,4 @@ ${DIM4} session id:${RESET4} ${BOLD2}${handle.sessionId}${RESET4} ${DIM4}(rotat
|
|
|
554398
554518
|
}
|
|
554399
554519
|
main2();
|
|
554400
554520
|
|
|
554401
|
-
//# debugId=
|
|
554521
|
+
//# debugId=F12F89ABF7237E0A64756E2164756E21
|
package/package.json
CHANGED