@anmol-srv/sigil 0.12.2 → 0.13.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/dist/cli.js +359 -374
- package/dist/daemon.js +150 -165
- package/dist/hooks/post-tool-use.js +24 -22
- package/dist/hooks/session-end.js +75 -73
- package/dist/hooks/stop.js +71 -69
- package/dist/hooks/user-prompt-submit.js +47 -45
- package/dist/server.js +46 -41
- package/package.json +1 -1
- package/src/db/migrations/20260429120200_upgrade-embedding-dim-1024.cjs +11 -22
- package/src/gui/web/app.css +58 -0
- package/src/gui/web/app.js +69 -557
- package/src/gui/web/index.html +5 -185
- package/src/gui/web/setup.js +401 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anmol-srv/sigil",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.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": {
|
|
@@ -1,34 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Bring all embedding columns to vector(1024) — Sigil's fixed embedding
|
|
3
|
+
* dimension (see src/lib/constants.js EMBEDDING_DIM).
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
* (
|
|
6
|
-
*
|
|
5
|
+
* The dimension is no longer configurable. Every provider/model is pinned to
|
|
6
|
+
* (or truncated to) 1024, and the schema is created at 1024 unconditionally,
|
|
7
|
+
* so the database and the embedder can never drift apart. Hardcoded here
|
|
8
|
+
* because .cjs migrations can't import the ESM constant.
|
|
7
9
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* REFUSES TO RUN if any embedding row exists — changing the column type
|
|
13
|
-
* would invalidate stored embeddings. Operators upgrading an existing DB:
|
|
14
|
-
* 1. sigil export to back up
|
|
15
|
-
* 2. sigil reset --confirm
|
|
16
|
-
* 3. set EMBEDDING_DIMENSIONS=1024 in ~/.sigil/.env
|
|
17
|
-
* 4. sigil migrate
|
|
18
|
-
* 5. re-ingest with the new embedding model
|
|
10
|
+
* REFUSES TO RUN if any embedding row exists — changing the column type would
|
|
11
|
+
* invalidate stored embeddings. (On a fresh setup the tables are empty, so
|
|
12
|
+
* this is a no-op guard.)
|
|
19
13
|
*/
|
|
20
14
|
|
|
21
15
|
const TABLES = ['chunk', 'fact', 'entity', 'embedding_cache'];
|
|
22
16
|
const DEFAULT_DIM = 768;
|
|
17
|
+
const TARGET_DIM = 1024; // = EMBEDDING_DIM
|
|
23
18
|
|
|
24
19
|
exports.up = async function (knex) {
|
|
25
|
-
const targetDim =
|
|
26
|
-
|
|
27
|
-
if (targetDim <= DEFAULT_DIM) {
|
|
28
|
-
// No-op for the default 768d (local nomic). Migration is recorded as
|
|
29
|
-
// applied so it doesn't keep trying on every sigil migrate.
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
20
|
+
const targetDim = TARGET_DIM;
|
|
32
21
|
|
|
33
22
|
// Safety check — bail loudly if existing embeddings would be invalidated.
|
|
34
23
|
for (const table of TABLES) {
|
package/src/gui/web/app.css
CHANGED
|
@@ -945,3 +945,61 @@ footer .footer-inner {
|
|
|
945
945
|
.db-flow-row .step-label { font-size: var(--t-base); color: var(--fg-2); }
|
|
946
946
|
.db-flow-row.done .step-label, .db-flow-row.active .step-label { color: var(--fg-1); }
|
|
947
947
|
.db-flow-row .step-detail { font-family: var(--font-mono); font-size: var(--t-sm); color: var(--fg-3); }
|
|
948
|
+
|
|
949
|
+
/* ── Native setup (setup.js) — stepped progress, no terminal logs ─────────── */
|
|
950
|
+
#setup .setup-detect { margin: var(--s-3) 0 var(--s-4); }
|
|
951
|
+
#setup .provider-card.disabled { opacity: .5; pointer-events: none; }
|
|
952
|
+
.setup-progress { margin-top: var(--s-4); }
|
|
953
|
+
.setup-progress-bar {
|
|
954
|
+
height: 8px;
|
|
955
|
+
border-radius: 999px;
|
|
956
|
+
background: var(--surface-2);
|
|
957
|
+
border: 1px solid var(--border);
|
|
958
|
+
overflow: hidden;
|
|
959
|
+
}
|
|
960
|
+
.setup-progress-bar > span {
|
|
961
|
+
display: block;
|
|
962
|
+
height: 100%;
|
|
963
|
+
width: 0;
|
|
964
|
+
background: var(--accent);
|
|
965
|
+
border-radius: 999px;
|
|
966
|
+
transition: width .35s ease;
|
|
967
|
+
}
|
|
968
|
+
.setup-progress-label {
|
|
969
|
+
margin-top: var(--s-2);
|
|
970
|
+
font-size: .85rem;
|
|
971
|
+
color: var(--fg-3);
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/* ── Setup: searchable model combobox (replaces the janky native datalist) ── */
|
|
975
|
+
.field.combo { position: relative; }
|
|
976
|
+
.combo-list {
|
|
977
|
+
position: absolute;
|
|
978
|
+
top: 100%;
|
|
979
|
+
left: 0;
|
|
980
|
+
right: 0;
|
|
981
|
+
z-index: 30;
|
|
982
|
+
margin: 4px 0 0;
|
|
983
|
+
padding: 4px;
|
|
984
|
+
max-height: 260px;
|
|
985
|
+
overflow-y: auto;
|
|
986
|
+
list-style: none;
|
|
987
|
+
background: var(--bg-surface-2, var(--surface-2));
|
|
988
|
+
border: 1px solid var(--border-strong, var(--border));
|
|
989
|
+
border-radius: 10px;
|
|
990
|
+
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
|
|
991
|
+
}
|
|
992
|
+
.combo-list li {
|
|
993
|
+
display: flex;
|
|
994
|
+
align-items: baseline;
|
|
995
|
+
justify-content: space-between;
|
|
996
|
+
gap: 16px;
|
|
997
|
+
padding: 7px 10px;
|
|
998
|
+
border-radius: 6px;
|
|
999
|
+
cursor: pointer;
|
|
1000
|
+
}
|
|
1001
|
+
.combo-list li:hover { background: var(--accent); color: var(--accent-fg); }
|
|
1002
|
+
.combo-list li:hover .combo-name { color: var(--accent-fg); }
|
|
1003
|
+
.combo-id { font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.85rem; }
|
|
1004
|
+
.combo-name { color: var(--fg-3); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
|
|
1005
|
+
.combo-empty { cursor: default; color: var(--fg-3); }
|