@piagent/platform 1.0.2 → 1.1.0
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 +36 -23
- package/README.md +78 -366
- package/docs/command-reference-vietnamese.md +43 -4
- package/docs/distribution-standard.md +9 -9
- package/docs/herdr-workflow.md +22 -1
- package/docs/mcp-and-tools.md +27 -3
- package/docs/operator-manual-vietnamese.md +12 -12
- package/docs/publishing-for-teams.md +1 -0
- package/docs/quickstart-vietnamese.md +32 -232
- package/docs/release-install-policy.md +16 -10
- package/docs/security-threat-model.md +1 -1
- package/docs/task-lifecycle-vietnamese.md +139 -0
- package/docs/team-onboarding.md +8 -7
- package/docs-site/index.html +36 -88
- package/package.json +4 -3
- package/packages/piagent-core/README.md +2 -1
- package/packages/piagent-core/extensions/document-intake.ts +436 -0
- package/packages/piagent-core/extensions/guard-types.ts +1 -0
- package/packages/piagent-core/extensions/piagent-guard.ts +120 -0
- package/packages/piagent-core/package.json +2 -2
- package/schemas/project-profile.schema.json +8 -0
- package/scripts/check-published-site.mjs +189 -0
- package/scripts/configure-mcp.sh +34 -1
- package/scripts/init-project.sh +19 -0
- package/scripts/install-global.sh +26 -8
- package/scripts/team-doctor.sh +1 -1
- package/scripts/uninstall-global.sh +4 -1
- package/scripts/verify-local.sh +113 -69
package/scripts/verify-local.sh
CHANGED
|
@@ -146,6 +146,7 @@ required_files=(
|
|
|
146
146
|
"$ROOT/scripts/audit-runtime-host.sh"
|
|
147
147
|
"$ROOT/scripts/verify-release-identity.mjs"
|
|
148
148
|
"$ROOT/scripts/verify-vercel-link.mjs"
|
|
149
|
+
"$ROOT/scripts/check-published-site.mjs"
|
|
149
150
|
"$ROOT/scripts/piagent-cli.mjs"
|
|
150
151
|
"$ROOT/scripts/init-project.sh"
|
|
151
152
|
"$ROOT/scripts/uninstall-global.sh"
|
|
@@ -176,7 +177,9 @@ required_files=(
|
|
|
176
177
|
"$ROOT/tests/capability-sources.test.mjs"
|
|
177
178
|
"$ROOT/packages/piagent-core/capabilities/capability-sources.js"
|
|
178
179
|
"$ROOT/packages/piagent-core/extensions/guard-shell-analysis.ts"
|
|
180
|
+
"$ROOT/packages/piagent-core/extensions/document-intake.ts"
|
|
179
181
|
"$ROOT/tests/guard-shell-analysis.test.mjs"
|
|
182
|
+
"$ROOT/tests/document-intake.test.mjs"
|
|
180
183
|
"$ROOT/tests/runtime-advisories.test.mjs"
|
|
181
184
|
"$ROOT/scripts/check-runtime-advisories.mjs"
|
|
182
185
|
"$ROOT/tests/migrate-project-state.test.mjs"
|
|
@@ -250,8 +253,8 @@ if (!rootPkg.pi.subagents?.agents?.length) {
|
|
|
250
253
|
throw new Error("root package.json missing pi.subagents.agents");
|
|
251
254
|
}
|
|
252
255
|
const expectedPeers = {
|
|
253
|
-
"@earendil-works/pi-ai": "0.
|
|
254
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
256
|
+
"@earendil-works/pi-ai": "0.82.0",
|
|
257
|
+
"@earendil-works/pi-coding-agent": "0.82.0",
|
|
255
258
|
typebox: "1.1.38"
|
|
256
259
|
};
|
|
257
260
|
for (const [name, version] of Object.entries(expectedPeers)) {
|
|
@@ -268,21 +271,61 @@ if (!pkg.pi.subagents?.agents?.length) {
|
|
|
268
271
|
}
|
|
269
272
|
NODE
|
|
270
273
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
274
|
+
# Documentation-coverage gates: a name that ships has to be findable in the docs
|
|
275
|
+
# that teach it. Each of these was a bare `grep >/dev/null` under `set -e`, which
|
|
276
|
+
# fails with exit 1 and no output, so a doc edit that dropped a term produced an
|
|
277
|
+
# unexplained failure and a bisect. Naming the term and the files searched turns
|
|
278
|
+
# that into a one-line fix.
|
|
279
|
+
# Repository-relative paths, so the message reads the same on every machine.
|
|
280
|
+
# Word-by-word because prefix removal on "$*" only strips the first word.
|
|
281
|
+
relative_paths() {
|
|
282
|
+
local out=""
|
|
283
|
+
for path in "$@"; do
|
|
284
|
+
out+="${path#"$ROOT/"} "
|
|
285
|
+
done
|
|
286
|
+
printf '%s' "${out% }"
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
require_documented() {
|
|
290
|
+
local term="$1"
|
|
291
|
+
shift
|
|
292
|
+
if ! grep -R "$term" "$@" >/dev/null; then
|
|
293
|
+
echo "documentation gate: \"$term\" is no longer mentioned in $(relative_paths "$@"); restore it or update this gate in the same change" >&2
|
|
294
|
+
exit 1
|
|
295
|
+
fi
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
# Long-running repo commands stay quiet on success so the gate output stays
|
|
299
|
+
# readable, but discarding their output on failure leaves this script exiting 1
|
|
300
|
+
# with nothing to read. Capture, then replay only when the command fails.
|
|
301
|
+
run_quietly() {
|
|
302
|
+
local label="$1"
|
|
303
|
+
shift
|
|
304
|
+
local output
|
|
305
|
+
if ! output="$(cd "$ROOT" && "$@" 2>&1)"; then
|
|
306
|
+
printf '%s\n' "$output" >&2
|
|
307
|
+
echo "$label failed; the output above is why" >&2
|
|
308
|
+
exit 1
|
|
309
|
+
fi
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
require_documented "auth.json" "$ROOT/docs" "$ROOT/packages/piagent-core" "$ROOT/templates"
|
|
313
|
+
require_documented "piagent_context" "$ROOT/packages/piagent-core"
|
|
314
|
+
require_documented "piagent_permission_status" "$ROOT/packages/piagent-core" "$ROOT/docs" "$ROOT/README.md"
|
|
315
|
+
require_documented "/full-access" "$ROOT/docs" "$ROOT/README.md" "$ROOT/packages/piagent-core/README.md"
|
|
316
|
+
require_documented "piagent_exec_policy_check" "$ROOT/packages/piagent-core" "$ROOT/docs" "$ROOT/templates/project/AGENTS.md"
|
|
317
|
+
require_documented "piagent_context_budget" "$ROOT/packages/piagent-core" "$ROOT/docs" "$ROOT/templates/project/AGENTS.md"
|
|
318
|
+
require_documented "piagent_tool_policy_check" "$ROOT/packages/piagent-core" "$ROOT/docs" "$ROOT/templates/project/AGENTS.md"
|
|
319
|
+
require_documented "piagent_task_gate_check" "$ROOT/packages/piagent-core" "$ROOT/docs" "$ROOT/templates/project/AGENTS.md"
|
|
320
|
+
require_documented "piagent_usage_snapshot" "$ROOT/packages/piagent-core" "$ROOT/docs" "$ROOT/templates/project/AGENTS.md"
|
|
321
|
+
require_documented "/piagent-usage" "$ROOT/packages/piagent-core" "$ROOT/docs" "$ROOT/README.md"
|
|
322
|
+
require_documented "piagent_document_read" "$ROOT/packages/piagent-core" "$ROOT/docs"
|
|
323
|
+
require_documented "additionalReadRoots" "$ROOT/docs" "$ROOT/schemas/project-profile.schema.json"
|
|
324
|
+
require_documented "/piagent-commands" "$ROOT/README.md" "$ROOT/docs" "$ROOT/packages/piagent-core/prompts"
|
|
325
|
+
require_documented "auto-delegation" "$ROOT/README.md" "$ROOT/docs" "$ROOT/packages/piagent-core/prompts" "$ROOT/templates/project/AGENTS.md"
|
|
326
|
+
require_documented "Subagents used/not used" "$ROOT/packages/piagent-core/prompts" "$ROOT/docs/auto-delegation-policy.md"
|
|
327
|
+
require_documented "Subagent orchestration capabilities" "$ROOT/README.md" "$ROOT/docs/subagent-orchestration-capabilities.md"
|
|
328
|
+
require_documented "pi-web-access" "$ROOT/README.md" "$ROOT/docs" "$ROOT/scripts/install-global.sh" "$ROOT/scripts/setup.sh"
|
|
286
329
|
grep -F 'PI_MCP_ADAPTER_SOURCE="npm:pi-mcp-adapter@2.11.0"' "$ROOT/scripts/install-global.sh" >/dev/null
|
|
287
330
|
grep -F 'PI_SUBAGENTS_SOURCE="npm:pi-subagents@0.35.1"' "$ROOT/scripts/install-global.sh" >/dev/null
|
|
288
331
|
grep -F 'PI_WEB_ACCESS_SOURCE="npm:pi-web-access@0.13.0"' "$ROOT/scripts/install-global.sh" >/dev/null
|
|
@@ -315,7 +358,7 @@ require_action_pin() {
|
|
|
315
358
|
local pin="$1"
|
|
316
359
|
shift
|
|
317
360
|
if ! grep -F "$pin" "$@" >/dev/null; then
|
|
318
|
-
echo "reviewed GitHub Actions pin $pin is missing from $
|
|
361
|
+
echo "reviewed GitHub Actions pin $pin is missing from $(relative_paths "$@"); update this pin in the same change that bumps the action" >&2
|
|
319
362
|
exit 1
|
|
320
363
|
fi
|
|
321
364
|
}
|
|
@@ -343,47 +386,47 @@ grep -F 'validate-source --package-source "$PACKAGE_SOURCE"' "$ROOT/scripts/inst
|
|
|
343
386
|
grep -F 'verify_npm_integrity "$PI_MCP_ADAPTER_SOURCE" "$PI_MCP_ADAPTER_INTEGRITY"' "$ROOT/scripts/install-global.sh" >/dev/null
|
|
344
387
|
grep -F 'verify_npm_integrity "$PI_SUBAGENTS_SOURCE" "$PI_SUBAGENTS_INTEGRITY"' "$ROOT/scripts/install-global.sh" >/dev/null
|
|
345
388
|
grep -F 'verify_npm_integrity "$PI_WEB_ACCESS_SOURCE" "$PI_WEB_ACCESS_INTEGRITY"' "$ROOT/scripts/install-global.sh" >/dev/null
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
389
|
+
require_documented "parallel-review" "$ROOT/docs" "$ROOT/README.md"
|
|
390
|
+
require_documented "intercomBridge" "$ROOT/scripts/configure-subagents.sh" "$ROOT/docs/subagents-and-multiagent.md"
|
|
391
|
+
require_documented "waitTool" "$ROOT/scripts/configure-subagents.sh" "$ROOT/docs/subagents-and-multiagent.md"
|
|
392
|
+
require_documented "piagent_profile_options" "$ROOT/packages/piagent-core" "$ROOT/docs"
|
|
393
|
+
require_documented "piagent_profile_apply" "$ROOT/packages/piagent-core" "$ROOT/docs"
|
|
394
|
+
require_documented "/profile auto" "$ROOT/README.md" "$ROOT/docs" "$ROOT/packages/piagent-core"
|
|
395
|
+
require_documented "piagent_profile_tech_context_record" "$ROOT/packages/piagent-core" "$ROOT/docs" "$ROOT/README.md"
|
|
396
|
+
require_documented "/profile tech" "$ROOT/README.md" "$ROOT/docs" "$ROOT/packages/piagent-core/prompts"
|
|
397
|
+
require_documented "/commit" "$ROOT/README.md" "$ROOT/docs" "$ROOT/packages/piagent-core/prompts"
|
|
398
|
+
require_documented "/pr" "$ROOT/README.md" "$ROOT/docs" "$ROOT/packages/piagent-core/prompts"
|
|
399
|
+
require_documented "piagent_project_onboarding_record" "$ROOT/packages/piagent-core" "$ROOT/docs"
|
|
400
|
+
require_documented "piagent_memory_status" "$ROOT/packages/piagent-core" "$ROOT/docs" "$ROOT/templates/project/AGENTS.md"
|
|
401
|
+
require_documented "piagent_memory_note" "$ROOT/packages/piagent-core" "$ROOT/docs"
|
|
402
|
+
require_documented "piagent_memory_search" "$ROOT/packages/piagent-core" "$ROOT/docs"
|
|
403
|
+
require_documented "piagent_memory_citation_record" "$ROOT/packages/piagent-core" "$ROOT/docs"
|
|
404
|
+
require_documented "piagent_context_index_status" "$ROOT/packages/piagent-core" "$ROOT/docs"
|
|
405
|
+
require_documented "piagent_context_index_record" "$ROOT/packages/piagent-core" "$ROOT/docs"
|
|
406
|
+
require_documented "piagent_context_index_search" "$ROOT/packages/piagent-core" "$ROOT/docs"
|
|
407
|
+
require_documented "/context-index" "$ROOT/README.md" "$ROOT/docs" "$ROOT/packages/piagent-core/prompts"
|
|
408
|
+
require_documented "/onboard-project" "$ROOT/README.md" "$ROOT/docs" "$ROOT/templates/project/AGENTS.md"
|
|
409
|
+
require_documented "/memory-policy" "$ROOT/README.md" "$ROOT/docs" "$ROOT/packages/piagent-core/prompts"
|
|
410
|
+
require_documented "/model-options" "$ROOT/README.md" "$ROOT/docs" "$ROOT/packages/piagent-core/prompts"
|
|
411
|
+
require_documented "anthropic/claude" "$ROOT/README.md" "$ROOT/docs/model-options.md" "$ROOT/packages/piagent-core/prompts/model-options.md"
|
|
412
|
+
require_documented "gpt-5.6" "$ROOT/README.md" "$ROOT/docs/model-options.md" "$ROOT/packages/piagent-core/prompts/model-options.md"
|
|
413
|
+
require_documented "claude-fable-5" "$ROOT/README.md" "$ROOT/docs/model-options.md" "$ROOT/packages/piagent-core/prompts/model-options.md"
|
|
414
|
+
require_documented "piagent-models" "$ROOT/README.md" "$ROOT/docs/model-options.md"
|
|
415
|
+
require_documented "enabledModels" "$ROOT/templates/global/settings.json" "$ROOT/docs/model-options.md" "$ROOT/scripts/configure-model-scope.sh"
|
|
416
|
+
require_documented "piagent-mcp" "$ROOT/README.md" "$ROOT/docs/mcp-and-tools.md" "$ROOT/scripts/configure-mcp.sh"
|
|
417
|
+
require_documented "pi-mcp-adapter" "$ROOT/README.md" "$ROOT/docs/mcp-and-tools.md" "$ROOT/scripts/install-global.sh"
|
|
418
|
+
require_documented "piagent-subagents" "$ROOT/README.md" "$ROOT/docs/subagents-and-multiagent.md" "$ROOT/scripts/configure-subagents.sh"
|
|
419
|
+
require_documented "subagents-fleet" "$ROOT/docs/command-reference-vietnamese.md" "$ROOT/docs/subagents-and-multiagent.md" "$ROOT/README.md"
|
|
420
|
+
require_documented "health check" "$ROOT/docs/command-reference-vietnamese.md" "$ROOT/docs/subagents-and-multiagent.md" "$ROOT/README.md"
|
|
421
|
+
require_documented "pi-subagents" "$ROOT/README.md" "$ROOT/docs/subagents-and-multiagent.md" "$ROOT/scripts/install-global.sh" "$ROOT/scripts/setup.sh"
|
|
422
|
+
require_documented "piagent-scout" "$ROOT/README.md" "$ROOT/docs/subagents-and-multiagent.md" "$ROOT/packages/piagent-core/subagents"
|
|
380
423
|
grep -F "@upstash/context7-mcp@3.2.4" "$ROOT/scripts/configure-mcp.sh" >/dev/null
|
|
381
424
|
grep -F "@upstash/context7-mcp@3.2.4" "$ROOT/docs/mcp-and-tools.md" >/dev/null
|
|
382
425
|
grep -F "chrome-devtools-mcp@1.6.0" "$ROOT/scripts/configure-mcp.sh" >/dev/null
|
|
383
426
|
grep -F "chrome-devtools-mcp@1.6.0" "$ROOT/docs/mcp-and-tools.md" >/dev/null
|
|
384
427
|
grep -F "@playwright/mcp@0.0.78" "$ROOT/scripts/configure-mcp.sh" >/dev/null
|
|
385
428
|
grep -F "@playwright/mcp@0.0.78" "$ROOT/docs/mcp-and-tools.md" >/dev/null
|
|
386
|
-
|
|
429
|
+
require_documented "https://mcp.figma.com/mcp" "$ROOT/scripts/configure-mcp.sh" "$ROOT/docs/mcp-and-tools.md"
|
|
387
430
|
grep -F "ghcr.io/github/github-mcp-server@sha256:2b0c48b070f61e9d3969269ead600f62d00fb237b60ac849ef3d166ee7de9ad3" "$ROOT/scripts/configure-mcp.sh" >/dev/null
|
|
388
431
|
grep -F "ghcr.io/github/github-mcp-server@sha256:2b0c48b070f61e9d3969269ead600f62d00fb237b60ac849ef3d166ee7de9ad3" "$ROOT/docs/mcp-and-tools.md" >/dev/null
|
|
389
432
|
grep -F '"GITHUB_READ_ONLY=1"' "$ROOT/scripts/configure-mcp.sh" >/dev/null
|
|
@@ -400,20 +443,20 @@ if grep -E '@latest|"@upstash/context7-mcp"|"chrome-devtools-mcp"|"@playwright/m
|
|
|
400
443
|
echo "MCP production presets contain a mutable dependency source"
|
|
401
444
|
exit 1
|
|
402
445
|
fi
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
446
|
+
require_documented "Ctrl+L" "$ROOT/README.md" "$ROOT/docs/model-options.md" "$ROOT/docs/team-onboarding.md" "$ROOT/docs/quickstart-vietnamese.md"
|
|
447
|
+
require_documented "/platform-improve" "$ROOT/packages/piagent-core/prompts" "$ROOT/docs"
|
|
448
|
+
require_documented "/be-to-fe" "$ROOT/packages/piagent-core/prompts" "$ROOT/docs"
|
|
449
|
+
require_documented "/scout" "$ROOT/packages/piagent-core/prompts" "$ROOT/docs" "$ROOT/README.md"
|
|
450
|
+
require_documented "piagent_context_preflight" "$ROOT/packages/piagent-core" "$ROOT/docs"
|
|
451
|
+
require_documented ".pi/task-inbox" "$ROOT/.gitignore" "$ROOT/templates/project/.pi/.gitignore" "$ROOT/docs"
|
|
452
|
+
require_documented "Task Implementation Contract" "$ROOT/docs" "$ROOT/packages/piagent-core/prompts"
|
|
453
|
+
require_documented "piagent-task-trace" "$ROOT/packages/piagent-core/extensions/piagent-guard.ts" "$ROOT/docs"
|
|
454
|
+
require_documented "piagent-source-cache" "$ROOT/packages/piagent-core/skills" "$ROOT/templates/project/AGENTS.md"
|
|
455
|
+
require_documented "piagent_source_checkout" "$ROOT/packages/piagent-core"
|
|
456
|
+
require_documented "scripts/setup.sh" "$ROOT/README.md" "$ROOT/docs"
|
|
457
|
+
require_documented "quality-benchmark.sh" "$ROOT/README.md" "$ROOT/docs"
|
|
458
|
+
require_documented "piagent-capabilities" "$ROOT/README.md" "$ROOT/docs/capability-packs.md"
|
|
459
|
+
require_documented ".pi-subagents/" "$ROOT/.gitignore" "$ROOT/docs/subagents-and-multiagent.md" "$ROOT/docs/distribution-standard.md" "$ROOT/scripts/init-project.sh"
|
|
417
460
|
test -s "$ROOT/tests/policy-core.test.mjs"
|
|
418
461
|
|
|
419
462
|
public_wording_pattern="$(
|
|
@@ -465,9 +508,10 @@ node --check "$ROOT/scripts/piagent-cli.mjs" >/dev/null
|
|
|
465
508
|
node --check "$ROOT/scripts/migrate-project-state.mjs" >/dev/null
|
|
466
509
|
node --check "$ROOT/scripts/import-agent-instructions.mjs" >/dev/null
|
|
467
510
|
node --check "$ROOT/scripts/check-runtime-advisories.mjs" >/dev/null
|
|
468
|
-
|
|
511
|
+
node --check "$ROOT/scripts/check-published-site.mjs" >/dev/null
|
|
512
|
+
run_quietly "npm test" npm test
|
|
469
513
|
if [[ -x "$ROOT/node_modules/.bin/tsc" ]]; then
|
|
470
|
-
|
|
514
|
+
run_quietly "npm run typecheck" npm run typecheck
|
|
471
515
|
fi
|
|
472
516
|
bash -n "$ROOT/scripts/quality-benchmark.sh"
|
|
473
517
|
bash -n "$ROOT/scripts/runtime-policy-smoke.sh"
|