@piagent/platform 1.7.1 → 1.9.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/AGENTS.md +7 -0
- package/CHANGELOG.md +113 -1
- package/README.md +45 -70
- package/README.vi.md +34 -61
- package/architecture/layers.json +16 -3
- package/catalog/capabilities.json +14 -7
- package/catalog/claude-model-additions.json +42 -0
- package/docs/auto-delegation-policy.md +2 -0
- package/docs/command-reference-vietnamese.md +69 -91
- package/docs/context-window-policy.md +5 -5
- package/docs/distribution-standard.md +16 -19
- package/docs/en/architecture.md +9 -1
- package/docs/herdr-workflow.md +2 -3
- package/docs/languages.json +4 -4
- package/docs/managed-local-acceptance.md +403 -0
- package/docs/mcp-and-tools.md +5 -7
- package/docs/memory-policy.md +3 -3
- package/docs/model-options.md +22 -17
- package/docs/oauth-providers.md +1 -1
- package/docs/operator-manual-vietnamese.md +85 -130
- package/docs/package-architecture-notes.md +4 -4
- package/docs/piagent-core-improvement-plan.md +3 -5
- package/docs/piagent-core-plan-checkpoint-2026-09-06.json +2 -13
- package/docs/piagent-runtime-benchmark-execution-plan.md +10 -8
- package/docs/project-adapters.md +3 -3
- package/docs/project-onboarding.md +15 -16
- package/docs/publishing-for-teams.md +3 -1
- package/docs/quality-benchmark.md +2 -0
- package/docs/quickstart-vietnamese.md +24 -25
- package/docs/release-install-policy.md +16 -11
- package/docs/research/harness-next-evidence-review.md +7 -7
- package/docs/runtime-harness-standard.md +2 -0
- package/docs/runtime-policy-design.md +2 -0
- package/docs/runtime-quality-baseline.md +2 -0
- package/docs/subagent-orchestration-capabilities.md +1 -1
- package/docs/subagents-and-multiagent.md +10 -8
- package/docs/task-implementation-contract.md +2 -0
- package/docs/task-lifecycle-vietnamese.md +2 -0
- package/docs/team-onboarding.md +33 -64
- package/docs/usage-observability.md +2 -2
- package/docs/vi/architecture.md +9 -1
- package/docs/workflow-recipes.md +6 -10
- package/docs-site/architecture.html +4 -3
- package/docs-site/assets/docs.css +80 -0
- package/docs-site/benchmark.html +7 -1
- package/docs-site/commands.html +37 -23
- package/docs-site/content/architecture.html +2 -2
- package/docs-site/content/benchmark.html +5 -0
- package/docs-site/content/commands.html +35 -22
- package/docs-site/content/ecosystem.html +144 -0
- package/docs-site/content/en/architecture.html +1 -1
- package/docs-site/content/en/benchmark.html +5 -0
- package/docs-site/content/en/commands.html +30 -13
- package/docs-site/content/en/ecosystem.html +144 -0
- package/docs-site/content/en/index.html +24 -9
- package/docs-site/content/en/quickstart.html +10 -12
- package/docs-site/content/en/runtime.html +1 -1
- package/docs-site/content/en/security.html +1 -1
- package/docs-site/content/en/team.html +2 -2
- package/docs-site/content/en/whats-new.html +89 -1
- package/docs-site/content/en/workflows.html +29 -31
- package/docs-site/content/index.html +24 -9
- package/docs-site/content/quickstart.html +10 -12
- package/docs-site/content/runtime.html +2 -2
- package/docs-site/content/security.html +2 -2
- package/docs-site/content/team.html +2 -2
- package/docs-site/content/whats-new.html +89 -1
- package/docs-site/content/workflows.html +36 -38
- package/docs-site/context-engine.html +2 -1
- package/docs-site/ecosystem.html +283 -0
- package/docs-site/en/architecture.html +3 -2
- package/docs-site/en/benchmark.html +7 -1
- package/docs-site/en/commands.html +32 -14
- package/docs-site/en/context-engine.html +2 -1
- package/docs-site/en/ecosystem.html +283 -0
- package/docs-site/en/index.html +30 -14
- package/docs-site/en/mcp-approval.html +2 -1
- package/docs-site/en/mcp-auth.html +2 -1
- package/docs-site/en/mcp-servers.html +2 -1
- package/docs-site/en/mcp.html +2 -1
- package/docs-site/en/permissions.html +2 -1
- package/docs-site/en/profiles.html +2 -1
- package/docs-site/en/quickstart.html +17 -18
- package/docs-site/en/runtime.html +3 -2
- package/docs-site/en/scope.html +2 -1
- package/docs-site/en/security.html +6 -5
- package/docs-site/en/team.html +4 -3
- package/docs-site/en/whats-new.html +97 -8
- package/docs-site/en/workflows.html +34 -35
- package/docs-site/index.html +30 -14
- package/docs-site/mcp-approval.html +2 -1
- package/docs-site/mcp-auth.html +2 -1
- package/docs-site/mcp-servers.html +2 -1
- package/docs-site/mcp.html +2 -1
- package/docs-site/permissions.html +2 -1
- package/docs-site/profiles.html +2 -1
- package/docs-site/quickstart.html +17 -18
- package/docs-site/runtime.html +4 -3
- package/docs-site/scope.html +2 -1
- package/docs-site/security.html +7 -6
- package/docs-site/team.html +4 -3
- package/docs-site/whats-new.html +97 -8
- package/docs-site/workflows.html +41 -42
- package/evals/fs5-causal-arm.v1.json +2 -2
- package/evals/private-holdout-v1/CURRENT_BOUNDARY.md +17 -0
- package/evals/private-holdout-v1/public-exposure.v2.json +2 -2
- package/package.json +10 -9
- package/packages/piagent-core/README.md +15 -23
- package/packages/piagent-core/docs/context-efficiency-improvement-plan.md +2 -0
- package/packages/piagent-core/extensions/experiment-loop-policy.ts +75 -0
- package/packages/piagent-core/extensions/local-state-path.js +15 -0
- package/packages/piagent-core/extensions/piagent-guard.ts +108 -960
- package/packages/piagent-core/extensions/policy-core.js +2 -2
- package/packages/piagent-core/extensions/source-checkout-paths.ts +54 -0
- package/packages/piagent-core/managed/broker-client.mjs +49 -0
- package/packages/piagent-core/managed/capabilities.mjs +28 -0
- package/packages/piagent-core/managed/compaction.mjs +63 -0
- package/packages/piagent-core/managed/doctor.mjs +107 -0
- package/packages/piagent-core/managed/native-catalog.mjs +42 -0
- package/packages/piagent-core/managed/patch-snapshot.mjs +48 -0
- package/packages/piagent-core/managed/repository-operation.mjs +84 -0
- package/packages/piagent-core/managed/request-stream.mjs +129 -0
- package/packages/piagent-core/managed/resource-loader.mjs +42 -0
- package/packages/piagent-core/managed/review-snapshot-worker.mjs +27 -0
- package/packages/piagent-core/managed/sandbox-diagnostic.mjs +12 -0
- package/packages/piagent-core/managed/search-fallback.mjs +93 -0
- package/packages/piagent-core/managed/session.mjs +472 -0
- package/packages/piagent-core/managed/store.d.mts +3 -0
- package/packages/piagent-core/managed/store.mjs +64 -0
- package/packages/piagent-core/managed/tool-boundary.mjs +243 -0
- package/packages/piagent-core/managed/tool-worker.mjs +36 -0
- package/packages/piagent-core/managed/toolchain.mjs +120 -0
- package/packages/piagent-core/managed/web-fetch.mjs +105 -0
- package/packages/piagent-core/managed/web-search.mjs +96 -0
- package/packages/piagent-core/managed/workflow.mjs +299 -0
- package/packages/piagent-core/package.json +3 -6
- package/packages/piagent-core/policies/base-policy.json +80 -26
- package/packages/piagent-core/runtime/hooks/agent-start-hook.ts +3 -3
- package/packages/piagent-core/runtime/hooks/input-hook.ts +35 -196
- package/packages/piagent-core/runtime/hooks/session-start-hook.ts +2 -0
- package/packages/piagent-core/runtime/inspection/approval-broker.ts +9 -1
- package/packages/piagent-core/runtime/inspection/same-process-bridge-proof.ts +1 -1
- package/packages/piagent-core/runtime/inspection/webui-snapshot.ts +1 -1
- package/packages/piagent-core/runtime/managed-failure.d.mts +10 -0
- package/packages/piagent-core/runtime/managed-failure.mjs +164 -0
- package/packages/piagent-core/runtime/model/model-route-policy.ts +33 -13
- package/packages/piagent-core/runtime/model/model-route-types.ts +10 -6
- package/packages/piagent-core/runtime/orchestration/minimal-delegation-policy.ts +8 -29
- package/packages/piagent-core/runtime/orchestration/owned-work-budget.ts +1 -1
- package/packages/piagent-core/runtime/policy/block-remedy.ts +5 -3
- package/packages/piagent-core/runtime/registration/context-commands.ts +1 -1
- package/packages/piagent-core/runtime/registration/knowledge-tools.ts +7 -7
- package/packages/piagent-core/runtime/registration/policy-tools.ts +2 -2
- package/packages/piagent-core/runtime/registration/session-commands.ts +11 -26
- package/packages/piagent-core/runtime/registration/task-evidence-tools.ts +1 -1
- package/packages/piagent-core/runtime/session/system-prompt.ts +6 -7
- package/packages/piagent-core/runtime/workflows/webui-runtime-command.ts +6 -6
- package/packages/piagent-core/runtime/workflows/webui-workflow.ts +6 -11
- package/packages/piagent-core/security/sensitive-text.js +9 -0
- package/packages/piagent-core/skills/piagent-ops/SKILL.md +8 -10
- package/packages/piagent-core/skills/test-audit/SKILL.md +101 -0
- package/packages/piagent-core/subagents/piagent-planner.md +1 -1
- package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-DGk34zJT.js → MarkdownMessage-Dd9wPk-v.js} +1 -1
- package/packages/piagent-webui/dist/client/assets/index-7I-50Q2U.js +228 -0
- package/packages/piagent-webui/dist/client/assets/{index-DVahUVWy.css → index-DgSmcnP8.css} +1 -1
- package/packages/piagent-webui/dist/client/index.html +2 -2
- package/packages/piagent-webui/extension/piagent-webui.ts +11 -11
- package/packages/piagent-webui/extension/session-stream-adapter.ts +3 -1
- package/packages/piagent-webui/extension/terminal-session-adapter.ts +6 -1
- package/packages/piagent-webui/gateway/company-relay.ts +308 -0
- package/packages/piagent-webui/gateway/control-socket.ts +39 -12
- package/packages/piagent-webui/gateway/gateway-service.ts +109 -28
- package/packages/piagent-webui/gateway/gateway-session-stream.ts +58 -2
- package/packages/piagent-webui/gateway/managed-gateway.mjs +41 -0
- package/packages/piagent-webui/gateway/managed-launch.ts +145 -0
- package/packages/piagent-webui/gateway/managed-projection.ts +20 -0
- package/packages/piagent-webui/gateway/pi-host.ts +22 -4
- package/packages/piagent-webui/gateway/runtime-session-controls.ts +5 -2
- package/packages/piagent-webui/gateway/session-approval-authority.ts +28 -0
- package/packages/piagent-webui/gateway/session-catalog.ts +11 -3
- package/packages/piagent-webui/gateway/session-command-controller.ts +8 -2
- package/packages/piagent-webui/gateway/session-file-facts.ts +25 -0
- package/packages/piagent-webui/gateway/session-inspection-registry.ts +42 -12
- package/packages/piagent-webui/gateway/session-list-cache.ts +68 -0
- package/packages/piagent-webui/gateway/session-runtime-ownership.ts +8 -1
- package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +20 -27
- package/packages/piagent-webui/ownership/managed-terminal-lease.ts +27 -0
- package/packages/piagent-webui/ownership/profile-state.ts +2 -0
- package/packages/piagent-webui/ownership/session-lease-store.ts +22 -1
- package/packages/piagent-webui/server/approval-projection.ts +9 -0
- package/packages/piagent-webui/server/core-inspection-provider.ts +4 -9
- package/packages/piagent-webui/server/loopback-server.ts +37 -1
- package/packages/piagent-webui/server/message-stop-reason.ts +11 -0
- package/packages/piagent-webui/server/tool-call-summary.ts +185 -0
- package/packages/piagent-webui/server/transcript-projection.ts +86 -3
- package/packs/engineering-base/pack.json +4 -0
- package/schemas/piagent-webui/runtime-command-v1.schema.json +1 -2
- package/schemas/piagent-webui/session-catalog-v1.schema.json +8 -0
- package/schemas/piagent-webui/transcript-v1.schema.json +94 -1
- package/scripts/build-docs-site.mjs +23 -12
- package/scripts/check-public-wording.mjs +5 -6
- package/scripts/check-runtime-advisories.mjs +23 -6
- package/scripts/claude-model-additions.mjs +33 -0
- package/scripts/configure-model-scope.sh +36 -8
- package/scripts/configure-subagents.sh +1 -1
- package/scripts/explain-command.mjs +5 -6
- package/scripts/install-global.sh +2 -2
- package/scripts/model-route-evaluation-core.ts +1 -0
- package/scripts/model-scope-prune.mjs +75 -0
- package/scripts/phase-tools-evaluation.mjs +9 -4
- package/scripts/pi-model-route.mjs +1 -1
- package/scripts/piagent-cli.mjs +51 -2
- package/scripts/piagent-dashboard.mjs +27 -4
- package/scripts/piagent-installations.mjs +26 -0
- package/scripts/piagent-studio.mjs +155 -0
- package/scripts/runtime-advisory-exceptions.json +29 -0
- package/scripts/setup.sh +2 -2
- package/scripts/team-doctor.sh +20 -1
- package/scripts/typescript-loader.mjs +6 -0
- package/scripts/verify-local.sh +5 -5
- package/scripts/verify-release-identity.mjs +1 -1
- package/templates/global/settings.json +8 -2
- package/templates/project/.pi/project-context.md +3 -3
- package/templates/project/AGENTS.md +4 -5
- package/docs/piagent-core-reasoning-research-2026-09-06.md +0 -225
- package/docs/piagent-core-research-sources-2026-09-06.json +0 -416
- package/packages/piagent-webui/dist/client/assets/index-DiKRmCEP.js +0 -176
package/docs/mcp-and-tools.md
CHANGED
|
@@ -580,11 +580,9 @@ operator diagnostics or recovery tools.
|
|
|
580
580
|
| `piagent_exec_policy_check` | Explain the shell-policy verdict already enforced by the hook. |
|
|
581
581
|
| `piagent_context_budget` | Diagnose candidate context files against hard caps. |
|
|
582
582
|
| `piagent_tool_policy_check` | Diagnose tool capability registration. |
|
|
583
|
-
| `piagent_task_gate_check` | Diagnose missing final proof during recovery. |
|
|
584
583
|
| `piagent_memory_status` | Project memory policy/files/rules. |
|
|
585
584
|
| `piagent_memory_search` | Keyword search `.pi/memory` markdown. |
|
|
586
585
|
| `piagent_memory_note` | Append explicit durable memory note. |
|
|
587
|
-
| `piagent_memory_citation_record` | Record memory evidence in task contract. |
|
|
588
586
|
| `piagent_context_index_status` | Inspect the compact advisory project context index. |
|
|
589
587
|
| `piagent_context_index_search` | Search context-index nodes before broad re-scouting. |
|
|
590
588
|
| `piagent_context_index_record` | Record cited project/profile/tech/task context after onboarding or approved handoff. |
|
|
@@ -593,11 +591,11 @@ operator diagnostics or recovery tools.
|
|
|
593
591
|
| `piagent_profile_tech_options` | Return select-style tech options for a profile family. |
|
|
594
592
|
| `piagent_profile_tech_apply` | Apply profile + selected role tech stack and Context7 placeholders. |
|
|
595
593
|
| `piagent_profile_tech_context_record` | Record a concise Context7 evidence snapshot for a selected tech. |
|
|
596
|
-
| `
|
|
597
|
-
| `
|
|
598
|
-
| `
|
|
599
|
-
|
|
600
|
-
|
|
594
|
+
| `piagent_document_read` | Read a document from the project or a granted `additionalReadRoots` directory (read-only). |
|
|
595
|
+
| `piagent_source_checkout` | Prepare an external Git repository for read-only inspection in this session. |
|
|
596
|
+
| `piagent_project_onboarding_record` | Record `.pi/project-context.md` after the agent has read the project. |
|
|
597
|
+
|
|
598
|
+
Retired in 1.9.0 with the task contract: `piagent_task_start`, `piagent_task_progress`, `piagent_task_gate_check`, `piagent_context_record`, `piagent_verify_record`, `piagent_trace_record` and `piagent_memory_citation_record`.
|
|
601
599
|
|
|
602
600
|
## Core capabilities
|
|
603
601
|
|
package/docs/memory-policy.md
CHANGED
|
@@ -100,7 +100,6 @@ Mode hiện tại:
|
|
|
100
100
|
| `piagent_memory_status` | Xem memory config/files/rules. |
|
|
101
101
|
| `piagent_memory_note` | Ghi durable note khi user explicit ask. Có redaction cho token/key/connection-string phổ biến. |
|
|
102
102
|
| `piagent_memory_search` | Keyword-search memory markdown. |
|
|
103
|
-
| `piagent_memory_citation_record` | Ghi memory file đã ảnh hưởng task contract. |
|
|
104
103
|
| `piagent_context_index_status` | Kiểm tra `.pi/context-index.json` có tồn tại/fresh/có citation không. |
|
|
105
104
|
| `piagent_context_index_search` | Tìm node/edge/citation trong context index trước khi scout rộng. |
|
|
106
105
|
| `piagent_context_index_record` | Ghi compact context graph sau onboarding hoặc approved handoff; không ghi transcript thô. |
|
|
@@ -111,11 +110,12 @@ Mode hiện tại:
|
|
|
111
110
|
|
|
112
111
|
```text
|
|
113
112
|
/login
|
|
114
|
-
/
|
|
115
|
-
/onboard run
|
|
113
|
+
/profile setup
|
|
116
114
|
/memory
|
|
117
115
|
```
|
|
118
116
|
|
|
117
|
+
Rồi nhờ agent onboard project bằng lời thường (từ bản 1.9.0 không còn `/onboard`).
|
|
118
|
+
|
|
119
119
|
`/memory-policy` vẫn là alias để xem cùng runtime status.
|
|
120
120
|
|
|
121
121
|
### Ghi nhớ explicit
|
package/docs/model-options.md
CHANGED
|
@@ -12,9 +12,11 @@ chỉ hoạt động khi operator chọn mode tương ứng; `/model`, CLI `--mo
|
|
|
12
12
|
## Capability routing trước task
|
|
13
13
|
|
|
14
14
|
Piagent có contract `low | medium | high | ultra`, tách khỏi tên model cụ thể.
|
|
15
|
-
Mapping
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
Mapping v2 hiện tại là GPT-6 Luna/medium, Sol/medium, Sol/high và
|
|
16
|
+
Astra/xhigh cho bốn tier `low | medium | high | ultra`. Mapping v1 của họ 5.6
|
|
17
|
+
chỉ dùng để đọc lại corpus benchmark lịch sử. Authenticated catalog phải có
|
|
18
|
+
đúng model/effort; khi GPT-6 chưa được cấp, router ghi rõ fallback 5.6 tương
|
|
19
|
+
ứng, và trả `unavailable` nếu cả hai lựa chọn đều vắng mặt.
|
|
18
20
|
|
|
19
21
|
```text
|
|
20
22
|
PIAGENT_PARENT_ROUTING=off|shadow|recommend|auto
|
|
@@ -100,26 +102,31 @@ off, minimal, low, medium, high, xhigh, max
|
|
|
100
102
|
Không phải model nào cũng hỗ trợ mọi level. Pi sẽ clamp theo capability của model. Cách chọn:
|
|
101
103
|
|
|
102
104
|
```bash
|
|
103
|
-
pi --model openai-codex/gpt-
|
|
105
|
+
pi --model openai-codex/gpt-6-sol:high
|
|
104
106
|
pi --model anthropic/claude-sonnet-5:xhigh
|
|
105
107
|
pi --thinking medium
|
|
106
108
|
```
|
|
107
109
|
|
|
108
110
|
## Current latest-family catalog
|
|
109
111
|
|
|
110
|
-
Đừng giới hạn vào vài ví dụ. Sau
|
|
112
|
+
Đừng giới hạn vào vài ví dụ. Sau khi nâng Pi host, kiểm tra catalog đã đăng nhập bằng `piagent-models`. Có tên model trong SDK không đồng nghĩa tài khoản đã được cấp quyền dùng. Các tier dưới đây dựa trên [hướng dẫn chọn model](https://developers.openai.com/api/docs/guides/model-selection) và [catalog chính thức](https://developers.openai.com/api/docs/models), chưa phải kết quả benchmark Piagent–Codex của phiên bản này.
|
|
111
113
|
|
|
112
114
|
### Họ model OpenAI Codex
|
|
113
115
|
|
|
114
116
|
| Model | Role gợi ý | Khi dùng |
|
|
115
117
|
|---|---|---|
|
|
118
|
+
| `openai-codex/gpt-6-luna` | efficient | task rõ phạm vi, khối lượng lớn; tier low của router ở `medium` effort |
|
|
119
|
+
| `openai-codex/gpt-6-sol` | balanced coding | công việc hằng ngày; mặc định phiên mới ở `high` effort, tier medium ở `medium` |
|
|
120
|
+
| `openai-codex/gpt-6-astra` | frontier | task rộng, mơ hồ, nhiều bước; tier ultra ở `xhigh` |
|
|
116
121
|
| `openai-codex/gpt-5.3-codex-spark` | fast scout | hỏi nhanh, thao tác nhỏ, chi phí thấp |
|
|
117
|
-
| `openai-codex/gpt-5.4-mini` | fast/cheap | scout nhẹ, docs, simple fix |
|
|
118
|
-
| `openai-codex/gpt-5.4` | balanced | task bình thường |
|
|
119
122
|
| `openai-codex/gpt-5.5` | balanced/hard | model thế hệ trước vẫn được hỗ trợ khi có trong authenticated catalog |
|
|
120
|
-
| `openai-codex/gpt-5.6-luna` |
|
|
121
|
-
| `openai-codex/gpt-5.6-terra` |
|
|
122
|
-
| `openai-codex/gpt-5.6-sol` |
|
|
123
|
+
| `openai-codex/gpt-5.6-luna` | legacy fallback low | dùng khi GPT-6 Luna chưa có trong authenticated catalog |
|
|
124
|
+
| `openai-codex/gpt-5.6-terra` | legacy fallback medium | dùng khi GPT-6 Sol chưa có trong authenticated catalog |
|
|
125
|
+
| `openai-codex/gpt-5.6-sol` | legacy fallback high/ultra | giữ phiên cũ và benchmark lịch sử; dùng khi GPT-6 Sol/Astra chưa có |
|
|
126
|
+
|
|
127
|
+
`gpt-5.4` và `gpt-5.4-mini` không còn trong catalog Codex đã đăng nhập (kiểm tra ngày 2026-10-01) nên đã bỏ khỏi preset; settings cũ còn ghi chúng chỉ sinh cảnh báo `No models match pattern` khi mở Pi. `piagent-doctor` liệt kê những mẫu không còn khớp model nào Pi biết; `piagent-model-scope --prune` chỉ xoá đúng những mẫu đó và giữ nguyên phần còn lại (thêm `--dry-run` để xem trước). Mẫu của provider chỉ đang đăng xuất vẫn được giữ.
|
|
128
|
+
|
|
129
|
+
Pi 0.87.1 khai báo cả ba GPT-6 model trên đường `openai-codex` và `openai`. Catalog Codex của Pi hiện khai báo cửa sổ context 272.000 token; tài liệu API công bố 1,05 triệu token. Hãy dùng giới hạn do host/provider của phiên thực tế cung cấp, không lấy giới hạn API để giả định cho đăng nhập Codex. Astra không hỗ trợ thinking `off`; Sol và Luna có hỗ trợ. Router chỉ chọn model/effort khớp đúng catalog đã đăng nhập, ghi `legacy-model-fallback` khi phải chọn 5.6, và vẫn giữ nguyên model người dùng pin rõ ràng.
|
|
123
130
|
|
|
124
131
|
### Họ model Claude (Anthropic)
|
|
125
132
|
|
|
@@ -145,11 +152,9 @@ available nào trong authenticated provider catalog.
|
|
|
145
152
|
|
|
146
153
|
| Preset | Model OpenAI Codex | Model Claude (Anthropic) | Khi dùng |
|
|
147
154
|
|---|---|---|---|
|
|
148
|
-
|
|
|
149
|
-
| Balanced implement | `openai-codex/gpt-
|
|
150
|
-
|
|
|
151
|
-
| Balanced implement | `openai-codex/gpt-5.6-terra:high` hoặc `openai-codex/gpt-5.5:high` | `anthropic/claude-sonnet-5:high` | task source hằng ngày, cân bằng capability/cost |
|
|
152
|
-
| Frontier/quality-first | `openai-codex/gpt-5.6-sol:high` | `anthropic/claude-opus-4-7:xhigh` hoặc `anthropic/claude-opus-4-8:xhigh` | architecture, long-horizon, high-risk review |
|
|
155
|
+
| Focused/volume | `openai-codex/gpt-6-luna:medium` | `anthropic/claude-haiku-4-5:low` | task nhỏ, rõ phạm vi và có cách kiểm tra |
|
|
156
|
+
| Balanced implement | `openai-codex/gpt-6-sol:medium` hoặc `:high` | `anthropic/claude-sonnet-5:high` | task source bình thường |
|
|
157
|
+
| Frontier/quality-first | `openai-codex/gpt-6-astra:xhigh` | `anthropic/claude-opus-4-8:xhigh` | task rộng, mơ hồ, nhiều bước |
|
|
153
158
|
|
|
154
159
|
Tên model có thể đổi theo Pi model catalog. Khi không chắc, ưu tiên `/model` hoặc `pi --list-models`.
|
|
155
160
|
|
|
@@ -158,7 +163,7 @@ Tên model có thể đổi theo Pi model catalog. Khi không chắc, ưu tiên
|
|
|
158
163
|
Global setup mặc định:
|
|
159
164
|
|
|
160
165
|
```bash
|
|
161
|
-
piagent-model-scope --preset full --default-model openai-codex/gpt-
|
|
166
|
+
piagent-model-scope --preset full --default-model openai-codex/gpt-6-sol:high
|
|
162
167
|
```
|
|
163
168
|
|
|
164
169
|
Scope này ghi vào settings:
|
|
@@ -179,7 +184,7 @@ Shift+Tab
|
|
|
179
184
|
Nếu muốn đặt default khác:
|
|
180
185
|
|
|
181
186
|
```bash
|
|
182
|
-
piagent-model-scope --preset full --default-model openai-codex/gpt-
|
|
187
|
+
piagent-model-scope --preset full --default-model openai-codex/gpt-6-sol:high
|
|
183
188
|
piagent-model-scope --preset full --default-model anthropic/claude-sonnet-5:xhigh
|
|
184
189
|
```
|
|
185
190
|
|
package/docs/oauth-providers.md
CHANGED
|
@@ -18,13 +18,13 @@ Support matrix release hiện tại: macOS Apple Silicon + Bash và Linux x64 +
|
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
node --version # >= 22.19.0
|
|
21
|
-
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.
|
|
22
|
-
npm install -g --ignore-scripts @piagent/platform@1.
|
|
21
|
+
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.87.1
|
|
22
|
+
npm install -g --ignore-scripts @piagent/platform@1.9.0
|
|
23
23
|
piagent-install --stable --dry-run
|
|
24
24
|
piagent-install --stable
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Khi seed `.pi/settings.json` cho team/repo cần audit lặp lại, giữ package source dạng pinned tag như `git:github.com/Vt-mmm/piagent@v1.
|
|
27
|
+
Khi seed `.pi/settings.json` cho team/repo cần audit lặp lại, giữ package source dạng pinned tag như `git:github.com/Vt-mmm/piagent@v1.9.0`. Máy cá nhân có thể dùng `git:github.com/Vt-mmm/piagent` để theo latest.
|
|
28
28
|
|
|
29
29
|
Nếu đang ở source checkout của platform, dùng helper theo channel để preview trước khi đổi:
|
|
30
30
|
|
|
@@ -38,7 +38,7 @@ bash scripts/install-global.sh --stable
|
|
|
38
38
|
Full update phải đồng bộ exact Pi host trước, rồi npm-global helper và Pi package matching:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.
|
|
41
|
+
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.87.1
|
|
42
42
|
npm install -g --ignore-scripts @piagent/platform@X.Y.Z
|
|
43
43
|
piagent-install --stable --dry-run
|
|
44
44
|
piagent-install --stable
|
|
@@ -99,8 +99,8 @@ install package once
|
|
|
99
99
|
### Cài Pi và package platform
|
|
100
100
|
|
|
101
101
|
```bash
|
|
102
|
-
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.
|
|
103
|
-
npm install -g --ignore-scripts @piagent/platform@1.
|
|
102
|
+
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.87.1
|
|
103
|
+
npm install -g --ignore-scripts @piagent/platform@1.9.0
|
|
104
104
|
piagent-install --stable --dry-run
|
|
105
105
|
piagent-install --stable
|
|
106
106
|
```
|
|
@@ -205,21 +205,23 @@ Gợi ý:
|
|
|
205
205
|
Sau `/login` và `/model`, chạy:
|
|
206
206
|
|
|
207
207
|
```text
|
|
208
|
-
/commands
|
|
209
208
|
/mcp
|
|
210
209
|
/subagents-doctor
|
|
211
|
-
/
|
|
212
|
-
/onboard run
|
|
210
|
+
/profile setup
|
|
213
211
|
/memory
|
|
214
212
|
```
|
|
215
213
|
|
|
216
|
-
|
|
214
|
+
Từ bản 1.9.0 không còn `/onboard`. Nhờ agent onboard bằng lời thường:
|
|
215
|
+
|
|
216
|
+
```text
|
|
217
|
+
Đọc project này (chỉ đọc) và ghi lại project context.
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Agent sẽ:
|
|
217
221
|
|
|
218
222
|
1. đọc repo theo context budget;
|
|
219
|
-
2.
|
|
220
|
-
3.
|
|
221
|
-
4. hỏi user trước khi apply nếu workflow chạy qua tool write;
|
|
222
|
-
5. ghi project profile, tech stack và context.
|
|
223
|
+
2. đề xuất profile phù hợp (`/profile setup` để chọn profile/tech bằng select);
|
|
224
|
+
3. ghi `.pi/project-context.md` và `.pi/context-index.json` bằng tool onboarding của Piagent.
|
|
223
225
|
|
|
224
226
|
File chính được tạo/cập nhật:
|
|
225
227
|
|
|
@@ -235,7 +237,7 @@ File chính được tạo/cập nhật:
|
|
|
235
237
|
.pi/memory/MEMORY.md
|
|
236
238
|
```
|
|
237
239
|
|
|
238
|
-
Nếu `.pi/project-context.md` còn `Generated: not yet`, hoặc `/context index` báo index đang pending/stale,
|
|
240
|
+
Nếu `.pi/project-context.md` còn `Generated: not yet`, hoặc `/context index` báo index đang pending/stale, nên nhờ agent onboard lại trước khi giao việc implement lớn.
|
|
239
241
|
|
|
240
242
|
### Đổi profile sau này
|
|
241
243
|
|
|
@@ -283,7 +285,7 @@ Không phải daily default. Dùng khi muốn tạo sẵn `.pi` files cho projec
|
|
|
283
285
|
bash /path/to/piagent/scripts/setup.sh /path/to/project \
|
|
284
286
|
--project-only \
|
|
285
287
|
--profile auto \
|
|
286
|
-
--package-source git:github.com/Vt-mmm/piagent@v1.
|
|
288
|
+
--package-source git:github.com/Vt-mmm/piagent@v1.9.0 \
|
|
287
289
|
--mcp-preset core \
|
|
288
290
|
--subagents-preset safe
|
|
289
291
|
```
|
|
@@ -306,45 +308,41 @@ bash /path/to/piagent/scripts/configure-subagents.sh --preset safe
|
|
|
306
308
|
|
|
307
309
|
## 4. Daily task workflow
|
|
308
310
|
|
|
311
|
+
Từ bản 1.9.0, mọi việc được yêu cầu bằng lời thường; không còn `/workflow`,
|
|
312
|
+
`/task`, `/scout`, `/fresh` và không có task contract. Nói rõ ý định (chỉ đọc,
|
|
313
|
+
chỉ lập kế hoạch, hay cho sửa) ngay trong câu yêu cầu.
|
|
314
|
+
|
|
309
315
|
### Requirement chưa rõ
|
|
310
316
|
|
|
311
317
|
```text
|
|
312
|
-
|
|
318
|
+
Cải tiến onboarding cho team mới. Chưa implement, chỉ hỏi phần còn thiếu và đề xuất plan.
|
|
313
319
|
```
|
|
314
320
|
|
|
315
321
|
### Cần plan trước
|
|
316
322
|
|
|
317
323
|
```text
|
|
318
|
-
|
|
324
|
+
Lập plan cho header sale menu hover stabilization: scope, file, lệnh verify và rủi ro. Chưa sửa code.
|
|
319
325
|
```
|
|
320
326
|
|
|
321
327
|
### Task rõ, cho implement
|
|
322
328
|
|
|
323
329
|
```text
|
|
324
|
-
|
|
330
|
+
Implement header sale menu hover stabilization. Thêm component test và chạy verify liên quan.
|
|
325
331
|
```
|
|
326
332
|
|
|
327
333
|
### Scout/audit read-only
|
|
328
334
|
|
|
329
335
|
```text
|
|
330
|
-
|
|
336
|
+
Scout payment FE mapping vs BE contract. Backend read-only. Không sửa source.
|
|
331
337
|
```
|
|
332
338
|
|
|
333
|
-
|
|
339
|
+
Dùng yêu cầu scout cho payment/auth/data/contract mapping khi mục tiêu là chốt evidence trước, chưa sửa code. Muốn chắc chắn không có lệnh ghi nào chạy, đổi session sang `/permission read-only`.
|
|
334
340
|
|
|
335
341
|
### Task mới khi session đã nặng
|
|
336
342
|
|
|
337
|
-
Nếu `/usage` cho thấy context cao, hoặc Pi báo context overflow,
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
/fresh scout Scout payment FE mapping vs BE contract. Backend read-only. Do not edit source.
|
|
341
|
-
/fresh task Implement <bounded task>.
|
|
342
|
-
/fresh be-to-fe Implement FE support for <BE contract>. Backend read-only.
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
Các command này tự mở session mới và replay prompt workflow ngắn. Anh không cần tự chạy `pi --name ...` rồi paste lại.
|
|
346
|
-
|
|
347
|
-
Input guard của platform cũng tự collapse prompt có full `Mandatory flow` boilerplate. Quy tắc vận hành: user chỉ mô tả task; checklist nằm trong platform prompt/piagent tools.
|
|
343
|
+
Nếu `/usage` cho thấy context cao, hoặc Pi báo context overflow, mở session mới
|
|
344
|
+
bằng `/new` (hoặc `/compact`) rồi nói lại yêu cầu. Không cần paste checklist:
|
|
345
|
+
guard tự áp policy cho từng tool call.
|
|
348
346
|
|
|
349
347
|
### Gửi ảnh/screenshot trong chat
|
|
350
348
|
|
|
@@ -361,7 +359,7 @@ lưu screenshot vào `~/Documents/team-screenshots` rồi thêm folder đó vào
|
|
|
361
359
|
Sau đó để nguyên path trong prompt:
|
|
362
360
|
|
|
363
361
|
```text
|
|
364
|
-
|
|
362
|
+
Scout lỗi UI trong ảnh ~/Documents/team-screenshots/screenshot.png. Chỉ đọc.
|
|
365
363
|
```
|
|
366
364
|
|
|
367
365
|
Piagent guard sẽ xử lý trước khi model nhận input:
|
|
@@ -385,19 +383,19 @@ prompt.
|
|
|
385
383
|
|
|
386
384
|
```text
|
|
387
385
|
/profile be-readonly-fe
|
|
388
|
-
|
|
386
|
+
Implement frontend support from backend endpoint/spec <name>. Backend is read-only.
|
|
389
387
|
```
|
|
390
388
|
|
|
391
389
|
### Cải tiến platform
|
|
392
390
|
|
|
393
391
|
```text
|
|
394
|
-
|
|
392
|
+
Improve MCP setup docs and subagent command guidance for team usage.
|
|
395
393
|
```
|
|
396
394
|
|
|
397
395
|
### Review trước final
|
|
398
396
|
|
|
399
397
|
```text
|
|
400
|
-
|
|
398
|
+
Review diff hiện tại: correctness, test còn thiếu, scope drift. Chỉ đọc.
|
|
401
399
|
```
|
|
402
400
|
|
|
403
401
|
### Commit và pull request
|
|
@@ -405,11 +403,11 @@ prompt.
|
|
|
405
403
|
Git trong Pi Agent là capability + guard, không có namespace `/git-*`. Khi muốn gom việc hiện tại:
|
|
406
404
|
|
|
407
405
|
```text
|
|
408
|
-
|
|
409
|
-
|
|
406
|
+
Commit các file docs vừa sửa với message "docs: update onboarding notes". Không push.
|
|
407
|
+
Tạo draft PR cho branch này, title "Add guarded git notes".
|
|
410
408
|
```
|
|
411
409
|
|
|
412
|
-
|
|
410
|
+
Guard hỏi xác nhận trước khi `git push` hoặc tạo/cập nhật GitHub PR. Các lệnh stage rộng như `git add .`, `git add -A`, `git add --all`, `git add -- .`, `git add :/` cũng phải qua confirmation.
|
|
413
411
|
|
|
414
412
|
### Preflight, live status và receipt
|
|
415
413
|
|
|
@@ -429,14 +427,9 @@ Read-only/plan/review không bao giờ hiện implementation authorization. Dòn
|
|
|
429
427
|
`host execution is not a sandbox` là boundary thật: Piagent policy giảm lỗi thao
|
|
430
428
|
tác nhưng không cô lập code khỏi account của operator.
|
|
431
429
|
|
|
432
|
-
`/piagent-status` đọc
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
review/helper/recovery, remaining risk và handoff. Receipt chỉ gọi là complete
|
|
436
|
-
khi hard completion gate trên working tree hiện tại pass, trace terminal là
|
|
437
|
-
`completed`, và mọi acceptance criterion đều satisfied. Thiếu gate evidence phải
|
|
438
|
-
fail closed thay vì suy đoán từ state cũ; evidence cùng runtime không được
|
|
439
|
-
gọi là independent audit. Tắt từng lớp bằng `PIAGENT_SOLVER_MODE=off`,
|
|
430
|
+
`/piagent-status` đọc state đã lưu (profile, guard, runtime, model), không hỏi
|
|
431
|
+
model nhớ lại. Từ bản 1.9.0 session không còn Task Contract, checkpoint hay
|
|
432
|
+
completion receipt; bản ghi task của các bản trước chỉ còn để xem lịch sử. Tắt từng lớp bằng `PIAGENT_SOLVER_MODE=off`,
|
|
440
433
|
`PIAGENT_PHASE_TOOLS=off`, `PIAGENT_AUTO_RECOVERY=off`, hoặc
|
|
441
434
|
`PIAGENT_HELPERS_MODE=off`. Hai lớp semantic có kill switch độc lập:
|
|
442
435
|
`PIAGENT_ACCEPTANCE_ASSURANCE=off` tắt assurance và semantic repair phụ thuộc,
|
|
@@ -447,12 +440,11 @@ giữ để có thể tạo attempt mới có provenance rõ ràng.
|
|
|
447
440
|
`/piagent-inspector` là một namespace read-only, không sinh thêm command rời.
|
|
448
441
|
Gõ không tham số để chọn `summary`, `files`, `commands`, `security`, `context`
|
|
449
442
|
hoặc `toggle`. Panel bốn dòng tự hiện sát phía trên footer native từ lúc mở session:
|
|
450
|
-
|
|
443
|
+
việc hiện tại; file/test đã đổi, `+/-`, command pass/fail/block, safety và
|
|
451
444
|
context budget. Nó dùng extension-status API nên không thay footer native của
|
|
452
|
-
Pi và không thêm bước bắt buộc
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
chỉ cung cấp usage exact theo response/turn.
|
|
445
|
+
Pi và không thêm bước bắt buộc nào. Dòng status dùng working-tree status; token
|
|
446
|
+
theo từng built-in tool luôn unavailable vì Pi chỉ cung cấp usage exact theo
|
|
447
|
+
response/turn.
|
|
456
448
|
|
|
457
449
|
Known unsupported/unpromoted surfaces của candidate hiện tại: parent routing
|
|
458
450
|
đã có `off|shadow|recommend|auto`, nhưng extension `auto` fail-closed về
|
|
@@ -478,59 +470,42 @@ piagent-route --prompt-file /path/to/task.txt --execute --yes -- --approve
|
|
|
478
470
|
Lệnh này dùng authenticated `pi --list-models`, không đọc credential store,
|
|
479
471
|
không ghi raw task vào route sidecar, giữ hard pin, và từ chối task bị blocked.
|
|
480
472
|
|
|
481
|
-
## 5. Control flow của một
|
|
473
|
+
## 5. Control flow của một lượt sửa code
|
|
482
474
|
|
|
483
|
-
|
|
475
|
+
Từ bản 1.9.0 một yêu cầu sửa code đi qua:
|
|
484
476
|
|
|
485
477
|
```text
|
|
486
|
-
|
|
487
|
-
->
|
|
488
|
-
->
|
|
489
|
-
->
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
->
|
|
493
|
-
->
|
|
494
|
-
-> completion hook: trace + final gate
|
|
495
|
-
-> immutable outcome / retry handoff
|
|
478
|
+
yêu cầu bằng lời thường
|
|
479
|
+
-> profile/context của project
|
|
480
|
+
-> agent đọc file đích và test gần nhất
|
|
481
|
+
-> sửa bằng read/edit/write/apply_patch/bash
|
|
482
|
+
(guard kiểm tra từng tool call: protected path, read-only path, quyền,
|
|
483
|
+
context budget, edit trên bản đọc cũ, xác nhận destructive/external)
|
|
484
|
+
-> chạy lệnh check của project
|
|
485
|
+
-> báo file đã đổi, kết quả verify, rủi ro còn lại
|
|
496
486
|
```
|
|
497
487
|
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
operator/diagnostics/recovery, không phải checklist phải gọi mỗi task.
|
|
488
|
+
Không còn task contract, scope khai báo, work plan, completion gate hay receipt.
|
|
489
|
+
Trong khung công ty (`piagent studio`), các bước plan/check/review mỗi lượt do
|
|
490
|
+
Harness của team trong Studio quy định; xem [nghiệm thu local](managed-local-acceptance.md).
|
|
502
491
|
|
|
503
|
-
Các Piagent tools:
|
|
492
|
+
Các Piagent tools còn lại là bề mặt operator/diagnostics, không phải checklist phải gọi mỗi lượt:
|
|
504
493
|
|
|
505
494
|
| Tool | Vai trò |
|
|
506
495
|
|---|---|
|
|
507
496
|
| `piagent_context` | Đọc active profile, required context, verify commands, MCP/memory settings. |
|
|
508
497
|
| `piagent_context_index_status/search/record` | Kiểm tra/tìm/ghi context index advisory có citation. |
|
|
509
|
-
| `piagent_task_start` | Fallback intake cho task rộng/high-risk/mơ hồ; scope chỉ nhận project-relative path/glob. |
|
|
510
|
-
| `piagent_task_progress` | Chuyển step trong work plan và ghi failure/ruled-out evidence. |
|
|
511
|
-
| `piagent_context_record` | Recovery: bổ sung context manifest khi observer không đủ. |
|
|
512
498
|
| `piagent_exec_policy_check` | Diagnostics: giải thích shell-policy verdict; runtime vẫn check mọi call. |
|
|
513
499
|
| `piagent_context_budget` | Diagnostics: xem budget của file/context lớn. |
|
|
514
500
|
| `piagent_tool_policy_check` | Diagnostics: xem capability verdict của tool/MCP. |
|
|
515
|
-
| `
|
|
516
|
-
| `
|
|
517
|
-
| `
|
|
501
|
+
| `piagent_document_read` | Đọc tài liệu ngoài project trong `additionalReadRoots` (chỉ đọc). |
|
|
502
|
+
| `piagent_source_checkout` | Chuẩn bị repo ngoài để đọc (read-only cho session). |
|
|
503
|
+
| `piagent_project_onboarding_record` | Ghi `.pi/project-context.md` sau khi agent đọc project. |
|
|
518
504
|
| `piagent_usage_snapshot` | Snapshot session/model/context. |
|
|
519
505
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
- có context manifest;
|
|
524
|
-
- mọi verify command đã chạy thật và khớp `task.verifyCommands`;
|
|
525
|
-
- changed files khác baseline, có evidence và nằm trong scope;
|
|
526
|
-
- work plan không còn step pending/in-progress/failed;
|
|
527
|
-
- trace outcome rõ;
|
|
528
|
-
- final gate pass hoặc ghi rõ blocked/partial.
|
|
529
|
-
|
|
530
|
-
Source task yêu cầu Git working tree và meaningful verifier ngay từ lúc start.
|
|
531
|
-
Một session chỉ dùng cho một task. Retry mở session mới với cùng `taskId`; runtime
|
|
532
|
-
giữ previous attempt evidence và từ chối vượt `maxAttempts`. Contract đã terminal
|
|
533
|
-
không thể sửa thêm context/verify/trace để viết lại lịch sử.
|
|
506
|
+
Các tool `piagent_task_start`, `piagent_task_progress`, `piagent_context_record`,
|
|
507
|
+
`piagent_verify_record`, `piagent_trace_record` và `piagent_task_gate_check` đã bỏ
|
|
508
|
+
từ bản 1.9.0.
|
|
534
509
|
|
|
535
510
|
## 6. Guardrails cần hiểu
|
|
536
511
|
|
|
@@ -798,10 +773,9 @@ pi --continue
|
|
|
798
773
|
|
|
799
774
|
Nếu `--continue` không đúng phiên cần làm, mở selector bằng `pi --resume`, chọn theo session name đã đặt. Khi resume đúng session cũ, tên session vẫn là tên đã set; nếu cần chỉnh lại cho khớp task nội bộ thì chạy `/name <new name>` ngay trước khi làm tiếp.
|
|
800
775
|
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
mới
|
|
804
|
-
session mới để usage/prompt/change evidence không bị trộn.
|
|
776
|
+
Agent Watch/report map session bằng `sessionId` và Pi custom trace, không dựa
|
|
777
|
+
riêng vào tên; đổi tên bằng `/name` sẽ được ghi nhận. Nên mở session mới cho việc
|
|
778
|
+
mới để usage/prompt/change evidence không bị trộn.
|
|
805
779
|
|
|
806
780
|
### Khi nào nên resume, continue, fork
|
|
807
781
|
|
|
@@ -944,7 +918,7 @@ Default safe config:
|
|
|
944
918
|
|
|
945
919
|
### Auto-delegation
|
|
946
920
|
|
|
947
|
-
Với
|
|
921
|
+
Với mọi yêu cầu (implement, plan, review…), parent agent tự suy luận và implement. Helper mặc định tắt. Khi operator bật rõ, runtime được dispatch tối đa hai helper read-only, context fresh (không inherit history, handoff tối đa 2.048 token). Ước tính tiết kiệm token chỉ là telemetry. Worker, retry và nested helper đều tắt.
|
|
948
922
|
|
|
949
923
|
Kiểm tra nhanh policy:
|
|
950
924
|
|
|
@@ -957,9 +931,10 @@ Không cần tự gọi `/run` cho task bình thường. Chỉ dùng `/run` khi
|
|
|
957
931
|
Helper chỉ đủ điều kiện khi đồng thời:
|
|
958
932
|
|
|
959
933
|
- operator đã opt-in;
|
|
960
|
-
-
|
|
961
|
-
- context chuyển giao fresh, tối đa 2.048 token và không inherit history
|
|
962
|
-
|
|
934
|
+
- tổng số helper của phiên chưa quá 2 và helper chỉ đọc;
|
|
935
|
+
- context chuyển giao fresh, tối đa 2.048 token và không inherit history.
|
|
936
|
+
|
|
937
|
+
Dự báo tiết kiệm token vẫn được ghi để theo dõi nhưng không còn là điều kiện (bounded-delegation-v2).
|
|
963
938
|
|
|
964
939
|
Không nên spawn khi:
|
|
965
940
|
|
|
@@ -1024,8 +999,8 @@ Watchdog là optional adversarial reviewer ở cuối turn, không bật mặc
|
|
|
1024
999
|
|
|
1025
1000
|
| Command | Dùng để |
|
|
1026
1001
|
|---|---|
|
|
1027
|
-
| `npm install -g --ignore-scripts @piagent/platform@1.
|
|
1028
|
-
| `pi install git:github.com/Vt-mmm/piagent@v1.
|
|
1002
|
+
| `npm install -g --ignore-scripts @piagent/platform@1.9.0` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
|
|
1003
|
+
| `pi install git:github.com/Vt-mmm/piagent@v1.9.0` | Install pinned release cho reproducible team setup. |
|
|
1029
1004
|
| `pi install git:github.com/Vt-mmm/piagent` | Install latest platform package cho máy cá nhân/sandbox. |
|
|
1030
1005
|
| Cài exact Pi host của release, rồi `npm install -g --ignore-scripts @piagent/platform@X.Y.Z` và `piagent-install --stable` | Full update: đồng bộ host, terminal helper và Pi package. Mỗi release pin một Pi host chính xác; lấy đúng version của release đang cài trong [release/install policy](release-install-policy.md). |
|
|
1031
1006
|
| Cài exact Pi host ghi trong release cũ, rồi helper `vPREVIOUS` và `piagent-install --stable` | Full rollback; đánh giá lại dependency findings của host cũ trước khi hạ version. |
|
|
@@ -1072,17 +1047,13 @@ Watchdog là optional adversarial reviewer ở cuối turn, không bật mặc
|
|
|
1072
1047
|
| `/model` / `Ctrl+L` | Chọn model. |
|
|
1073
1048
|
| `Ctrl+P` | Cycle scoped models. |
|
|
1074
1049
|
| `Shift+Tab` | Cycle thinking level. |
|
|
1075
|
-
| `/
|
|
1076
|
-
| `/piagent-inspector` | Menu read-only cho task diff/file test/line, command, safety và context; `toggle` ẩn/hiện panel bốn dòng trong session. |
|
|
1077
|
-
| `/workflow` | Menu task/scout/review/git/onboard workflow. |
|
|
1050
|
+
| `/piagent-inspector` | Menu read-only cho diff/file test/line, command, safety và context; `toggle` ẩn/hiện panel bốn dòng trong session. |
|
|
1078
1051
|
| `/permission` | Menu permission status/read-only/workspace-write/full-access. |
|
|
1079
1052
|
| `/permission status` | Xem permission profile hiện tại. |
|
|
1080
1053
|
| `/permission read-only` | Chuyển session sang read-only. |
|
|
1081
1054
|
| `/permission workspace-write` | Chuyển session sang write chuẩn. |
|
|
1082
1055
|
| `/permission full-access` | Bật trusted full-access cho session hiện tại. |
|
|
1083
1056
|
| `/permission full-access <task>` | Bật trusted full-access rồi gửi `<task>` cho agent làm tiếp. |
|
|
1084
|
-
| `/onboard` | Menu/status onboarding runtime. |
|
|
1085
|
-
| `/onboard run` | Onboard/read project lần đầu. |
|
|
1086
1057
|
| `/context` | Menu context index/search/preflight/compact. |
|
|
1087
1058
|
| `/context index` | Xem compact context index, không gọi model follow-up. |
|
|
1088
1059
|
| `/context search <keyword>` | Tìm node/edge/citation trong context index. |
|
|
@@ -1100,25 +1071,13 @@ Watchdog là optional adversarial reviewer ở cuối turn, không bật mặc
|
|
|
1100
1071
|
| `/usage` | Snapshot context/session. |
|
|
1101
1072
|
| `/usage logs` | Xem capture output dài đã compact. |
|
|
1102
1073
|
| `/name` | Đặt/đổi tên session theo task để report dễ map. |
|
|
1103
|
-
| `/
|
|
1074
|
+
| `/new` | Pi native: mở session mới khi phiên hiện tại nặng. |
|
|
1104
1075
|
| `/name <name>` | Đổi tên session cho resume/report. |
|
|
1105
1076
|
| `/session` | Pi native session stats/info. |
|
|
1106
1077
|
| `/mcp` / `/mcp tools` | Check MCP. |
|
|
1107
1078
|
| `/subagents-doctor` | Check subagent setup. |
|
|
1108
1079
|
| `/subagents-fleet` | Follow child sessions. |
|
|
1109
1080
|
| `/subagent-cost` | Check subagent token/cost. |
|
|
1110
|
-
| `/workflow discuss <request>` | Làm rõ, không sửa. |
|
|
1111
|
-
| `/workflow plan <goal>` | Lập plan. |
|
|
1112
|
-
| `/workflow scout <request>` | Scout/audit read-only. |
|
|
1113
|
-
| `/fresh scout <request>` | Tự mở session mới rồi chạy scout workflow. |
|
|
1114
|
-
| `/fresh task <request>` | Tự mở session mới rồi chạy task workflow. |
|
|
1115
|
-
| `/fresh be-to-fe <request>` | Tự mở session mới rồi chạy BE-to-FE workflow. |
|
|
1116
|
-
| `/workflow task <request>` | Implement task. |
|
|
1117
|
-
| `/workflow be-to-fe <request>` | BE read-only, FE implementation. |
|
|
1118
|
-
| `/workflow platform-improve <request>` | Cải tiến platform. |
|
|
1119
|
-
| `/workflow review [scope]` | Review diff/source. |
|
|
1120
|
-
| `/workflow commit [message/scope]` | Commit local qua workflow có guard. |
|
|
1121
|
-
| `/workflow pr [title/request]` | Chuẩn bị PR, hỏi trước khi push/GitHub write. |
|
|
1122
1081
|
|
|
1123
1082
|
## 12. Troubleshooting
|
|
1124
1083
|
|
|
@@ -1137,7 +1096,7 @@ Mở lại Pi session sau khi install.
|
|
|
1137
1096
|
Cài lại terminal helper đúng release rồi kiểm tra `PATH`:
|
|
1138
1097
|
|
|
1139
1098
|
```bash
|
|
1140
|
-
npm install -g --ignore-scripts @piagent/platform@1.
|
|
1099
|
+
npm install -g --ignore-scripts @piagent/platform@1.9.0
|
|
1141
1100
|
command -v piagent-install
|
|
1142
1101
|
```
|
|
1143
1102
|
|
|
@@ -1222,21 +1181,17 @@ pi --session <session-id>
|
|
|
1222
1181
|
pi --session /absolute/path/to/session.jsonl
|
|
1223
1182
|
```
|
|
1224
1183
|
|
|
1225
|
-
###
|
|
1226
|
-
|
|
1227
|
-
Nguyên nhân thường gặp:
|
|
1184
|
+
### Lệnh/tool bị chặn
|
|
1228
1185
|
|
|
1229
|
-
|
|
1230
|
-
- command string không exact-match `task.verifyCommands`;
|
|
1231
|
-
- verify chạy trước `task.createdAt`;
|
|
1232
|
-
- verify chạy ở cwd khác;
|
|
1233
|
-
- subagent chạy nhưng parent chưa thấy persisted ledger đúng cwd.
|
|
1186
|
+
Guard luôn ghi lý do khi chặn. Nguyên nhân thường gặp:
|
|
1234
1187
|
|
|
1235
|
-
|
|
1188
|
+
- đụng protected path (`.env`, `auth.json`, `.pi/piagent-state/**`…) hoặc read-only path của profile;
|
|
1189
|
+
- permission `read-only` (chặn ghi và shell) — đổi bằng `/permission`;
|
|
1190
|
+
- file quá lớn so với context budget;
|
|
1191
|
+
- file đã đổi từ lần đọc trước (`previously observed source snapshot is stale`) — đọc lại file một lần rồi sửa;
|
|
1192
|
+
- lệnh destructive/external cần xác nhận mà người vận hành chưa đồng ý.
|
|
1236
1193
|
|
|
1237
|
-
|
|
1238
|
-
Run the exact verify command from task.verifyCommands in the project cwd, then record verify evidence again.
|
|
1239
|
-
```
|
|
1194
|
+
Xem chi tiết bằng `/piagent-inspector security`, hoặc giải thích một lệnh shell trước khi chạy bằng `piagent-explain "<lệnh>"` từ terminal.
|
|
1240
1195
|
|
|
1241
1196
|
## 13. Không commit
|
|
1242
1197
|
|
|
@@ -92,13 +92,13 @@ Manifest data never executes code. Invalid paths, symbolic links, dependency cyc
|
|
|
92
92
|
|
|
93
93
|
| Capability | Implementation |
|
|
94
94
|
|---|---|
|
|
95
|
-
| Project onboarding |
|
|
95
|
+
| Project onboarding | plain request + `piagent_project_onboarding_record` |
|
|
96
96
|
| Project context index | `/context` + `piagent_context_index_*` |
|
|
97
97
|
| Profile switching | `/profile` + `piagent_profile_options` / `piagent_profile_apply` |
|
|
98
98
|
| Explicit memory | `/memory` + `piagent_memory_*` |
|
|
99
|
-
| Task lifecycle |
|
|
100
|
-
| Platform workflow |
|
|
101
|
-
| Backend-readonly to frontend | `/
|
|
99
|
+
| Task lifecycle | retired in 1.9.0; turns are freeform |
|
|
100
|
+
| Platform workflow | plain request |
|
|
101
|
+
| Backend-readonly to frontend | `/profile be-readonly-fe` + plain request |
|
|
102
102
|
| Source cache | `piagent-source-cache` + `piagent_source_checkout` |
|
|
103
103
|
| Subagent roles | `piagent-scout`, `piagent-planner`, `piagent-worker`, `piagent-reviewer`, `piagent-oracle` |
|
|
104
104
|
| Quality benchmark | `scripts/benchmark-runner.mjs` + `benchmark/benchmark-core.js`; legacy recorder: `scripts/quality-benchmark.sh` |
|