agendex-cli 0.17.0 → 0.18.0

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.js +22 -31
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -4176,12 +4176,12 @@ async function login(siteUrlOverride) {
4176
4176
  const existing = loadConfig();
4177
4177
  const config = {
4178
4178
  configVersion: 3,
4179
- token: existing?.token,
4180
4179
  cloudToken: callback.token,
4181
4180
  convexUrl: callback.convexUrl,
4182
- deviceId: existing?.deviceId,
4183
4181
  enabledAdapters: existing?.enabledAdapters ?? [],
4184
- customPlanDirs: existing?.customPlanDirs ?? []
4182
+ customPlanDirs: existing?.customPlanDirs ?? [],
4183
+ ...existing?.token ? { token: existing.token } : {},
4184
+ ...existing?.deviceId ? { deviceId: existing.deviceId } : {}
4185
4185
  };
4186
4186
  saveConfig(config);
4187
4187
  console.log(`[agendex] Logged in successfully!`);
@@ -4195,12 +4195,10 @@ function logout() {
4195
4195
  }
4196
4196
  const config = {
4197
4197
  configVersion: 3,
4198
- token: existing.token,
4199
- cloudToken: undefined,
4200
- convexUrl: undefined,
4201
- deviceId: existing.deviceId,
4202
4198
  enabledAdapters: existing.enabledAdapters,
4203
- customPlanDirs: existing.customPlanDirs
4199
+ customPlanDirs: existing.customPlanDirs,
4200
+ ...existing.token ? { token: existing.token } : {},
4201
+ ...existing.deviceId ? { deviceId: existing.deviceId } : {}
4204
4202
  };
4205
4203
  saveConfig(config);
4206
4204
  console.log("[agendex] Logged out. Cloud token removed.");
@@ -4290,38 +4288,31 @@ async function startCallbackServer() {
4290
4288
  };
4291
4289
  }
4292
4290
  function callbackPage(success) {
4293
- const title = success ? "Login successful" : "Login failed";
4294
- const message = success ? "You can close this tab and return to your terminal." : "Missing token. Please try again.";
4295
- const icon = success ? '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width:32px;height:32px;color:#22c55e"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/></svg>' : '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width:32px;height:32px;color:#ef4444"><path stroke-linecap="round" stroke-linejoin="round" d="m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/></svg>';
4291
+ const title = success ? "Signed in" : "Sign in failed";
4292
+ const message = success ? "Return to your terminal." : "Run agendex login again.";
4296
4293
  return `<!DOCTYPE html>
4297
4294
  <html lang="en">
4298
4295
  <head>
4299
4296
  <meta charset="utf-8"/>
4300
4297
  <meta name="viewport" content="width=device-width,initial-scale=1"/>
4301
- <title>${title} Agendex</title>
4298
+ <title>${title} | Agendex</title>
4302
4299
  <style>
4303
- *{margin:0;padding:0;box-sizing:border-box}
4304
- @media(prefers-color-scheme:dark){
4305
- :root{--bg:#111;--surface:#161616;--text:#e8e8e8;--secondary:#888;--tertiary:#555;--border:rgba(255,255,255,0.06)}
4306
- }
4307
- @media(prefers-color-scheme:light){
4308
- :root{--bg:#fafafa;--surface:#fff;--text:#111;--secondary:#666;--tertiary:#999;--border:rgba(0,0,0,0.06)}
4309
- }
4310
- body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:var(--bg);color:var(--text);display:flex;align-items:center;justify-content:center;min-height:100vh;-webkit-font-smoothing:antialiased}
4311
- .card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:40px 48px;text-align:center;max-width:400px;width:100%;box-shadow:0 2px 16px rgba(0,0,0,0.04)}
4312
- .icon{margin-bottom:16px;display:flex;justify-content:center}
4313
- h1{font-size:18px;font-weight:600;letter-spacing:-0.02em;margin-bottom:8px}
4314
- p{font-size:13px;color:var(--secondary);line-height:1.5}
4315
- .brand{margin-top:24px;font-size:11px;color:var(--tertiary);letter-spacing:0.04em;font-weight:500}
4300
+ *{box-sizing:border-box}
4301
+ :root{color-scheme:dark light;--bg:oklch(13% 0.018 180);--text:oklch(91% 0.012 125);--muted:oklch(58% 0.018 160);--accent:oklch(90% 0.23 125);--err:oklch(64% 0.2 25)}
4302
+ @media(prefers-color-scheme:light){:root{--bg:oklch(97% 0.014 125);--text:oklch(18% 0.016 135);--muted:oklch(48% 0.018 155)}}
4303
+ body{margin:0;min-height:100vh;background:var(--bg);color:var(--text);font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;display:grid;place-items:center;padding:32px;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
4304
+ main{width:min(100%,340px)}
4305
+ h1{font-size:21px;font-weight:560;line-height:1.25;letter-spacing:-.02em;margin:0}
4306
+ p{font-size:15px;line-height:1.5;color:var(--muted);margin:9px 0 0}
4307
+ .brand{font-family:'SF Mono','JetBrains Mono','Fira Code',ui-monospace,monospace;font-size:12px;line-height:1;color:var(--accent);margin-top:42px;letter-spacing:.02em}
4316
4308
  </style>
4317
4309
  </head>
4318
4310
  <body>
4319
- <div class="card">
4320
- <div class="icon">${icon}</div>
4321
- <h1>${title}</h1>
4311
+ <main aria-labelledby="callback-title">
4312
+ <h1 id="callback-title">${title}</h1>
4322
4313
  <p>${message}</p>
4323
- <div class="brand">AGENDEX</div>
4324
- </div>
4314
+ <div class="brand">agendex</div>
4315
+ </main>
4325
4316
  </body>
4326
4317
  </html>`;
4327
4318
  }
@@ -4989,7 +4980,7 @@ import { join as join14 } from "node:path";
4989
4980
  // package.json
4990
4981
  var package_default = {
4991
4982
  name: "agendex-cli",
4992
- version: "0.17.0",
4983
+ version: "0.18.0",
4993
4984
  description: "Agendex CLI for login, sync, and daemon workflows",
4994
4985
  homepage: "https://github.com/Tyru5/Agendex#readme",
4995
4986
  bugs: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agendex-cli",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "Agendex CLI for login, sync, and daemon workflows",
5
5
  "homepage": "https://github.com/Tyru5/Agendex#readme",
6
6
  "repository": {