pi-harness-runtime 1.1.435 → 1.1.436
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/harness/key-file-audit.ts +103 -3
- package/harness/startup-report.ts +32 -1
- package/index.ts +28 -0
- package/package.json +1 -1
- package/packages/a2a-adapter/package.json +1 -1
- package/packages/agent-policy/package.json +1 -1
- package/packages/architecture-generator/package.json +1 -1
- package/packages/auth/package.json +1 -1
- package/packages/autonomous-refactor/package.json +1 -1
- package/packages/autonomous-runtime/package.json +1 -1
- package/packages/cache-strategy/package.json +1 -1
- package/packages/capability-registry/package.json +1 -1
- package/packages/checkpoint/package.json +1 -1
- package/packages/cli-plugin-sdk/package.json +1 -1
- package/packages/clipboard/package.json +1 -1
- package/packages/clipboard-plugin/package.json +1 -1
- package/packages/code-generation/package.json +1 -1
- package/packages/code-review/package.json +1 -1
- package/packages/codex-adapter/package.json +1 -1
- package/packages/codex-watcher/package.json +1 -1
- package/packages/config-capture/package.json +1 -1
- package/packages/connection-runtime/package.json +1 -1
- package/packages/context-compiler/package.json +1 -1
- package/packages/context-discovery/package.json +1 -1
- package/packages/context-manager/package.json +1 -1
- package/packages/contracts/package.json +1 -1
- package/packages/cookie-sanitizer/package.json +1 -1
- package/packages/cost-optimizer/package.json +1 -1
- package/packages/dependency-analyzer/package.json +1 -1
- package/packages/django-plugin/package.json +1 -1
- package/packages/doc-generator/package.json +1 -1
- package/packages/durable-review/package.json +1 -1
- package/packages/e2e-tester/package.json +1 -1
- package/packages/evaluation-engine/package.json +1 -1
- package/packages/evaluation-runner/package.json +1 -1
- package/packages/event-bus/package.json +1 -1
- package/packages/event-sink/package.json +1 -1
- package/packages/event-store/package.json +1 -1
- package/packages/experience-replay/package.json +1 -1
- package/packages/feedback-collector/package.json +1 -1
- package/packages/file-copy-helper/package.json +1 -1
- package/packages/framework-detector/package.json +1 -1
- package/packages/framework-plugin-sdk/package.json +1 -1
- package/packages/frappe-plugin/package.json +1 -1
- package/packages/generic-web-plugin/package.json +1 -1
- package/packages/health-monitor/package.json +1 -1
- package/packages/intent-analyzer/package.json +1 -1
- package/packages/jev-judge/package.json +1 -1
- package/packages/knowledge-graph/package.json +1 -1
- package/packages/knowledge-retrieval/package.json +1 -1
- package/packages/laravel-plugin/package.json +1 -1
- package/packages/learning-engine/package.json +1 -1
- package/packages/logging/package.json +1 -1
- package/packages/mcp-adapter/package.json +1 -1
- package/packages/memory-engine/package.json +1 -1
- package/packages/milestone-manager/package.json +1 -1
- package/packages/model-registry/package.json +1 -1
- package/packages/nextjs-plugin/package.json +1 -1
- package/packages/notification/package.json +1 -1
- package/packages/observability/package.json +1 -1
- package/packages/okf-indexer/package.json +1 -1
- package/packages/paperclip-integration/package.json +1 -1
- package/packages/performance-optimizer/package.json +1 -1
- package/packages/permission-mode/package.json +1 -1
- package/packages/privilege-broker/package.json +1 -1
- package/packages/project-analyzer/package.json +1 -1
- package/packages/project-bootstrap/package.json +1 -1
- package/packages/projection-engine/package.json +1 -1
- package/packages/prompt-compiler/package.json +1 -1
- package/packages/prompt-versioning/package.json +1 -1
- package/packages/provider-adapter-sdk/package.json +1 -1
- package/packages/provider-router/package.json +1 -1
- package/packages/provider-selector/package.json +1 -1
- package/packages/providers/package.json +1 -1
- package/packages/qdrant-skills/package.json +1 -1
- package/packages/quota-manager/package.json +1 -1
- package/packages/rate-limiter/package.json +1 -1
- package/packages/react-vite-plugin/package.json +1 -1
- package/packages/relay/package.json +1 -1
- package/packages/release-manager/package.json +1 -1
- package/packages/requirement-compiler/package.json +1 -1
- package/packages/runtime/package.json +1 -1
- package/packages/scheduler/package.json +1 -1
- package/packages/scheduler-adapter/package.json +1 -1
- package/packages/session/package.json +1 -1
- package/packages/session-api/package.json +1 -1
- package/packages/session-export/package.json +1 -1
- package/packages/shared-context/package.json +1 -1
- package/packages/skill-mcp-client/package.json +1 -1
- package/packages/skill-registry/package.json +1 -1
- package/packages/skills/package.json +1 -1
- package/packages/sprint-planner/package.json +1 -1
- package/packages/subscription-engine/package.json +1 -1
- package/packages/task-compiler/package.json +1 -1
- package/packages/tencentdb-memory/package.json +1 -1
- package/packages/tencentdb-sync/package.json +1 -1
- package/packages/test-data-generator/package.json +1 -1
- package/packages/test-generator/package.json +1 -1
- package/packages/todo-bd-sync/package.json +1 -1
- package/packages/token-estimation/package.json +1 -1
- package/packages/token-optimizer/package.json +1 -1
- package/packages/tooling-preference/package.json +1 -1
- package/packages/trajectory/package.json +1 -1
- package/packages/tui/package.json +1 -1
- package/packages/two-phase-review/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/voice-api/package.json +1 -1
- package/packages/webmcp-tester/package.json +1 -1
- package/packages/wiki/package.json +1 -1
- package/packages/workflow-events/package.json +1 -1
- package/packages/workspace-scanner/package.json +1 -1
- package/packages/worktree/package.json +1 -1
- package/packages/write-review/package.json +1 -1
- package/scripts/check-sensitive-terms.d.mts +116 -0
- package/scripts/check-sensitive-terms.mjs +728 -0
- package/scripts/release/adapters/node-workspace.ts +1 -3
- package/scripts/release/tsconfig.json +11 -0
- package/scripts/typecheck-packages.mjs +15 -2
- package/scripts/verify-package-contents.ts +69 -1
- package/scripts/tsconfig.json +0 -9
|
@@ -105,9 +105,7 @@ export const nodeWorkspaceAdapter: ReleaseAdapter = {
|
|
|
105
105
|
|
|
106
106
|
// Must have workspaces field
|
|
107
107
|
try {
|
|
108
|
-
const raw = JSON.parse(
|
|
109
|
-
readFileSync(rootPkg, "utf-8") as unknown as string,
|
|
110
|
-
);
|
|
108
|
+
const raw = JSON.parse(readFileSync(rootPkg, "utf-8"));
|
|
111
109
|
if (raw.workspaces) return 0.9;
|
|
112
110
|
} catch {
|
|
113
111
|
// ignore
|
|
@@ -36,7 +36,8 @@ const BASELINES = new Map([
|
|
|
36
36
|
["voice-api", 16],
|
|
37
37
|
["worktree", 0],
|
|
38
38
|
["harness", 20],
|
|
39
|
-
["scripts",
|
|
39
|
+
["scripts", 9],
|
|
40
|
+
["scripts/release", 0],
|
|
40
41
|
["root", 2],
|
|
41
42
|
["new-modules", 0],
|
|
42
43
|
]);
|
|
@@ -67,11 +68,16 @@ for (const name of readdirSync(packagesDir).sort()) {
|
|
|
67
68
|
const project = join(packagesDir, name, "tsconfig.json");
|
|
68
69
|
if (existsSync(project)) projects.push(relative(root, project));
|
|
69
70
|
}
|
|
70
|
-
for (const extra of ["harness", "scripts"]) {
|
|
71
|
+
for (const extra of ["harness", "scripts/release"]) {
|
|
71
72
|
if (existsSync(join(root, extra, "tsconfig.json"))) {
|
|
72
73
|
projects.push(join(extra, "tsconfig.json"));
|
|
73
74
|
}
|
|
74
75
|
}
|
|
76
|
+
// The scripts of the repository are their own project, with a config
|
|
77
|
+
// of their own at the root of the repository.
|
|
78
|
+
if (existsSync(join(root, "tsconfig.scripts.json"))) {
|
|
79
|
+
projects.push("tsconfig.scripts.json");
|
|
80
|
+
}
|
|
75
81
|
// The root extension (index.ts) has no project of its own - it is the entry
|
|
76
82
|
// point of the extension and was never type checked.
|
|
77
83
|
if (existsSync(join(root, "tsconfig.root.json"))) {
|
|
@@ -92,9 +98,16 @@ function ownerOf(projectPath) {
|
|
|
92
98
|
const normalized = projectPath.split("\\").join("/");
|
|
93
99
|
if (normalized === "tsconfig.root.json") return "root";
|
|
94
100
|
if (normalized === "tsconfig.new-modules.json") return "new-modules";
|
|
101
|
+
if (normalized === "tsconfig.scripts.json") return "scripts";
|
|
95
102
|
if (normalized.startsWith("packages/")) {
|
|
96
103
|
return normalized.split("/")[1];
|
|
97
104
|
}
|
|
105
|
+
// A project in a folder of its own (the release sources in
|
|
106
|
+
// scripts/release) is a project of its own, and not the project of
|
|
107
|
+
// the folder that holds it.
|
|
108
|
+
if (normalized.endsWith("/tsconfig.json")) {
|
|
109
|
+
return normalized.slice(0, -"/tsconfig.json".length);
|
|
110
|
+
}
|
|
98
111
|
return normalized.split("/")[0];
|
|
99
112
|
}
|
|
100
113
|
|
|
@@ -36,6 +36,12 @@ import {
|
|
|
36
36
|
packageNameOf,
|
|
37
37
|
resolveRelativeImport,
|
|
38
38
|
} from "./lib/runtime-imports.js";
|
|
39
|
+
import {
|
|
40
|
+
readTermsFile,
|
|
41
|
+
redactTerms,
|
|
42
|
+
scanText,
|
|
43
|
+
termsFromEnv,
|
|
44
|
+
} from "./check-sensitive-terms.mjs";
|
|
39
45
|
|
|
40
46
|
const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
41
47
|
const verifyTarball = process.argv.includes("--pack");
|
|
@@ -48,7 +54,8 @@ interface Problem {
|
|
|
48
54
|
| "missing-tarball"
|
|
49
55
|
| "missing-package"
|
|
50
56
|
| "forbidden-path"
|
|
51
|
-
| "missing-plugin"
|
|
57
|
+
| "missing-plugin"
|
|
58
|
+
| "sensitive-content";
|
|
52
59
|
detail: string;
|
|
53
60
|
}
|
|
54
61
|
|
|
@@ -221,6 +228,66 @@ function checkPackageLayout(): void {
|
|
|
221
228
|
}
|
|
222
229
|
}
|
|
223
230
|
|
|
231
|
+
/**
|
|
232
|
+
* The terms of the list, and where they came from.
|
|
233
|
+
*
|
|
234
|
+
* The list is the repository secret, or the local file. A run without a
|
|
235
|
+
* list scans nothing - and says so, because "no name was found" and
|
|
236
|
+
* "nothing was looked at" are not the same statement.
|
|
237
|
+
*/
|
|
238
|
+
function sensitiveTerms(): { terms: string[]; source: string } {
|
|
239
|
+
const fromEnv = termsFromEnv(process.env);
|
|
240
|
+
if (fromEnv.length > 0) return { terms: fromEnv, source: "the environment" };
|
|
241
|
+
const file = process.env.PI_SENSITIVE_TERMS_FILE;
|
|
242
|
+
if (file) {
|
|
243
|
+
const terms = readTermsFile(file);
|
|
244
|
+
if (terms.length > 0) return { terms, source: file };
|
|
245
|
+
}
|
|
246
|
+
return { terms: [], source: "none" };
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* The published files must not hold a client name.
|
|
251
|
+
*
|
|
252
|
+
* The other checks look at the paths of the published files. This one
|
|
253
|
+
* looks at what is inside them: a name in a comment, in a doc or in a
|
|
254
|
+
* string is published like any other byte, and npm keeps a published
|
|
255
|
+
* version for a long time - long enough that the removal of one becomes
|
|
256
|
+
* a support ticket.
|
|
257
|
+
*
|
|
258
|
+
* The report names the file and the line and never the term, and the
|
|
259
|
+
* path is printed with the terms hidden because a path is often the
|
|
260
|
+
* place the term is in.
|
|
261
|
+
*/
|
|
262
|
+
function checkSensitiveContent(files: string[]): void {
|
|
263
|
+
const { terms, source } = sensitiveTerms();
|
|
264
|
+
if (terms.length === 0) {
|
|
265
|
+
// Nothing was checked. The release workflow runs this check on
|
|
266
|
+
// its own, with the secret, and it fails closed.
|
|
267
|
+
console.log(
|
|
268
|
+
"[verify-package-contents] the sensitive content scan was skipped: no term list is configured",
|
|
269
|
+
);
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
for (const file of files) {
|
|
273
|
+
let content: string;
|
|
274
|
+
try {
|
|
275
|
+
content = readFileSync(join(ROOT, file), "utf8");
|
|
276
|
+
} catch {
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
for (const found of scanText(content, file, terms)) {
|
|
280
|
+
problems.push({
|
|
281
|
+
kind: "sensitive-content",
|
|
282
|
+
detail: `${redactTerms(found.path, terms)}:${found.line} holds a term from the sensitive list`,
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
console.log(
|
|
287
|
+
`[verify-package-contents] the sensitive content scan looked at ${files.length} published file(s) with the list of ${source}`,
|
|
288
|
+
);
|
|
289
|
+
}
|
|
290
|
+
|
|
224
291
|
/**
|
|
225
292
|
* The postinstall copies the plugin from the package root.
|
|
226
293
|
*
|
|
@@ -596,6 +663,7 @@ if (publishedFiles.length === 0) {
|
|
|
596
663
|
});
|
|
597
664
|
} else {
|
|
598
665
|
checkRelativeImports(publishedFiles);
|
|
666
|
+
checkSensitiveContent(publishedFiles);
|
|
599
667
|
if (verifyTarball) inspectTarball(publishedFiles);
|
|
600
668
|
}
|
|
601
669
|
|