privateboard 0.1.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 +21 -0
- package/README.md +120 -0
- package/dist/cli.js +10502 -0
- package/dist/cli.js.map +1 -0
- package/package.json +63 -0
- package/public/adjourn-overlay.css +253 -0
- package/public/agent-overlay.css +444 -0
- package/public/agent-overlay.js +604 -0
- package/public/agent-profile.css +3230 -0
- package/public/agent-profile.js +3329 -0
- package/public/app.js +6629 -0
- package/public/auto-hide-scroll.js +90 -0
- package/public/avatar-skill.js +793 -0
- package/public/avatars/chair.svg +98 -0
- package/public/avatars/first-principles.svg +122 -0
- package/public/avatars/long-horizon.svg +147 -0
- package/public/avatars/open_ai.png +0 -0
- package/public/avatars/phenomenologist.svg +130 -0
- package/public/avatars/socrates.svg +187 -0
- package/public/avatars/user-empathy.svg +117 -0
- package/public/avatars/value-investor.svg +117 -0
- package/public/favicon.svg +10 -0
- package/public/fonts/agent-Italic.woff2 +0 -0
- package/public/fonts/human-sans.woff2 +0 -0
- package/public/icons.css +103 -0
- package/public/models-cache.js +57 -0
- package/public/new-agent.css +1359 -0
- package/public/new-agent.js +675 -0
- package/public/onboarding.css +628 -0
- package/public/onboarding.js +782 -0
- package/public/prototype-dashboard.html +7596 -0
- package/public/report/spines/a16z-thesis.css +1055 -0
- package/public/report/spines/anthropic-essay.css +556 -0
- package/public/report/spines/boardroom-dark.css +1082 -0
- package/public/report/spines/gartner-note.css +538 -0
- package/public/report/spines/mckinsey-deck.css +523 -0
- package/public/report/spines/openai-paper.css +516 -0
- package/public/report.html +1417 -0
- package/public/room-settings.css +895 -0
- package/public/room-settings.js +1039 -0
- package/public/themes.css +338 -0
- package/public/user-settings.css +1236 -0
- package/public/user-settings.js +1291 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* ═══════════════════════════════════════════
|
|
2
|
+
MODELS CACHE · /api/models singleton
|
|
3
|
+
═══════════════════════════════════════════
|
|
4
|
+
Shared store for the model availability snapshot · every picker
|
|
5
|
+
(composer / agent profile / new-agent / user-settings default)
|
|
6
|
+
reads from here so they all reflect the same key state at the
|
|
7
|
+
same time.
|
|
8
|
+
|
|
9
|
+
API:
|
|
10
|
+
boardroomModels() snapshot or null
|
|
11
|
+
boardroomModelsRefresh() Promise<snapshot>
|
|
12
|
+
boardroomModelsOnUpdate(fn) subscribe (returns unsubscribe)
|
|
13
|
+
|
|
14
|
+
Snapshot shape mirrors GET /api/models:
|
|
15
|
+
{ hasAnyKey, models[], reachable[], defaultModelV,
|
|
16
|
+
utilityModelV, providers[] }
|
|
17
|
+
*/
|
|
18
|
+
(function () {
|
|
19
|
+
let _cache = null;
|
|
20
|
+
const _subs = new Set();
|
|
21
|
+
let _inflight = null;
|
|
22
|
+
|
|
23
|
+
function notify() {
|
|
24
|
+
for (const fn of _subs) {
|
|
25
|
+
try { fn(_cache); } catch (e) { /* swallow */ }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function refresh() {
|
|
30
|
+
if (_inflight) return _inflight;
|
|
31
|
+
_inflight = (async () => {
|
|
32
|
+
try {
|
|
33
|
+
const r = await fetch("/api/models");
|
|
34
|
+
if (r.ok) _cache = await r.json();
|
|
35
|
+
} catch (e) { /* keep last cache on offline */ }
|
|
36
|
+
_inflight = null;
|
|
37
|
+
notify();
|
|
38
|
+
return _cache;
|
|
39
|
+
})();
|
|
40
|
+
return _inflight;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Public API · synchronous read returns the latest snapshot
|
|
44
|
+
// (or null until the first refresh resolves).
|
|
45
|
+
window.boardroomModels = () => _cache;
|
|
46
|
+
window.boardroomModelsRefresh = refresh;
|
|
47
|
+
window.boardroomModelsOnUpdate = (fn) => {
|
|
48
|
+
_subs.add(fn);
|
|
49
|
+
return () => _subs.delete(fn);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// Kick off the initial fetch as soon as the module loads · every
|
|
53
|
+
// consumer that calls boardroomModels() before this resolves will
|
|
54
|
+
// get null and should subscribe via boardroomModelsOnUpdate to
|
|
55
|
+
// re-render once the data arrives.
|
|
56
|
+
refresh();
|
|
57
|
+
})();
|