@anmol-srv/sigil 0.10.3 → 0.12.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/LICENSE +18 -12
- package/README.md +90 -82
- package/dist/cli.js +758 -507
- package/dist/daemon.js +724 -0
- package/dist/hooks/post-tool-use.js +20 -22
- package/dist/hooks/session-end.js +63 -61
- package/dist/hooks/stop.js +76 -74
- package/dist/hooks/user-prompt-submit.js +55 -47
- package/dist/server.js +45 -554
- package/integrations/hermes/README.md +4 -4
- package/integrations/hermes/plugin/README.md +8 -8
- package/knexfile.js +29 -8
- package/package.json +11 -5
- package/src/db/migrations/20260601000000_create-device-table.cjs +34 -0
- package/src/db/migrations/20260601000001_create-pairing-code-table.cjs +27 -0
- package/src/db/migrations/20260601000002_add-fact-provenance.cjs +31 -0
- package/src/db/migrations/20260601000003_add-device-revoked-reason.cjs +19 -0
- package/src/db/migrations/20260601000004_create-trace-event-table.cjs +35 -0
- package/src/db/migrations/20260601000005_add-fact-agent-provenance.cjs +25 -0
- package/src/gui/web/api.js +37 -0
- package/src/gui/web/app.css +947 -0
- package/src/gui/web/app.js +1230 -0
- package/src/gui/web/components.js +90 -0
- package/src/gui/web/design/colors_and_type.css +178 -0
- package/src/gui/web/design/sigil-mark-mono.svg +8 -0
- package/src/gui/web/design/sigil-mark.svg +26 -0
- package/src/gui/web/index.html +536 -0
- package/src/gui/web/sigil.svg +31 -0
- package/src/gui/web/toast.js +62 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vanilla design-system primitives (translated from Sigil.zip's ui_kit). Each
|
|
3
|
+
* returns a DOM node. Used by the onboarding wizard so every screen is composed
|
|
4
|
+
* from the same on-brand parts: status square+word, connector cards, DB-flow
|
|
5
|
+
* rows. No framework, no build step.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const E = (tag, cls, text) => {
|
|
9
|
+
const el = document.createElement(tag);
|
|
10
|
+
if (cls) el.className = cls;
|
|
11
|
+
if (text != null) el.textContent = text;
|
|
12
|
+
return el;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** Status square + lowercase word. kind: ok|warn|danger|muted */
|
|
16
|
+
export function statusDot(kind, word) {
|
|
17
|
+
const wrap = E('span', `status-dot ${kind}`);
|
|
18
|
+
wrap.append(E('span', 'sq'), E('span', null, word));
|
|
19
|
+
return wrap;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const CONNECTOR_STATUS = {
|
|
23
|
+
connected: { kind: 'ok', word: 'connected' },
|
|
24
|
+
available: { kind: 'muted', word: 'available' },
|
|
25
|
+
unavailable: { kind: 'muted', word: 'not installed' },
|
|
26
|
+
connecting: { kind: 'warn', word: 'connecting…' },
|
|
27
|
+
error: { kind: 'danger', word: 'error' },
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Connector card. `onAction(id, action)` is called with action 'connect' |
|
|
32
|
+
* 'disconnect' | 'retry'. `state` overrides the derived status (e.g. while a
|
|
33
|
+
* connect is in flight pass 'connecting').
|
|
34
|
+
*/
|
|
35
|
+
export function connectorCard(c, onAction) {
|
|
36
|
+
const status = c.uiState || c.status;
|
|
37
|
+
const card = E('div', `connector-card ${status === 'unavailable' ? 'unavailable' : ''}`);
|
|
38
|
+
card.dataset.id = c.id;
|
|
39
|
+
|
|
40
|
+
const top = E('div', 'cc-top');
|
|
41
|
+
top.append(E('div', 'cc-name', c.label));
|
|
42
|
+
const meta = CONNECTOR_STATUS[status] || CONNECTOR_STATUS.available;
|
|
43
|
+
top.append(statusDot(meta.kind, meta.word));
|
|
44
|
+
card.append(top);
|
|
45
|
+
|
|
46
|
+
card.append(E('div', 'cc-hint', c.reason && status === 'error' ? c.reason : c.hint));
|
|
47
|
+
|
|
48
|
+
const actions = E('div', 'cc-actions');
|
|
49
|
+
if (status === 'connected') {
|
|
50
|
+
const b = E('button', 'btn danger', 'Disconnect');
|
|
51
|
+
b.type = 'button';
|
|
52
|
+
b.onclick = () => onAction(c.id, 'disconnect');
|
|
53
|
+
actions.append(b);
|
|
54
|
+
} else if (status === 'connecting') {
|
|
55
|
+
const b = E('button', 'btn', 'Connecting…');
|
|
56
|
+
b.type = 'button'; b.disabled = true;
|
|
57
|
+
actions.append(b);
|
|
58
|
+
} else if (status === 'unavailable') {
|
|
59
|
+
// no action — not installed on this machine
|
|
60
|
+
} else {
|
|
61
|
+
const b = E('button', status === 'error' ? 'btn' : 'btn primary', status === 'error' ? 'Retry' : 'Connect');
|
|
62
|
+
b.type = 'button';
|
|
63
|
+
b.onclick = () => onAction(c.id, status === 'error' ? 'retry' : 'connect');
|
|
64
|
+
actions.append(b);
|
|
65
|
+
}
|
|
66
|
+
card.append(actions);
|
|
67
|
+
return card;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* A single row in the DB guided flow. phase: pending|active|done|error.
|
|
72
|
+
* Returns the row element; update via setFlowRow().
|
|
73
|
+
*/
|
|
74
|
+
export function dbFlowRow(id, label) {
|
|
75
|
+
const row = E('div', 'db-flow-row pending');
|
|
76
|
+
row.dataset.row = id;
|
|
77
|
+
row.append(E('span', 'step-sq'));
|
|
78
|
+
row.append(E('span', 'step-label', label));
|
|
79
|
+
row.append(E('span', 'step-detail', ''));
|
|
80
|
+
return row;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function setFlowRow(container, id, { phase, detail } = {}) {
|
|
84
|
+
const row = container.querySelector(`[data-row="${id}"]`);
|
|
85
|
+
if (!row) return;
|
|
86
|
+
if (phase) row.className = `db-flow-row ${phase}`;
|
|
87
|
+
if (detail != null) row.querySelector('.step-detail').textContent = detail;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export { E };
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/* ============================================================
|
|
2
|
+
SIGIL DESIGN SYSTEM — colors_and_type.css
|
|
3
|
+
Dark, sharp-edged console. Blue brand mark, monospace data,
|
|
4
|
+
restrained status color. Import this file to inherit all tokens.
|
|
5
|
+
============================================================ */
|
|
6
|
+
|
|
7
|
+
/* ---- Webfonts ---------------------------------------------- */
|
|
8
|
+
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
/* ========================================================
|
|
12
|
+
COLOR — cool-neutral dark ramp
|
|
13
|
+
Surfaces are layered near-black; text is a desaturated
|
|
14
|
+
white ramp. Chroma is kept extremely low (cool grey).
|
|
15
|
+
======================================================== */
|
|
16
|
+
|
|
17
|
+
/* Backgrounds / surfaces (low → high elevation) */
|
|
18
|
+
--bg-0: #08090b; /* app background, deepest */
|
|
19
|
+
--bg-1: #0b0c0e; /* page canvas */
|
|
20
|
+
--surface-1: #101113; /* card / panel */
|
|
21
|
+
--surface-2: #151618; /* row hover, inset, raised */
|
|
22
|
+
--surface-3: #1b1d20; /* active / pressed surface */
|
|
23
|
+
|
|
24
|
+
/* Borders / hairlines */
|
|
25
|
+
--border-1: #1d1f23; /* default hairline divider */
|
|
26
|
+
--border-2: #292c31; /* stronger border / card edge */
|
|
27
|
+
--border-strong: #3a3e44; /* focus-adjacent, input border hover */
|
|
28
|
+
|
|
29
|
+
/* Foreground text ramp */
|
|
30
|
+
--fg-1: #f4f5f6; /* primary text, headings, key values */
|
|
31
|
+
--fg-2: #a2a5ab; /* body, secondary text */
|
|
32
|
+
--fg-3: #74777d; /* labels, captions, footer */
|
|
33
|
+
--fg-4: #50535a; /* disabled, faint meta */
|
|
34
|
+
|
|
35
|
+
/* ---- Brand (from the Sigil mark gradient) ---- */
|
|
36
|
+
--brand: #0084ff; /* primary blue — active, links, focus */
|
|
37
|
+
--brand-deep: #004ce6; /* gradient anchor / pressed */
|
|
38
|
+
--brand-light: #99d5ff; /* gradient highlight / on-dark accents */
|
|
39
|
+
--brand-tint: rgba(0, 132, 255, 0.12); /* selected/active wash */
|
|
40
|
+
--brand-ring: rgba(0, 132, 255, 0.45); /* focus ring */
|
|
41
|
+
|
|
42
|
+
/* ---- Status (semantic, used sparingly) ---- */
|
|
43
|
+
--ok: #3ddc84; /* connected / healthy */
|
|
44
|
+
--ok-tint: rgba(61, 220, 132, 0.12);
|
|
45
|
+
--warn: #f5b544; /* degraded / attention */
|
|
46
|
+
--warn-tint: rgba(245, 181, 68, 0.12);
|
|
47
|
+
--danger: #ff5a52; /* error / disconnected */
|
|
48
|
+
--danger-tint: rgba(255, 90, 82, 0.12);
|
|
49
|
+
--info: var(--brand);
|
|
50
|
+
|
|
51
|
+
/* ========================================================
|
|
52
|
+
TYPE — Geist (UI) + Geist Mono (data / identifiers)
|
|
53
|
+
UI copy is grotesk; anything machine-derived (pids,
|
|
54
|
+
versions, hashes, ids, durations) is monospace.
|
|
55
|
+
======================================================== */
|
|
56
|
+
--font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
57
|
+
--font-mono: 'Geist Mono', ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
|
|
58
|
+
|
|
59
|
+
/* Type scale (px → rem at 16px base) */
|
|
60
|
+
--text-display: 2.25rem; /* 36 — page hero (rare) */
|
|
61
|
+
--text-h1: 1.625rem; /* 26 — page title */
|
|
62
|
+
--text-h2: 1.125rem; /* 18 — section / card value */
|
|
63
|
+
--text-h3: 1rem; /* 16 — sub-section */
|
|
64
|
+
--text-body: 0.9375rem;/* 15 — body copy */
|
|
65
|
+
--text-sm: 0.8125rem;/* 13 — table cells, meta */
|
|
66
|
+
--text-label: 0.6875rem;/* 11 — UPPERCASE eyebrow labels */
|
|
67
|
+
--text-xs: 0.625rem; /* 10 — micro meta */
|
|
68
|
+
|
|
69
|
+
/* Weights */
|
|
70
|
+
--w-regular: 400;
|
|
71
|
+
--w-medium: 500;
|
|
72
|
+
--w-semibold:600;
|
|
73
|
+
--w-bold: 700;
|
|
74
|
+
|
|
75
|
+
/* Tracking */
|
|
76
|
+
--track-label: 0.12em; /* uppercase eyebrows */
|
|
77
|
+
--track-tight: -0.01em; /* large headings */
|
|
78
|
+
--track-normal: 0;
|
|
79
|
+
|
|
80
|
+
/* Line heights */
|
|
81
|
+
--lh-tight: 1.15;
|
|
82
|
+
--lh-snug: 1.35;
|
|
83
|
+
--lh-body: 1.55;
|
|
84
|
+
|
|
85
|
+
/* ========================================================
|
|
86
|
+
GEOMETRY — sharp edges. Radius is near-zero by design.
|
|
87
|
+
======================================================== */
|
|
88
|
+
--radius-0: 0px; /* default — sharp */
|
|
89
|
+
--radius-1: 2px; /* inputs, badges (barely softened) */
|
|
90
|
+
--radius-2: 3px; /* the largest we ever go */
|
|
91
|
+
|
|
92
|
+
/* Borders */
|
|
93
|
+
--bw: 1px;
|
|
94
|
+
|
|
95
|
+
/* ========================================================
|
|
96
|
+
SPACING — 4px base grid
|
|
97
|
+
======================================================== */
|
|
98
|
+
--sp-1: 4px;
|
|
99
|
+
--sp-2: 8px;
|
|
100
|
+
--sp-3: 12px;
|
|
101
|
+
--sp-4: 16px;
|
|
102
|
+
--sp-5: 24px;
|
|
103
|
+
--sp-6: 32px;
|
|
104
|
+
--sp-7: 48px;
|
|
105
|
+
--sp-8: 64px;
|
|
106
|
+
--sp-9: 96px;
|
|
107
|
+
|
|
108
|
+
/* Layout */
|
|
109
|
+
--maxw: 1680px; /* content max width */
|
|
110
|
+
--gutter: 32px; /* page horizontal padding */
|
|
111
|
+
--nav-h: 64px; /* top bar height */
|
|
112
|
+
|
|
113
|
+
/* ========================================================
|
|
114
|
+
ELEVATION — shadows are flat & subtle (console, not card UI)
|
|
115
|
+
======================================================== */
|
|
116
|
+
--shadow-0: none;
|
|
117
|
+
--shadow-1: 0 1px 0 rgba(0,0,0,0.4);
|
|
118
|
+
--shadow-2: 0 8px 24px rgba(0,0,0,0.45);
|
|
119
|
+
--shadow-pop: 0 12px 40px rgba(0,0,0,0.6);
|
|
120
|
+
|
|
121
|
+
/* Focus */
|
|
122
|
+
--focus-ring: 0 0 0 1px var(--brand), 0 0 0 4px var(--brand-ring);
|
|
123
|
+
|
|
124
|
+
/* Motion — minimal, quick, no bounce */
|
|
125
|
+
--ease: cubic-bezier(0.2, 0, 0, 1);
|
|
126
|
+
--dur-1: 90ms;
|
|
127
|
+
--dur-2: 150ms;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* ============================================================
|
|
131
|
+
SEMANTIC ELEMENT STYLES — opt-in helpers
|
|
132
|
+
============================================================ */
|
|
133
|
+
|
|
134
|
+
.sig-display {
|
|
135
|
+
font-family: var(--font-sans);
|
|
136
|
+
font-size: var(--text-display);
|
|
137
|
+
font-weight: var(--w-bold);
|
|
138
|
+
letter-spacing: var(--track-tight);
|
|
139
|
+
line-height: var(--lh-tight);
|
|
140
|
+
color: var(--fg-1);
|
|
141
|
+
}
|
|
142
|
+
.sig-h1 {
|
|
143
|
+
font-family: var(--font-sans);
|
|
144
|
+
font-size: var(--text-h1);
|
|
145
|
+
font-weight: var(--w-bold);
|
|
146
|
+
letter-spacing: var(--track-tight);
|
|
147
|
+
line-height: var(--lh-tight);
|
|
148
|
+
color: var(--fg-1);
|
|
149
|
+
}
|
|
150
|
+
.sig-h2 {
|
|
151
|
+
font-family: var(--font-sans);
|
|
152
|
+
font-size: var(--text-h2);
|
|
153
|
+
font-weight: var(--w-semibold);
|
|
154
|
+
line-height: var(--lh-snug);
|
|
155
|
+
color: var(--fg-1);
|
|
156
|
+
}
|
|
157
|
+
.sig-label {
|
|
158
|
+
font-family: var(--font-sans);
|
|
159
|
+
font-size: var(--text-label);
|
|
160
|
+
font-weight: var(--w-semibold);
|
|
161
|
+
letter-spacing: var(--track-label);
|
|
162
|
+
text-transform: uppercase;
|
|
163
|
+
color: var(--fg-3);
|
|
164
|
+
}
|
|
165
|
+
.sig-body {
|
|
166
|
+
font-family: var(--font-sans);
|
|
167
|
+
font-size: var(--text-body);
|
|
168
|
+
font-weight: var(--w-regular);
|
|
169
|
+
line-height: var(--lh-body);
|
|
170
|
+
color: var(--fg-2);
|
|
171
|
+
}
|
|
172
|
+
.sig-mono {
|
|
173
|
+
font-family: var(--font-mono);
|
|
174
|
+
font-size: var(--text-sm);
|
|
175
|
+
font-weight: var(--w-medium);
|
|
176
|
+
color: var(--fg-1);
|
|
177
|
+
font-feature-settings: 'ss01' on, 'zero' on;
|
|
178
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
|
2
|
+
<g fill="currentColor">
|
|
3
|
+
<path d="m54.7 21.7v8.9h3.3l19.9-9.7 1.4-0.1 0.1 1.8-9.7 19.9v3.1h9.6l16.2-12.7 2.7-2.8v-27.9h-28.6l-14.9 19.5z"></path>
|
|
4
|
+
<path d="m2.2 2.2v27.9l2.7 2.2 15.8 13.4h9.5v-3.2l-9.8-20 0.1-1.8 1.6 0.1 19.9 9.8h3.2v-8.9l-14.9-19.5z"></path>
|
|
5
|
+
<path d="m20.6 54.4-17.2 13.2-1.2 1.6v28.7h28.1l14.9-19.4v-9.7h-3.3l-19.9 10.5-1.5 0.1v-1.8l9.7-19.8v-3.4z"></path>
|
|
6
|
+
<path d="m54.7 68.8v9.7l14.9 19.4h28.7v-28.7l-19.1-14.8h-9.5v3.3l9.7 19.9-0.1 1.7h-1.4l-19.7-10.5z"></path>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
|
2
|
+
<linearGradient id="sig1" x1="54.74" x2="98.29" y1="23.07" y2="10.4" gradientUnits="userSpaceOnUse">
|
|
3
|
+
<stop stop-color="#99D5FF" offset="0"></stop>
|
|
4
|
+
<stop stop-color="#0084FF" offset=".3602"></stop>
|
|
5
|
+
<stop stop-color="#004CE6" offset="1"></stop>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="sig2" x1="1.691" x2="45.24" y1="10.02" y2="32.95" gradientUnits="userSpaceOnUse">
|
|
8
|
+
<stop stop-color="#005CE6" offset=".3602"></stop>
|
|
9
|
+
<stop stop-color="#0084FF" offset=".7432"></stop>
|
|
10
|
+
<stop stop-color="#C9E7FF" offset="1"></stop>
|
|
11
|
+
</linearGradient>
|
|
12
|
+
<linearGradient id="sig3" x1="2.223" x2="45.24" y1="89.56" y2="67.06" gradientUnits="userSpaceOnUse">
|
|
13
|
+
<stop stop-color="#005CE6" offset=".3602"></stop>
|
|
14
|
+
<stop stop-color="#0084FF" offset=".7432"></stop>
|
|
15
|
+
<stop stop-color="#C9E7FF" offset="1"></stop>
|
|
16
|
+
</linearGradient>
|
|
17
|
+
<linearGradient id="sig4" x1="54.74" x2="98.29" y1="78.41" y2="89.91" gradientUnits="userSpaceOnUse">
|
|
18
|
+
<stop stop-color="#99D5FF" offset="0"></stop>
|
|
19
|
+
<stop stop-color="#0084FF" offset=".3602"></stop>
|
|
20
|
+
<stop stop-color="#004CE6" offset="1"></stop>
|
|
21
|
+
</linearGradient>
|
|
22
|
+
<path fill="url(#sig1)" d="m54.7 21.7v8.9h3.3l19.9-9.7 1.4-0.1 0.1 1.8-9.7 19.9v3.1h9.6l16.2-12.7 2.7-2.8v-27.9h-28.6l-14.9 19.5z"></path>
|
|
23
|
+
<path fill="url(#sig2)" d="m2.2 2.2v27.9l2.7 2.2 15.8 13.4h9.5v-3.2l-9.8-20 0.1-1.8 1.6 0.1 19.9 9.8h3.2v-8.9l-14.9-19.5z"></path>
|
|
24
|
+
<path fill="url(#sig3)" d="m20.6 54.4-17.2 13.2-1.2 1.6v28.7h28.1l14.9-19.4v-9.7h-3.3l-19.9 10.5-1.5 0.1v-1.8l9.7-19.8v-3.4z"></path>
|
|
25
|
+
<path fill="url(#sig4)" d="m54.7 68.8v9.7l14.9 19.4h28.7v-28.7l-19.1-14.8h-9.5v3.3l9.7 19.9-0.1 1.7h-1.4l-19.7-10.5z"></path>
|
|
26
|
+
</svg>
|