@piagent/platform 1.45.0 → 1.46.1
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/CHANGELOG.md +39 -0
- package/README.md +5 -3
- package/README.vi.md +5 -3
- package/docs/command-reference-vietnamese.md +2 -2
- package/docs/distribution-standard.md +6 -6
- package/docs/en/architecture.md +1 -1
- package/docs/harness-conformance.md +22 -5
- package/docs/languages.json +4 -4
- package/docs/operator-manual-vietnamese.md +7 -7
- package/docs/publishing-for-teams.md +2 -0
- package/docs/release-install-policy.md +2 -2
- package/docs/team-onboarding.md +2 -2
- package/docs/vi/architecture.md +1 -1
- package/docs-site/architecture.html +1 -1
- package/docs-site/assets/search-en.json +1 -1
- package/docs-site/assets/search-vi.json +1 -1
- package/docs-site/benchmark.html +1 -1
- package/docs-site/commands.html +1 -1
- package/docs-site/context-engine.html +1 -1
- package/docs-site/ecosystem.html +1 -1
- package/docs-site/en/architecture.html +1 -1
- package/docs-site/en/benchmark.html +1 -1
- package/docs-site/en/commands.html +1 -1
- package/docs-site/en/context-engine.html +1 -1
- package/docs-site/en/ecosystem.html +1 -1
- package/docs-site/en/index.html +15 -15
- package/docs-site/en/mcp-approval.html +1 -1
- package/docs-site/en/mcp-auth.html +1 -1
- package/docs-site/en/mcp-servers.html +1 -1
- package/docs-site/en/mcp.html +1 -1
- package/docs-site/en/permissions.html +1 -1
- package/docs-site/en/profiles.html +1 -1
- package/docs-site/en/quickstart.html +1 -1
- package/docs-site/en/runtime.html +1 -1
- package/docs-site/en/scope.html +1 -1
- package/docs-site/en/security.html +1 -1
- package/docs-site/en/team.html +1 -1
- package/docs-site/en/update.html +3 -3
- package/docs-site/en/whats-new.html +55 -29
- package/docs-site/en/windows.html +1 -1
- package/docs-site/en/workflows.html +1 -1
- package/docs-site/index.html +15 -15
- package/docs-site/mcp-approval.html +1 -1
- package/docs-site/mcp-auth.html +1 -1
- package/docs-site/mcp-servers.html +1 -1
- package/docs-site/mcp.html +1 -1
- package/docs-site/permissions.html +1 -1
- package/docs-site/profiles.html +1 -1
- package/docs-site/quickstart.html +1 -1
- package/docs-site/releases.json +83 -0
- package/docs-site/runtime.html +1 -1
- package/docs-site/scope.html +1 -1
- package/docs-site/security.html +1 -1
- package/docs-site/team.html +1 -1
- package/docs-site/update.html +3 -3
- package/docs-site/whats-new.html +55 -29
- package/docs-site/windows.html +1 -1
- package/docs-site/workflows.html +1 -1
- package/evals/private-holdout-v1/public-exposure.v2.json +2 -2
- package/package.json +1 -1
- package/packages/piagent-core/benchmark/benchmark-bootstrap.js +3 -1
- package/packages/piagent-core/extensions/agent-home.d.ts +4 -0
- package/packages/piagent-core/extensions/agent-home.js +52 -0
- package/packages/piagent-core/extensions/piagent-guard.ts +5 -1
- package/packages/piagent-core/managed/copies.mjs +61 -0
- package/packages/piagent-core/managed/grant-share.mjs +9 -1
- package/packages/piagent-core/managed/helper-roles.mjs +5 -3
- package/packages/piagent-core/managed/helper-run.mjs +120 -52
- package/packages/piagent-core/managed/helper-settlement.mjs +5 -1
- package/packages/piagent-core/managed/ledger.mjs +187 -0
- package/packages/piagent-core/managed/objections.mjs +49 -27
- package/packages/piagent-core/managed/patch-snapshot.mjs +9 -0
- package/packages/piagent-core/managed/session.mjs +14 -14
- package/packages/piagent-core/managed/toolchain.mjs +7 -3
- package/packages/piagent-core/managed/workflow.mjs +32 -26
- package/packages/piagent-core/mcp/mcp-config-layers.js +4 -1
- package/packages/piagent-core/package.json +1 -1
- package/packages/piagent-core/runtime/managed-failure.mjs +8 -0
- package/packages/piagent-webui/extension/piagent-webui.ts +2 -0
- package/packages/piagent-webui/gateway/gateway-service.ts +4 -1
- package/packages/piagent-webui/gateway/pi-host.ts +2 -2
- package/packages/piagent-webui/ownership/profile-state.ts +10 -1
- package/packages/piagent-webui/server/benchmark-release-monitor.ts +2 -1
- package/scripts/benchmark-runner-support.mjs +2 -1
- package/scripts/company-terminal.mjs +19 -1
- package/scripts/dashboard-update-job.mjs +4 -2
- package/scripts/install-global.sh +113 -5
- package/scripts/model-scope-prune.mjs +2 -1
- package/scripts/personal-pi-config.mjs +2 -1
- package/scripts/personal-pi-restore.mjs +184 -0
- package/scripts/pi-usage-history.mjs +2 -1
- package/scripts/piagent-cli.mjs +49 -9
- package/scripts/piagent-dashboard.mjs +5 -3
- package/scripts/setup.sh +2 -6
- package/scripts/team-doctor.sh +11 -5
- package/scripts/uninstall-global.sh +17 -2
- package/scripts/update-global.mjs +5 -2
package/scripts/team-doctor.sh
CHANGED
|
@@ -72,8 +72,14 @@ const installations = piagentInstallations();
|
|
|
72
72
|
if(installations.length>1) warnings.push("Multiple Piagent installations detected. Use the pinned Watch launcher; other PATHs may run an older build: "+installations.map(i=>`${i.version} [${i.fingerprint}] ${i.root}`).join("; "));
|
|
73
73
|
// Personal Pi loading Piagent twice does not start; old company providers send it to Studio outside the Harness.
|
|
74
74
|
const { inspect: inspectPersonalPi } = await import(pathToFileURL(path.join(platformRoot, "scripts/personal-pi-config.mjs")).href);
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
const personalPiDir = path.join(process.env.HOME || "", ".pi", "agent");
|
|
76
|
+
for (const agentDir of new Set([personalPiDir, process.env.PI_CODING_AGENT_DIR || personalPiDir]))
|
|
77
|
+
for (const finding of inspectPersonalPi(agentDir).findings)
|
|
78
|
+
(finding.kind === "duplicate-extensions" ? errors : warnings).push(`${agentDir === personalPiDir ? "personal Pi" : "Piagent home"}: ${finding.text} Fix: piagent-update`);
|
|
79
|
+
// Since 1.46 Piagent runs from its own home; an older install left in personal Pi keeps loading there.
|
|
80
|
+
const { plan: personalPiRestorePlan } = await import(pathToFileURL(path.join(platformRoot, "scripts/personal-pi-restore.mjs")).href);
|
|
81
|
+
if (personalPiRestorePlan({ personalDir: personalPiDir }).legacy)
|
|
82
|
+
warnings.push("personal Pi still loads an older Piagent install (~/.pi/agent). Fix: piagent restore-pi --apply");
|
|
77
83
|
const { verifyCapabilityLock } = await import(pathToFileURL(path.join(platformRoot, "packages", "piagent-core", "capabilities", "capability-core.js")).href);
|
|
78
84
|
|
|
79
85
|
function exists(rel) {
|
|
@@ -271,9 +277,9 @@ if (commandExists("pi")) {
|
|
|
271
277
|
piHasMcpAdapter = combined.includes("pi-mcp-adapter");
|
|
272
278
|
piHasSubagents = combined.includes("pi-subagents");
|
|
273
279
|
piHasWebAccess = combined.includes("pi-web-access");
|
|
274
|
-
if (!piHasMcpAdapter) warnings.push("Pi MCP adapter not found in `pi list`; run
|
|
275
|
-
if (!piHasSubagents) warnings.push("Pi subagents package not found in `pi list`; run
|
|
276
|
-
if (!piHasWebAccess) warnings.push("Pi web access package not found in `pi list`; run `piagent-
|
|
280
|
+
if (!piHasMcpAdapter) warnings.push("Pi MCP adapter not found in `pi list`; run `piagent-install --with-mcp` (installs into Piagent's home, not your personal pi)");
|
|
281
|
+
if (!piHasSubagents) warnings.push("Pi subagents package not found in `pi list`; run `piagent-install --with-subagents` if you want them");
|
|
282
|
+
if (!piHasWebAccess) warnings.push("Pi web access package not found in `pi list`; run `piagent-install --with-web-access` so researcher subagents can browse/fetch external sources");
|
|
277
283
|
}
|
|
278
284
|
|
|
279
285
|
const mcpFiles = [
|
|
@@ -9,7 +9,16 @@ set -euo pipefail
|
|
|
9
9
|
# deleted.
|
|
10
10
|
|
|
11
11
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
12
|
-
|
|
12
|
+
# Piagent's own Pi home (same rule as packages/piagent-core/extensions/agent-home.js).
|
|
13
|
+
PERSONAL_PI_DIR="${HOME}/.pi/agent"
|
|
14
|
+
if [[ -n "${PIAGENT_AGENT_DIR:-}" ]]; then
|
|
15
|
+
PI_AGENT_DIR="$PIAGENT_AGENT_DIR"
|
|
16
|
+
elif [[ -n "${PI_CODING_AGENT_DIR:-}" && "${PI_CODING_AGENT_DIR%/}" != "$PERSONAL_PI_DIR" ]]; then
|
|
17
|
+
PI_AGENT_DIR="$PI_CODING_AGENT_DIR"
|
|
18
|
+
else
|
|
19
|
+
PI_AGENT_DIR="${HOME}/.piagent/agent"
|
|
20
|
+
fi
|
|
21
|
+
export PI_CODING_AGENT_DIR="$PI_AGENT_DIR"
|
|
13
22
|
GLOBAL_SETTINGS="$PI_AGENT_DIR/settings.json"
|
|
14
23
|
|
|
15
24
|
APPLY=false
|
|
@@ -26,7 +35,9 @@ usage() {
|
|
|
26
35
|
Usage:
|
|
27
36
|
piagent-uninstall [--apply] [--with-addons] [--with-host] [--project <path>]
|
|
28
37
|
|
|
29
|
-
Removes the Pi package this platform installed from
|
|
38
|
+
Removes the Pi package this platform installed from Piagent's own Pi home
|
|
39
|
+
(~/.piagent/agent). An install from before 1.46 lives in your personal pi
|
|
40
|
+
(~/.pi/agent): `piagent restore-pi --apply` takes it out of there.
|
|
30
41
|
|
|
31
42
|
(default) Dry run. Reports what would be removed and exits 0.
|
|
32
43
|
--apply Perform the removal.
|
|
@@ -291,6 +302,10 @@ NODE
|
|
|
291
302
|
fi
|
|
292
303
|
|
|
293
304
|
echo
|
|
305
|
+
if node "$ROOT/scripts/personal-pi-restore.mjs" --json 2>/dev/null | grep -q '"legacy": true'; then
|
|
306
|
+
echo "Your personal pi ($PERSONAL_PI_DIR) still loads an older Piagent install."
|
|
307
|
+
echo " Take it out with: piagent restore-pi --apply"
|
|
308
|
+
fi
|
|
294
309
|
if [[ "$APPLY" == true ]]; then
|
|
295
310
|
echo "Uninstall complete."
|
|
296
311
|
echo "The npm-global helper is separate and stays until you remove it:"
|
|
@@ -22,6 +22,7 @@ import path from "node:path";
|
|
|
22
22
|
import { spawnSync } from "node:child_process";
|
|
23
23
|
import { fileURLToPath } from "node:url";
|
|
24
24
|
import { inspect as inspectPersonalPi } from "./personal-pi-config.mjs";
|
|
25
|
+
import { personalPiAgentDir, piagentAgentDir } from "../packages/piagent-core/extensions/agent-home.js";
|
|
25
26
|
import { hostPlan, installPrivateHost, privateHostRoot } from "../packages/piagent-core/managed/pi-host.mjs";
|
|
26
27
|
|
|
27
28
|
const HELPER_PACKAGE = "@piagent/platform";
|
|
@@ -438,8 +439,10 @@ function main() {
|
|
|
438
439
|
: ` host: ${currentHost ?? "not installed"} -> ${targetHost}${hostNeedsChange ? "" : " (already current)"}`);
|
|
439
440
|
// The Pi package can lag the helper (installed from an older tag), and
|
|
440
441
|
// personal Pi can hold conflicting Piagent or old company entries.
|
|
441
|
-
|
|
442
|
-
|
|
442
|
+
// The package lives in Piagent's home; old company entries and an older
|
|
443
|
+
// Piagent install live in the member's personal pi.
|
|
444
|
+
const personal = inspectPersonalPi(personalPiAgentDir()), own = inspectPersonalPi(piagentAgentDir());
|
|
445
|
+
const installedPackages = own.packages.map((item) => item.version ?? "unknown");
|
|
443
446
|
const packageNeedsChange = options.package && (options.force || installedPackages.length !== 1 || installedPackages[0] !== targetHelper);
|
|
444
447
|
console.log(` package: ${installedPackages.join(", ") || "not installed"} -> v${targetHelper}${options.package ? packageNeedsChange ? " (reinstalled as a resolved commit)" : " (already current)" : " (skipped)"}`);
|
|
445
448
|
for (const finding of personal.findings) console.log(` personal Pi: ${finding.text}`);
|