instar 1.3.1981 → 1.3.1983

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 (32) hide show
  1. package/dashboard/console/console.css +7 -0
  2. package/dashboard/console/needs-strip.js +22 -5
  3. package/dashboard/console/plans-model.js +3 -0
  4. package/dist/commands/init.d.ts +1 -0
  5. package/dist/commands/init.d.ts.map +1 -1
  6. package/dist/commands/init.js +29 -3
  7. package/dist/commands/init.js.map +1 -1
  8. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  9. package/dist/core/PostUpdateMigrator.js +28 -2
  10. package/dist/core/PostUpdateMigrator.js.map +1 -1
  11. package/dist/data/standards-guard-index.json +1 -1
  12. package/dist/data/standards-guard-index.meta.json +2 -2
  13. package/dist/data/standards-registry.meta.json +1 -1
  14. package/dist/monitoring/NativeHookEvents.d.ts +10 -0
  15. package/dist/monitoring/NativeHookEvents.d.ts.map +1 -1
  16. package/dist/monitoring/NativeHookEvents.js +37 -0
  17. package/dist/monitoring/NativeHookEvents.js.map +1 -1
  18. package/dist/native/InstarWedgeCanary.app/Contents/MacOS/InstarWedgeCanary +0 -0
  19. package/dist/native/instar-desktop-host +0 -0
  20. package/dist/server/routes.d.ts.map +1 -1
  21. package/dist/server/routes.js +4 -1
  22. package/dist/server/routes.js.map +1 -1
  23. package/package.json +1 -1
  24. package/src/data/builtin-manifest.json +64 -64
  25. package/src/data/standards-guard-index.json +1 -1
  26. package/src/data/standards-guard-index.meta.json +2 -2
  27. package/src/data/standards-registry.meta.json +1 -1
  28. package/upgrades/1.3.1982.md +26 -0
  29. package/upgrades/1.3.1983.md +16 -0
  30. package/upgrades/side-effects/hook-reporter-event-delivery.md +139 -0
  31. package/upgrades/side-effects/needs-you-clear-groups.md +44 -0
  32. package/upgrades/side-effects/usage-pool-roots-fixture.md +70 -0
@@ -1771,3 +1771,10 @@ a.needs-row:hover { background: var(--surface-raised); }
1771
1771
  .wc-tile-foot .work-actions { width: 100%; }
1772
1772
  .wc-tile-foot .work-actions > button { flex: 1 1 auto; }
1773
1773
  }
1774
+
1775
+ /* A long approval inbox stays within the screen; all received actions remain reachable. */
1776
+ .needs-groups { max-height: min(52vh, 28rem); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--strip-line); border-top: 0; background: var(--surface); scrollbar-gutter: stable; }
1777
+ .needs-group-heading { margin: 0; padding: 10px 14px 4px; font-size: 12px; font-weight: 650; color: var(--text-muted); }
1778
+ .needs-groups .needs-rows { border: 0; }
1779
+ .needs-group + .needs-group { border-top: 1px solid var(--hairline); }
1780
+ .needs-groups:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@@ -48,7 +48,7 @@ export function stripModel(res, { expanded = false } = {}) {
48
48
  // "12+" when some place could not be checked: at least that many (the line under it names what was missed).
49
49
  badge: `${count}${complete ? '' : '+'}`,
50
50
  incomplete: !complete,
51
- title: count > 0 ? `Needs you · ${count}` : 'Nothing found so far',
51
+ title: count > 0 ? 'Needs you' : 'Nothing found so far',
52
52
  rows,
53
53
  more: Math.max(0, items.length - rows.length),
54
54
  truncated,
@@ -84,6 +84,18 @@ export function cardLinkOf(row) {
84
84
  return { href: c.href, label: typeof c.label === 'string' && c.label ? c.label : 'Has a card on the work board' };
85
85
  }
86
86
 
87
+ /** Group only by structured source and severity; never infer whether an ask is legitimate from its wording. */
88
+ export function needGroups(rows) {
89
+ const labels = { plans: 'Plans to review', workBoard: 'Work that needs you', 'chief-of-staff': 'Project decisions', accounts: 'Sign-ins', 'document-decisions': 'Documents to review', approvals: 'Permissions to review' };
90
+ const groups = new Map();
91
+ for (const row of rows) {
92
+ const label = row.tone === 'bad' ? 'Problems to check' : labels[row.source] || 'Other requests';
93
+ if (!groups.has(label)) groups.set(label, { label, rows: [] });
94
+ groups.get(label).rows.push(row);
95
+ }
96
+ return [...groups.values()];
97
+ }
98
+
87
99
  // Each shell owns its answer and timer. A late read from a previous door cannot populate this one.
88
100
  let stopPrevious;
89
101
  // Open or closed, kept across page changes in this tab (closed by default).
@@ -114,7 +126,7 @@ export function mountNeedsStrip(host, { get, hrefFor, open: startOpen }) {
114
126
  return;
115
127
  }
116
128
  const heading = el('h2', { class: 'needs-heading', tabindex: '-1', text: m.title });
117
- const rows = el('ul', { class: 'needs-rows' }, m.rows.map((r) => {
129
+ const renderRow = (r) => {
118
130
  const href = hrefFor ? hrefFor(r.action) : null;
119
131
  const body = [el('span', { class: TONE_DOT[r.tone] || 'dot attn', 'aria-hidden': 'true' }),
120
132
  el('span', { class: 'needs-text' }, el('span', { class: 'needs-title', text: r.title }), el('span', { class: 'needs-why', text: r.why || '' }))];
@@ -128,7 +140,12 @@ export function mountNeedsStrip(host, { get, hrefFor, open: startOpen }) {
128
140
  return el('li', {}, href ? el('a', { class: 'needs-row', href }, ...body) : el('div', { class: 'needs-row' }, ...body),
129
141
  ...(showCard ? [el('a', { class: 'link-btn needs-card-link', href: card.href, text: card.label })] : []),
130
142
  ...(also ? [el('a', { class: 'needs-also', href: also, text: r.alsoOpens.label || 'Open the project conversation' })] : []));
131
- }));
143
+ };
144
+ const rows = expanded ? el('div', { class: 'needs-groups', tabindex: '0', role: 'region', 'aria-label': 'Requests that need you' }, needGroups(m.rows).map((g) =>
145
+ el('section', { class: 'needs-group', 'aria-label': g.label },
146
+ el('h3', { class: 'needs-group-heading', text: `${g.label} · ${g.rows.length}` }),
147
+ el('ul', { class: 'needs-rows' }, g.rows.map(renderRow)))))
148
+ : el('ul', { class: 'needs-rows' }, m.rows.map(renderRow));
132
149
  const controls = [];
133
150
  if (m.more > 0 || (expanded && (m.rows.length > STRIP_ROWS || m.page?.previousCursor)) || (!expanded && m.page?.nextCursor)) {
134
151
  const text = expanded ? 'Show fewer' : m.page?.nextCursor ? 'Show more needs' : m.truncated ? `Show ${m.more} more available ${m.more === 1 ? 'item' : 'items'}` :
@@ -138,7 +155,7 @@ export function mountNeedsStrip(host, { get, hrefFor, open: startOpen }) {
138
155
  if (!expanded && m.page?.start > 0) { void load({ cursor: null, start: 0 }); return; }
139
156
  if (!expanded) cursor = null;
140
157
  paint();
141
- const firstNewRow = expanded && host.querySelector(`li:nth-child(${STRIP_ROWS + 1}) a`);
158
+ const firstNewRow = expanded && host.querySelector('.needs-groups');
142
159
  (firstNewRow || host.querySelector('[aria-expanded]'))?.focus();
143
160
  }, { 'aria-expanded': String(expanded) }));
144
161
  }
@@ -179,7 +196,7 @@ export function mountNeedsStrip(host, { get, hrefFor, open: startOpen }) {
179
196
  const focused = document.activeElement;
180
197
  const focusInStrip = host.contains(focused);
181
198
  // Keep a live action stable during ordinary polling. A heading is only a reading position.
182
- if (background && res?.ok && !failure && focusInStrip && focused.matches('a, button')) return;
199
+ if (background && res?.ok && !failure && focusInStrip && focused.matches('a, button, .needs-groups')) return;
183
200
  failure = res?.ok || denied ? null : res?.status === 409 ? 'stale' : 'retry';
184
201
  retryTarget = denied ? { cursor: null, start: 0 } : target;
185
202
  cursor = denied ? null : target.cursor;
@@ -48,6 +48,9 @@ export function projectNeedsOk(p) {
48
48
  if (!p || !OPEN_STATUSES.has(p.status)) return false;
49
49
  if ((Number(p.unacknowledgedAdvanceCount) || 0) > 0) return true;
50
50
  const cur = currentRoundIndex(p);
51
+ // A tracking-only project has not requested a launch. A real scheduled launch
52
+ // still requires acknowledgment, even when automatic advancement is disabled.
53
+ if (p.autoAdvance === false && !p.rounds?.[cur]?.autoAdvanceAt) return false;
51
54
  return cur === 0 && !p.firstLaunchAckAt;
52
55
  }
53
56
 
@@ -148,6 +148,7 @@ export declare function loadRelayTemplate(filename: string, port: number): strin
148
148
  * no session on it can answer. Both locations, as PostUpdateMigrator.migrateScripts keeps them.
149
149
  */
150
150
  export declare function installTelegramRelayForJoinedMachine(projectDir: string, stateDir: string, port: number): void;
151
+ export declare function getHookEventReporterScript(): string;
151
152
  /**
152
153
  * The normal-Chrome helper scripts shipped in src/templates/scripts/browser/: the three macOS tools
153
154
  * (Apple Events), the Windows driver written by PP (native-drive.ps1, real OS input + UI Automation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C,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CA8lBrD;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAqElF;AA6KD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAiBxE;AAaD;;;GAGG;AACH,wBAAgB,oCAAoC,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAK7G;AAqdD,wBAAgB,0BAA0B,IAAI,MAAM,CA6GnD;AAohBD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,YAAI,kBAAkB,EAAE,cAAc,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAU,CAAC;AAC/L,sGAAsG;AACtG,eAAO,MAAM,8BAA8B,YAAI,qBAAqB,CAAU,CAAC;AAC/E,kGAAkG;AAClG,eAAO,MAAM,0BAA0B,YAAI,kBAAkB,EAAE,cAAc,EAAE,qBAAqB,CAAU,CAAC;AAC/G;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,YAAI,kBAAkB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,CAAU,CAAC;AAElI;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CA0BlE"}
@@ -4537,7 +4537,7 @@ fi
4537
4537
  fs.writeFileSync(path.join(hooksDir, 'model-tier-skill-entry.sh'), migrator.getHookContent('model-tier-skill-entry'), { mode: 0o755 });
4538
4538
  fs.writeFileSync(path.join(hooksDir, 'model-tier-reconciler.js'), migrator.getHookContent('model-tier-reconciler'), { mode: 0o755 });
4539
4539
  }
4540
- function getHookEventReporterScript() {
4540
+ export function getHookEventReporterScript() {
4541
4541
  return `#!/usr/bin/env node
4542
4542
  // Hook Event Reporter — command hook replacement for HTTP hooks.
4543
4543
  //
@@ -4554,7 +4554,9 @@ function getHookEventReporterScript() {
4554
4554
 
4555
4555
  const serverUrl = process.env.INSTAR_SERVER_URL || 'http://localhost:4042';
4556
4556
  const authToken = process.env.INSTAR_AUTH_TOKEN || '';
4557
- const instarSid = process.env.INSTAR_SESSION_ID || '';
4557
+ // Validated once: an id that fails the pattern is sent in neither the query nor the body (the hook exits).
4558
+ const rawSid = process.env.INSTAR_SESSION_ID || '';
4559
+ const instarSid = /^[A-Za-z0-9._:-]{1,128}$/.test(rawSid) ? rawSid : '';
4558
4560
 
4559
4561
  if (!authToken || !instarSid) {
4560
4562
  // Missing env vars — skip silently
@@ -4567,8 +4569,32 @@ process.stdin.on('end', async () => {
4567
4569
  try {
4568
4570
  const { request } = await import('node:http');
4569
4571
  const input = JSON.parse(data);
4572
+ // Bound the forwarded identifying fields here too: an older server stores a payload as received.
4573
+ const str = (v, max) => (typeof v === 'string' && v.length > 0 && v.length <= max ? v : undefined);
4574
+ const id = (v) => (typeof v === 'string' && /^[A-Za-z0-9._:-]{1,128}$/.test(v) ? v : undefined);
4575
+ const absPath = (v) => (typeof v === 'string' && v.startsWith('/') && v.length <= 1024 ? v : undefined);
4570
4576
  const payload = JSON.stringify({
4571
- event: input.hook_event || (input.tool_name ? 'PostToolUse' : 'Unknown'),
4577
+ // Claude Code names the event in hook_event_name (hook_event is the old
4578
+ // spelling, kept as a fallback). Without it every Stop, SubagentStart,
4579
+ // SubagentStop, TaskCompleted, SessionEnd and PreCompact event arrived as
4580
+ // \"Unknown\" and no consumer of those events ever ran (2026-11-21).
4581
+ event: input.hook_event_name || input.hook_event || (input.tool_name ? 'PostToolUse' : 'Unknown'),
4582
+ // The instar session this hook ran in, so consumers keyed on it (the
4583
+ // practice-fold runner, the subagent tracker) can find the session.
4584
+ instar_session_id: id(instarSid),
4585
+ // The tmux session name, which Compaction Trigger 1 checks against the session id.
4586
+ instar_session: str(process.env.INSTAR_SESSION_NAME, 128),
4587
+ // Short identifying fields the native reporter also forwards (docs/specs/native-hook-events.md
4588
+ // D1); the server bounds them the same way. Message text (last_assistant_message,
4589
+ // task_subject) is deliberately NOT sent from here: an older server stores payloads as
4590
+ // received, so raw text could reach storage during a version mismatch.
4591
+ agent_id: id(input.agent_id),
4592
+ agent_type: str(input.agent_type, 128),
4593
+ agent_transcript_path: absPath(input.agent_transcript_path),
4594
+ task_id: id(input.task_id),
4595
+ reason: str(input.reason, 64),
4596
+ trigger: str(input.trigger, 64),
4597
+
4572
4598
  session_id: input.session_id || '',
4573
4599
  tool_name: input.tool_name || '',
4574
4600
  // green-pr-automerge Layer 2: forward the session cwd so the server can