dsh-fundus 0.0.0-stage → 0.1.1
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 +21 -0
- package/README.md +31 -2
- package/cordis.patch.yml +3 -0
- package/icon.svg +5 -0
- package/lib/client.js +259 -0
- package/lib/client.js.map +7 -0
- package/lib/core.mjs +1993 -0
- package/lib/core.mjs.map +7 -0
- package/lib/index.js +2350 -0
- package/lib/index.js.map +7 -0
- package/locale/de.json +6 -0
- package/locale/en.json +6 -0
- package/package.json +79 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jan (HagbardCeline) / janpauldahlke
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-fundus
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Status:** `0.1.1` — Tier-1 Unified Local Studio Archive for **[The Ivory Tower](https://github.com/janpauldahlke/the-ivory-tower)** / [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
4
|
+
|
|
5
|
+
Indexes documents, `dsh-web-missions` receipts, and tagged media in `~/.ivory-tower/fundus/` (`node:sqlite` FTS5 + BM25), verifies primary-source quote provenance via `ctx.galley.registerPreflight('fundus-quotes')`, and exposes a calm read-only **Sources & Media** right-sidebar inspector.
|
|
6
|
+
|
|
7
|
+
## What ships in `0.1.0`
|
|
8
|
+
|
|
9
|
+
- **Hermetic vault:** content-addressed `blobs/sha256/…`, deterministic `src-*` / `pas-*` ids, idempotent re-ingest
|
|
10
|
+
- **Prime-11 tools:** `fundus_search`, `fundus_read` (read-only)
|
|
11
|
+
- **Long-tail via `ctx.fundus`:** `fundus_ingest`, `fundus_import_mission`, `fundus_tag_media`, `fundus_delete`
|
|
12
|
+
- **HTTP:** `/api/fundus/{health,search,item,blob,ingest}`
|
|
13
|
+
- **UI:** `Fundus` tab (`kind: 'fundus'`) with Paper/Desk/Ink CSS variables
|
|
14
|
+
|
|
15
|
+
Parked for `v0.2.0`: live VLM captioning, external vectors, `.docx`/`.pdf` reverse intake (schema columns ready).
|
|
16
|
+
|
|
17
|
+
## Development
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm run build # node build.mjs && tsc --noEmit
|
|
21
|
+
npm test # node build.mjs && node --test "test/**/*.test.mjs"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Air-gapped composition check (isolated `DSH_HOME`, never touches `:3080`):
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
IVORY_FUNDUS_DIR="$PWD/.dsh/fundus-3090" ./agent/scripts/boot-3090.sh --dump-config
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
MIT — see [`LICENSE`](./LICENSE).
|
package/cordis.patch.yml
ADDED
package/icon.svg
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="Fundus archive">
|
|
2
|
+
<rect x="6" y="10" width="52" height="44" rx="4" fill="#EFE9DF" stroke="#1C1917" stroke-width="2"/>
|
|
3
|
+
<path d="M14 22h36M14 32h28M14 42h20" stroke="#1C1917" stroke-width="2" stroke-linecap="round"/>
|
|
4
|
+
<rect x="40" y="38" width="12" height="10" rx="1" fill="#3D6B4F"/>
|
|
5
|
+
</svg>
|
package/lib/client.js
ADDED
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({ id: "dsh-fundus", factory: (require) => {
|
|
2
|
+
var module = { exports: {} }; var exports = module.exports;
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name2 in all)
|
|
10
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// src/client/index.tsx
|
|
23
|
+
var index_exports = {};
|
|
24
|
+
__export(index_exports, {
|
|
25
|
+
apply: () => apply,
|
|
26
|
+
inject: () => inject,
|
|
27
|
+
name: () => name
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(index_exports);
|
|
30
|
+
|
|
31
|
+
// src/shared/types.ts
|
|
32
|
+
var PLUGIN = "dsh-fundus";
|
|
33
|
+
|
|
34
|
+
// src/shared/i18n.ts
|
|
35
|
+
var STRINGS = {
|
|
36
|
+
en: {
|
|
37
|
+
tabTitle: "Sources & Media",
|
|
38
|
+
tabDescription: "Search and inspect the local Fundus archive of passages, sources, and media.",
|
|
39
|
+
sourcesLabel: "Sources & Media",
|
|
40
|
+
refresh: "Refresh",
|
|
41
|
+
searchPlaceholder: "Search passages, sources, media\u2026",
|
|
42
|
+
filterAll: "All",
|
|
43
|
+
filterPassages: "Passages",
|
|
44
|
+
filterSources: "Sources",
|
|
45
|
+
filterMedia: "Media",
|
|
46
|
+
empty: "No results yet. Ingest sources or clear the search box to browse recent entries.",
|
|
47
|
+
copyId: "Copy ID",
|
|
48
|
+
stats: "{sources} sources \xB7 {passages} passages \xB7 {media} media"
|
|
49
|
+
},
|
|
50
|
+
de: {
|
|
51
|
+
tabTitle: "Quellen & Medien",
|
|
52
|
+
tabDescription: "Lokales Fundus-Archiv durchsuchen und Passagen, Quellen sowie Medien pr\xFCfen.",
|
|
53
|
+
sourcesLabel: "Quellen & Medien",
|
|
54
|
+
refresh: "Aktualisieren",
|
|
55
|
+
searchPlaceholder: "Passagen, Quellen, Medien suchen\u2026",
|
|
56
|
+
filterAll: "Alle",
|
|
57
|
+
filterPassages: "Passagen",
|
|
58
|
+
filterSources: "Quellen",
|
|
59
|
+
filterMedia: "Medien",
|
|
60
|
+
empty: "Noch keine Treffer. Quellen einspielen oder Suchfeld leeren, um aktuelle Eintr\xE4ge zu sehen.",
|
|
61
|
+
copyId: "ID kopieren",
|
|
62
|
+
stats: "{sources} Quellen \xB7 {passages} Passagen \xB7 {media} Medien"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
function t(locale, key) {
|
|
66
|
+
return STRINGS[locale][key] ?? STRINGS.en[key];
|
|
67
|
+
}
|
|
68
|
+
function formatStats(locale, stats) {
|
|
69
|
+
return t(locale, "stats").replace("{sources}", String(stats.sources)).replace("{passages}", String(stats.passages)).replace("{media}", String(stats.media));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// src/client/FundusIcon.tsx
|
|
73
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
74
|
+
function FundusIcon(props) {
|
|
75
|
+
const size = props.size ?? 18;
|
|
76
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
77
|
+
"svg",
|
|
78
|
+
{
|
|
79
|
+
className: props.className,
|
|
80
|
+
width: size,
|
|
81
|
+
height: size,
|
|
82
|
+
viewBox: "0 0 24 24",
|
|
83
|
+
fill: "none",
|
|
84
|
+
"aria-hidden": "true",
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M7 9h10M7 13h7M7 17h5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// src/client/FundusPane.tsx
|
|
94
|
+
var import_react = require("react");
|
|
95
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
96
|
+
function resolvePaneLocale(ctx) {
|
|
97
|
+
try {
|
|
98
|
+
const loc = typeof ctx?.get === "function" ? ctx.get("locale") : void 0;
|
|
99
|
+
return loc?.lang === "de" ? "de" : "en";
|
|
100
|
+
} catch {
|
|
101
|
+
return "en";
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function FundusPane(props) {
|
|
105
|
+
const locale = resolvePaneLocale(props.ctx);
|
|
106
|
+
const [query, setQuery] = (0, import_react.useState)("");
|
|
107
|
+
const [filter, setFilter] = (0, import_react.useState)("all");
|
|
108
|
+
const [hits, setHits] = (0, import_react.useState)([]);
|
|
109
|
+
const [stats, setStats] = (0, import_react.useState)({ sources: 0, passages: 0, media: 0 });
|
|
110
|
+
const [expanded, setExpanded] = (0, import_react.useState)(null);
|
|
111
|
+
const [detail, setDetail] = (0, import_react.useState)("");
|
|
112
|
+
const timer = (0, import_react.useRef)(null);
|
|
113
|
+
const load = (0, import_react.useCallback)(async (q, kind) => {
|
|
114
|
+
try {
|
|
115
|
+
const res = await fetch(`/api/fundus/search?q=${encodeURIComponent(q || "*")}&kind=${kind}&limit=20`);
|
|
116
|
+
const json = await res.json();
|
|
117
|
+
setHits(json.hits ?? []);
|
|
118
|
+
if (json.stats) setStats(json.stats);
|
|
119
|
+
} catch {
|
|
120
|
+
setHits([]);
|
|
121
|
+
}
|
|
122
|
+
}, []);
|
|
123
|
+
(0, import_react.useEffect)(() => {
|
|
124
|
+
if (timer.current) clearTimeout(timer.current);
|
|
125
|
+
timer.current = setTimeout(() => void load(query, filter), 150);
|
|
126
|
+
return () => {
|
|
127
|
+
if (timer.current) clearTimeout(timer.current);
|
|
128
|
+
};
|
|
129
|
+
}, [query, filter, load]);
|
|
130
|
+
const expand = async (hit) => {
|
|
131
|
+
if (expanded === hit.id) {
|
|
132
|
+
setExpanded(null);
|
|
133
|
+
setDetail("");
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
setExpanded(hit.id);
|
|
137
|
+
try {
|
|
138
|
+
const extra = hit.kind === "source" ? "&includePassages=1" : "";
|
|
139
|
+
const json = await (await fetch(`/api/fundus/item?id=${encodeURIComponent(hit.id)}${extra}`)).json();
|
|
140
|
+
if (hit.kind === "passage") {
|
|
141
|
+
setDetail(`${json.text ?? ""}
|
|
142
|
+
|
|
143
|
+
sha256: ${json.quoteSha256 ?? ""}`);
|
|
144
|
+
} else if (hit.kind === "source") {
|
|
145
|
+
setDetail((json.passages ?? []).map((p) => `[${p.id} \xB7 ${p.locator}] ${p.text}`).join("\n\n"));
|
|
146
|
+
} else {
|
|
147
|
+
setDetail(String(json.caption ?? hit.caption ?? ""));
|
|
148
|
+
}
|
|
149
|
+
} catch {
|
|
150
|
+
setDetail("");
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
const pills = [
|
|
154
|
+
["all", t(locale, "filterAll")],
|
|
155
|
+
["passage", t(locale, "filterPassages")],
|
|
156
|
+
["source", t(locale, "filterSources")],
|
|
157
|
+
["media", t(locale, "filterMedia")]
|
|
158
|
+
];
|
|
159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsh-fundus-pane", children: [
|
|
160
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsh-fundus-head", children: [
|
|
161
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: formatStats(locale, stats) }),
|
|
162
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", className: "dsh-fundus-refresh", onClick: () => void load(query, filter), children: "\u21BB" })
|
|
163
|
+
] }),
|
|
164
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
165
|
+
"input",
|
|
166
|
+
{
|
|
167
|
+
className: "dsh-fundus-search",
|
|
168
|
+
value: query,
|
|
169
|
+
placeholder: t(locale, "searchPlaceholder"),
|
|
170
|
+
onChange: (e) => setQuery(e.target.value)
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dsh-fundus-pills", children: pills.map(([id, label2]) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", className: filter === id ? "is-active" : "", onClick: () => setFilter(id), children: label2 }, id)) }),
|
|
174
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsh-fundus-list", children: [
|
|
175
|
+
!hits.length ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "dsh-fundus-empty", children: t(locale, "empty") }) : null,
|
|
176
|
+
hits.map((hit) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("article", { className: "dsh-fundus-card", onClick: () => void expand(hit), children: [
|
|
177
|
+
hit.kind === "media" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("img", { className: "dsh-fundus-thumb", src: `/api/fundus/blob?sourceId=${hit.sourceId}`, alt: "", width: 48, height: 48 }) : null,
|
|
178
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsh-fundus-card-body", children: [
|
|
179
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { children: [
|
|
180
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("strong", { children: hit.title }),
|
|
181
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
182
|
+
"button",
|
|
183
|
+
{
|
|
184
|
+
type: "button",
|
|
185
|
+
className: "dsh-fundus-id",
|
|
186
|
+
onClick: (e) => {
|
|
187
|
+
e.stopPropagation();
|
|
188
|
+
void navigator.clipboard?.writeText(hit.id);
|
|
189
|
+
},
|
|
190
|
+
children: hit.id
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
] }),
|
|
194
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dsh-fundus-meta", children: hit.kind === "passage" ? hit.locator : hit.kind === "source" ? `${hit.passageCount ?? 0} passages` : `${hit.widthPx ?? "?"}\xD7${hit.heightPx ?? "?"} \xB7 ${hit.mimeType}` }),
|
|
195
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: hit.kind === "media" ? hit.caption : hit.snippet }),
|
|
196
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("footer", { children: [
|
|
197
|
+
hit.license,
|
|
198
|
+
hit.tags?.length ? ` \xB7 ${hit.tags.join(", ")}` : ""
|
|
199
|
+
] }),
|
|
200
|
+
expanded === hit.id && detail ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("pre", { className: "dsh-fundus-detail", children: detail }) : null
|
|
201
|
+
] })
|
|
202
|
+
] }, hit.id))
|
|
203
|
+
] })
|
|
204
|
+
] });
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// src/client/index.tsx
|
|
208
|
+
var name = PLUGIN;
|
|
209
|
+
var inject = ["slots", "sidebarRightTabs"];
|
|
210
|
+
var STYLE = `[data-dsh-fundus],.dsh-fundus-pane{--f-paper:var(--ivory-paper,#FAF7F2);--f-desk:var(--ivory-desk,#EFE9DF);--f-ink:var(--ivory-ink,#1C1917);--f-muted:var(--ivory-ink-muted,#57534E);--f-line:var(--ivory-line,#E3DCD0);--f-ok:var(--ivory-verified,#3D6B4F);color:var(--f-ink);font:13px/1.45 ui-sans-serif,system-ui,sans-serif}.dsh-fundus-pane{display:flex;flex-direction:column;gap:8px;height:100%;padding:8px;background:var(--f-paper)}.dsh-fundus-head{display:flex;justify-content:space-between;align-items:center;color:var(--f-muted);font-size:12px}.dsh-fundus-refresh,.dsh-fundus-pills button,.dsh-fundus-id{border:1px solid var(--f-line);background:var(--f-desk);color:var(--f-ink);border-radius:4px;cursor:pointer;padding:2px 8px}.dsh-fundus-search{width:100%;border:1px solid var(--f-line);border-radius:4px;padding:6px 8px;background:#fff;color:var(--f-ink)}.dsh-fundus-pills{display:flex;gap:4px;flex-wrap:wrap}.dsh-fundus-pills button.is-active{background:var(--f-ok);color:#fff;border-color:var(--f-ok)}.dsh-fundus-list{overflow:auto;display:flex;flex-direction:column;gap:8px}.dsh-fundus-card{display:flex;gap:8px;border-top:1px solid var(--f-line);padding-top:8px;cursor:pointer}.dsh-fundus-thumb{width:48px;height:48px;object-fit:cover;background:var(--f-desk);flex:none}.dsh-fundus-card-body{min-width:0;flex:1}.dsh-fundus-card header{display:flex;justify-content:space-between;gap:8px;align-items:baseline}.dsh-fundus-meta,.dsh-fundus-card footer,.dsh-fundus-empty{color:var(--f-muted);font-size:12px}.dsh-fundus-detail{white-space:pre-wrap;background:var(--f-desk);padding:8px;border-radius:4px;font-size:12px}.dsh-fundus-id{font-family:ui-monospace,monospace;font-size:11px}`;
|
|
211
|
+
function resolveLocale(ctx) {
|
|
212
|
+
try {
|
|
213
|
+
const loc = typeof ctx.get === "function" ? ctx.get("locale") : void 0;
|
|
214
|
+
return loc?.lang === "de" ? "de" : "en";
|
|
215
|
+
} catch {
|
|
216
|
+
return "en";
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
function label(ctx, key) {
|
|
220
|
+
return t(resolveLocale(ctx), key);
|
|
221
|
+
}
|
|
222
|
+
function apply(ctx) {
|
|
223
|
+
if (typeof document !== "undefined" && !document.querySelector("style[data-dsh-fundus]")) {
|
|
224
|
+
const el = document.createElement("style");
|
|
225
|
+
el.setAttribute("data-dsh-fundus", "");
|
|
226
|
+
el.textContent = STYLE;
|
|
227
|
+
document.head.appendChild(el);
|
|
228
|
+
ctx.effect(() => () => el.remove(), "fundus: style");
|
|
229
|
+
}
|
|
230
|
+
const tabs = ctx.sidebarRightTabs;
|
|
231
|
+
const slots = ctx.slots;
|
|
232
|
+
const disposeType = tabs.register({
|
|
233
|
+
id: "fundus",
|
|
234
|
+
kind: "fundus",
|
|
235
|
+
title: () => label(ctx, "tabTitle"),
|
|
236
|
+
guide: [
|
|
237
|
+
{
|
|
238
|
+
id: "fundus",
|
|
239
|
+
order: 290,
|
|
240
|
+
title: () => label(ctx, "tabTitle"),
|
|
241
|
+
description: () => label(ctx, "tabDescription"),
|
|
242
|
+
icon: FundusIcon
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
});
|
|
246
|
+
const disposeBody = slots.inject(
|
|
247
|
+
"sidebar.right.pane.tab",
|
|
248
|
+
() => slots.register({ name: "sidebar.right.pane.tab", key: "fundus" }, FundusPane)
|
|
249
|
+
);
|
|
250
|
+
ctx.effect(
|
|
251
|
+
() => () => {
|
|
252
|
+
disposeBody();
|
|
253
|
+
disposeType();
|
|
254
|
+
},
|
|
255
|
+
"fundus: rightbar tab"
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
return module.exports; } });
|
|
259
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/client/index.tsx", "../src/shared/types.ts", "../src/shared/i18n.ts", "../src/client/FundusIcon.tsx", "../src/client/FundusPane.tsx"],
|
|
4
|
+
"sourcesContent": ["/** dsh-fundus \u2014 browser client face (ModuleLoader CJS entry). */\nimport type { Context } from '@deepseek-ai/cordis'\nimport { PLUGIN } from '../shared/types.ts'\nimport { t, type LocaleCode } from '../shared/i18n.ts'\nimport { FundusIcon } from './FundusIcon.tsx'\nimport { FundusPane } from './FundusPane.tsx'\n\nexport const name = PLUGIN\nexport const inject = ['slots', 'sidebarRightTabs']\n\nconst STYLE = `[data-dsh-fundus],.dsh-fundus-pane{--f-paper:var(--ivory-paper,#FAF7F2);--f-desk:var(--ivory-desk,#EFE9DF);--f-ink:var(--ivory-ink,#1C1917);--f-muted:var(--ivory-ink-muted,#57534E);--f-line:var(--ivory-line,#E3DCD0);--f-ok:var(--ivory-verified,#3D6B4F);color:var(--f-ink);font:13px/1.45 ui-sans-serif,system-ui,sans-serif}.dsh-fundus-pane{display:flex;flex-direction:column;gap:8px;height:100%;padding:8px;background:var(--f-paper)}.dsh-fundus-head{display:flex;justify-content:space-between;align-items:center;color:var(--f-muted);font-size:12px}.dsh-fundus-refresh,.dsh-fundus-pills button,.dsh-fundus-id{border:1px solid var(--f-line);background:var(--f-desk);color:var(--f-ink);border-radius:4px;cursor:pointer;padding:2px 8px}.dsh-fundus-search{width:100%;border:1px solid var(--f-line);border-radius:4px;padding:6px 8px;background:#fff;color:var(--f-ink)}.dsh-fundus-pills{display:flex;gap:4px;flex-wrap:wrap}.dsh-fundus-pills button.is-active{background:var(--f-ok);color:#fff;border-color:var(--f-ok)}.dsh-fundus-list{overflow:auto;display:flex;flex-direction:column;gap:8px}.dsh-fundus-card{display:flex;gap:8px;border-top:1px solid var(--f-line);padding-top:8px;cursor:pointer}.dsh-fundus-thumb{width:48px;height:48px;object-fit:cover;background:var(--f-desk);flex:none}.dsh-fundus-card-body{min-width:0;flex:1}.dsh-fundus-card header{display:flex;justify-content:space-between;gap:8px;align-items:baseline}.dsh-fundus-meta,.dsh-fundus-card footer,.dsh-fundus-empty{color:var(--f-muted);font-size:12px}.dsh-fundus-detail{white-space:pre-wrap;background:var(--f-desk);padding:8px;border-radius:4px;font-size:12px}.dsh-fundus-id{font-family:ui-monospace,monospace;font-size:11px}`\n\nfunction resolveLocale(ctx: Context): LocaleCode {\n try {\n const loc =\n typeof ctx.get === 'function' ? (ctx.get('locale') as { lang?: string } | undefined) : undefined\n return loc?.lang === 'de' ? 'de' : 'en'\n } catch {\n return 'en'\n }\n}\n\nfunction label(ctx: Context, key: 'tabTitle' | 'tabDescription') {\n return t(resolveLocale(ctx), key)\n}\n\nexport function apply(ctx: Context): void {\n if (typeof document !== 'undefined' && !document.querySelector('style[data-dsh-fundus]')) {\n const el = document.createElement('style')\n el.setAttribute('data-dsh-fundus', '')\n el.textContent = STYLE\n document.head.appendChild(el)\n ctx.effect(() => () => el.remove(), 'fundus: style')\n }\n const tabs = ctx.sidebarRightTabs as { register: (d: Record<string, unknown>) => () => void }\n const slots = ctx.slots as {\n inject: (n: string, f: () => () => void) => () => void\n register: (s: { name: string; key: string }, c: unknown) => () => void\n }\n const disposeType = tabs.register({\n id: 'fundus',\n kind: 'fundus',\n title: () => label(ctx, 'tabTitle'),\n guide: [\n {\n id: 'fundus',\n order: 290,\n title: () => label(ctx, 'tabTitle'),\n description: () => label(ctx, 'tabDescription'),\n icon: FundusIcon,\n },\n ],\n })\n const disposeBody = slots.inject('sidebar.right.pane.tab', () =>\n slots.register({ name: 'sidebar.right.pane.tab', key: 'fundus' }, FundusPane),\n )\n ctx.effect(\n () => () => {\n disposeBody()\n disposeType()\n },\n 'fundus: rightbar tab',\n )\n}\n", "/**\n * dsh-fundus \u2014 shared constants & public type authority.\n * Mirror of agent/STUDIO_CONTRACTS.d.ts seams needed by this brick (never import agent/).\n */\n\nexport const PLUGIN = 'dsh-fundus'\nexport const VERSION = '0.1.1'\n\nexport interface HealthProbe {\n ok: true\n plugin: typeof PLUGIN\n version: string\n}\n\nexport type StudioToolCategory =\n | 'archive-intake'\n | 'archive-admin'\n | 'planning'\n | 'plates'\n | 'review'\n\nexport interface StudioTailToolPropertySchema {\n readonly type: 'string' | 'number' | 'integer' | 'boolean' | 'array'\n readonly description: string\n readonly enum?: readonly string[]\n readonly items?: {\n readonly type: 'string' | 'number' | 'integer' | 'boolean'\n readonly enum?: readonly string[]\n }\n readonly minimum?: number\n readonly maximum?: number\n}\n\nexport interface StudioTailToolSchema {\n readonly type: 'object'\n readonly properties: Readonly<Record<string, StudioTailToolPropertySchema>>\n readonly required: readonly string[]\n readonly additionalProperties: false\n}\n\nexport interface StudioTailToolExecContext {\n readonly cwd?: string\n readonly sessionId?: string\n readonly signal?: AbortSignal\n}\n\nexport interface StudioTailToolDescriptor {\n readonly name: string\n readonly owner: string\n readonly category: StudioToolCategory\n readonly description: string\n readonly searchTerms: readonly string[]\n readonly parametersSchema: StudioTailToolSchema\n execute(\n args: Record<string, unknown>,\n exec?: StudioTailToolExecContext,\n ): Promise<Record<string, unknown>> | Record<string, unknown>\n}\n\nexport interface StudioTailToolProvider {\n listTailTools(): readonly StudioTailToolDescriptor[]\n executeTailTool(\n name: string,\n args: Record<string, unknown>,\n exec?: StudioTailToolExecContext,\n ): Promise<Record<string, unknown>>\n}\n\nexport interface SourceProvenanceLike {\n readonly sourceId: string\n readonly quoteSha256?: string\n readonly citation?: string\n readonly locator?: string\n}\n\nexport type GalleyInlineLike =\n | { readonly t: 'text'; readonly v: string }\n | { readonly t: 'strong'; readonly c: readonly GalleyInlineLike[] }\n | { readonly t: 'emph'; readonly c: readonly GalleyInlineLike[] }\n | { readonly t: 'code'; readonly v: string }\n | { readonly t: 'cloze'; readonly hint?: string }\n | { readonly t: 'math'; readonly v: string }\n | { readonly t: 'newline' }\n\nexport interface GalleyBlockLike {\n readonly id: string\n readonly type: string\n readonly body?: readonly GalleyInlineLike[]\n readonly provenance?: SourceProvenanceLike\n readonly [key: string]: unknown\n}\n\nexport interface GalleyPacketLike {\n readonly id: string\n readonly sheetOrder: readonly string[]\n readonly sheets: Readonly<\n Record<\n string,\n {\n readonly id: string\n readonly title: string\n readonly blocks: readonly GalleyBlockLike[]\n }\n >\n >\n readonly [key: string]: unknown\n}\n\nexport interface GalleyPreflightWarningLike {\n readonly code: string\n readonly severity: 'info' | 'warn' | 'error'\n readonly sheetId?: string\n readonly blockId?: string\n readonly message: string\n}\n\nexport interface GalleyServiceLike {\n registerPreflight(\n id: string,\n check: (packet: GalleyPacketLike, cwd: string) => GalleyPreflightWarningLike[],\n ): () => void\n getStore(cwd?: string): {\n listAnnotations?(packetId: string): ReadonlyArray<{\n readonly id: string\n readonly blockId: string\n readonly body: readonly GalleyInlineLike[]\n readonly provenance?: SourceProvenanceLike\n readonly resolved: boolean\n }>\n }\n}\n\nexport interface CompanionShelfItemLike {\n readonly id: string\n readonly section: 'sources' | 'unit-plan' | 'custom'\n readonly label: { readonly en: string; readonly de?: string }\n readonly badge?: string | number\n readonly rightTabKind?: string\n readonly starterPrompt?: string\n}\n\nexport interface IvoryShellServiceLike {\n registerShelfItem(item: CompanionShelfItemLike): () => void\n}\n\nexport type FundusSearchKind = 'all' | 'passage' | 'source' | 'media'\nexport type FundusSourceKind = 'markdown' | 'text' | 'json-pack' | 'web-mission' | 'media'\nexport type FundusVisionStatus = 'none' | 'pending' | 'done' | 'failed'\n\nexport interface FundusQuoteVerification {\n readonly ok: boolean\n readonly code:\n | 'VERIFIED_EXACT'\n | 'VERIFIED_EXCERPT'\n | 'NON_FUNDUS_ID'\n | 'FUNDUS_UNKNOWN_SOURCE'\n | 'FUNDUS_QUOTE_DRIFT'\n | 'FUNDUS_HASH_MISMATCH'\n readonly sourceId: string\n readonly canonicalSha256: string\n readonly expectedSha256?: string\n readonly message?: string\n}\n\nexport interface FundusVisionAdapter {\n readonly id: string\n describeMedia(input: {\n readonly bytes: Buffer\n readonly mimeType: string\n readonly filename?: string\n readonly hintTitle?: string\n readonly signal?: AbortSignal\n }): Promise<{\n readonly description: string\n readonly ocrText?: string\n readonly suggestedTags?: readonly string[]\n readonly model: string\n }>\n}\n\nexport interface FundusConfig {\n readonly enabled?: boolean\n readonly vaultDir?: string\n readonly maxPassageChars?: number\n}\n\nexport interface FundusServiceLike extends StudioTailToolProvider {\n getVaultDir(): string\n getStats(): {\n readonly sources: number\n readonly passages: number\n readonly media: number\n readonly blobs: number\n }\n search(input: {\n readonly query: string\n readonly kind?: FundusSearchKind\n readonly tag?: string\n readonly language?: string\n readonly limit?: number\n }): Record<string, unknown>\n read(input: {\n readonly id: string\n readonly includePassages?: boolean\n }): Record<string, unknown>\n verifyQuote(input: {\n readonly text: string\n readonly provenance: SourceProvenanceLike\n }): FundusQuoteVerification\n registerVisionAdapter?(adapter: FundusVisionAdapter): () => void\n}\n\nexport interface WebMissionPageJson {\n readonly artifact_id: string\n readonly mission_id: string\n readonly url: string\n readonly finalUrl: string\n readonly normalized_url: string\n readonly status: number\n readonly contentType: string\n readonly title: string\n readonly content: string\n readonly fetchedAt: string\n readonly stored_at?: string\n readonly quality: 'full' | 'thin' | 'blocked'\n readonly qualitySignals?: readonly string[]\n}\n", "/**\n * EN + DE UI strings with 100% key parity.\n */\n\nexport type LocaleCode = 'en' | 'de'\n\nconst STRINGS = {\n en: {\n tabTitle: 'Sources & Media',\n tabDescription: 'Search and inspect the local Fundus archive of passages, sources, and media.',\n sourcesLabel: 'Sources & Media',\n refresh: 'Refresh',\n searchPlaceholder: 'Search passages, sources, media\u2026',\n filterAll: 'All',\n filterPassages: 'Passages',\n filterSources: 'Sources',\n filterMedia: 'Media',\n empty: 'No results yet. Ingest sources or clear the search box to browse recent entries.',\n copyId: 'Copy ID',\n stats: '{sources} sources \u00B7 {passages} passages \u00B7 {media} media',\n },\n de: {\n tabTitle: 'Quellen & Medien',\n tabDescription: 'Lokales Fundus-Archiv durchsuchen und Passagen, Quellen sowie Medien pr\u00FCfen.',\n sourcesLabel: 'Quellen & Medien',\n refresh: 'Aktualisieren',\n searchPlaceholder: 'Passagen, Quellen, Medien suchen\u2026',\n filterAll: 'Alle',\n filterPassages: 'Passagen',\n filterSources: 'Quellen',\n filterMedia: 'Medien',\n empty: 'Noch keine Treffer. Quellen einspielen oder Suchfeld leeren, um aktuelle Eintr\u00E4ge zu sehen.',\n copyId: 'ID kopieren',\n stats: '{sources} Quellen \u00B7 {passages} Passagen \u00B7 {media} Medien',\n },\n} as const\n\nexport type FundusUiKey = keyof typeof STRINGS.en\n\nexport function t(locale: LocaleCode, key: FundusUiKey): string {\n return STRINGS[locale][key] ?? STRINGS.en[key]\n}\n\nexport function formatStats(\n locale: LocaleCode,\n stats: { sources: number; passages: number; media: number },\n): string {\n return t(locale, 'stats')\n .replace('{sources}', String(stats.sources))\n .replace('{passages}', String(stats.passages))\n .replace('{media}', String(stats.media))\n}\n\nexport { STRINGS }\n", "/** Minimal archive / index-card icon for the Fundus right-sidebar tab. */\nexport function FundusIcon(props: { size?: number; className?: string }) {\n const size = props.size ?? 18\n return (\n <svg\n className={props.className as string | undefined}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n aria-hidden=\"true\"\n >\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M7 9h10M7 13h7M7 17h5\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n </svg>\n )\n}\n", "import { useCallback, useEffect, useRef, useState } from 'react'\nimport { formatStats, t, type LocaleCode } from '../shared/i18n.ts'\n\ntype Hit = {\n kind: 'passage' | 'source' | 'media'\n id: string\n sourceId: string\n title: string\n locator?: string\n passageCount?: number\n snippet?: string\n license: string\n tags: string[]\n quoteSha256?: string\n mimeType?: string\n widthPx?: number | null\n heightPx?: number | null\n caption?: string\n}\ntype Filter = 'all' | 'passage' | 'source' | 'media'\n\nfunction resolvePaneLocale(ctx?: { get?: (k: string) => unknown }): LocaleCode {\n try {\n const loc =\n typeof ctx?.get === 'function' ? (ctx.get('locale') as { lang?: string } | undefined) : undefined\n return loc?.lang === 'de' ? 'de' : 'en'\n } catch {\n return 'en'\n }\n}\n\nexport function FundusPane(props: { ctx?: { get?: (k: string) => unknown } }) {\n const locale: LocaleCode = resolvePaneLocale(props.ctx)\n const [query, setQuery] = useState('')\n const [filter, setFilter] = useState<Filter>('all')\n const [hits, setHits] = useState<Hit[]>([])\n const [stats, setStats] = useState({ sources: 0, passages: 0, media: 0 })\n const [expanded, setExpanded] = useState<string | null>(null)\n const [detail, setDetail] = useState('')\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null)\n\n const load = useCallback(async (q: string, kind: Filter) => {\n try {\n const res = await fetch(`/api/fundus/search?q=${encodeURIComponent(q || '*')}&kind=${kind}&limit=20`)\n const json = (await res.json()) as { hits?: Hit[]; stats?: typeof stats }\n setHits(json.hits ?? [])\n if (json.stats) setStats(json.stats)\n } catch {\n setHits([])\n }\n }, [])\n\n useEffect(() => {\n if (timer.current) clearTimeout(timer.current)\n timer.current = setTimeout(() => void load(query, filter), 150)\n return () => {\n if (timer.current) clearTimeout(timer.current)\n }\n }, [query, filter, load])\n\n const expand = async (hit: Hit) => {\n if (expanded === hit.id) {\n setExpanded(null)\n setDetail('')\n return\n }\n setExpanded(hit.id)\n try {\n const extra = hit.kind === 'source' ? '&includePassages=1' : ''\n const json = (await (await fetch(`/api/fundus/item?id=${encodeURIComponent(hit.id)}${extra}`)).json()) as {\n text?: string\n quoteSha256?: string\n caption?: string\n passages?: Array<{ id: string; locator: string; text: string }>\n }\n if (hit.kind === 'passage') {\n setDetail(`${json.text ?? ''}\\n\\nsha256: ${json.quoteSha256 ?? ''}`)\n } else if (hit.kind === 'source') {\n setDetail((json.passages ?? []).map((p) => `[${p.id} \u00B7 ${p.locator}] ${p.text}`).join('\\n\\n'))\n } else {\n setDetail(String(json.caption ?? hit.caption ?? ''))\n }\n } catch {\n setDetail('')\n }\n }\n\n const pills: Array<[Filter, string]> = [\n ['all', t(locale, 'filterAll')],\n ['passage', t(locale, 'filterPassages')],\n ['source', t(locale, 'filterSources')],\n ['media', t(locale, 'filterMedia')],\n ]\n\n return (\n <div className=\"dsh-fundus-pane\">\n <div className=\"dsh-fundus-head\">\n <span>{formatStats(locale, stats)}</span>\n <button type=\"button\" className=\"dsh-fundus-refresh\" onClick={() => void load(query, filter)}>\n \u21BB\n </button>\n </div>\n <input\n className=\"dsh-fundus-search\"\n value={query}\n placeholder={t(locale, 'searchPlaceholder')}\n onChange={(e: { target: { value: string } }) => setQuery(e.target.value)}\n />\n <div className=\"dsh-fundus-pills\">\n {pills.map(([id, label]) => (\n <button key={id} type=\"button\" className={filter === id ? 'is-active' : ''} onClick={() => setFilter(id)}>\n {label}\n </button>\n ))}\n </div>\n <div className=\"dsh-fundus-list\">\n {!hits.length ? <p className=\"dsh-fundus-empty\">{t(locale, 'empty')}</p> : null}\n {hits.map((hit) => (\n <article key={hit.id} className=\"dsh-fundus-card\" onClick={() => void expand(hit)}>\n {hit.kind === 'media' ? (\n <img className=\"dsh-fundus-thumb\" src={`/api/fundus/blob?sourceId=${hit.sourceId}`} alt=\"\" width={48} height={48} />\n ) : null}\n <div className=\"dsh-fundus-card-body\">\n <header>\n <strong>{hit.title}</strong>\n <button\n type=\"button\"\n className=\"dsh-fundus-id\"\n onClick={(e: { stopPropagation: () => void }) => {\n e.stopPropagation()\n void navigator.clipboard?.writeText(hit.id)\n }}\n >\n {hit.id}\n </button>\n </header>\n <div className=\"dsh-fundus-meta\">\n {hit.kind === 'passage'\n ? hit.locator\n : hit.kind === 'source'\n ? `${hit.passageCount ?? 0} passages`\n : `${hit.widthPx ?? '?'}\u00D7${hit.heightPx ?? '?'} \u00B7 ${hit.mimeType}`}\n </div>\n <p>{hit.kind === 'media' ? hit.caption : hit.snippet}</p>\n <footer>\n {hit.license}\n {hit.tags?.length ? ` \u00B7 ${hit.tags.join(', ')}` : ''}\n </footer>\n {expanded === hit.id && detail ? <pre className=\"dsh-fundus-detail\">{detail}</pre> : null}\n </div>\n </article>\n ))}\n </div>\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,SAAS;;;ACCtB,IAAM,UAAU;AAAA,EACd,IAAI;AAAA,IACF,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,cAAc;AAAA,IACd,SAAS;AAAA,IACT,mBAAmB;AAAA,IACnB,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,aAAa;AAAA,IACb,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAAA,EACA,IAAI;AAAA,IACF,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,cAAc;AAAA,IACd,SAAS;AAAA,IACT,mBAAmB;AAAA,IACnB,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,aAAa;AAAA,IACb,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AACF;AAIO,SAAS,EAAE,QAAoB,KAA0B;AAC9D,SAAO,QAAQ,MAAM,EAAE,GAAG,KAAK,QAAQ,GAAG,GAAG;AAC/C;AAEO,SAAS,YACd,QACA,OACQ;AACR,SAAO,EAAE,QAAQ,OAAO,EACrB,QAAQ,aAAa,OAAO,MAAM,OAAO,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