pi-harness-runtime 1.1.435 → 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 (122) hide show
  1. package/harness/key-file-audit.ts +103 -3
  2. package/harness/startup-report.ts +32 -1
  3. package/index.ts +28 -0
  4. package/package.json +2 -1
  5. package/packages/a2a-adapter/package.json +1 -1
  6. package/packages/agent-policy/package.json +1 -1
  7. package/packages/architecture-generator/package.json +1 -1
  8. package/packages/auth/package.json +1 -1
  9. package/packages/autonomous-refactor/package.json +1 -1
  10. package/packages/autonomous-runtime/package.json +1 -1
  11. package/packages/cache-strategy/package.json +1 -1
  12. package/packages/capability-registry/package.json +1 -1
  13. package/packages/checkpoint/package.json +1 -1
  14. package/packages/cli-plugin-sdk/package.json +1 -1
  15. package/packages/clipboard/package.json +1 -1
  16. package/packages/clipboard-plugin/package.json +1 -1
  17. package/packages/code-generation/package.json +1 -1
  18. package/packages/code-review/package.json +1 -1
  19. package/packages/codex-adapter/package.json +1 -1
  20. package/packages/codex-watcher/package.json +1 -1
  21. package/packages/config-capture/package.json +1 -1
  22. package/packages/connection-runtime/package.json +1 -1
  23. package/packages/context-compiler/package.json +1 -1
  24. package/packages/context-discovery/package.json +1 -1
  25. package/packages/context-manager/package.json +1 -1
  26. package/packages/contracts/package.json +1 -1
  27. package/packages/cookie-sanitizer/package.json +1 -1
  28. package/packages/cost-optimizer/package.json +1 -1
  29. package/packages/dependency-analyzer/package.json +1 -1
  30. package/packages/django-plugin/package.json +1 -1
  31. package/packages/doc-generator/package.json +1 -1
  32. package/packages/durable-review/package.json +1 -1
  33. package/packages/e2e-tester/package.json +1 -1
  34. package/packages/evaluation-engine/package.json +1 -1
  35. package/packages/evaluation-runner/package.json +1 -1
  36. package/packages/event-bus/package.json +1 -1
  37. package/packages/event-sink/package.json +1 -1
  38. package/packages/event-store/package.json +1 -1
  39. package/packages/experience-replay/package.json +1 -1
  40. package/packages/feedback-collector/package.json +1 -1
  41. package/packages/file-copy-helper/package.json +1 -1
  42. package/packages/framework-detector/package.json +1 -1
  43. package/packages/framework-plugin-sdk/package.json +1 -1
  44. package/packages/frappe-plugin/package.json +1 -1
  45. package/packages/generic-web-plugin/package.json +1 -1
  46. package/packages/health-monitor/package.json +1 -1
  47. package/packages/intent-analyzer/package.json +1 -1
  48. package/packages/jev-judge/package.json +1 -1
  49. package/packages/knowledge-graph/package.json +1 -1
  50. package/packages/knowledge-retrieval/package.json +1 -1
  51. package/packages/laravel-plugin/package.json +1 -1
  52. package/packages/learning-engine/package.json +1 -1
  53. package/packages/logging/package.json +1 -1
  54. package/packages/mcp-adapter/package.json +1 -1
  55. package/packages/memory-engine/package.json +1 -1
  56. package/packages/milestone-manager/package.json +1 -1
  57. package/packages/model-registry/package.json +1 -1
  58. package/packages/nextjs-plugin/package.json +1 -1
  59. package/packages/notification/package.json +1 -1
  60. package/packages/observability/package.json +1 -1
  61. package/packages/okf-indexer/package.json +1 -1
  62. package/packages/paperclip-integration/package.json +1 -1
  63. package/packages/performance-optimizer/package.json +1 -1
  64. package/packages/permission-mode/package.json +1 -1
  65. package/packages/privilege-broker/package.json +1 -1
  66. package/packages/project-analyzer/package.json +1 -1
  67. package/packages/project-bootstrap/package.json +1 -1
  68. package/packages/projection-engine/package.json +1 -1
  69. package/packages/prompt-compiler/package.json +1 -1
  70. package/packages/prompt-versioning/package.json +1 -1
  71. package/packages/provider-adapter-sdk/package.json +1 -1
  72. package/packages/provider-router/package.json +1 -1
  73. package/packages/provider-selector/package.json +1 -1
  74. package/packages/providers/package.json +1 -1
  75. package/packages/qdrant-skills/package.json +1 -1
  76. package/packages/quota-manager/package.json +1 -1
  77. package/packages/rate-limiter/package.json +1 -1
  78. package/packages/react-vite-plugin/package.json +1 -1
  79. package/packages/relay/package.json +1 -1
  80. package/packages/release-manager/package.json +1 -1
  81. package/packages/requirement-compiler/package.json +1 -1
  82. package/packages/runtime/package.json +1 -1
  83. package/packages/scheduler/package.json +1 -1
  84. package/packages/scheduler-adapter/package.json +1 -1
  85. package/packages/session/package.json +1 -1
  86. package/packages/session-api/package.json +1 -1
  87. package/packages/session-export/package.json +1 -1
  88. package/packages/shared-context/package.json +1 -1
  89. package/packages/skill-mcp-client/package.json +1 -1
  90. package/packages/skill-registry/package.json +1 -1
  91. package/packages/skills/package.json +1 -1
  92. package/packages/sprint-planner/package.json +1 -1
  93. package/packages/subscription-engine/package.json +1 -1
  94. package/packages/task-compiler/package.json +1 -1
  95. package/packages/tencentdb-memory/package.json +1 -1
  96. package/packages/tencentdb-sync/package.json +1 -1
  97. package/packages/test-data-generator/package.json +1 -1
  98. package/packages/test-generator/package.json +1 -1
  99. package/packages/todo-bd-sync/package.json +1 -1
  100. package/packages/token-estimation/package.json +1 -1
  101. package/packages/token-optimizer/package.json +1 -1
  102. package/packages/tooling-preference/package.json +1 -1
  103. package/packages/trajectory/package.json +1 -1
  104. package/packages/tui/package.json +1 -1
  105. package/packages/two-phase-review/package.json +1 -1
  106. package/packages/types/package.json +1 -1
  107. package/packages/voice-api/package.json +1 -1
  108. package/packages/webmcp-tester/package.json +1 -1
  109. package/packages/wiki/package.json +1 -1
  110. package/packages/workflow-events/package.json +1 -1
  111. package/packages/workspace-scanner/package.json +1 -1
  112. package/packages/worktree/package.json +1 -1
  113. package/packages/write-review/package.json +1 -1
  114. package/scripts/check-sensitive-terms.d.mts +116 -0
  115. package/scripts/check-sensitive-terms.mjs +764 -0
  116. package/scripts/guard-scan.sh +102 -0
  117. package/scripts/release/adapters/node-workspace.ts +1 -3
  118. package/scripts/release/orchestrator.ts +11 -5
  119. package/scripts/release/tsconfig.json +11 -0
  120. package/scripts/typecheck-packages.mjs +15 -2
  121. package/scripts/verify-package-contents.ts +69 -1
  122. package/scripts/tsconfig.json +0 -9
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/write-review",
3
- "version": "1.1.435",
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",
@@ -0,0 +1,116 @@
1
+ /**
2
+ * The types of the sensitive term check.
3
+ *
4
+ * The check is a plain JavaScript module on purpose: the pre-push hook
5
+ * runs it on the machine of a user who may have no build tools at all,
6
+ * and the workflow runs it with the node of the runner. A TypeScript
7
+ * source would ask both for a compiler they do not have.
8
+ *
9
+ * The declarations live here so that the TypeScript side of the
10
+ * repository - the package verification - can use the check without
11
+ * knowing anything about JavaScript.
12
+ */
13
+
14
+ /** A place where a term was found. The path and the line, and nothing else. */
15
+ export interface SensitiveHit {
16
+ /** The path of the file, relative to the scanned root. */
17
+ path: string;
18
+ /** The line of the hit. 0 when the path itself holds the term. */
19
+ line: number;
20
+ }
21
+
22
+ /** What a scan found. */
23
+ export interface SensitiveScanResult {
24
+ /** Every place a term was found. */
25
+ hits: SensitiveHit[];
26
+ /** How many files were looked at. */
27
+ scanned: number;
28
+ /** What was scanned, in words. */
29
+ mode: string;
30
+ }
31
+
32
+ /** The terms of a list: one term per line, empty lines and comments skipped. */
33
+ export function parseTerms(text: string): string[];
34
+
35
+ /** The terms of a file. A file that cannot be read is no terms. */
36
+ export function readTermsFile(path: string | undefined): string[];
37
+
38
+ /** The repository of a checkout, from its origin remote. */
39
+ export function repositoryFromRemote(cwd?: string): string | null;
40
+
41
+ /** The terms of the environment: SENSITIVE_TERMS, or PI_SENSITIVE_TERMS_FILE. */
42
+ export function termsFromEnv(env?: Record<string, string | undefined>): string[];
43
+
44
+ /** Does a line hold one of the terms? A plain, case-insensitive fragment. */
45
+ export function lineHasTerm(line: string, terms: string[]): boolean;
46
+
47
+ /** The added lines of a unified diff, with the line they have in the new file. */
48
+ export function addedLines(patch: string): { line: number; text: string }[];
49
+
50
+ /** The lines of a whole file. */
51
+ export function fileLines(content: string): { line: number; text: string }[];
52
+
53
+ /** Does a path hold a term? */
54
+ export function pathHasTerm(path: string, terms: string[]): boolean;
55
+
56
+ /** Hide the terms in a text. */
57
+ export function redactTerms(text: string, terms: string[]): string;
58
+
59
+ /** Scan a unified diff for the terms. */
60
+ export function scanPatch(patch: string, path: string, terms: string[]): SensitiveHit[];
61
+
62
+ /** Scan a whole text for the terms. */
63
+ export function scanText(text: string, path: string, terms: string[]): SensitiveHit[];
64
+
65
+ /** The report of a scan. It names the places and never a term. */
66
+ export function formatReport(args: {
67
+ hits: SensitiveHit[];
68
+ scanned: number;
69
+ mode: string;
70
+ terms?: string[];
71
+ }): string;
72
+
73
+ /** The files of a directory tree. A symlink is not followed. */
74
+ export function listTreeFiles(
75
+ dir: string,
76
+ root?: string,
77
+ out?: { relative: string; absolute: string }[],
78
+ ): { relative: string; absolute: string }[];
79
+
80
+ /** Scan a directory tree for the terms. */
81
+ export function scanTree(dir: string, terms: string[]): SensitiveScanResult;
82
+
83
+ /** Scan a range of commits for the terms. */
84
+ export function scanRange(
85
+ range: string,
86
+ terms: string[],
87
+ cwd?: string,
88
+ ): SensitiveScanResult;
89
+
90
+ /** A commit of a range. */
91
+ export interface SensitiveCommit {
92
+ /** The commit id. */
93
+ sha: string;
94
+ /** The message of the commit. */
95
+ message: string;
96
+ }
97
+
98
+ /** The commits of a range, with their messages. */
99
+ export function commitMessages(
100
+ range: string,
101
+ cwd?: string,
102
+ ): SensitiveCommit[];
103
+
104
+ /** Scan the commit messages of a range for the terms. */
105
+ export function scanCommitMessages(
106
+ range: string,
107
+ terms: string[],
108
+ cwd?: string,
109
+ ): SensitiveScanResult;
110
+
111
+ /** The exit code of a clean run. */
112
+ export const EXIT_CLEAN: number;
113
+ /** The exit code of a run that found a term. */
114
+ export const EXIT_FOUND: number;
115
+ /** The exit code of a run that could not check anything. */
116
+ export const EXIT_UNAVAILABLE: number;