@fitchmultz/pi-ask-question 0.6.5 → 0.6.7

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.
@@ -0,0 +1,16 @@
1
+ /** Shared runtime guards for the cooperative answer-bus protocol. */
2
+
3
+ /** Narrow an unknown value to a string-keyed record. */
4
+ export function isRecord(value: unknown): value is Record<string, unknown> {
5
+ return typeof value === "object" && value !== null;
6
+ }
7
+
8
+ /** Check for a non-blank identifier string of at most 128 characters. */
9
+ export function validId(value: unknown): value is string {
10
+ return typeof value === "string" && value.trim().length > 0 && value.length <= 128;
11
+ }
12
+
13
+ /** Narrow an unknown value to a dense array of strings. */
14
+ export function isStringArray(value: unknown): value is string[] {
15
+ return Array.isArray(value) && Array.from(value).every((entry) => typeof entry === "string");
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fitchmultz/pi-ask-question",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
4
4
  "description": "Pi extension that adds an interactive ask_question tool and /grill-me pressure-test mode",
5
5
  "author": "Mitch Fultz (https://github.com/fitchmultz)",
6
6
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  "format": "oxfmt --write .",
38
38
  "format:check": "oxfmt --check .",
39
39
  "check:compat": "npm run check",
40
- "check": "npm test && npm run typecheck && npm run format:check && npm pack --dry-run",
40
+ "check": "npm run lint && npm test && npm run typecheck && npm run format:check && npm pack --dry-run",
41
41
  "prepublishOnly": "npm run check"
42
42
  },
43
43
  "files": [