@danypops/pi-papyrus 0.52.2 → 0.52.3

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.
@@ -46,7 +46,9 @@ import {
46
46
  } from "../tool-rendering/render-model.ts";
47
47
  import { recordRenderDiagnostic, shapeFingerprint } from "./render-diagnostics.ts";
48
48
 
49
- function isArtifact(value: unknown): value is Artifact {
49
+ /** Every field an Artifact and its lean list-default ArtifactSummary (tasks.list/docs.list/
50
+ * rules.list/playbooks.list without full:true -- see summarizeArtifact()) both always carry. */
51
+ function hasArtifactCoreFields(value: unknown): value is Omit<Artifact, "body" | "extra"> {
50
52
  if (typeof value !== "object" || value === null) return false;
51
53
  const row = value as Record<string, unknown>;
52
54
  return (
@@ -55,15 +57,27 @@ function isArtifact(value: unknown): value is Artifact {
55
57
  typeof row.title === "string" &&
56
58
  typeof row.status === "string" &&
57
59
  typeof row.subtype === "string" &&
58
- typeof row.body === "string" &&
59
60
  Array.isArray(row.labels) &&
60
61
  typeof row.created_at === "string" &&
61
62
  typeof row.updated_at === "string"
62
63
  );
63
64
  }
64
65
 
66
+ function isArtifact(value: unknown): value is Artifact {
67
+ return hasArtifactCoreFields(value) && typeof (value as Record<string, unknown>).body === "string";
68
+ }
69
+
70
+ /**
71
+ * Regression (real, live-observed): tasks.list's own documented default ("Returns a lean
72
+ * summary (no body/extra) unless full: true is passed") returns ArtifactSummary rows, which
73
+ * omit body entirely. createArtifactListDetails/artifactSummary (render-model.ts) never read
74
+ * .body for list rendering -- only single-artifact createArtifactDetails does -- so requiring
75
+ * body here (matching isArtifact) silently fell every default (lean, the common case) list
76
+ * call for tasks.list/docs.list/rules.list/playbooks.list through to the generic raw Vehicle
77
+ * table renderer instead of the curated ArtifactListCard.
78
+ */
65
79
  function isArtifactArray(value: unknown): value is Artifact[] {
66
- return Array.isArray(value) && value.every(isArtifact);
80
+ return Array.isArray(value) && value.every(hasArtifactCoreFields);
67
81
  }
68
82
 
69
83
  /** tasks.focused/tasks.pause/tasks.unpause's own wrapper shape -- an Artifact
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danypops/pi-papyrus",
3
- "version": "0.52.2",
3
+ "version": "0.52.3",
4
4
  "description": "Pi host extension for Papyrus: native tools, TUI panels, and context injection over the daemon-backed graph store",
5
5
  "type": "module",
6
6
  "keywords": ["pi-package"],