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.
- package/package.json +2 -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.mjs +36 -0
- package/scripts/guard-scan.sh +102 -0
- package/scripts/release/orchestrator.ts +11 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/provider-router",
|
|
3
|
-
"version": "1.1.
|
|
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/two-phase-review",
|
|
3
|
-
"version": "1.1.
|
|
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",
|
|
@@ -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[] = [
|