@appchy/jarvis 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +7 -8
- package/dist/bin.js.map +1 -1
- package/package.json +4 -4
package/dist/bin.js
CHANGED
|
@@ -4909,13 +4909,13 @@ async function browserAuth(appUrl) {
|
|
|
4909
4909
|
return false;
|
|
4910
4910
|
}
|
|
4911
4911
|
}
|
|
4912
|
-
var
|
|
4912
|
+
var APP_URL = process.env.APP_URL ?? "https://jarvis.appchy.com" ?? "https://app.appchy.ai";
|
|
4913
4913
|
async function ensureSetup() {
|
|
4914
4914
|
const config = loadConfig();
|
|
4915
4915
|
if (config?.token || config?.anthropicApiKey || config?.useSubscription) {
|
|
4916
4916
|
return true;
|
|
4917
4917
|
}
|
|
4918
|
-
return browserAuth(
|
|
4918
|
+
return browserAuth(APP_URL);
|
|
4919
4919
|
}
|
|
4920
4920
|
function createCli() {
|
|
4921
4921
|
const program = new Command().name("jarvis").description("Jarvis local agent \u2014 runs Claude Code on your machine").version(PKG_VERSION);
|
|
@@ -4963,17 +4963,16 @@ function createCli() {
|
|
|
4963
4963
|
return;
|
|
4964
4964
|
}
|
|
4965
4965
|
const workspacePath = opts.workspace ?? config?.workspacePath ?? process.cwd();
|
|
4966
|
-
const anthropicApiKey = opts.apiKey ?? config?.anthropicApiKey ?? process.env.ANTHROPIC_API_KEY;
|
|
4967
4966
|
const userId = config?.userId ?? process.env.JARVIS_USER_ID ?? "local";
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4967
|
+
const explicitApiKey = opts.apiKey ?? config?.anthropicApiKey;
|
|
4968
|
+
const useSubscription = !explicitApiKey;
|
|
4969
|
+
const anthropicApiKey = explicitApiKey;
|
|
4971
4970
|
if (opts.foreground) {
|
|
4972
4971
|
await startAgent({
|
|
4973
4972
|
port,
|
|
4974
4973
|
workspacePath,
|
|
4975
4974
|
anthropicApiKey,
|
|
4976
|
-
useSubscription
|
|
4975
|
+
useSubscription,
|
|
4977
4976
|
userId,
|
|
4978
4977
|
upstream: (() => {
|
|
4979
4978
|
const apiUrl = process.env.JARVIS_UPSTREAM_URL ?? config?.apiUrl;
|
|
@@ -5079,7 +5078,7 @@ function createCli() {
|
|
|
5079
5078
|
console.log("Starting agent...");
|
|
5080
5079
|
await program.parseAsync(["node", "jarvis", "start"]);
|
|
5081
5080
|
});
|
|
5082
|
-
program.command("logs").description("View agent logs").option("-f, --follow", "Follow log output (like tail -f)").option("-n, --lines <n>", "Number of lines to show", "50").action((opts) => {
|
|
5081
|
+
program.command("logs").description("View agent logs").option("-f, --follow", "Follow log output (like tail -f)", true).option("-n, --lines <n>", "Number of lines to show", "50").action((opts) => {
|
|
5083
5082
|
if (!fs7.existsSync(LOG_FILE)) {
|
|
5084
5083
|
console.log("No log file found. Start the agent first: jarvis start");
|
|
5085
5084
|
return;
|