@davesheffer/hunch 1.39.1 → 1.39.2

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.
package/dist/wiki/wiki.js CHANGED
@@ -33,6 +33,7 @@ import { writeFileAtomic } from "../core/io.js";
33
33
  import { compareCodeUnits } from "../core/canonicalOrder.js";
34
34
  import { hunchPaths, toPosixTarget } from "../core/paths.js";
35
35
  import { isLive } from "../core/topics.js";
36
+ import { confirmCommand, isAgentTestimony } from "../core/countersign.js";
36
37
  import { scanRepoDocs } from "../core/docscan.js";
37
38
  import { adoptedSlug, adoptionHash, renderAdoptedDoc } from "./adopt.js";
38
39
  import { assembleGraphData, renderGraphPage } from "./graph.js";
@@ -396,6 +397,10 @@ const NOW_ID = "_now";
396
397
  const GRAPH_ID = "_graph";
397
398
  /** Manifest component-id prefix for adopted (wiki-managed) doc copies. */
398
399
  const ADOPTED_PREFIX = "doc:";
400
+ /** Marker for an unconfirmed roadmap item, naming the human countersign command. */
401
+ export function unconfirmedRoadmapMarker(item, opts = {}) {
402
+ return item.unconfirmed ? `⚠ unconfirmed agent testimony — confirm: ${confirmCommand(item.id, opts)}` : "";
403
+ }
399
404
  /** The hot view's inputs: last `recentLimit` decisions by date (any status — a
400
405
  * supersession IS activity), and every live PROPOSED decision (the roadmap:
401
406
  * record intent as a proposed decision; accepting or superseding it removes it
@@ -405,15 +410,21 @@ export function nowData(decisions, recentLimit = 10) {
405
410
  const byDateDesc = (a, b) => compareCodeUnits(b.valid_from ?? b.date, a.valid_from ?? a.date) || compareCodeUnits(a.id, b.id);
406
411
  const recent = [...decisions].sort(byDateDesc).slice(0, recentLimit)
407
412
  .map((d) => ({ id: d.id, topic: d.topic, title: d.title, status: d.status, date: (d.valid_from ?? d.date).slice(0, 10), note: clip1(d.decision) }));
408
- // Roadmap = INTENT the human vouched for. Auto-synthesized drafts are also
409
- // status "proposed", but they describe work already done and belong to the
410
- // review queue (`hunch review`) — surfacing them here would bury real plans.
413
+ // Roadmap = deliberately recorded INTENT: human-vouched, or recorded by an agent
414
+ // (hunch_record_decision, e.g. at the end of /capture) and not yet confirmed. The latter
415
+ // is shown MARKED with the human confirm command — never hidden, and never routed to
416
+ // `adopt-drafts` (which would accept it). Auto-synthesized drafts are also status
417
+ // "proposed", but they describe work already done and belong to the review queue
418
+ // (`hunch review`) — surfacing them here would bury real plans.
411
419
  const live = decisions.filter((d) => d.status === "proposed" && !d.superseded_by && !d.valid_to);
412
- const vouched = live.filter((d) => d.provenance.source.includes("human_confirmed"));
413
- const roadmap = vouched
420
+ const intent = live.filter((d) => d.provenance.source.includes("human_confirmed") || isAgentTestimony(d.provenance.source));
421
+ const roadmap = intent
414
422
  .sort(byDateDesc)
415
- .map((d) => ({ id: d.id, topic: d.topic, title: d.title, status: d.status, date: (d.valid_from ?? d.date).slice(0, 10), note: clip1(d.context || d.decision) }));
416
- return { recent, roadmap, pendingReview: live.length - vouched.length };
423
+ .map((d) => ({
424
+ id: d.id, topic: d.topic, title: d.title, status: d.status, date: (d.valid_from ?? d.date).slice(0, 10), note: clip1(d.context || d.decision),
425
+ ...(isAgentTestimony(d.provenance.source) ? { unconfirmed: true } : {}),
426
+ }));
427
+ return { recent, roadmap, pendingReview: live.length - intent.length };
417
428
  }
418
429
  /** The hot file — a DERIVED view like every other page: what just happened
419
430
  * (last N decisions) and what's next (live proposed decisions). No topic pins
@@ -436,7 +447,7 @@ export function renderNowPage(recent, roadmap, home, pendingReview = 0) {
436
447
  if (!roadmap.length)
437
448
  L.push("_Empty. Record what's next as a PROPOSED decision (`/capture`, status: proposed) and it appears here._", "");
438
449
  for (const r of roadmap)
439
- L.push(`- **${r.title}** — ${r.note || "(no context)"} _(${r.id}${r.topic ? `, topic \`${r.topic}\`` : ""}, since ${r.date})_`);
450
+ L.push(`- **${r.title}** — ${r.note || "(no context)"} _(${r.id}${r.topic ? `, topic \`${r.topic}\`` : ""}, since ${r.date})_${r.unconfirmed ? ` — ${unconfirmedRoadmapMarker(r, { private: home.kind === "private" })}` : ""}`);
440
451
  if (roadmap.length)
441
452
  L.push("");
442
453
  if (pendingReview > 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@davesheffer/hunch",
3
- "version": "1.39.1",
3
+ "version": "1.39.2",
4
4
  "mcpName": "io.github.davesheffer/hunch",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Dave Sheffer <dave.sheffer1@gmail.com>",
package/server.json CHANGED
@@ -7,13 +7,13 @@
7
7
  "source": "github"
8
8
  },
9
9
  "websiteUrl": "https://www.hunchmemory.com",
10
- "version": "1.39.1",
10
+ "version": "1.39.2",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "registryBaseUrl": "https://registry.npmjs.org",
15
15
  "identifier": "@davesheffer/hunch",
16
- "version": "1.39.1",
16
+ "version": "1.39.2",
17
17
  "runtimeHint": "npx",
18
18
  "packageArguments": [
19
19
  {