@srobroek/pi-design 0.13.0 → 0.14.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## design [0.14.1](https://github.com/srobroek/harness-plugins/compare/design--v0.14.0...design--v0.14.1) (2026-12-03)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **kit:** bump @srobroek/harness-kit to 1.11.1 (prereq probe timeout) ([206f2c4](https://github.com/srobroek/harness-plugins/commit/206f2c4c6c0dee08d9f06977db78f778b2fd1bf6))
6
+
7
+ ## design [0.14.0](https://github.com/srobroek/harness-plugins/compare/design--v0.13.0...design--v0.14.0) (2026-12-02)
8
+
9
+ ### Features
10
+
11
+ * **beads:** add beads-hygiene ledger audit skill and ledger-auditor agents ([611b67a](https://github.com/srobroek/harness-plugins/commit/611b67a0a6e02ec7a1917170843feb946766a4a7))
12
+
1
13
  ## design [0.13.0](https://github.com/srobroek/harness-plugins/compare/design--v0.12.2...design--v0.13.0) (2026-12-01)
2
14
 
3
15
  ### Features
package/README.md CHANGED
@@ -246,7 +246,7 @@ as a Linux ARM server, it drives Playwright's Chromium. Install that Chromium on
246
246
  pinned Playwright:
247
247
 
248
248
  ```sh
249
- npx -y playwright-core@1.66.0-alpha-2026-11-27 install chromium chromium-headless-shell
249
+ npx -y playwright-core@1.66.0-alpha-2026-11-28 install chromium chromium-headless-shell
250
250
  ```
251
251
 
252
252
  ### Scan tool
package/_kit/prereqs.ts CHANGED
@@ -74,6 +74,9 @@ export interface Finding {
74
74
  prerequisite: Prerequisite
75
75
  problem: "missing" | "version"
76
76
  found?: string
77
+ /** Set when `<bin> --version` did not answer within `timeoutMs`, as opposed to answering with something unreadable. */
78
+ timedOut?: boolean
79
+ timeoutMs?: number
77
80
  }
78
81
 
79
82
  export type Env = Record<string, string | undefined>
@@ -102,7 +105,8 @@ interface Api {
102
105
  type Version = readonly [number, number, number]
103
106
  type Comparator = { op: "<" | "<=" | ">" | ">="; version: Version }
104
107
 
105
- const VERSION_TIMEOUT_MS = 2000
108
+ /** Python and node CLIs take 1 to 2 s to start cold on a loaded machine, and many extensions start at once. */
109
+ export const VERSION_TIMEOUT_MS = 10_000
106
110
  const OPERATOR = /^(<=|>=|<|>|=|\^|~)?v?(.+)$/
107
111
  const NUMBER = /^\d+$/
108
112
  const WILDCARD = /^[xX*]$/
@@ -215,20 +219,21 @@ export function which(bin: string, dirs: readonly string[]): string | undefined
215
219
  return undefined
216
220
  }
217
221
 
218
- function readVersion(file: string): string | undefined {
219
- const run = spawnSync(file, ["--version"], { encoding: "utf8", timeout: VERSION_TIMEOUT_MS, killSignal: "SIGKILL", stdio: ["ignore", "pipe", "pipe"] })
220
- if (run.error) return undefined
221
- return versionIn(`${run.stdout ?? ""}\n${run.stderr ?? ""}`)
222
+ function readVersion(file: string, timeoutMs: number): { found?: string; timedOut?: true } {
223
+ const run = spawnSync(file, ["--version"], { encoding: "utf8", timeout: timeoutMs, killSignal: "SIGKILL", stdio: ["ignore", "pipe", "pipe"] })
224
+ if (run.error) return (run.error as NodeJS.ErrnoException).code === "ETIMEDOUT" ? { timedOut: true } : {}
225
+ const found = versionIn(`${run.stdout ?? ""}\n${run.stderr ?? ""}`)
226
+ return found === undefined ? {} : { found }
222
227
  }
223
228
 
224
229
  /** The unmet prerequisites of a manifest, in its order. Runs the lookups and version commands on every call. */
225
- export function check(manifest: Manifest, root: string, env: Env): Finding[] {
230
+ export function check(manifest: Manifest, root: string, env: Env, timeoutMs = VERSION_TIMEOUT_MS): Finding[] {
226
231
  return manifest.prerequisites.flatMap((prerequisite): Finding[] => {
227
232
  const file = which(prerequisite.bin, searchPath(prerequisite, root, env))
228
233
  if (!file) return [{ prerequisite, problem: "missing" }]
229
234
  if (!prerequisite.version) return []
230
- const found = readVersion(file)
231
- if (found === undefined) return [{ prerequisite, problem: "version" }]
235
+ const { found, timedOut } = readVersion(file, timeoutMs)
236
+ if (found === undefined) return [{ prerequisite, problem: "version", ...(timedOut ? { timedOut, timeoutMs } : {}) }]
232
237
  return satisfies(found, prerequisite.version) ? [] : [{ prerequisite, problem: "version", found }]
233
238
  })
234
239
  }
@@ -240,9 +245,9 @@ export function installHint(install: Install): string {
240
245
  }
241
246
 
242
247
  /** One unmet prerequisite: what it is for, what is wrong, and how to install it. */
243
- export function describeFinding({ prerequisite, problem, found }: Finding): string {
248
+ export function describeFinding({ prerequisite, problem, found, timedOut, timeoutMs }: Finding): string {
244
249
  const where = prerequisite.install.npm ? "not in node_modules/.bin or on PATH" : "not on PATH"
245
- const wrong = problem === "missing" ? where : found ? `version ${found} does not satisfy ${prerequisite.version}` : `cannot read its version from \`${prerequisite.bin} --version\` (needs ${prerequisite.version})`
250
+ const wrong = problem === "missing" ? where : found ? `version ${found} does not satisfy ${prerequisite.version}` : timedOut ? `\`${prerequisite.bin} --version\` did not answer within ${(timeoutMs ?? VERSION_TIMEOUT_MS) / 1000} s (needs ${prerequisite.version})` : `cannot read its version from \`${prerequisite.bin} --version\` (needs ${prerequisite.version})`
246
251
  return `${prerequisite.bin} (${prerequisite.required ? "required, " : ""}for ${prerequisite.for}): ${wrong}; install: ${installHint(prerequisite.install)}`
247
252
  }
248
253
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@srobroek/pi-design",
3
- "version": "0.13.0",
3
+ "version": "0.14.1",
4
4
  "description": "UI and UX design skills: design-system audit, DESIGN.md, rendered-surface review, accessibility audit, motion, microcopy, prototypes, and wireframes.",
5
5
  "keywords": [
6
6
  "pi-package"