engrm 0.2.2 → 0.2.3

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 +33 -10
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1075,21 +1075,44 @@ async function openBrowser(url) {
1075
1075
  return false;
1076
1076
  }
1077
1077
  }
1078
+ var PAGE_STYLE = `
1079
+ *{margin:0;padding:0;box-sizing:border-box}
1080
+ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:#06060e;color:#fff;min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
1081
+ body::before{content:'';position:fixed;inset:0;z-index:-1;background:radial-gradient(ellipse at 30% 20%,rgba(0,212,255,0.06) 0%,transparent 50%),radial-gradient(ellipse at 70% 80%,rgba(123,44,191,0.06) 0%,transparent 50%)}
1082
+ .card{width:100%;max-width:440px;padding:48px 40px;border-radius:16px;border:1px solid rgba(255,255,255,0.07);background:rgba(255,255,255,0.02);backdrop-filter:blur(20px);text-align:center}
1083
+ .logo{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:28px}
1084
+ .logo span{font-size:1.3rem;font-weight:700}
1085
+ .icon{width:56px;height:56px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 20px}
1086
+ .icon.success{background:rgba(16,185,129,0.12);border:2px solid rgba(16,185,129,0.3)}
1087
+ .icon.error{background:rgba(239,68,68,0.12);border:2px solid rgba(239,68,68,0.3)}
1088
+ h1{font-size:1.4rem;font-weight:700;margin-bottom:8px}
1089
+ p{color:rgba(255,255,255,0.6);font-size:0.9rem;line-height:1.5}
1090
+ .hint{margin-top:24px;padding:12px 16px;font-size:0.82rem;color:rgba(255,255,255,0.4);background:rgba(255,255,255,0.02);border:1px solid rgba(255,255,255,0.06);border-radius:8px}
1091
+ a{color:#00d4ff;text-decoration:none}
1092
+ `;
1093
+ var LOGO_SVG = `<svg viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" style="width:32px;height:32px"><rect width="40" height="40" rx="10" fill="#0c0c1e"/><rect x="0.5" y="0.5" width="39" height="39" rx="9.5" stroke="rgba(255,255,255,0.08)"/><path d="M12 12h10M12 20h8M12 28h10M12 12v16" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><circle cx="13" cy="7" r="3" fill="#00d4ff"/><circle cx="33" cy="33" r="3" fill="#7b2cbf"/></svg>`;
1078
1094
  function successPage() {
1079
1095
  return `<!DOCTYPE html>
1080
- <html><head><title>Engrm</title>
1081
- <style>body{font-family:system-ui;display:flex;justify-content:center;align-items:center;min-height:100vh;margin:0;background:#f8f9fa}
1082
- .card{text-align:center;padding:3rem;border-radius:12px;background:white;box-shadow:0 2px 12px rgba(0,0,0,0.1)}
1083
- h1{color:#10b981;margin-bottom:0.5rem}p{color:#6b7280}</style></head>
1084
- <body><div class="card"><h1>Connected!</h1><p>You can close this tab and return to the terminal.</p></div></body></html>`;
1096
+ <html><head><title>Engrm — Connected</title><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect rx='6' width='32' height='32' fill='%230c0c1e'/><text x='7' y='24' font-family='system-ui' font-weight='700' font-size='22' fill='white'>E</text><circle cx='10' cy='6' r='3' fill='%2300d4ff'/><circle cx='26' cy='26' r='3' fill='%237b2cbf'/></svg>"><style>${PAGE_STYLE}</style></head>
1097
+ <body><div class="card">
1098
+ <div class="logo">${LOGO_SVG}<span>Engrm</span></div>
1099
+ <div class="icon success"><svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="#10b981" stroke-width="2.5" stroke-linecap="round"><path d="M20 6L9 17l-5-5"/></svg></div>
1100
+ <h1>Connected!</h1>
1101
+ <p>Your device is now linked to your Engrm account. Memory will sync automatically across all your devices.</p>
1102
+ <div class="hint">You can close this tab and return to the terminal. Your next Claude Code session will have memory.</div>
1103
+ </div></body></html>`;
1085
1104
  }
1086
1105
  function errorPage(message) {
1106
+ const safeMessage = message.replace(/[<>&"']/g, (c) => `&#${c.charCodeAt(0)};`);
1087
1107
  return `<!DOCTYPE html>
1088
- <html><head><title>Engrm</title>
1089
- <style>body{font-family:system-ui;display:flex;justify-content:center;align-items:center;min-height:100vh;margin:0;background:#f8f9fa}
1090
- .card{text-align:center;padding:3rem;border-radius:12px;background:white;box-shadow:0 2px 12px rgba(0,0,0,0.1)}
1091
- h1{color:#ef4444;margin-bottom:0.5rem}p{color:#6b7280}</style></head>
1092
- <body><div class="card"><h1>Authorization Failed</h1><p>${message}</p></div></body></html>`;
1108
+ <html><head><title>Engrm — Error</title><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect rx='6' width='32' height='32' fill='%230c0c1e'/><text x='7' y='24' font-family='system-ui' font-weight='700' font-size='22' fill='white'>E</text><circle cx='10' cy='6' r='3' fill='%2300d4ff'/><circle cx='26' cy='26' r='3' fill='%237b2cbf'/></svg>"><style>${PAGE_STYLE}</style></head>
1109
+ <body><div class="card">
1110
+ <div class="logo">${LOGO_SVG}<span>Engrm</span></div>
1111
+ <div class="icon error"><svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="#ef4444" stroke-width="2.5" stroke-linecap="round"><path d="M18 6L6 18M6 6l12 12"/></svg></div>
1112
+ <h1>Authorization Failed</h1>
1113
+ <p>${safeMessage}</p>
1114
+ <div class="hint">Try running <code style="color:#00d4ff">engrm init</code> again, or use <code style="color:#00d4ff">engrm init --token=cmt_xxx</code> with a provisioning token from <a href="https://engrm.dev">engrm.dev</a>.</div>
1115
+ </div></body></html>`;
1093
1116
  }
1094
1117
 
1095
1118
  // src/register.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "engrm",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Cross-device, team-shared memory layer for AI coding agents",
5
5
  "type": "module",
6
6
  "main": "dist/server.js",