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.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +120 -0
  3. package/dist/cli.js +10502 -0
  4. package/dist/cli.js.map +1 -0
  5. package/package.json +63 -0
  6. package/public/adjourn-overlay.css +253 -0
  7. package/public/agent-overlay.css +444 -0
  8. package/public/agent-overlay.js +604 -0
  9. package/public/agent-profile.css +3230 -0
  10. package/public/agent-profile.js +3329 -0
  11. package/public/app.js +6629 -0
  12. package/public/auto-hide-scroll.js +90 -0
  13. package/public/avatar-skill.js +793 -0
  14. package/public/avatars/chair.svg +98 -0
  15. package/public/avatars/first-principles.svg +122 -0
  16. package/public/avatars/long-horizon.svg +147 -0
  17. package/public/avatars/open_ai.png +0 -0
  18. package/public/avatars/phenomenologist.svg +130 -0
  19. package/public/avatars/socrates.svg +187 -0
  20. package/public/avatars/user-empathy.svg +117 -0
  21. package/public/avatars/value-investor.svg +117 -0
  22. package/public/favicon.svg +10 -0
  23. package/public/fonts/agent-Italic.woff2 +0 -0
  24. package/public/fonts/human-sans.woff2 +0 -0
  25. package/public/icons.css +103 -0
  26. package/public/models-cache.js +57 -0
  27. package/public/new-agent.css +1359 -0
  28. package/public/new-agent.js +675 -0
  29. package/public/onboarding.css +628 -0
  30. package/public/onboarding.js +782 -0
  31. package/public/prototype-dashboard.html +7596 -0
  32. package/public/report/spines/a16z-thesis.css +1055 -0
  33. package/public/report/spines/anthropic-essay.css +556 -0
  34. package/public/report/spines/boardroom-dark.css +1082 -0
  35. package/public/report/spines/gartner-note.css +538 -0
  36. package/public/report/spines/mckinsey-deck.css +523 -0
  37. package/public/report/spines/openai-paper.css +516 -0
  38. package/public/report.html +1417 -0
  39. package/public/room-settings.css +895 -0
  40. package/public/room-settings.js +1039 -0
  41. package/public/themes.css +338 -0
  42. package/public/user-settings.css +1236 -0
  43. 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
+ })();