agent-factorio 0.3.0 → 0.3.1

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/bin.js CHANGED
@@ -64,6 +64,7 @@ program
64
64
  program
65
65
  .command("login")
66
66
  .description("Connect to an AgentFactorio hub and join an organization")
67
+ .option("--hub-url <url>", "Hub URL (default: https://agent-factorio.vercel.app)")
67
68
  .action(loginCommand);
68
69
 
69
70
  program
@@ -41,16 +41,11 @@ async function waitForVerification(hubUrl, loginToken) {
41
41
  throw new Error("Verification timed out. Please try again.");
42
42
  }
43
43
 
44
- export async function loginCommand() {
45
- const existing = readGlobalConfig();
46
- const defaultUrl = existing?.organizations?.[0]?.hubUrl || "";
44
+ const DEFAULT_HUB_URL = "https://agent-factorio.vercel.app";
47
45
 
48
- // 1. Hub URL
49
- const hubUrl = await ask("AgentFactorio Hub URL", defaultUrl || "https://agent-factorio.vercel.app");
50
- if (!hubUrl) {
51
- error("Hub URL is required.");
52
- process.exit(1);
53
- }
46
+ export async function loginCommand(options = {}) {
47
+ const existing = readGlobalConfig();
48
+ const hubUrl = options.hubUrl || existing?.organizations?.[0]?.hubUrl || DEFAULT_HUB_URL;
54
49
 
55
50
  // Check connectivity
56
51
  const reachable = await checkHub(hubUrl);
@@ -58,7 +53,6 @@ export async function loginCommand() {
58
53
  error(`Cannot connect to ${hubUrl}. Is the hub running?`);
59
54
  process.exit(1);
60
55
  }
61
- success("Hub connected.");
62
56
 
63
57
  // 2. Email input
64
58
  const email = await ask("Your email (used as your identifier)");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-factorio",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "CLI for AgentFactorio — AI Agent Fleet Management hub",
5
5
  "type": "module",
6
6
  "bin": {