create-pmos 0.397.0 → 0.399.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 (195) hide show
  1. package/package.json +25 -25
  2. package/payload/KIT-VERSION +2 -2
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/payload/state/log.md +1 -1
  7. package/workspace/briefing-premium-adddoc-test.js +105 -52
  8. package/workspace/briefing-premium-board-test.js +284 -128
  9. package/workspace/briefing-premium-calendar-2-test.js +135 -198
  10. package/workspace/briefing-premium-calendar-3-test.js +143 -418
  11. package/workspace/briefing-premium-calendar-test.js +85 -196
  12. package/workspace/briefing-premium-doc-edit-test.js +99 -83
  13. package/workspace/briefing-premium-initiative-test.js +175 -290
  14. package/workspace/briefing-premium-insights-test.js +414 -219
  15. package/workspace/briefing-premium-metrics-test.js +55 -97
  16. package/workspace/briefing-premium-products-test.js +44 -28
  17. package/workspace/briefing-premium-sources-test.js +70 -49
  18. package/workspace/briefing-premium-test.js +155 -648
  19. package/workspace/briefing-premium-work-test.js +88 -283
  20. package/workspace/changelog.json +24 -0
  21. package/workspace/ev-everywhere-test.js +210 -0
  22. package/workspace/fixtures/board-premium-trail.js +32 -0
  23. package/workspace/fixtures/premium-viewer-fixtures.js +187 -0
  24. package/workspace/guide/briefing-premium.md +3 -1
  25. package/workspace/guide/home.md +68 -0
  26. package/workspace/guide/index.md +1 -0
  27. package/workspace/lib/agent-roles.js +71 -0
  28. package/workspace/lib/board-grill.js +63 -0
  29. package/workspace/lib/board-premium.js +121 -24
  30. package/workspace/lib/board-trail.js +223 -0
  31. package/workspace/lib/home-work-item.js +58 -0
  32. package/workspace/lib/initiative-layout.js +77 -0
  33. package/workspace/lib/insights-goals.js +196 -0
  34. package/workspace/lib/insights-premium.js +64 -15
  35. package/workspace/lib/insights-records.js +115 -0
  36. package/workspace/lib/jira-tickets.js +1 -1
  37. package/workspace/lib/meeting-points.js +52 -0
  38. package/workspace/lib/news-for-you.js +88 -0
  39. package/workspace/lib/notes-series.js +29 -6
  40. package/workspace/lib/report-confirm.js +48 -0
  41. package/workspace/lib/route-modules.js +12 -0
  42. package/workspace/lib/routes-board-docs.js +46 -0
  43. package/workspace/lib/routes-board-grill.js +90 -0
  44. package/workspace/lib/routes-board-trail.js +33 -0
  45. package/workspace/lib/routes-home-desk.js +176 -0
  46. package/workspace/lib/routes-home-review.js +108 -0
  47. package/workspace/lib/routes-initiative-layout.js +57 -0
  48. package/workspace/lib/routes-insights-premium.js +16 -4
  49. package/workspace/lib/routes-insights-records.js +133 -0
  50. package/workspace/lib/routes-meeting-points.js +37 -0
  51. package/workspace/lib/routes-news.js +57 -0
  52. package/workspace/lib/routes-notes.js +3 -1
  53. package/workspace/lib/routes-report-confirm.js +31 -0
  54. package/workspace/lib/routes-search.js +38 -0
  55. package/workspace/lib/routes-viewer.js +108 -0
  56. package/workspace/lib/search-index.js +176 -0
  57. package/workspace/lib/transcript-steps.js +123 -0
  58. package/workspace/lib/viewer-meeting.js +205 -0
  59. package/workspace/lib/viewer-report.js +89 -0
  60. package/workspace/package-lock.json +2 -2
  61. package/workspace/package.json +1 -1
  62. package/workspace/premium-board-actions-test.js +128 -82
  63. package/workspace/premium-briefing-depth-test.js +104 -90
  64. package/workspace/premium-chat-attach-test.js +54 -63
  65. package/workspace/premium-chat-chart-tab-test.js +37 -37
  66. package/workspace/premium-chat-context-test.js +19 -18
  67. package/workspace/premium-chat-goal-view-test.js +23 -23
  68. package/workspace/premium-chat-notes-test.js +26 -31
  69. package/workspace/premium-chat-report-tab-test.js +46 -28
  70. package/workspace/premium-chat-term-test.js +16 -16
  71. package/workspace/premium-chat-viewer-test.js +60 -59
  72. package/workspace/premium-core-doc-issue-test.js +52 -43
  73. package/workspace/premium-html-viewer-test.js +14 -17
  74. package/workspace/premium-phone-card-test.js +10 -3
  75. package/workspace/premium-phone-room-test.js +41 -35
  76. package/workspace/premium-report-read-test.js +152 -197
  77. package/workspace/premium-viewer-download-test.js +19 -22
  78. package/workspace/premium-viewer-flicker-test.js +11 -16
  79. package/workspace/premium-viewer-share-test.js +6 -9
  80. package/workspace/premium-viewer-test.js +41 -60
  81. package/workspace/premium-vw-backlog-test.js +53 -33
  82. package/workspace/premium-vw-cal-test.js +97 -128
  83. package/workspace/premium-vw-copy-test.js +17 -33
  84. package/workspace/premium-vw-doc-test.js +17 -10
  85. package/workspace/premium-vw-item-test.js +50 -49
  86. package/workspace/premium-vw-jira-test.js +53 -27
  87. package/workspace/premium-vw-meet-test.js +115 -187
  88. package/workspace/premium-vw-notes-test.js +88 -109
  89. package/workspace/premium-vw-rec-test.js +71 -194
  90. package/workspace/premium-vw-slides-test.js +46 -50
  91. package/workspace/premium-welcome-test.js +3 -2
  92. package/workspace/premium-work-depth-test.js +61 -53
  93. package/workspace/public/pm/bd-acts.js +383 -0
  94. package/workspace/public/pm/bd-asks.js +261 -0
  95. package/workspace/public/pm/bd-pop.js +59 -0
  96. package/workspace/public/pm/bd-span.js +222 -82
  97. package/workspace/public/pm/bd-stages.js +25 -11
  98. package/workspace/public/pm/bd-views.js +169 -0
  99. package/workspace/public/pm/c3-doc-sheet.js +1 -1
  100. package/workspace/public/pm/c3-md.js +3 -395
  101. package/workspace/public/pm/c3-phone-detail.js +1 -1
  102. package/workspace/public/pm/c3-phone-model.js +3 -68
  103. package/workspace/public/pm/chat-term.js +3 -3
  104. package/workspace/public/pm/cozy-board.css +798 -230
  105. package/workspace/public/pm/cozy-ev.css +228 -0
  106. package/workspace/public/pm/cozy-evmodel.js +106 -0
  107. package/workspace/public/pm/cozy-evui.js +47 -0
  108. package/workspace/public/pm/cozy-home.css +570 -142
  109. package/workspace/public/pm/cozy-home.js +5 -3
  110. package/workspace/public/pm/cozy-insights.css +437 -170
  111. package/workspace/public/pm/cozy-md.js +396 -0
  112. package/workspace/public/pm/cozy-nav.js +104 -29
  113. package/workspace/public/pm/cozy-news.js +140 -0
  114. package/workspace/public/pm/cozy-placeholder.js +26 -0
  115. package/workspace/public/pm/cozy-search.js +203 -0
  116. package/workspace/public/pm/cozy-settings.js +198 -0
  117. package/workspace/public/pm/cozy-sources.js +89 -0
  118. package/workspace/public/pm/cozy-today.css +217 -0
  119. package/workspace/public/pm/cozy-viewer.css +3 -3
  120. package/workspace/public/pm/cozy-viewer.js +145 -0
  121. package/workspace/public/pm/cozy-vw-mtg.css +350 -0
  122. package/workspace/public/pm/cozy-vw-rp.css +152 -0
  123. package/workspace/public/pm/cozy-vw.css +485 -0
  124. package/workspace/public/pm/cozy.css +83 -1
  125. package/workspace/public/pm/home-adddoc.js +48 -0
  126. package/workspace/public/pm/home-app.js +1179 -0
  127. package/workspace/public/pm/home-around.js +413 -0
  128. package/workspace/public/pm/home-chat.js +512 -0
  129. package/workspace/public/pm/home-data.js +312 -0
  130. package/workspace/public/pm/home-dictate.js +54 -0
  131. package/workspace/public/pm/home-draft.js +68 -0
  132. package/workspace/public/pm/home-ini-model.js +190 -0
  133. package/workspace/public/pm/home-ini.css +171 -0
  134. package/workspace/public/pm/home-ini.js +456 -0
  135. package/workspace/public/pm/home-list.js +276 -0
  136. package/workspace/public/pm/home-more.js +132 -0
  137. package/workspace/public/pm/home-phone-card.js +109 -0
  138. package/workspace/public/pm/home-review.js +104 -0
  139. package/workspace/public/pm/home-task.js +67 -0
  140. package/workspace/public/pm/home-today.js +144 -0
  141. package/workspace/public/pm/home-work.js +547 -0
  142. package/workspace/public/pm/phone-moment.js +69 -0
  143. package/workspace/public/pm/pm-work-view.js +1 -1
  144. package/workspace/public/pm/premium-attach.js +4 -0
  145. package/workspace/public/pm/premium-board.js +548 -395
  146. package/workspace/public/pm/premium-chart-tab.js +109 -62
  147. package/workspace/public/pm/premium-deck.js +3 -3
  148. package/workspace/public/pm/premium-first.js +23 -21
  149. package/workspace/public/pm/premium-insights.js +1102 -581
  150. package/workspace/public/pm/premium-meeting.js +61 -549
  151. package/workspace/public/pm/premium-mtg-present.js +138 -0
  152. package/workspace/public/pm/premium-mtg-replay.js +142 -0
  153. package/workspace/public/pm/premium-notes.js +1 -1
  154. package/workspace/public/pm/premium-report-frame.css +20 -0
  155. package/workspace/public/pm/premium-report-read.js +669 -476
  156. package/workspace/public/pm/premium-report-tab.js +116 -67
  157. package/workspace/public/pm/premium-shell.js +76 -123
  158. package/workspace/public/pm/premium-viewer.js +22 -1
  159. package/workspace/public/pm/premium-vw-cal.js +277 -48
  160. package/workspace/public/pm/premium-vw-doc.css +6 -0
  161. package/workspace/public/pm/premium-vw-doc.js +40 -2
  162. package/workspace/public/pm/premium-vw-file.js +2 -2
  163. package/workspace/public/pm/premium-vw-meet.js +6 -83
  164. package/workspace/public/pm/premium-vw-mtg.js +958 -0
  165. package/workspace/public/pm/premium-vw-notes.js +116 -68
  166. package/workspace/public/pm/premium-vw-open.js +35 -0
  167. package/workspace/public/pm/premium-vw-page.js +16 -0
  168. package/workspace/public/pm/premium-vw-rec.js +11 -218
  169. package/workspace/public/pm/premium-vw-slides.css +5 -0
  170. package/workspace/public/pm/premium-vw-slides.js +44 -8
  171. package/workspace/public/pm/rp-parts.js +269 -0
  172. package/workspace/public/pm/term-view.js +22 -0
  173. package/workspace/public/premium-board.html +29 -70
  174. package/workspace/public/premium-initiative.html +8 -48
  175. package/workspace/public/premium-insights.html +26 -64
  176. package/workspace/public/premium-viewer.html +20 -0
  177. package/workspace/public/premium.html +18 -107
  178. package/workspace/r/m1.png +0 -0
  179. package/workspace/r/m2.png +0 -0
  180. package/workspace/r/m3.png +0 -0
  181. package/workspace/r/nl.png +0 -0
  182. package/workspace/server.js +18 -3
  183. package/workspace/test-files.json +1 -0
  184. package/workspace/test-lists/home-libs.json +9 -0
  185. package/workspace/test-lists/initiative-layout.json +9 -0
  186. package/workspace/test-lists/premium-report-read.json +1 -1
  187. package/workspace/test-lists/premium-uncovered-meetings.json +9 -0
  188. package/workspace/test-lists/premium-uncovered-reports.json +9 -0
  189. package/workspace/test-lists/premium-vw-agreed.json +9 -0
  190. package/workspace/test-lists/premium-vw-notes.json +1 -1
  191. package/workspace/test-lists/uf-everywhere.json +15 -0
  192. package/workspace/test-lists/uf-home.json +9 -0
  193. package/workspace/test-lists/uncovered-board.json +9 -0
  194. package/workspace/public/pm/premium-work.js +0 -729
  195. package/workspace/public/pm/premium.js +0 -1146
@@ -1,68 +1,3 @@
1
- /* pm/c3-phone-model.js — which moment of the day the phone companion is in, and what it brings (initiative c3-phone-companion).
2
- * Pure: it reads today's meetings and the PM's own open items (GET /api/brief-page) and a clock, and returns one moment. No DOM, no fetch.
3
- *
4
- * momentOf({ today, needs, now }) → { kind, meeting?, next?, minutes?, fits?, later }
5
- * kind 'meeting' a meeting is under way (start ≤ now < end) meeting = that one
6
- * 'before' the next meeting starts within BEFORE_MIN minutes meeting = the next one, minutes = until it starts
7
- * 'after' a meeting ended less than AFTER_MIN minutes ago, nothing under way meeting = the one that ended
8
- * 'gap' a free stretch of GAP_MIN minutes or more before the next meeting minutes = free minutes, fits = items that fit
9
- * 'morning' before noon with no meeting under way or near next = the next meeting, or null
10
- * 'work' working hours after noon with no meeting near next = the next meeting, or null
11
- * 'recap' from WRAP_HOUR on: the evening recap of the day next = null
12
- * 'night' from NIGHT_HOUR on, or before EARLY_HOUR: tomorrow at a glance next = null
13
- * later the meetings still to come after the one the moment is about (time order), for "I'll bring up later".
14
- * part the part of the day the moment belongs to (PART_OF), drawn as one icon in the header:
15
- * morning · work (gap, work) · meeting (before, meeting, after) · evening (recap) · night
16
- * fitsIn(needs, minutes) the own items worth doing in a free stretch: overdue first (most late first), then due today; at most two.
17
- * The meeting rows are the brief page's today[] rows: { id, title, start, end, people, initiative, prepared, before }. */
18
-
19
- export const BEFORE_MIN = 30;
20
- export const AFTER_MIN = 20;
21
- export const GAP_MIN = 15;
22
- export const WRAP_HOUR = 17;
23
- export const NIGHT_HOUR = 20;
24
- export const EARLY_HOUR = 5;
25
- export const PART_OF = Object.freeze({ morning: 'morning', gap: 'work', work: 'work', before: 'meeting', meeting: 'meeting', after: 'meeting', recap: 'evening', night: 'night' });
26
-
27
- const ms = (iso) => Date.parse(iso);
28
- const ok = (m) => m && m.id && !Number.isNaN(ms(m.start)) && !Number.isNaN(ms(m.end || m.start));
29
-
30
- export function fitsIn(needs, minutes) {
31
- if (!(minutes >= GAP_MIN)) return [];
32
- const own = (needs || []).filter((n) => n && (n.kind === 'overdue' || n.kind === 'due-today'));
33
- own.sort((a, b) => (a.kind === b.kind ? (b.days_late || 0) - (a.days_late || 0) : a.kind === 'overdue' ? -1 : 1));
34
- return own.slice(0, 2);
35
- }
36
-
37
- export function momentOf(args = {}) {
38
- const mo = kindOf(args);
39
- return { ...mo, part: PART_OF[mo.kind] };
40
- }
41
-
42
- function kindOf({ today, needs, now } = {}) {
43
- const t = (now instanceof Date ? now : new Date(now || Date.now())).getTime();
44
- const hour = new Date(t).getHours();
45
- const rows = (today || []).filter(ok).slice().sort((a, b) => ms(a.start) - ms(b.start));
46
- const end = (m) => ms(m.end || m.start);
47
- const cur = rows.find((m) => ms(m.start) <= t && t < end(m));
48
- const upcoming = rows.filter((m) => ms(m.start) > t);
49
- const next = upcoming[0] || null;
50
- const laterThan = (m) => upcoming.filter((x) => x !== m);
51
- if (cur) return { kind: 'meeting', meeting: cur, minutes: Math.round((end(cur) - t) / 60000), later: upcoming };
52
- const until = next ? Math.round((ms(next.start) - t) / 60000) : null;
53
- if (next && until <= BEFORE_MIN) return { kind: 'before', meeting: next, minutes: until, later: laterThan(next) };
54
- const ended = rows.filter((m) => end(m) <= t && t - end(m) < AFTER_MIN * 60000).pop();
55
- if (ended) return { kind: 'after', meeting: ended, later: upcoming };
56
- if (hour >= NIGHT_HOUR || hour < EARLY_HOUR) return { kind: 'night', next: null, later: upcoming };
57
- if (hour >= WRAP_HOUR) return { kind: 'recap', next: null, later: upcoming };
58
- if (next && until >= GAP_MIN && rows.some((m) => end(m) <= t)) return { kind: 'gap', next, minutes: until, fits: fitsIn(needs, until), later: upcoming };
59
- if (hour < 12) return { kind: 'morning', next, later: upcoming };
60
- return { kind: 'work', next, minutes: until, fits: fitsIn(needs, until === null ? 120 : until), later: upcoming };
61
- }
62
-
63
- /** "in 25 min", "in 1 h 5 min" */
64
- export function inText(minutes) {
65
- const m = Math.max(0, Math.round(minutes || 0));
66
- if (m < 60) return 'in ' + m + ' min';
67
- return 'in ' + Math.floor(m / 60) + ' h' + (m % 60 ? ' ' + (m % 60) + ' min' : '');
68
- }
1
+ /* pm/c3-phone-model.js — moved to pm/phone-moment.js (premium-agreed-design: no c3-* module loads on a premium page). The console keeps importing
2
+ * this name, so it re-exports the one copy. */
3
+ export * from './phone-moment.js';
@@ -1,12 +1,12 @@
1
1
  /* chat-term — the chat header's Open in terminal icon (chat-open-in-terminal, Wawan 2026-10-22). Pure: no DOM, so Node tests it.
2
- * A running session opens in the console's terminal, attached to the same process (/console.html?term=<id>), in a new tab.
2
+ * A running session's terminal opens read only in the Viewer (term-view.js): nothing on the premium pages links to the console any more.
3
3
  * An ended chat copies the line that resumes its Claude Code conversation in a terminal (lib/briefing-premium-agent.js resumeCommand).
4
4
  * Nothing to open or copy: the icon is hidden. */
5
5
  export const TERM_ICON = '<svg class="i" viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="4" width="18" height="16" rx="3"/><path d="m7 10 3 2-3 2M12 15h5"/></svg>';
6
6
 
7
- /** { live, command, ws } → { href, label } for a running session, { copy, label } for an ended one, or null. */
7
+ /** { live, command, ws } → { term, label } for a running session, { copy, label } for an ended one, or null. */
8
8
  export function termTarget({ live = null, command = null, ws = null } = {}) {
9
- if (live && /^sess-\d+$/.test(String(live))) return { href: '/console.html?term=' + encodeURIComponent(live) + (ws ? '&ws=' + encodeURIComponent(ws) : ''), label: 'Open in terminal' };
9
+ if (live && /^sess-\d+$/.test(String(live))) return { term: String(live), label: 'Watch its terminal' };
10
10
  if (command && typeof command === 'string') return { copy: command, label: 'Copy the terminal command' };
11
11
  return null;
12
12
  }