pi-harness-runtime 1.1.436 → 1.1.437

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 (113) hide show
  1. package/package.json +2 -1
  2. package/packages/a2a-adapter/package.json +1 -1
  3. package/packages/agent-policy/package.json +1 -1
  4. package/packages/architecture-generator/package.json +1 -1
  5. package/packages/auth/package.json +1 -1
  6. package/packages/autonomous-refactor/package.json +1 -1
  7. package/packages/autonomous-runtime/package.json +1 -1
  8. package/packages/cache-strategy/package.json +1 -1
  9. package/packages/capability-registry/package.json +1 -1
  10. package/packages/checkpoint/package.json +1 -1
  11. package/packages/cli-plugin-sdk/package.json +1 -1
  12. package/packages/clipboard/package.json +1 -1
  13. package/packages/clipboard-plugin/package.json +1 -1
  14. package/packages/code-generation/package.json +1 -1
  15. package/packages/code-review/package.json +1 -1
  16. package/packages/codex-adapter/package.json +1 -1
  17. package/packages/codex-watcher/package.json +1 -1
  18. package/packages/config-capture/package.json +1 -1
  19. package/packages/connection-runtime/package.json +1 -1
  20. package/packages/context-compiler/package.json +1 -1
  21. package/packages/context-discovery/package.json +1 -1
  22. package/packages/context-manager/package.json +1 -1
  23. package/packages/contracts/package.json +1 -1
  24. package/packages/cookie-sanitizer/package.json +1 -1
  25. package/packages/cost-optimizer/package.json +1 -1
  26. package/packages/dependency-analyzer/package.json +1 -1
  27. package/packages/django-plugin/package.json +1 -1
  28. package/packages/doc-generator/package.json +1 -1
  29. package/packages/durable-review/package.json +1 -1
  30. package/packages/e2e-tester/package.json +1 -1
  31. package/packages/evaluation-engine/package.json +1 -1
  32. package/packages/evaluation-runner/package.json +1 -1
  33. package/packages/event-bus/package.json +1 -1
  34. package/packages/event-sink/package.json +1 -1
  35. package/packages/event-store/package.json +1 -1
  36. package/packages/experience-replay/package.json +1 -1
  37. package/packages/feedback-collector/package.json +1 -1
  38. package/packages/file-copy-helper/package.json +1 -1
  39. package/packages/framework-detector/package.json +1 -1
  40. package/packages/framework-plugin-sdk/package.json +1 -1
  41. package/packages/frappe-plugin/package.json +1 -1
  42. package/packages/generic-web-plugin/package.json +1 -1
  43. package/packages/health-monitor/package.json +1 -1
  44. package/packages/intent-analyzer/package.json +1 -1
  45. package/packages/jev-judge/package.json +1 -1
  46. package/packages/knowledge-graph/package.json +1 -1
  47. package/packages/knowledge-retrieval/package.json +1 -1
  48. package/packages/laravel-plugin/package.json +1 -1
  49. package/packages/learning-engine/package.json +1 -1
  50. package/packages/logging/package.json +1 -1
  51. package/packages/mcp-adapter/package.json +1 -1
  52. package/packages/memory-engine/package.json +1 -1
  53. package/packages/milestone-manager/package.json +1 -1
  54. package/packages/model-registry/package.json +1 -1
  55. package/packages/nextjs-plugin/package.json +1 -1
  56. package/packages/notification/package.json +1 -1
  57. package/packages/observability/package.json +1 -1
  58. package/packages/okf-indexer/package.json +1 -1
  59. package/packages/paperclip-integration/package.json +1 -1
  60. package/packages/performance-optimizer/package.json +1 -1
  61. package/packages/permission-mode/package.json +1 -1
  62. package/packages/privilege-broker/package.json +1 -1
  63. package/packages/project-analyzer/package.json +1 -1
  64. package/packages/project-bootstrap/package.json +1 -1
  65. package/packages/projection-engine/package.json +1 -1
  66. package/packages/prompt-compiler/package.json +1 -1
  67. package/packages/prompt-versioning/package.json +1 -1
  68. package/packages/provider-adapter-sdk/package.json +1 -1
  69. package/packages/provider-router/package.json +1 -1
  70. package/packages/provider-selector/package.json +1 -1
  71. package/packages/providers/package.json +1 -1
  72. package/packages/qdrant-skills/package.json +1 -1
  73. package/packages/quota-manager/package.json +1 -1
  74. package/packages/rate-limiter/package.json +1 -1
  75. package/packages/react-vite-plugin/package.json +1 -1
  76. package/packages/relay/package.json +1 -1
  77. package/packages/release-manager/package.json +1 -1
  78. package/packages/requirement-compiler/package.json +1 -1
  79. package/packages/runtime/package.json +1 -1
  80. package/packages/scheduler/package.json +1 -1
  81. package/packages/scheduler-adapter/package.json +1 -1
  82. package/packages/session/package.json +1 -1
  83. package/packages/session-api/package.json +1 -1
  84. package/packages/session-export/package.json +1 -1
  85. package/packages/shared-context/package.json +1 -1
  86. package/packages/skill-mcp-client/package.json +1 -1
  87. package/packages/skill-registry/package.json +1 -1
  88. package/packages/skills/package.json +1 -1
  89. package/packages/sprint-planner/package.json +1 -1
  90. package/packages/subscription-engine/package.json +1 -1
  91. package/packages/task-compiler/package.json +1 -1
  92. package/packages/tencentdb-memory/package.json +1 -1
  93. package/packages/tencentdb-sync/package.json +1 -1
  94. package/packages/test-data-generator/package.json +1 -1
  95. package/packages/test-generator/package.json +1 -1
  96. package/packages/todo-bd-sync/package.json +1 -1
  97. package/packages/token-estimation/package.json +1 -1
  98. package/packages/token-optimizer/package.json +1 -1
  99. package/packages/tooling-preference/package.json +1 -1
  100. package/packages/trajectory/package.json +1 -1
  101. package/packages/tui/package.json +1 -1
  102. package/packages/two-phase-review/package.json +1 -1
  103. package/packages/types/package.json +1 -1
  104. package/packages/voice-api/package.json +1 -1
  105. package/packages/webmcp-tester/package.json +1 -1
  106. package/packages/wiki/package.json +1 -1
  107. package/packages/workflow-events/package.json +1 -1
  108. package/packages/workspace-scanner/package.json +1 -1
  109. package/packages/worktree/package.json +1 -1
  110. package/packages/write-review/package.json +1 -1
  111. package/scripts/check-sensitive-terms.mjs +36 -0
  112. package/scripts/guard-scan.sh +102 -0
  113. package/scripts/release/orchestrator.ts +11 -5
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/prompt-versioning",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "type": "module",
5
5
  "description": "Version control for prompts with rollback support (RFC-0019)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/provider-adapter-sdk",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "SDK for building, testing, and registering AI provider adapters",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/provider-router",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Enhanced Provider Router for pi-harness-runtime — intelligent routing with capabilities, costs, and quotas",
5
5
  "type": "module",
6
6
  "main": "./dist/provider-router.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/provider-selector",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Multi-Provider Selector — route requests by cost, quality, and latency (RFC-0012)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/providers",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "pi-harness-runtime — providers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/qdrant-skills",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Qdrant vector search integration for Hermes-style skill system",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/quota-manager",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "pi-harness-runtime — quota-manager",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/rate-limiter",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "type": "module",
5
5
  "description": "Rate limiting with token bucket algorithm (RFC-0023)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/react-vite-plugin",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "React/Vite framework analysis — components, config, TypeScript setup",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/relay",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "type": "module",
5
5
  "description": "Cloud relay for remote access - T3 Connect style for pi-harness",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/release-manager",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "type": "module",
5
5
  "description": "Release management for pi-harness",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/requirement-compiler",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Compiles raw requirements into validated CompiledRequirement with ambiguity detection and risk tagging",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/runtime",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "pi-harness-runtime — runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/scheduler",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "pi-harness-runtime — scheduler",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/scheduler-adapter",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Scheduler Adapter — cron, systemd, launchd, internal adapters for autonomous runtime (RFC-0101 §6)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/session",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Session management system for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/session-api",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/session-export",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/shared-context",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "pi-harness-runtime — shared-context",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/skill-mcp-client",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "MCP client for Skills SaaS backend",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/skill-registry",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Skill Registry for pi-harness-runtime — dynamic skill discovery and invocation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/skills",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "File-based skill system with pi.dev compatibility and Hermes self-improvement",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/sprint-planner",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "type": "module",
5
5
  "description": "Sprint planning engine for pi-harness",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/subscription-engine",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/task-compiler",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Task Compiler for pi-harness-runtime — produces deterministic task DAG from CompiledRequirement",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/tencentdb-memory",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "TencentDB Agent Memory client - sync skills to centralized knowledge base",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/tencentdb-sync",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Sync SKILL.md skills to TencentDB-Agent-Memory server (RFC-0105/0106)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/test-data-generator",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Test data generation for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/test-generator",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Auto-Test Generator — generate unit and E2E tests from source code (RFC-0013)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/todo-bd-sync",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Two-way sync between rpiv-todo overlay and bd issue tracker",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/token-estimation",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "pi-harness-runtime — token-estimation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/token-optimizer",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Token Budget Optimizer — maximize prompt value within token limits (RFC-0011)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/tooling-preference",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "pi-harness-runtime — JS/TS tooling preference (Biome vs ESLint/Prettier) proposal",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/trajectory",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Trajectory capture for the write-review loop — persists cycle records for learning",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/tui",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "pi-harness-runtime — tui",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/two-phase-review",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "pi-harness-runtime — two-phase implementation and review workflow (queue review signals, gate the phase, scope the diff)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/types",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Shared TypeScript types for pi-harness-runtime packages",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/voice-api",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "type": "module",
5
5
  "description": "Voice-to-text API using Whisper for Telegram and LINE integration",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/webmcp-tester",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "WebMCP-powered E2E testing for pi-harness - natural language test scenarios",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/wiki",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "LLM Wiki integration for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/workflow-events",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/workspace-scanner",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/worktree",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "pi-harness-runtime — worktree",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/write-review",
3
- "version": "1.1.436",
3
+ "version": "1.1.437",
4
4
  "description": "Two-agent write-review loop with blackboard coordination",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -563,6 +563,15 @@ export function scanRange(range, terms, cwd = process.cwd()) {
563
563
  };
564
564
  }
565
565
 
566
+ /**
567
+ * The directories a tree scan does not walk.
568
+ *
569
+ * They are never part of a published package, and their content is not
570
+ * the content of this repository. A name inside a dependency is not a
571
+ * leak of this repository.
572
+ */
573
+ const SKIPPED_DIRECTORIES = new Set([".git", "node_modules"]);
574
+
566
575
  /**
567
576
  * The files of a directory tree.
568
577
  *
@@ -581,6 +590,7 @@ export function listTreeFiles(dir, root = dir, out = []) {
581
590
  for (const entry of entries) {
582
591
  const absolute = join(dir, entry.name);
583
592
  if (entry.isDirectory()) {
593
+ if (SKIPPED_DIRECTORIES.has(entry.name)) continue;
584
594
  listTreeFiles(absolute, root, out);
585
595
  continue;
586
596
  }
@@ -657,6 +667,25 @@ async function main() {
657
667
  return EXIT_UNAVAILABLE;
658
668
  }
659
669
 
670
+ // A mode without its value checked nothing. That is a broken
671
+ // command, not a clean result, so it stops here.
672
+ const required = {
673
+ diff: "path",
674
+ file: "path",
675
+ range: "range",
676
+ tree: "path",
677
+ commits: "range",
678
+ };
679
+ const needed = args.mode ? required[args.mode] : undefined;
680
+ if (needed && !args[needed]) {
681
+ console.error(`the mode --${args.mode} needs a ${needed}.`);
682
+ return EXIT_UNAVAILABLE;
683
+ }
684
+ if (args.mode === "text" && args.text === undefined) {
685
+ console.error("the mode --text needs a text.");
686
+ return EXIT_UNAVAILABLE;
687
+ }
688
+
660
689
  let result;
661
690
  if (args.mode === "pr") {
662
691
  const repo = args.repo ?? process.env.GITHUB_REPOSITORY ?? repositoryFromRemote();
@@ -698,6 +727,13 @@ async function main() {
698
727
  result = scanRange(args.range, terms);
699
728
  } else if (args.mode === "commits") {
700
729
  result = scanCommitMessages(args.range, terms);
730
+ // A range that holds no commit is a range that was written
731
+ // wrong. Scanning it would report a clean result for a check
732
+ // that never ran.
733
+ if (result.scanned === 0) {
734
+ console.error(`the range ${args.range} holds no commit, so nothing could be checked.`);
735
+ return EXIT_UNAVAILABLE;
736
+ }
701
737
  } else if (args.mode === "tree") {
702
738
  if (!existsSync(args.path) || !statSync(args.path).isDirectory()) {
703
739
  console.error(`the directory ${args.path} does not exist.`);
@@ -0,0 +1,102 @@
1
+ #!/usr/bin/env bash
2
+ # Scan the whole checkout for a client name.
3
+ #
4
+ # The checks that run in CI look at what a pull request changes. This one
5
+ # looks at everything: the files of the working tree, the paths of every
6
+ # ref of the repository, and the commit messages of every ref. It is the
7
+ # check to run when the question is "is this repository clean right now",
8
+ # and the check to run before a release that was prepared outside of a
9
+ # pull request.
10
+ #
11
+ # The list of terms comes from PI_SENSITIVE_TERMS_FILE or from
12
+ # SENSITIVE_TERMS. Without a list the script says so and stops - a
13
+ # machine that does not know the names cannot check for them, and a scan
14
+ # that found nothing is not a scan that passed.
15
+ #
16
+ # The report names the file and the line and never the term.
17
+
18
+ set -euo pipefail
19
+
20
+ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
21
+ cd "$ROOT"
22
+
23
+ SCANNER="scripts/check-sensitive-terms.mjs"
24
+
25
+ if [ ! -f "$SCANNER" ]; then
26
+ echo "guard: the scanner is missing at $SCANNER" >&2
27
+ exit 2
28
+ fi
29
+
30
+ # The list of terms, without printing it.
31
+ if [ -n "${PI_SENSITIVE_TERMS_FILE:-}" ] && [ -f "${PI_SENSITIVE_TERMS_FILE:-}" ]; then
32
+ TERMS="$(cat "$PI_SENSITIVE_TERMS_FILE")"
33
+ elif [ -n "${SENSITIVE_TERMS:-}" ]; then
34
+ TERMS="$SENSITIVE_TERMS"
35
+ else
36
+ echo "guard: no list of terms. Set PI_SENSITIVE_TERMS_FILE or SENSITIVE_TERMS."
37
+ echo "guard: the scan did not run, so nothing was checked."
38
+ exit 2
39
+ fi
40
+
41
+ if [ -z "$TERMS" ]; then
42
+ echo "guard: the list of terms is empty. The scan did not run."
43
+ exit 2
44
+ fi
45
+
46
+ COUNT="$(node --input-type=module -e '
47
+ import { readTermsFile, termsFromEnv } from "./scripts/check-sensitive-terms.mjs";
48
+ const terms = process.env.PI_SENSITIVE_TERMS_FILE
49
+ ? readTermsFile(process.env.PI_SENSITIVE_TERMS_FILE)
50
+ : termsFromEnv();
51
+ console.log(terms.length);
52
+ ')"
53
+ echo "guard: a list of ${COUNT} term(s)"
54
+
55
+ STATUS=0
56
+
57
+ # The working tree: the files and their paths.
58
+ echo "guard: the files and the paths of the working tree"
59
+ if ! node "$SCANNER" --tree .; then
60
+ STATUS=1
61
+ fi
62
+
63
+ # The commit messages of every ref. A message is public the moment the
64
+ # commit is pushed, and GitHub builds the release notes from them.
65
+ echo "guard: the commit messages of every ref"
66
+ if ! node "$SCANNER" --commits --all; then
67
+ STATUS=1
68
+ fi
69
+
70
+ # The paths of every ref. A name in a path is a name in a link to the
71
+ # repository, and the history of a path outlives the file.
72
+ echo "guard: the paths of every ref"
73
+ if ! node --input-type=module -e '
74
+ import { execFileSync } from "node:child_process";
75
+ import { pathHasTerm, termsFromEnv, redactTerms } from "./scripts/check-sensitive-terms.mjs";
76
+
77
+ const terms = termsFromEnv();
78
+ if (terms.length === 0) {
79
+ console.error("guard: no list of terms, so the paths were not checked.");
80
+ process.exit(2);
81
+ }
82
+ const output = execFileSync("git", ["log", "--all", "--name-only", "--pretty=format:"], {
83
+ encoding: "utf8",
84
+ maxBuffer: 64 * 1024 * 1024,
85
+ });
86
+ const paths = [...new Set(output.split("\n").map((line) => line.trim()).filter(Boolean))];
87
+ const hits = paths.filter((path) => pathHasTerm(path, terms));
88
+ for (const path of hits) {
89
+ console.log(`a path of the history holds a client name: ${redactTerms(path, terms)}`);
90
+ }
91
+ console.log(`guard: ${paths.length} path(s) of the history were checked`);
92
+ process.exit(hits.length > 0 ? 1 : 0);
93
+ '; then
94
+ STATUS=1
95
+ fi
96
+
97
+ if [ "$STATUS" -eq 0 ]; then
98
+ echo "guard: the repository holds no client name"
99
+ else
100
+ echo "guard: a client name is in the repository. See the places above."
101
+ fi
102
+ exit "$STATUS"
@@ -12,14 +12,20 @@
12
12
  * The orchestrator handles the git/npm plumbing.
13
13
  */
14
14
 
15
+ // The imports below carry a `pi-lens-ignore` marker for TS5097. The language
16
+ // server that reads this file still holds a project configuration that no
17
+ // longer exists, and it reports the .ts specifiers as an error. The compiler
18
+ // does not - `npx tsc -p scripts/release/tsconfig.json` is clean - and Node
19
+ // needs the literal .ts specifiers, because its type stripping does not remap
20
+ // a .js specifier to a .ts file.
15
21
  import { execSync } from "node:child_process";
16
22
  import { existsSync } from "node:fs";
17
23
  import { resolve } from "path";
18
- import { detectStacks, formatProfile } from "./adapters/detector.ts";
19
- import { nodeWorkspaceAdapter } from "./adapters/node-workspace.ts";
20
- import { tauriAdapter } from "./adapters/tauri.ts";
21
- import { rustAdapter } from "./adapters/rust.ts";
22
- import { pythonAdapter } from "./adapters/python.ts";
24
+ import { detectStacks, formatProfile } from "./adapters/detector.ts"; // pi-lens-ignore: ts:5097
25
+ import { nodeWorkspaceAdapter } from "./adapters/node-workspace.ts"; // pi-lens-ignore: ts:5097
26
+ import { tauriAdapter } from "./adapters/tauri.ts"; // pi-lens-ignore: ts:5097
27
+ import { rustAdapter } from "./adapters/rust.ts"; // pi-lens-ignore: ts:5097
28
+ import { pythonAdapter } from "./adapters/python.ts"; // pi-lens-ignore: ts:5097
23
29
  import type { AdapterContext, ReleaseAdapter } from "./adapters/base.ts";
24
30
 
25
31
  const ADAPTERS: ReleaseAdapter[] = [