create-pmos 0.75.0 → 0.76.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.
@@ -3238,6 +3238,17 @@ function skillLaunch(wsIdArg, skillId) {
3238
3238
  modelAsk: { skillTier: task.tier || null, skill: task.skill } };
3239
3239
  }
3240
3240
 
3241
+ /** Type a follow-up into a RUNNING session, as its first input is typed (lib/first-input.js: wait until the pane is quiet,
3242
+ * type the text, then Enter as its own key). → true when it was handed to the session, false when the session is gone.
3243
+ * Used by the Notes minute bullets (lib/routes-notes.js) to tell the one bullets session that the next minute is ready. */
3244
+ function sendToSession(id, text) {
3245
+ const s = sessions.get(String(id || ''));
3246
+ if (!s || !s.pty || s.state === 'exited' || s.agent === 'shell') return false;
3247
+ const t = String(text == null ? '' : text).replace(/[\r\n]+/g, ' ').trim();
3248
+ if (!t) return false;
3249
+ try { firstInput.deliver(s, safeFirstInput(t) + '\r'); return true; } catch { return false; }
3250
+ }
3251
+
3241
3252
  function spawnSession({ name, agent, cwd, ws, origin, initialInput, profile, initiative, modelAsk, planItem, workType }) {
3242
3253
  const id = nextSessionId();
3243
3254
  /* pm-os-absorb Run 1 — every AGENT session gets a token, `<id>.<8 hex>`, in its environment as PMOS_SESSION, and
@@ -8430,7 +8441,7 @@ async function handleRequest(req, res) {
8430
8441
  // pm-os-absorb Runs 2–5 — the planning layer's routes, one file per run (lib/route-modules.js). Last, so none shadows a route above.
8431
8442
  // meeting-notes Run 1: the Notes routes keep notes in the per-user runtime directory and start the agent-summary session.
8432
8443
  if (await routeModules.dispatch(req, res, url, { json, readBody, getWs, invalidateNeedsAgg, boardCache, consoleState, stateDirFor, sessionList, initiativeIndex,
8433
- runtimeDir: STATE, spawnSession, jevModelOpts,
8444
+ runtimeDir: STATE, spawnSession, jevModelOpts, sendToSession,
8434
8445
  // initiative my-work: every registered repository, the day runs, and the two presses that start sessions
8435
8446
  workspaceList: () => [...workspaces.values()], readDayRun, myWorkBrief, myWorkRead })) return;
8436
8447
  res.writeHead(404); res.end('not found');