create-pmos 0.376.0 → 0.378.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.
@@ -2627,6 +2627,37 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
2627
2627
  .chatpg.dfocus .dlg.on{height:100%;border-radius:0;padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))}
2628
2628
  }
2629
2629
  @media (max-width:999px) and (prefers-reduced-motion:reduce){.chatpg .rail{transition:none}}
2630
+ /* premium-chat-attach: the + at the left inside the message box, its menu, the attachment chips, a drop on the conversation, an attachment in the viewer */
2631
+ .askbar:has(.askplus:not([hidden])) textarea{padding-left:50px}
2632
+ .askbar .askplus{position:absolute;left:3px;bottom:5px;z-index:2;width:44px;height:44px;min-height:44px;border-radius:50%;background:transparent;color:var(--ink-2)}
2633
+ .askbar .askplus[hidden]{display:none}
2634
+ .askbar .askplus:hover,.askbar .askplus.on{background:var(--card-solid);color:var(--ink)}
2635
+ .askbar .askplus svg{width:20px;height:20px}
2636
+ .plusm{position:absolute;left:0;bottom:calc(100% - 6px);z-index:3;min-width:min(290px,100%);background:var(--card-solid);border-radius:var(--r-in);box-shadow:var(--card-shadow);padding:6px;display:grid;gap:2px}
2637
+ .plusm[hidden]{display:none}
2638
+ .askbar .plusm>button{display:flex;align-items:center;gap:10px;width:auto;height:auto;min-height:44px;padding:8px 12px;border-radius:12px;background:transparent;color:var(--ink);text-align:left;place-items:initial}
2639
+ .askbar .plusm>button:hover,.askbar .plusm>button:focus-visible{background:var(--well);outline:0}
2640
+ .askbar .plusm>button svg{width:18px;height:18px;flex:none}
2641
+ .plusm span{font-weight:500}
2642
+ .plusm em{margin-left:auto;padding-left:12px;font-style:normal;font-size:var(--fs-1);color:var(--ink-3)}
2643
+ .atrow{flex:1 0 100%;display:flex;gap:6px;flex-wrap:wrap;min-width:0}
2644
+ .atrow[hidden]{display:none}
2645
+ .atc{display:inline-flex;align-items:center;gap:8px;max-width:min(240px,100%);min-width:0;padding:4px 4px 4px 4px;border-radius:12px;background:var(--well);color:var(--ink);font-size:var(--fs-2);text-align:left}
2646
+ .atc.up{opacity:.7}
2647
+ .ath{width:36px;height:36px;border-radius:8px;flex:none;object-fit:cover;background:var(--card-solid)}
2648
+ .atx{display:grid;place-items:center;font-size:var(--fs-1);font-weight:600;letter-spacing:.04em;color:var(--ink-3)}
2649
+ .atn{display:grid;min-width:0}
2650
+ .atn b{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
2651
+ .atn em{font-style:normal;font-size:var(--fs-1);color:var(--ink-3)}
2652
+ .askbar .atx-rm{width:44px;height:44px;min-height:44px;margin:-4px -4px -4px -8px;flex:none;border-radius:50%;background:radial-gradient(circle,var(--card-solid) 13px,transparent 14px);color:var(--ink-2);font-size:var(--fs-4);line-height:1}
2653
+ .atrow.sent{margin:0 0 6px}
2654
+ .atrow.sent .atc{background:var(--card-solid);padding-right:10px;cursor:pointer}
2655
+ .atrow.sent .atc:focus-visible{outline:0;box-shadow:0 0 0 2px var(--b3)}
2656
+ @media (max-width:999px){.askbar .atrow{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.askbar .atc{flex:none;max-width:200px}}
2657
+ #dBody.atdrop{outline:2px dashed var(--b3);outline-offset:-8px;border-radius:var(--r-in)}
2658
+ .atfile .atview{display:block;max-width:100%;height:auto;margin:8px auto;border-radius:8px}
2659
+ .atfile .atpdf{display:block;width:100%;height:max(420px,calc(100dvh - 260px));border:1px solid var(--hair);border-radius:8px}
2660
+ @media (pointer:coarse){.plusm em{display:none}}
2630
2661
 
2631
2662
  /* ── premium-chat-viewer: the Chat page's viewer is closed until something opens in it. Desktop: vw-shut takes its column away and the
2632
2663
  conversation is centred; the head's Viewer pill opens it again. Phone: no Detail / Conversation switch; vw-layer puts the viewer over the
@@ -2672,3 +2703,18 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
2672
2703
  .vtab[hidden]{display:none}
2673
2704
  @media (min-width:1000px){.chatpg .dlg.full .otop{flex-wrap:nowrap;align-items:center}.chatpg .dlg.full .otop #vTabs{flex:1 1 0;min-width:0}}
2674
2705
  .chatpg.vwlayer .dlg.on{border-radius:0}
2706
+ /* ── premium-chat-viewer slice 2: what an answer worked with, as chips under it (the main one first); on a phone a bar over the box offers it ── */
2707
+ .ctxc{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
2708
+ .ctxchip{display:inline-flex;align-items:center;gap:8px;min-height:44px;max-width:100%;padding:6px 12px 6px 10px;border-radius:var(--r-chip);background:var(--well);color:var(--ink);text-align:left;cursor:pointer}
2709
+ .ctxchip:hover{background:var(--card)}
2710
+ .ctxchip:focus-visible{outline:2px solid var(--ink);outline-offset:1px}
2711
+ .ctxchip.lead{background:var(--card-solid);box-shadow:var(--card-shadow)}
2712
+ .ctxchip .i{width:16px;height:16px;flex:none;color:var(--ink-2)}
2713
+ .ctxchip span{display:flex;flex-direction:column;min-width:0}
2714
+ .ctxchip b{font-weight:600;font-size:var(--fs-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:240px}
2715
+ .ctxchip em{font-style:normal;font-size:var(--fs-1);color:var(--ink-3)}
2716
+ .ctxpeek{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:44px;margin:0 0 8px;padding:6px 14px;border-radius:14px;background:var(--card-solid);box-shadow:var(--card-shadow);color:var(--ink-2);font-size:var(--fs-2);text-align:left}
2717
+ .ctxpeek[hidden]{display:none}
2718
+ .ctxpeek b{color:var(--ink);font-weight:600}
2719
+ .ctxpeek em{font-style:normal;font-weight:600;color:var(--ink)}
2720
+ .vwtk b{display:block}
@@ -4112,6 +4112,8 @@ function spawnSessionInner({ name, agent, cwd, ws, origin, initialInput, profile
4112
4112
  * hooks post to this workspace (lib/routes-hooks.js, loopback only; the session token travels in the PMOS_SESSION env). */
4113
4113
  // premium-chat-session U1: a chat panel's session gets the /goal Stop hook (lib/goal-chat.js) instead, so a started goal keeps going until done.
4114
4114
  if (agent === 'claude' && /^chat:/.test(String(tag || ''))) argv.push('--settings', JSON.stringify(require('./lib/goal-chat.js').hookSettings(PORT)));
4115
+ // premium-chat-attach A6: the files the PM attaches live in the state folder, added as a directory so Claude reads them without a permission question
4116
+ if (agent === 'claude' && /^chat:/.test(String(tag || ''))) { const cf = require('./lib/chat-files.js').rootOf(STATE); try { fs.mkdirSync(cf, { recursive: true }); argv.push('--add-dir', cf); } catch { /* no folder: an attachment read asks first */ } }
4115
4117
  // premium-chat-session L2: a chat keeps one Claude Code conversation id, so the session that replaces an ended one resumes it
4116
4118
  if (agent === 'claude' && /^chat:/.test(String(tag || '')) && chatClaude && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(String(chatClaude.id || ''))) argv.push(chatClaude.resume ? '--resume' : '--session-id', String(chatClaude.id));
4117
4119
  else if (process.env.PMOS_AGENT_HOOKS === '1' && agent === 'claude') argv.push('--settings', JSON.stringify(require('./lib/routes-hooks.js').settingsFor(PORT)));
@@ -8048,6 +8050,11 @@ async function handleRequest(req, res) {
8048
8050
  // `jira-push` for the tickets the PM selected (a PM-only press, pm-guard act `push`, which first records the
8049
8051
  // selection), and Check now starts `jira-sync` for this initiative. No route here reads or writes Jira: the session,
8050
8052
  // holding the PM's own Atlassian connection, does (D53, D88).
8053
+ if (p === '/api/jira/ticket' && req.method === 'GET') { // premium-chat-viewer slice 2: one ticket by key from the stored Jira readings
8054
+ const w = getWs(url.searchParams.get('ws'));
8055
+ const t = jiraStatus.findTicket(w ? w.root : SELF_ROOT, url.searchParams.get('key'));
8056
+ return json(res, { ok: true, ticket: t });
8057
+ }
8051
8058
  if (p === '/api/jira/tickets' && req.method === 'GET') {
8052
8059
  const w = getWs(url.searchParams.get('ws'));
8053
8060
  const root = w ? w.root : SELF_ROOT;
@@ -0,0 +1,13 @@
1
+ {
2
+ "_comment": "Initiative premium-chat-attach: files and photos on a premium chat message (the store and the pure parts, and the + menu, chips, drop and paste on the real page and server).",
3
+ "modules": [
4
+ "premium-chat-attach.test.js"
5
+ ],
6
+ "panels": [
7
+ "premium-chat-attach-test.js"
8
+ ],
9
+ "seconds": {
10
+ "premium-chat-attach.test.js": 1,
11
+ "premium-chat-attach-test.js": 30
12
+ }
13
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "What an answer worked with shows as chips under it (files, Jira tickets, Slack, links) and its main item opens once when Claude finishes; on a phone a bar offers it. Real server, 390 and 1280 wide.",
3
+ "seconds": {
4
+ "premium-chat-context-test.js": 40
5
+ },
6
+ "panels": [
7
+ "premium-chat-context-test.js"
8
+ ]
9
+ }