latticesql 4.2.3 → 4.3.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/README.md +78 -1
- package/dist/cli.js +6081 -892
- package/dist/desktop-entry.js +81507 -0
- package/dist/gui-assets/ort/ort-wasm-simd-threaded.asyncify.wasm +0 -0
- package/dist/gui-assets/ort/ort-wasm-simd-threaded.jsep.wasm +0 -0
- package/dist/gui-assets/ort/ort-wasm-simd-threaded.wasm +0 -0
- package/dist/gui-assets/transcriber.worker.mjs +46 -0
- package/dist/index.cjs +6409 -1133
- package/dist/index.d.cts +902 -3
- package/dist/index.d.ts +902 -3
- package/dist/index.js +6333 -1099
- package/docs/assistant.md +11 -7
- package/docs/bugs/2026-06-23-connectors-tab-out-of-scope.md +67 -0
- package/docs/bugs/2026-06-24-cloud-pooler-exhaustion.md +68 -0
- package/docs/bugs/2026-06-24-html-author-model-entitlement.md +77 -0
- package/docs/bugs/2026-06-25-chat-attached-files-not-connected.md +64 -0
- package/docs/connectors.md +166 -0
- package/docs/desktop.md +75 -0
- package/package.json +9 -2
- package/docs/examples/dashboard.html +0 -284
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<title>My Dashboard</title>
|
|
7
|
-
<style>
|
|
8
|
-
/* A plain, mobile-friendly starting point. Restyle freely — only the
|
|
9
|
-
fetch() calls below matter. One system font, differentiated by
|
|
10
|
-
weight/size only. */
|
|
11
|
-
:root {
|
|
12
|
-
font-family:
|
|
13
|
-
ui-sans-serif,
|
|
14
|
-
system-ui,
|
|
15
|
-
-apple-system,
|
|
16
|
-
Segoe UI,
|
|
17
|
-
Roboto,
|
|
18
|
-
sans-serif;
|
|
19
|
-
color-scheme: light dark;
|
|
20
|
-
}
|
|
21
|
-
* {
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
}
|
|
24
|
-
body {
|
|
25
|
-
margin: 0;
|
|
26
|
-
padding: 1.5rem 1rem;
|
|
27
|
-
max-width: 760px;
|
|
28
|
-
margin-inline: auto;
|
|
29
|
-
line-height: 1.5;
|
|
30
|
-
overflow-x: hidden;
|
|
31
|
-
}
|
|
32
|
-
h1 {
|
|
33
|
-
font-size: 1.4rem;
|
|
34
|
-
margin: 0 0 0.25rem;
|
|
35
|
-
}
|
|
36
|
-
p.sub {
|
|
37
|
-
margin: 0 0 1.5rem;
|
|
38
|
-
opacity: 0.7;
|
|
39
|
-
}
|
|
40
|
-
section {
|
|
41
|
-
border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
|
|
42
|
-
border-radius: 12px;
|
|
43
|
-
padding: 1rem;
|
|
44
|
-
margin-bottom: 1.25rem;
|
|
45
|
-
}
|
|
46
|
-
label {
|
|
47
|
-
font-weight: 600;
|
|
48
|
-
display: block;
|
|
49
|
-
margin-bottom: 0.5rem;
|
|
50
|
-
}
|
|
51
|
-
textarea,
|
|
52
|
-
input[type='text'] {
|
|
53
|
-
width: 100%;
|
|
54
|
-
padding: 0.6rem;
|
|
55
|
-
border-radius: 8px;
|
|
56
|
-
border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
|
|
57
|
-
background: transparent;
|
|
58
|
-
color: inherit;
|
|
59
|
-
font: inherit;
|
|
60
|
-
}
|
|
61
|
-
textarea {
|
|
62
|
-
min-height: 70px;
|
|
63
|
-
resize: vertical;
|
|
64
|
-
}
|
|
65
|
-
.row {
|
|
66
|
-
display: flex;
|
|
67
|
-
gap: 0.5rem;
|
|
68
|
-
flex-wrap: wrap;
|
|
69
|
-
align-items: center;
|
|
70
|
-
margin-top: 0.6rem;
|
|
71
|
-
}
|
|
72
|
-
button {
|
|
73
|
-
padding: 0.55rem 1rem;
|
|
74
|
-
border-radius: 8px;
|
|
75
|
-
border: 0;
|
|
76
|
-
background: #2d6cdf;
|
|
77
|
-
color: #fff;
|
|
78
|
-
font: inherit;
|
|
79
|
-
font-weight: 600;
|
|
80
|
-
cursor: pointer;
|
|
81
|
-
}
|
|
82
|
-
button:disabled {
|
|
83
|
-
opacity: 0.5;
|
|
84
|
-
cursor: default;
|
|
85
|
-
}
|
|
86
|
-
#drop {
|
|
87
|
-
border: 2px dashed color-mix(in srgb, currentColor 30%, transparent);
|
|
88
|
-
border-radius: 10px;
|
|
89
|
-
padding: 1.25rem;
|
|
90
|
-
text-align: center;
|
|
91
|
-
opacity: 0.85;
|
|
92
|
-
}
|
|
93
|
-
#drop.over {
|
|
94
|
-
border-color: #2d6cdf;
|
|
95
|
-
opacity: 1;
|
|
96
|
-
}
|
|
97
|
-
ul {
|
|
98
|
-
list-style: none;
|
|
99
|
-
padding: 0;
|
|
100
|
-
margin: 0;
|
|
101
|
-
}
|
|
102
|
-
li {
|
|
103
|
-
padding: 0.7rem 0;
|
|
104
|
-
border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
|
|
105
|
-
}
|
|
106
|
-
li:first-child {
|
|
107
|
-
border-top: 0;
|
|
108
|
-
}
|
|
109
|
-
.name {
|
|
110
|
-
font-weight: 600;
|
|
111
|
-
word-break: break-word;
|
|
112
|
-
}
|
|
113
|
-
.meta {
|
|
114
|
-
font-size: 0.85rem;
|
|
115
|
-
opacity: 0.7;
|
|
116
|
-
}
|
|
117
|
-
.tag {
|
|
118
|
-
display: inline-block;
|
|
119
|
-
font-size: 0.75rem;
|
|
120
|
-
padding: 0.1rem 0.5rem;
|
|
121
|
-
border-radius: 999px;
|
|
122
|
-
background: color-mix(in srgb, currentColor 12%, transparent);
|
|
123
|
-
margin: 0.15rem 0.15rem 0 0;
|
|
124
|
-
}
|
|
125
|
-
#status {
|
|
126
|
-
min-height: 1.2rem;
|
|
127
|
-
font-size: 0.85rem;
|
|
128
|
-
opacity: 0.8;
|
|
129
|
-
}
|
|
130
|
-
</style>
|
|
131
|
-
</head>
|
|
132
|
-
<body>
|
|
133
|
-
<h1>My Dashboard</h1>
|
|
134
|
-
<p class="sub">
|
|
135
|
-
Upload a file or jot a note — Lattice reads it and files it against your data.
|
|
136
|
-
</p>
|
|
137
|
-
|
|
138
|
-
<section>
|
|
139
|
-
<label for="file">Upload files</label>
|
|
140
|
-
<div id="drop">
|
|
141
|
-
Drag files here, or
|
|
142
|
-
<button type="button" id="pick">choose files</button>
|
|
143
|
-
</div>
|
|
144
|
-
<input id="file" type="file" multiple hidden />
|
|
145
|
-
</section>
|
|
146
|
-
|
|
147
|
-
<section>
|
|
148
|
-
<label for="note">Add a note</label>
|
|
149
|
-
<textarea id="note" placeholder="Type a note, or paste a link to capture it…"></textarea>
|
|
150
|
-
<div class="row">
|
|
151
|
-
<button type="button" id="addNote">Add note</button>
|
|
152
|
-
</div>
|
|
153
|
-
</section>
|
|
154
|
-
|
|
155
|
-
<section>
|
|
156
|
-
<label>Recently captured</label>
|
|
157
|
-
<div id="status"></div>
|
|
158
|
-
<ul id="list"></ul>
|
|
159
|
-
</section>
|
|
160
|
-
|
|
161
|
-
<script>
|
|
162
|
-
// ---- Lattice client -------------------------------------------------
|
|
163
|
-
// These three calls are the whole integration. The dashboard is served by
|
|
164
|
-
// Lattice on the same origin, so plain relative fetch() works — no API key
|
|
165
|
-
// in the page, no CORS. Copy these into your own page to wire your own UI.
|
|
166
|
-
|
|
167
|
-
// Upload one file. Returns { id, extraction_status, suggestedLinks, ... }.
|
|
168
|
-
async function latticeUpload(file) {
|
|
169
|
-
const res = await fetch('/api/ingest/upload', {
|
|
170
|
-
method: 'POST',
|
|
171
|
-
headers: {
|
|
172
|
-
'content-type': file.type || 'application/octet-stream',
|
|
173
|
-
'x-filename': encodeURIComponent(file.name || 'file'),
|
|
174
|
-
},
|
|
175
|
-
body: file,
|
|
176
|
-
});
|
|
177
|
-
if (!res.ok) throw new Error('Upload failed: HTTP ' + res.status);
|
|
178
|
-
return res.json();
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
// Capture a note (or a pasted URL). Returns { id, extraction_status, suggestedLinks }.
|
|
182
|
-
async function latticeAddNote(text, title) {
|
|
183
|
-
const res = await fetch('/api/ingest/text', {
|
|
184
|
-
method: 'POST',
|
|
185
|
-
headers: { 'content-type': 'application/json' },
|
|
186
|
-
body: JSON.stringify(title ? { text, title } : { text }),
|
|
187
|
-
});
|
|
188
|
-
if (!res.ok) throw new Error('Add note failed: HTTP ' + res.status);
|
|
189
|
-
return res.json();
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// List captured items (newest first). Returns an array of file rows.
|
|
193
|
-
async function latticeListFiles(limit = 25) {
|
|
194
|
-
const res = await fetch('/api/tables/files/rows?limit=' + limit);
|
|
195
|
-
if (!res.ok) throw new Error('List failed: HTTP ' + res.status);
|
|
196
|
-
const data = await res.json();
|
|
197
|
-
return Array.isArray(data.rows) ? data.rows : [];
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
// ---- Wiring (replace with your own UI) ------------------------------
|
|
201
|
-
const statusEl = document.getElementById('status');
|
|
202
|
-
const listEl = document.getElementById('list');
|
|
203
|
-
const fileInput = document.getElementById('file');
|
|
204
|
-
const drop = document.getElementById('drop');
|
|
205
|
-
|
|
206
|
-
function setStatus(msg) {
|
|
207
|
-
statusEl.textContent = msg || '';
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
function renderList(rows) {
|
|
211
|
-
listEl.innerHTML = '';
|
|
212
|
-
for (const r of rows) {
|
|
213
|
-
const li = document.createElement('li');
|
|
214
|
-
const name = document.createElement('div');
|
|
215
|
-
name.className = 'name';
|
|
216
|
-
name.textContent = r.original_name || r.name || '(untitled)';
|
|
217
|
-
const meta = document.createElement('div');
|
|
218
|
-
meta.className = 'meta';
|
|
219
|
-
meta.textContent =
|
|
220
|
-
(r.description || '').slice(0, 200) +
|
|
221
|
-
(r.extraction_status ? ' · ' + r.extraction_status : '');
|
|
222
|
-
li.append(name, meta);
|
|
223
|
-
listEl.append(li);
|
|
224
|
-
}
|
|
225
|
-
if (rows.length === 0) listEl.innerHTML = '<li class="meta">Nothing captured yet.</li>';
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
async function refresh() {
|
|
229
|
-
try {
|
|
230
|
-
renderList(await latticeListFiles());
|
|
231
|
-
} catch (e) {
|
|
232
|
-
setStatus(e.message);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
async function handleFiles(files) {
|
|
237
|
-
for (const file of files) {
|
|
238
|
-
setStatus('Uploading ' + file.name + '…');
|
|
239
|
-
try {
|
|
240
|
-
const out = await latticeUpload(file);
|
|
241
|
-
const n = (out.suggestedLinks || []).length;
|
|
242
|
-
setStatus('Captured ' + file.name + (n ? ' · linked to ' + n + ' record(s)' : ''));
|
|
243
|
-
} catch (e) {
|
|
244
|
-
setStatus(e.message);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
await refresh();
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
document.getElementById('pick').addEventListener('click', () => fileInput.click());
|
|
251
|
-
fileInput.addEventListener('change', () => {
|
|
252
|
-
if (fileInput.files.length) handleFiles(fileInput.files);
|
|
253
|
-
fileInput.value = '';
|
|
254
|
-
});
|
|
255
|
-
drop.addEventListener('dragover', (e) => {
|
|
256
|
-
e.preventDefault();
|
|
257
|
-
drop.classList.add('over');
|
|
258
|
-
});
|
|
259
|
-
drop.addEventListener('dragleave', () => drop.classList.remove('over'));
|
|
260
|
-
drop.addEventListener('drop', (e) => {
|
|
261
|
-
e.preventDefault();
|
|
262
|
-
drop.classList.remove('over');
|
|
263
|
-
if (e.dataTransfer.files.length) handleFiles(e.dataTransfer.files);
|
|
264
|
-
});
|
|
265
|
-
|
|
266
|
-
document.getElementById('addNote').addEventListener('click', async () => {
|
|
267
|
-
const ta = document.getElementById('note');
|
|
268
|
-
const text = ta.value.trim();
|
|
269
|
-
if (!text) return;
|
|
270
|
-
setStatus('Saving note…');
|
|
271
|
-
try {
|
|
272
|
-
await latticeAddNote(text);
|
|
273
|
-
ta.value = '';
|
|
274
|
-
setStatus('Note captured.');
|
|
275
|
-
} catch (e) {
|
|
276
|
-
setStatus(e.message);
|
|
277
|
-
}
|
|
278
|
-
await refresh();
|
|
279
|
-
});
|
|
280
|
-
|
|
281
|
-
refresh();
|
|
282
|
-
</script>
|
|
283
|
-
</body>
|
|
284
|
-
</html>
|