@anmol-srv/sigil 0.13.0 → 0.14.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anmol-srv/sigil",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "type": "module",
5
5
  "description": "Local-first memory infrastructure for AI coding agents. One brain shared across Claude Code, Codex CLI, Cursor, Kiro, Continue, Cline, Windsurf, or any MCP client. Organized in pluggable pods, stored in your own Postgres. No cloud, no telemetry. Auto-captured from Claude Code via hooks; surfaced everywhere else as a 9-tool MCP server.",
6
6
  "bin": {
@@ -1003,3 +1003,47 @@ footer .footer-inner {
1003
1003
  .combo-id { font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.85rem; }
1004
1004
  .combo-name { color: var(--fg-3); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
1005
1005
  .combo-empty { cursor: default; color: var(--fg-3); }
1006
+
1007
+ /* ── Landing splash — branded boot screen, fades out after the setup check ── */
1008
+ .landing {
1009
+ position: fixed;
1010
+ inset: 0;
1011
+ z-index: 1000;
1012
+ display: flex;
1013
+ align-items: center;
1014
+ justify-content: center;
1015
+ background: var(--bg-0, #0a0a0c);
1016
+ opacity: 1;
1017
+ transition: opacity 0.5s ease;
1018
+ }
1019
+ .landing[hidden] { display: none; }
1020
+ .landing.fade-out { opacity: 0; pointer-events: none; }
1021
+ .landing-inner {
1022
+ display: flex;
1023
+ flex-direction: column;
1024
+ align-items: center;
1025
+ gap: var(--s-3);
1026
+ text-align: center;
1027
+ }
1028
+ .landing-mark { animation: landing-pulse 2.2s ease-in-out infinite; }
1029
+ .landing-name {
1030
+ font-size: 2rem;
1031
+ font-weight: 700;
1032
+ letter-spacing: -0.02em;
1033
+ color: var(--fg-1, #ffffff);
1034
+ }
1035
+ .landing-tagline { color: var(--fg-3); font-size: 0.95rem; }
1036
+ .landing-spinner {
1037
+ margin-top: var(--s-4);
1038
+ width: 22px;
1039
+ height: 22px;
1040
+ border-radius: 50%;
1041
+ border: 2px solid var(--border-strong, rgba(255, 255, 255, 0.15));
1042
+ border-top-color: var(--accent);
1043
+ animation: landing-spin 0.8s linear infinite;
1044
+ }
1045
+ @keyframes landing-spin { to { transform: rotate(360deg); } }
1046
+ @keyframes landing-pulse {
1047
+ 0%, 100% { transform: scale(1); opacity: 0.9; }
1048
+ 50% { transform: scale(1.06); opacity: 1; }
1049
+ }
@@ -264,7 +264,7 @@ function cfgSwitchFields(p) {
264
264
  if (cfgSwitch.step === 'llm') return p.fields || [];
265
265
  const f = [];
266
266
  if (p.keyed && !p.sharedKeyAvailable) f.push({ name: 'apiKey', label: `${p.label} API key`, type: 'password', placeholder: 'paste key' });
267
- if (p.id === 'ollama') f.push({ name: 'host', label: 'Ollama host', type: 'text', placeholder: 'http://localhost:11434' });
267
+ if (p.id === 'ollama') f.push({ name: 'host', label: 'Ollama host', type: 'text', placeholder: 'http://localhost:11434', optional: true });
268
268
  return f;
269
269
  }
270
270
 
@@ -775,8 +775,23 @@ $('#dev-create')?.addEventListener('click', async () => {
775
775
  // ════════════════════════════════════════════════════════════════════
776
776
  // BOOT
777
777
  // ════════════════════════════════════════════════════════════════════
778
+ // Branded landing splash: stays up while we check ~/.sigil (via setup.state)
779
+ // and route to setup or the dashboard, then fades out. A minimum dwell keeps
780
+ // it from flashing on a fast check.
781
+ function dismissLanding() {
782
+ const el = $('#landing');
783
+ if (!el) return;
784
+ el.classList.add('fade-out');
785
+ setTimeout(() => { el.hidden = true; }, 550);
786
+ }
787
+ async function runLanding() {
788
+ const started = Date.now();
789
+ try { await initSetup(); } catch { /* initSetup handles its own errors */ }
790
+ const MIN_MS = 1100;
791
+ setTimeout(dismissLanding, Math.max(0, MIN_MS - (Date.now() - started)));
792
+ }
793
+
778
794
  const initial = (window.location.hash || '#health').slice(1);
779
795
  setRoute(validRoutes.includes(initial) ? initial : 'health');
780
- // Native config-store-driven setup (replaces the legacy onboardingState wizard).
781
- initSetup();
796
+ runLanding();
782
797
  setInterval(refreshHealth, 5000);
@@ -14,6 +14,19 @@
14
14
  <!-- Toast stack — central status/error feedback (see toast.js) -->
15
15
  <div id="toasts" class="toast-stack" aria-live="polite"></div>
16
16
 
17
+ <!-- ════════════════════════════════════════════════════════════════════
18
+ LANDING — branded splash shown on launch while we check ~/.sigil for an
19
+ existing setup, then fades to reveal setup (first run) or the dashboard.
20
+ ════════════════════════════════════════════════════════════════════ -->
21
+ <div id="landing" class="landing">
22
+ <div class="landing-inner">
23
+ <img class="landing-mark" src="/static/design/sigil-mark.svg" alt="Sigil" width="72" height="72">
24
+ <div class="landing-name">Sigil</div>
25
+ <div class="landing-tagline">Local-first memory for your AI agents</div>
26
+ <div class="landing-spinner" aria-hidden="true"></div>
27
+ </div>
28
+ </div>
29
+
17
30
  <!-- ════════════════════════════════════════════════════════════════════
18
31
  NATIVE SETUP (config-store driven; replaces the legacy wizard above)
19
32
  Stepped progress bar — no terminal logs. See src/gui/web/setup.js.
@@ -12,6 +12,7 @@
12
12
  */
13
13
  import { rpc } from './api.js';
14
14
  import { toast } from './toast.js';
15
+ import { connectorCard } from './components.js';
15
16
 
16
17
  const $ = (s, r = document) => r.querySelector(s);
17
18
  const esc = (v) => String(v ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]));
@@ -20,6 +21,7 @@ const STEP_DESC = {
20
21
  database: 'Where memory lives',
21
22
  llm: 'Fact extraction + reasoning',
22
23
  embedding: 'Semantic search',
24
+ connectors: 'Editors & tools that share this brain',
23
25
  identity: 'Personalize + smoke-test',
24
26
  };
25
27
 
@@ -140,6 +142,7 @@ async function enterStep(stepId) {
140
142
  if (stepId === 'database') return renderDatabaseStep();
141
143
  if (stepId === 'llm') return renderProviderStep('llm');
142
144
  if (stepId === 'embedding') return renderProviderStep('embedding');
145
+ if (stepId === 'connectors') return renderConnectorsStep();
143
146
  if (stepId === 'identity') return renderIdentityStep();
144
147
  renderComingSoon();
145
148
  }
@@ -250,7 +253,7 @@ function providerFields(stepId, p) {
250
253
  let note = '';
251
254
  if (p.keyed && !p.sharedKeyAvailable) fields.push({ name: 'apiKey', label: `${p.label} API key`, type: 'password', placeholder: 'paste key' });
252
255
  else if (p.keyed && p.sharedKeyAvailable) note = 'Reuses the API key from your LLM step.';
253
- if (p.id === 'ollama') fields.push({ name: 'host', label: 'Ollama host', type: 'text', placeholder: 'http://localhost:11434' });
256
+ if (p.id === 'ollama') fields.push({ name: 'host', label: 'Ollama host', type: 'text', placeholder: 'http://localhost:11434', optional: true });
254
257
  return { fields, note };
255
258
  }
256
259
 
@@ -333,6 +336,47 @@ function runProviderStep(stepId) {
333
336
  runStep(stepId, { provider: selectedProvider, ...collectFields() });
334
337
  }
335
338
 
339
+ // ── Connectors step (multi-toggle list) ──────────────────────────────────────
340
+ async function renderConnectorsStep() {
341
+ shell({
342
+ title: 'Connect your coding agents.',
343
+ lede: 'Sigil installs memory hooks into the AI tools you already use — one shared brain across Claude Code, Cursor, Codex, Kiro, and more. Connect any you want; you can change this any time in Settings.',
344
+ body: '<div class="connector-grid" id="setup-connectors"><div class="muted">detecting installed tools…</div></div>',
345
+ });
346
+ // Connectors are optional — Continue is always enabled.
347
+ $('#setup-run').disabled = false;
348
+ $('#setup-run').addEventListener('click', () => runStep('connectors', {}));
349
+ await loadSetupConnectors();
350
+ }
351
+
352
+ async function loadSetupConnectors() {
353
+ const host = $('#setup-connectors');
354
+ if (!host) return;
355
+ try {
356
+ const { connectors } = await rpc('listConnectors');
357
+ host.innerHTML = '';
358
+ if (!connectors.length) { host.innerHTML = '<div class="muted">no agents detected on this machine</div>'; return; }
359
+ connectors.forEach((c) => host.appendChild(connectorCard(c, onSetupConnectorAction)));
360
+ } catch (err) {
361
+ host.innerHTML = `<div class="muted">could not load agents: ${esc(err.message)}</div>`;
362
+ }
363
+ }
364
+
365
+ async function onSetupConnectorAction(id, action) {
366
+ const host = $('#setup-connectors');
367
+ const card = host?.querySelector(`[data-id="${id}"]`);
368
+ if (action === 'disconnect') {
369
+ try { await rpc('disconnectConnector', { id }); toast({ variant: 'success', message: `${id} disconnected` }); }
370
+ catch (err) { toast({ variant: 'error', message: err.message, hint: err.hint, code: err.code }); }
371
+ return loadSetupConnectors();
372
+ }
373
+ // connect / retry
374
+ if (card) card.replaceWith(connectorCard({ id, label: id, hint: '', uiState: 'connecting' }, onSetupConnectorAction));
375
+ try { await rpc('connectConnector', { id }); toast({ variant: 'success', message: `${id} connected` }); }
376
+ catch (err) { toast({ variant: 'error', message: err.message || `could not connect ${id}`, hint: err.hint, code: err.code }); }
377
+ return loadSetupConnectors();
378
+ }
379
+
336
380
  // ── Identity step (form) ─────────────────────────────────────────────────────
337
381
  function renderIdentityStep() {
338
382
  shell({