pi-agent-ide 0.7.2 → 0.7.3
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 +29 -0
- package/README.md +3 -1
- package/dist/{chunk-KOVPDKSJ.js → chunk-2ZMMRINH.js} +1 -1
- package/dist/{chunk-EURHXLN3.js → chunk-BYZSBXUK.js} +1 -1
- package/dist/{chunk-XDG7EQRN.js → chunk-CEX73RI5.js} +1 -1
- package/dist/{chunk-YWQS33DF.js → chunk-DZWTKF2K.js} +1 -1
- package/dist/{chunk-F6IWZKOG.js → chunk-EOKEQ3YH.js} +1 -1
- package/dist/{chunk-SJ4UZ4GU.js → chunk-HZ5BNF3A.js} +1 -1
- package/dist/{chunk-TQGE7RH6.js → chunk-NHKPP2AI.js} +2 -2
- package/dist/{chunk-SNF7PDDX.js → chunk-TXOTNK6B.js} +1 -1
- package/dist/chunk-WLZIUMJL.js +1 -0
- package/dist/entry-11.js +1 -1
- package/dist/entry-17.js +1 -1
- package/dist/entry-25.js +1 -1
- package/dist/entry-31.js +12 -12
- package/dist/entry-33.js +3 -2
- package/dist/entry-37.js +6 -6
- package/dist/entry-51.js +1 -1
- package/dist/entry-56.js +1 -1
- package/dist/entry-58.js +1 -1
- package/dist/entry-60.js +1 -1
- package/dist/entry-62.js +1 -1
- package/dist/entry-65.js +1 -1
- package/dist/entry-68.js +1 -1
- package/dist/entry-70.js +1 -1
- package/dist/entry-75.js +1 -1
- package/dist/entry-77.js +56 -51
- package/dist/entry-78.js +8 -7
- package/dist/entry-79.js +1 -1
- package/dist/pi-agent-ide.js +20 -20
- package/docs/agent-guides/editing.md +9 -2
- package/docs/configuration.md +21 -0
- package/docs/development.md +4 -0
- package/docs/directory-operations.md +45 -0
- package/docs/releases.md +8 -0
- package/docs/research/codemode-write-context.md +56 -0
- package/docs/user-hooks.md +26 -0
- package/node_modules/pi-agent-doctor/package.json +1 -1
- package/node_modules/pi-agent-documentation/package.json +1 -1
- package/node_modules/pi-agent-filesystem/package.json +7 -7
- package/node_modules/pi-agent-filesystem-image/package.json +3 -3
- package/node_modules/pi-agent-filesystem-jq/package.json +5 -5
- package/node_modules/pi-agent-filesystem-pdf/package.json +3 -3
- package/node_modules/pi-agent-filesystem-text/package.json +3 -3
- package/node_modules/pi-agent-ide-ast/package.json +13 -13
- package/node_modules/pi-agent-ide-ast/src/extension.ts +3 -1
- package/node_modules/pi-agent-ide-ast/src/overflow-handler.ts +7 -2
- package/node_modules/pi-agent-ide-changes/package.json +9 -8
- package/node_modules/pi-agent-ide-changes/src/tool-index-change.ts +16 -0
- package/node_modules/pi-agent-ide-formatter/package.json +3 -3
- package/node_modules/pi-agent-ide-languages/package.json +2 -2
- package/node_modules/pi-agent-ide-lint/package.json +7 -7
- package/node_modules/pi-agent-ide-lsp/index.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/package.json +9 -9
- package/node_modules/pi-agent-ide-lsp/src/declaration-targets.ts +2 -1
- package/node_modules/pi-agent-image/package.json +2 -2
- package/node_modules/pi-agent-invariant/package.json +1 -1
- package/node_modules/pi-agent-pdf/package.json +2 -2
- package/node_modules/pi-agent-read/package.json +7 -7
- package/node_modules/pi-agent-resource/package.json +1 -1
- package/node_modules/pi-agent-search/package.json +5 -5
- package/node_modules/pi-agent-search-text/package.json +7 -7
- package/node_modules/pi-agent-text/package.json +2 -2
- package/node_modules/pi-agent-text-anchor-constant/package.json +3 -3
- package/node_modules/pi-agent-text-anchor-exact/package.json +3 -3
- package/node_modules/pi-agent-text-anchor-line-hash/package.json +5 -5
- package/node_modules/pi-agent-text-editor/package.json +9 -9
- package/node_modules/pi-agent-text-editor/src/api/delete-guard.ts +24 -0
- package/node_modules/pi-agent-text-editor/src/api/mutation-guard.ts +1 -0
- package/node_modules/pi-agent-text-editor/src/api/plugin-protocol.ts +4 -1
- package/node_modules/pi-agent-text-editor/src/core/delete-policy.ts +284 -0
- package/node_modules/pi-agent-text-editor/src/core/file-operation-tools.ts +32 -3
- package/node_modules/pi-agent-text-editor/src/core/file-operations.ts +30 -40
- package/node_modules/pi-agent-text-editor/src/core/file-result-targets.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/file-transfers.ts +164 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +1 -6
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +7 -1
- package/node_modules/pi-agent-text-editor/src/core/native-text-edit-batch.ts +55 -12
- package/node_modules/pi-agent-text-editor/src/core/result-transfer.ts +39 -9
- package/node_modules/pi-agent-text-editor/src/core/structured-result.ts +7 -1
- package/node_modules/pi-agent-text-editor/src/core/temporary-directories.ts +96 -0
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +3 -0
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +51 -1
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +53 -8
- package/node_modules/pi-agent-text-editor/src/core/write-agent-result.ts +66 -0
- package/node_modules/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +6 -4
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +6 -4
- package/node_modules/pi-agent-text-editor-renderer/package.json +5 -5
- package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +33 -18
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +4 -4
- package/node_modules/pi-agent-tool-call-interception/package.json +2 -2
- package/node_modules/pi-agent-tool-ui/package.json +1 -1
- package/node_modules/pi-agent-web/package.json +7 -7
- package/node_modules/pi-agent-web-html/package.json +2 -2
- package/node_modules/pi-agent-web-image/package.json +3 -3
- package/node_modules/pi-agent-web-pdf/package.json +3 -3
- package/node_modules/pi-agent-web-text/package.json +3 -3
- package/package.json +36 -35
- package/src/api/hooks.ts +24 -0
- package/src/composite/nested-tool-rendering.ts +120 -71
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +7 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/package.json +5 -5
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +7 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +2 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +3 -3
- package/src/extensions/pi-agent-read/package.json +7 -7
- package/src/extensions/pi-agent-search/package.json +5 -5
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +7 -7
- package/src/extensions/pi-agent-text-editor/package.json +9 -9
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +3 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +3 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +33 -18
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +4 -4
- package/src/extensions/pi-agent-text-editor/src/api/delete-guard.ts +24 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-guard.ts +1 -0
- package/src/extensions/pi-agent-text-editor/src/api/plugin-protocol.ts +4 -1
- package/src/extensions/pi-agent-text-editor/src/core/delete-policy.ts +284 -0
- package/src/extensions/pi-agent-text-editor/src/core/file-operation-tools.ts +32 -3
- package/src/extensions/pi-agent-text-editor/src/core/file-operations.ts +30 -40
- package/src/extensions/pi-agent-text-editor/src/core/file-result-targets.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/file-transfers.ts +164 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +1 -6
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +7 -1
- package/src/extensions/pi-agent-text-editor/src/core/native-text-edit-batch.ts +55 -12
- package/src/extensions/pi-agent-text-editor/src/core/result-transfer.ts +39 -9
- package/src/extensions/pi-agent-text-editor/src/core/structured-result.ts +7 -1
- package/src/extensions/pi-agent-text-editor/src/core/temporary-directories.ts +96 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +3 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +51 -1
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +53 -8
- package/src/extensions/pi-agent-text-editor/src/core/write-agent-result.ts +66 -0
- package/src/extensions/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +6 -4
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +6 -4
- package/src/plugins/pi-agent-ide-ast/package.json +13 -13
- package/src/plugins/pi-agent-ide-ast/src/extension.ts +3 -1
- package/src/plugins/pi-agent-ide-ast/src/overflow-handler.ts +7 -2
- package/src/plugins/pi-agent-ide-changes/package.json +9 -8
- package/src/plugins/pi-agent-ide-changes/src/tool-index-change.ts +16 -0
- package/src/plugins/pi-agent-ide-debugger/index.ts +3 -1
- package/src/plugins/pi-agent-ide-formatter/package.json +3 -3
- package/src/plugins/pi-agent-ide-languages/package.json +2 -2
- package/src/plugins/pi-agent-ide-lint/package.json +7 -7
- package/src/plugins/pi-agent-ide-lsp/index.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/package.json +9 -9
- package/src/plugins/pi-agent-ide-lsp/src/declaration-targets.ts +2 -1
- package/dist/chunk-PKSQT6TC.js +0 -1
package/docs/configuration.md
CHANGED
|
@@ -229,6 +229,27 @@ No tip appears when built-in mappings already cover the project. Empty projects,
|
|
|
229
229
|
|
|
230
230
|
Each actionable state has its own stable fingerprint. The same state is shown once per project, while a materially different later problem can produce a new tip. Like other startup tips, it never enters model context. See [Startup tip provider](./extensions.md#startup-tip-provider) for the provider contract and persistence behavior.
|
|
231
231
|
|
|
232
|
+
### Temporary-directory deletion
|
|
233
|
+
|
|
234
|
+
Delete skips the external/non-Git confirmation for descendants of temporary roots. Defaults are `tmp`, `.tmp`, `temp`, and `.temp` under the current Git worktree root (or cwd without Git) and your home directory, plus the system temporary directory. The system root follows the OS environment, such as `TMPDIR` on Linux or `TEMP`/`TMP` on Windows.
|
|
235
|
+
|
|
236
|
+
Configure this in `<agent-dir>/pi-agent-ide/deletion.json` globally, or `<project>/.pi/pi-agent-ide/deletion.json` for one project. `<agent-dir>` defaults to `~/.pi/agent` and follows `PI_CODING_AGENT_DIR`.
|
|
237
|
+
|
|
238
|
+
```json
|
|
239
|
+
{
|
|
240
|
+
"temporaryDirectories": {
|
|
241
|
+
"mode": "extend",
|
|
242
|
+
"paths": ["scratch", "~/build-scratch"]
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
`extend` adds to the lower layer; `replace` replaces it. Layers apply in this order: defaults, global, project. A project replacement overrides both defaults and global settings. Use `{"temporaryDirectories":{"mode":"replace","paths":[]}}` to disable the exception.
|
|
248
|
+
|
|
249
|
+
Relative global paths start at your home directory; relative project paths start at the worktree root, or cwd without Git. Absolute paths and a leading `~/` are supported. Globs and other shell expansion are not supported. Custom roots resolve symlinks; named defaults do not grant access to a redirected root's destination. Missing roots are skipped. Settings are read for each deletion and checked again before removal. Invalid settings block directory/symlink deletion rather than falling back.
|
|
250
|
+
|
|
251
|
+
The exception does not apply to the temporary roots themselves, tracked/staged contents, failed Git checks inside the current project, or protected project/Git/filesystem paths. Parent links must resolve inside an allowed root. Unlinking the final symlink leaves its destination alone. Hooks still apply. Copy and Move keep their existing safeguards, and regular-file deletion is unchanged.
|
|
252
|
+
|
|
232
253
|
### Exact text recovery
|
|
233
254
|
|
|
234
255
|
Exact text anchors work without configuration. Optional recovery settings live in `.pi/pi-agent-ide/text-editor.json`:
|
package/docs/development.md
CHANGED
|
@@ -63,6 +63,10 @@ CI uses the same four shards without changing test or job timeouts. Set `REPORT_
|
|
|
63
63
|
|
|
64
64
|
`--no-extensions` also disables Pi's native built-ins. Native fixtures explicitly load `builtin:codemode`, `builtin:tool-search`, and `builtin:mcp`; ordinary fixtures do not. `native-host.integration.test.ts` checks the version inside the launched process, deferred discovery, nested execution, and isolation from personal MCP servers.
|
|
65
65
|
|
|
66
|
+
### Paid model capability checks
|
|
67
|
+
|
|
68
|
+
Tool changes also require reviewing the matrix and supported tool chains in `benchmarks/tool-capabilities/README.md` in the checkout. Run `pnpm check:capabilities` for its free schema/coverage gate; it is included in `pnpm check`. The real-model suite uses `pnpm validate:tools:models --run --model PROFILE_ID` only with explicit paid permission. It runs isolated cases and checks both outcomes and actual routes. It is not part of ordinary tests or CI.
|
|
69
|
+
|
|
66
70
|
### Watch integration tests live
|
|
67
71
|
|
|
68
72
|
Use the project command to watch every test in one file:
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Directory and symlink operations
|
|
2
|
+
|
|
3
|
+
Delete, Copy, and Move accept ordinary filesystem paths without text selectors. The same implementation runs for standalone calls and calls nested in native Codemode. Read results, directory listings, and other registered selections do not become whole-directory authority.
|
|
4
|
+
|
|
5
|
+
## Capability table
|
|
6
|
+
|
|
7
|
+
| Operation | Directory behavior | Symlink behavior | Guards and failure effects |
|
|
8
|
+
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
9
|
+
| Delete | Remove the directory and all contents recursively. | Unlink only the link, including a broken link. Never follow links inside a removed tree. | Existing before-delete hooks, protected paths, and host approval policy apply. Refusal is `not-applied`; a filesystem failure after removal starts is `unknown`. |
|
|
10
|
+
| Copy | Copy into the exact target path. Create missing parents. Merge into an existing directory, overwrite matching regular files, and keep destination-only entries. | Copy link text without following the target, including standalone and broken links. | Preflight the source tree and matching destination entries. Refuse aliases, overlapping trees, symlink destinations, unsupported object types, and type conflicts before writes. Protect project roots, ancestors, and current Git control data from recursive overwrites. After-start failure is `unknown`. |
|
|
11
|
+
| Move | Move into the exact target path. Create missing parents. Replace an existing directory, removing its old destination-only entries. | Move the link object without following its target, including standalone and broken links. | Apply Copy's top-level transfer checks and Delete's safety policy to directory/link source removal and existing destination removal. Recheck both approved objects before execution. After-start failure is `unknown`. |
|
|
12
|
+
|
|
13
|
+
A target names the resulting object, not a containing directory with an implicit source-name child. For example, Copy from `source` to `new/target` produces `new/target/nested`, not `new/target/source/nested`.
|
|
14
|
+
|
|
15
|
+
Symlink text is preserved exactly. A relative link can point somewhere different after relocation. Existing symlink destinations are rejected, even if their referents match. Copy also rejects a conflicting link at any matching destination entry. Destination-only links are left alone by Copy; replacing a Move destination removes the links, not their referents. File/directory/link type conflicts are refused rather than converted.
|
|
16
|
+
|
|
17
|
+
Only regular files, directories, and symlink objects are supported within source trees. Recursive transfers preserve file bytes and empty directories; they do not promise preserved timestamps, ownership, or hard-link relationships. Directory and link targets are not post-processed as text and have no reusable text selection. Inspect their ordinary paths with Read.
|
|
18
|
+
|
|
19
|
+
## Move safety policy
|
|
20
|
+
|
|
21
|
+
For directory and symlink Move sources, and existing directory destinations, the same before-delete hook runs before any removal or dialog. Denial or a thrown hook error blocks the transfer. Tracked or newly staged entries, external targets, missing Git worktrees, and failed Git checks require host approval. No available dialog means no transfer. Untracked internal targets need no dialog. There is no agent approval argument.
|
|
22
|
+
|
|
23
|
+
Protected project roots, ancestors, filesystem roots, and current Git control paths cannot be moved or recursively overwritten. Parent symlinks are resolved for identity, containment, and project-boundary checks; the final link object is not dereferenced. The project boundary is the Git worktree containing Pi's cwd. Without Git, cwd and its ancestors remain protected.
|
|
24
|
+
|
|
25
|
+
Move obtains all required approvals and rechecks each object afterwards. Changes to identity, Git classification, source-tree entries, or matching destination entries during preflight prevent dispatch. These checks are not an atomic filesystem lock against other processes. Ordinary-file overwrite behavior and selected-text editing remain unchanged.
|
|
26
|
+
|
|
27
|
+
For hook setup and the existing Delete policy, see [File hooks](user-hooks.md).
|
|
28
|
+
|
|
29
|
+
## Cross-device moves, cancellation, and partial failure
|
|
30
|
+
|
|
31
|
+
Move first attempts a filesystem rename. On a cross-device error, the filesystem library copies the object and then removes the source. The copy and removal phases can fail separately. Replacement may already have removed destination contents when a later phase fails.
|
|
32
|
+
|
|
33
|
+
Cancellation before filesystem execution prevents the transfer. The recursive filesystem primitives are not interruptible through the tool's abort signal once dispatched; in-flight work may finish. A failed filesystem call after dispatch reports `unknown`, even when the precise effects cannot be established.
|
|
34
|
+
|
|
35
|
+
There is no recursive undo or atomic rollback. After an unknown result, inspect both source and target before deciding whether to retry. Earlier successful operations in the same Codemode script are not rolled back when a later operation fails.
|
|
36
|
+
|
|
37
|
+
## Executable checks
|
|
38
|
+
|
|
39
|
+
- [Transfer unit tests](https://github.com/alexshpunt/pi-agent-ide/blob/develop/src/extensions/pi-agent-text-editor/tests/core/directory-transfers.test.ts): binary bytes, empty directories, link text, merge/replace behavior, aliases, nested destinations, conflicts, hooks/approvals, changed objects, cancellation, real Linux cross-device moves, and controlled partial failures.
|
|
40
|
+
- [Delete policy unit tests](https://github.com/alexshpunt/pi-agent-ide/blob/develop/src/extensions/pi-agent-text-editor/tests/core/delete-policy.test.ts): deletion guards and uncertain recursive effects.
|
|
41
|
+
- [Real-Pi transfer cases](https://github.com/alexshpunt/pi-agent-ide/blob/develop/tests/integration/directory-transfers.integration.test.ts): direct and native Codemode transfers, preserved source/sentinel bytes, host approval, and refusal paths.
|
|
42
|
+
- [Real-Pi Delete cases](https://github.com/alexshpunt/pi-agent-ide/blob/develop/tests/integration/delete-objects.integration.test.ts): both call routes and fail-closed host guards.
|
|
43
|
+
- [Paid capability matrix](https://github.com/alexshpunt/pi-agent-ide/blob/develop/benchmarks/tool-capabilities/README.md): executable `directory-transfers` and `directory-transfer-gates` cases have direct and Codemode routes. They are not model-verified until explicitly run with paid permission. Free coverage checks do not prove model execution.
|
|
44
|
+
|
|
45
|
+
These contracts are checked on Linux/WSL. The cross-device test uses `/dev/shm` and runs only on Linux. Other operating systems are not verified by that test.
|
package/docs/releases.md
CHANGED
|
@@ -18,6 +18,14 @@ See [Develop nightly](nightly.md). Nightlies test a pinned `develop` commit and
|
|
|
18
18
|
|
|
19
19
|
Real debugger integration tests and adapter/platform jobs still run, but their results are non-blocking and kept outside the shared CI test totals and badges. They have separate jobs and reports marked flaky. A failed debugger job does not reject a release candidate. Pure debugger unit tests, other source/runtime checks, and editor tests remain blocking. In particular, Delete is not part of this exception.
|
|
20
20
|
|
|
21
|
+
## Reuse full CI evidence
|
|
22
|
+
|
|
23
|
+
A release has two full test gates: the pinned promotion PR and the versioned candidate PR. Every other PR and every nightly also runs fully. A later push to `main` or `develop` can reuse a successful full CI run only when its exact Git tree, CI workflow, Node/npm/pnpm pins, and Linux/Windows runner image identities match.
|
|
24
|
+
|
|
25
|
+
CI checks the source run and attempt through GitHub, including the actual tested commit and both successful core jobs. Their results must be no older than 24 hours. Missing, failed, expired or incompatible evidence means a full run. A reused run never creates new evidence or extends its lifetime. New develop combinations and changed verification conditions therefore still get fresh tests.
|
|
26
|
+
|
|
27
|
+
The required `Validate` check and commit-range security scan still run on reused pushes. The CI summary links to the full source run rather than reporting new test counts. Reused pushes do not update test badges. Candidate packaging, installed-runtime tests, branch protection and exact-archive publication checks stay unchanged.
|
|
28
|
+
|
|
21
29
|
## Start a release
|
|
22
30
|
|
|
23
31
|
Choose a release cut by its full commit SHA. If that commit is not yet on main, promote it through a separate pinned branch such as `chore/promote-X.Y.Z`, not a PR whose head is the moving `develop` branch. Keep that promotion head unchanged while CI runs. New develop merges do not join the release unless its scope is explicitly changed. After promotion and main-to-develop synchronization succeed, start the versioned release below. See `.pi/skills/publish-pi-agent-ide/SKILL.md` for the agent runbook.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Codemode Write context verification
|
|
2
|
+
|
|
3
|
+
[LPT-666](https://linear.app/alexshpunt/issue/LPT-666/verify-codemode-write-results-do-not-duplicate-file-content-in-model)
|
|
4
|
+
|
|
5
|
+
## Finding
|
|
6
|
+
|
|
7
|
+
Silent nested Write did duplicate file text into the next provider request. The IDE's native editor-batch hook appended the final Write presentation to Codemode output, even when the script printed nothing. That extra presentation also bypassed Codemode's output limit.
|
|
8
|
+
|
|
9
|
+
The deterministic fixture writes 400 distinct marked lines (60,400 bytes). Its baseline includes the same content in script arguments but never calls Write.
|
|
10
|
+
|
|
11
|
+
| Following provider result | Before the fix | After the fix |
|
|
12
|
+
| -------------------------------------- | ----------------------------------------------- | ------------------------------------------------- |
|
|
13
|
+
| Baseline | 47 text characters, no file-body markers | Same |
|
|
14
|
+
| Silent Write | 57,776 text characters, 337 file-body markers | 47 script-output characters, no file-body markers |
|
|
15
|
+
| Explicit Write output, 1,000-token cap | An extra file fragment appeared outside the cap | Compact receipt only; no file text |
|
|
16
|
+
|
|
17
|
+
These are character counts, not billed token measurements. The pre-fix result counts include the attached editing guide. After-fix output-size assertions exclude that separate guide; the saved request keeps it unchanged (6,345 characters in the captured run).
|
|
18
|
+
|
|
19
|
+
## Boundaries
|
|
20
|
+
|
|
21
|
+
- Script arguments legitimately contain the file content. The tests check them separately from subsequent tool-result content.
|
|
22
|
+
- `providerRequests` captures the exact input to the deterministic provider, not a paid HTTP request. It includes native SDK metadata as well as model-facing content.
|
|
23
|
+
- Native `details.calls` keeps a short argument preview. Native `nestedCalls` keeps call identity, status, timing, and bounded arguments or byte counts. These are not display-only IDE panels, and this change does not remove them.
|
|
24
|
+
- The inspected OpenAI Responses serializer converts tool results from `msg.content`; it does not send `details` or `nestedCalls` as tool output. Arbitrary custom providers can choose differently. We do not claim that the raw context object contains zero copied argument bytes.
|
|
25
|
+
- `ide-nested-results` is a saved custom entry for human-facing panels, not another model message. The fixture checks saved Write presentations and the rendered diff separately.
|
|
26
|
+
|
|
27
|
+
The fixtures use the pinned Pi 1.0.0 host. Live worktree verification uses installed Pi 1.1.0. Pi itself is unchanged.
|
|
28
|
+
|
|
29
|
+
Final live verification after reload covered direct Write, no-op Write, explicit nested output, silent 400-line Write, a directory-target failure, and Write-result reuse through Read. Direct and explicit Write output contained only status, one path, and the Read reminder; the failure added a short reason. Silent output stayed empty. Only the explicit Read exposed file content. `inspect_tui` captured Herdr `w3Q9:p1`, 105×108 cells, revision 344: the direct Write diff and the large nested diff's final rows/+400 count stayed visible. Existing argument-retention limits were labelled honestly.
|
|
30
|
+
|
|
31
|
+
Nineteen focused integration checks and ten capability-route unit checks passed. Final one-path and notice refinements were rechecked with three direct/error/Read cases and two notice/interruption cases. Typecheck, targeted lint, free capability coverage, and configured startup passed. No broad suites or paid inference ran.
|
|
32
|
+
|
|
33
|
+
## Compact Write contract
|
|
34
|
+
|
|
35
|
+
A later direct-call probe also returned a `Final text` file fragment. The user expanded the scope: Write must return only a write status, path, and a reminder to Read the file. Problems get a short reason, not file text or detailed diagnostics. Human-facing diffs stay visible.
|
|
36
|
+
|
|
37
|
+
Direct Write and explicit `text(result)` / `return result` now share that compact receipt. Small, large, and unchanged files do not produce content previews. Formatter availability, diff counts, source lines, and successful formatting details are not part of the agent receipt.
|
|
38
|
+
|
|
39
|
+
Keep full mutation data for the renderer and whole-file source targets. Read still consumes the unchanged Write result, including formatted and no-op snapshots. Explicit Read is the positive control for obtaining content; Codemode still owns that output's truncation and recovery file.
|
|
40
|
+
|
|
41
|
+
Silent native Write still does not append a second receipt or file body to the parent result. It keeps short problem notices when processing failed or was interrupted, native editor-batch metadata, and unrelated pending-edit receipts.
|
|
42
|
+
|
|
43
|
+
## Reproduce
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
pnpm exec pi-test run -- vitest run --config vitest.integration.config.mjs \
|
|
47
|
+
tests/integration/native-codemode-write-context.integration.test.ts
|
|
48
|
+
pnpm exec vitest run scripts/tool-capability-matrix.test.ts -t 'capability route evidence'
|
|
49
|
+
pnpm check:capabilities
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Each context case saves `following-provider-request.json` beside `run.jsonl` under `.tmp/test-runs/tests/integration/native-codemode-write-context.integration.test.ts/`. The test source regenerates these local captures; they are not committed.
|
|
53
|
+
|
|
54
|
+
Coverage includes direct small/large/no-op and failed Writes, silent and repeated Writes, explicit compact text/return, Read output truncation, short problem notices, native metadata, persisted panels, and the executable silent-Write capability case. Related Write target, formatting, batch-boundary, and after-save interruption checks protect result reuse and honest recovery.
|
|
55
|
+
|
|
56
|
+
The paid matrix declares `codemode.silent-write` and `edit.write-receipt`. It checks both the completed parent's output and the Write child's own content, not just tool names. No paid matrix routes were run; real-model execution remains unverified.
|
package/docs/user-hooks.md
CHANGED
|
@@ -45,6 +45,32 @@ export default function (pi: ExtensionAPI) {
|
|
|
45
45
|
|
|
46
46
|
The hook receives one complete plan after Resource and anchor resolution but before the first write. It covers standalone mutation tools, including calls through native Codemode. A denial or thrown error leaves every Resource unchanged.
|
|
47
47
|
|
|
48
|
+
## Protect whole objects from deletion
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
52
|
+
import { connectBeforeDeleteHook } from "pi-agent-ide/api/hooks";
|
|
53
|
+
|
|
54
|
+
export default function (pi: ExtensionAPI) {
|
|
55
|
+
connectBeforeDeleteHook(pi, {
|
|
56
|
+
id: "protect-data",
|
|
57
|
+
run(event) {
|
|
58
|
+
return event.resolvedPath.endsWith("/data")
|
|
59
|
+
? { decision: "deny", reason: "Keep the data directory" }
|
|
60
|
+
: { decision: "allow" };
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
This hook covers whole-object Delete calls for regular files, directories, and symlinks, plus directory/symlink Move source removal and existing destination removal. Both standalone and native Codemode calls use it. It does not cover selected-text removal, terminal/debugger actions, Copy, or ordinary-file Move. The event provides `path` (absolute requested path), `resolvedPath` (parent symlinks resolved, final symlink left alone), `cwd`, `kind`, `recursive`, and an optional abort `signal`. It runs once before removal and any user dialog. A denial or thrown error blocks removal; allowing does not override another hook or built-in protection.
|
|
67
|
+
|
|
68
|
+
Delete removes directories recursively and unlinks symlinks, including broken ones, without traversing their targets. The built-in policy uses the Git worktree containing Pi's cwd. Tracked or newly staged targets require a user dialog. External directories and symlinks and targets without a Git worktree require a dialog unless they are eligible descendants of a [temporary root](./configuration.md#temporary-directory-deletion). Failed Git checks inside the current project still require a dialog. Untracked directories and symlinks inside that worktree need no dialog. Ordinary files keep their existing policy.
|
|
69
|
+
|
|
70
|
+
The dialog names the exact target, reason, and operation. Refusal, dismissal, cancellation, or an unavailable dialog prevents removal. Project roots, their ancestors, filesystem roots, and current Git control paths are always blocked, even when a hook allows. Git control protection also covers regular-file `.git` markers. Without Git, cwd and its ancestors are protected.
|
|
71
|
+
|
|
72
|
+
Delete checks the target identity and policy again after hooks and confirmation. Changed targets need a new request; there is no agent approval flag. These checks are not an atomic lock against other processes changing the filesystem. Recursive deletion has no rollback: a filesystem error after removal begins reports `unknown` effects, because some entries may already be gone.
|
|
73
|
+
|
|
48
74
|
## Check saved edits
|
|
49
75
|
|
|
50
76
|
```ts
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-image": "0.7.
|
|
10
|
-
"pi-agent-invariant": "0.7.
|
|
11
|
-
"pi-agent-read": "0.7.
|
|
12
|
-
"pi-agent-resource": "0.7.
|
|
13
|
-
"pi-agent-text": "0.7.
|
|
14
|
-
"pi-agent-text-editor": "0.7.
|
|
9
|
+
"pi-agent-image": "0.7.3",
|
|
10
|
+
"pi-agent-invariant": "0.7.3",
|
|
11
|
+
"pi-agent-read": "0.7.3",
|
|
12
|
+
"pi-agent-resource": "0.7.3",
|
|
13
|
+
"pi-agent-text": "0.7.3",
|
|
14
|
+
"pi-agent-text-editor": "0.7.3"
|
|
15
15
|
},
|
|
16
16
|
"pi": {
|
|
17
17
|
"extensions": [
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-image",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#extension": "./index.ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-image": "0.7.
|
|
10
|
-
"pi-agent-resource": "0.7.
|
|
9
|
+
"pi-agent-image": "0.7.3",
|
|
10
|
+
"pi-agent-resource": "0.7.3"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-jq",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"cross-spawn": "^7.0.6",
|
|
10
|
-
"pi-agent-doctor": "0.7.
|
|
11
|
-
"pi-agent-documentation": "0.7.
|
|
12
|
-
"pi-agent-read": "0.7.
|
|
13
|
-
"pi-agent-text": "0.7.
|
|
10
|
+
"pi-agent-doctor": "0.7.3",
|
|
11
|
+
"pi-agent-documentation": "0.7.3",
|
|
12
|
+
"pi-agent-read": "0.7.3",
|
|
13
|
+
"pi-agent-text": "0.7.3"
|
|
14
14
|
},
|
|
15
15
|
"pi": {
|
|
16
16
|
"extensions": [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-pdf",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-pdf": "0.7.
|
|
7
|
-
"pi-agent-resource": "0.7.
|
|
6
|
+
"pi-agent-pdf": "0.7.3",
|
|
7
|
+
"pi-agent-resource": "0.7.3"
|
|
8
8
|
},
|
|
9
9
|
"pi": {
|
|
10
10
|
"extensions": [
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-text",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#extension": "./index.ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-resource": "0.7.
|
|
10
|
-
"pi-agent-text": "0.7.
|
|
9
|
+
"pi-agent-resource": "0.7.3",
|
|
10
|
+
"pi-agent-text": "0.7.3"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-ast",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
"@tree-sitter-grammars/tree-sitter-toml": "^0.7.0",
|
|
32
32
|
"@tree-sitter-grammars/tree-sitter-yaml": "^0.7.1",
|
|
33
33
|
"cross-spawn": "^7.0.6",
|
|
34
|
-
"pi-agent-doctor": "0.7.
|
|
35
|
-
"pi-agent-documentation": "0.7.
|
|
36
|
-
"pi-agent-invariant": "0.7.
|
|
37
|
-
"pi-agent-read": "0.7.
|
|
38
|
-
"pi-agent-resource": "0.7.
|
|
39
|
-
"pi-agent-search": "0.7.
|
|
40
|
-
"pi-agent-search-text": "0.7.
|
|
41
|
-
"pi-agent-text": "0.7.
|
|
42
|
-
"pi-agent-text-editor": "0.7.
|
|
43
|
-
"pi-agent-tool-call-interception": "0.7.
|
|
44
|
-
"pi-agent-tool-ui": "0.7.
|
|
34
|
+
"pi-agent-doctor": "0.7.3",
|
|
35
|
+
"pi-agent-documentation": "0.7.3",
|
|
36
|
+
"pi-agent-invariant": "0.7.3",
|
|
37
|
+
"pi-agent-read": "0.7.3",
|
|
38
|
+
"pi-agent-resource": "0.7.3",
|
|
39
|
+
"pi-agent-search": "0.7.3",
|
|
40
|
+
"pi-agent-search-text": "0.7.3",
|
|
41
|
+
"pi-agent-text": "0.7.3",
|
|
42
|
+
"pi-agent-text-editor": "0.7.3",
|
|
43
|
+
"pi-agent-tool-call-interception": "0.7.3",
|
|
44
|
+
"pi-agent-tool-ui": "0.7.3",
|
|
45
45
|
"tree-sitter-cpp": "^0.23.4",
|
|
46
46
|
"tree-sitter-javascript": "^0.25.0",
|
|
47
47
|
"tree-sitter-json": "^0.24.8",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@earendil-works/pi-coding-agent": "*",
|
|
60
60
|
"@earendil-works/pi-tui": "*",
|
|
61
|
-
"pi-agent-ide": "0.7.
|
|
61
|
+
"pi-agent-ide": "0.7.3",
|
|
62
62
|
"typebox": "*"
|
|
63
63
|
},
|
|
64
64
|
"peerDependenciesMeta": {
|
|
@@ -52,7 +52,9 @@ export default async function registerAst(pi: ExtensionAPI): Promise<void> {
|
|
|
52
52
|
stage: "post-read",
|
|
53
53
|
async handler(context) {
|
|
54
54
|
const result = await overflow(context);
|
|
55
|
-
return result.kind === "return"
|
|
55
|
+
return result.kind === "return" || result.transform !== undefined
|
|
56
|
+
? result
|
|
57
|
+
: scopes(result.context);
|
|
56
58
|
},
|
|
57
59
|
});
|
|
58
60
|
api.describe({
|
|
@@ -52,7 +52,7 @@ export const reduceAstReadOutput: ReadOutputReducer = async (result, context, bu
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
/**
|
|
55
|
+
/** Present an overflowing read window as an outline without losing its source data. */
|
|
56
56
|
export function createAstOverflowHandler(): ReadPostReadHandler {
|
|
57
57
|
return async (context) => {
|
|
58
58
|
const { state, result } = context;
|
|
@@ -83,6 +83,11 @@ export function createAstOverflowHandler(): ReadPostReadHandler {
|
|
|
83
83
|
);
|
|
84
84
|
return reduced === undefined
|
|
85
85
|
? { kind: "continue", context }
|
|
86
|
-
: {
|
|
86
|
+
: {
|
|
87
|
+
kind: "continue",
|
|
88
|
+
context,
|
|
89
|
+
// Keep canonical data added by other post-read transforms, including source targets.
|
|
90
|
+
transform: (result) => ({ ...reduced, script: result.script }),
|
|
91
|
+
};
|
|
87
92
|
};
|
|
88
93
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-changes",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"diff": "^9.0.0",
|
|
16
|
-
"pi-agent-doctor": "0.7.
|
|
17
|
-
"pi-agent-documentation": "0.7.
|
|
18
|
-
"pi-agent-invariant": "0.7.
|
|
19
|
-
"pi-agent-read": "0.7.
|
|
20
|
-
"pi-agent-resource": "0.7.
|
|
21
|
-
"pi-agent-text": "0.7.
|
|
22
|
-
"pi-agent-text-editor": "0.7.
|
|
16
|
+
"pi-agent-doctor": "0.7.3",
|
|
17
|
+
"pi-agent-documentation": "0.7.3",
|
|
18
|
+
"pi-agent-invariant": "0.7.3",
|
|
19
|
+
"pi-agent-read": "0.7.3",
|
|
20
|
+
"pi-agent-resource": "0.7.3",
|
|
21
|
+
"pi-agent-text": "0.7.3",
|
|
22
|
+
"pi-agent-text-editor": "0.7.3"
|
|
23
23
|
},
|
|
24
24
|
"pi": {
|
|
25
25
|
"extensions": [
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@earendil-works/pi-coding-agent": "*",
|
|
31
|
+
"@earendil-works/pi-tui": "*",
|
|
31
32
|
"typebox": "*"
|
|
32
33
|
}
|
|
33
34
|
}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
type ExtensionAPI,
|
|
9
9
|
withFileMutationQueue,
|
|
10
10
|
} from "@earendil-works/pi-coding-agent";
|
|
11
|
+
import { Text } from "@earendil-works/pi-tui";
|
|
11
12
|
import { Type, type Static } from "typebox";
|
|
12
13
|
import { resultError, structuredResultSchema, withStructuredResult } from "pi-agent-resource";
|
|
13
14
|
const indexDataSchema = Type.Object(
|
|
@@ -127,6 +128,21 @@ export function createIndexChangeTool(
|
|
|
127
128
|
: "Use unstage to remove one selected Git change from the index. Worktree content is kept.",
|
|
128
129
|
parameters,
|
|
129
130
|
outputSchema: indexOutputSchema,
|
|
131
|
+
// The full IDE removes private result metadata before calling this renderer.
|
|
132
|
+
...(action === "stage" && {
|
|
133
|
+
renderResult(result, _options, theme) {
|
|
134
|
+
return new Text(
|
|
135
|
+
theme.fg(
|
|
136
|
+
"toolOutput",
|
|
137
|
+
result.content
|
|
138
|
+
.flatMap((block) => (block.type === "text" ? [block.text] : []))
|
|
139
|
+
.join("\n"),
|
|
140
|
+
),
|
|
141
|
+
0,
|
|
142
|
+
0,
|
|
143
|
+
);
|
|
144
|
+
},
|
|
145
|
+
}),
|
|
130
146
|
async execute(_toolCallId, parameters, signal, _onUpdate, context) {
|
|
131
147
|
try {
|
|
132
148
|
const result = await execute(parameters, signal, context);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-formatter",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-doctor": "0.7.
|
|
6
|
+
"pi-agent-doctor": "0.7.3"
|
|
7
7
|
},
|
|
8
8
|
"pi": {
|
|
9
9
|
"extensions": [
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
14
|
"@earendil-works/pi-coding-agent": "*",
|
|
15
|
-
"pi-agent-ide": "0.7.
|
|
15
|
+
"pi-agent-ide": "0.7.3"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"pi-agent-ide": {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-lint",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-doctor": "0.7.
|
|
7
|
-
"pi-agent-invariant": "0.7.
|
|
8
|
-
"pi-agent-read": "0.7.
|
|
9
|
-
"pi-agent-resource": "0.7.
|
|
10
|
-
"pi-agent-text": "0.7.
|
|
6
|
+
"pi-agent-doctor": "0.7.3",
|
|
7
|
+
"pi-agent-invariant": "0.7.3",
|
|
8
|
+
"pi-agent-read": "0.7.3",
|
|
9
|
+
"pi-agent-resource": "0.7.3",
|
|
10
|
+
"pi-agent-text": "0.7.3"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"@earendil-works/pi-coding-agent": "*",
|
|
19
|
-
"pi-agent-ide": "0.7.
|
|
19
|
+
"pi-agent-ide": "0.7.3"
|
|
20
20
|
},
|
|
21
21
|
"peerDependenciesMeta": {
|
|
22
22
|
"pi-agent-ide": {
|
|
@@ -143,7 +143,7 @@ export default async function registerLsp(pi: ExtensionAPI): Promise<void> {
|
|
|
143
143
|
api
|
|
144
144
|
.tool(operation)
|
|
145
145
|
.describe(
|
|
146
|
-
"Use symbol:<file>#<selector> as path to select one exact declaration without start/end. Use parent/child for ambiguous names. Copy/
|
|
146
|
+
"Use symbol:<file>#<selector> as path to select one exact declaration without start/end. Use parent/child for ambiguous names. For declaration-text Copy/Move, supply an explicit target and destination anchor. This text fallback leaves imports and references unchanged; it is not semantic rename." +
|
|
147
147
|
(operation === "replace"
|
|
148
148
|
? " Use symbol:<file>#<selector>#name with text containing the new name for native LSP rename across references. Omit start/end. A failed server rename never falls back to identifier text replacement."
|
|
149
149
|
: ""),
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-lsp",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"cross-spawn": "^7.0.6",
|
|
7
|
-
"pi-agent-doctor": "0.7.
|
|
8
|
-
"pi-agent-invariant": "0.7.
|
|
9
|
-
"pi-agent-read": "0.7.
|
|
10
|
-
"pi-agent-resource": "0.7.
|
|
11
|
-
"pi-agent-search": "0.7.
|
|
12
|
-
"pi-agent-text": "0.7.
|
|
13
|
-
"pi-agent-text-editor": "0.7.
|
|
7
|
+
"pi-agent-doctor": "0.7.3",
|
|
8
|
+
"pi-agent-invariant": "0.7.3",
|
|
9
|
+
"pi-agent-read": "0.7.3",
|
|
10
|
+
"pi-agent-resource": "0.7.3",
|
|
11
|
+
"pi-agent-search": "0.7.3",
|
|
12
|
+
"pi-agent-text": "0.7.3",
|
|
13
|
+
"pi-agent-text-editor": "0.7.3",
|
|
14
14
|
"vscode-jsonrpc": "^9.0.0",
|
|
15
15
|
"vscode-uri": "^3.1.0"
|
|
16
16
|
},
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@earendil-works/pi-coding-agent": "*",
|
|
24
|
-
"pi-agent-ide": "0.7.
|
|
24
|
+
"pi-agent-ide": "0.7.3"
|
|
25
25
|
},
|
|
26
26
|
"peerDependenciesMeta": {
|
|
27
27
|
"pi-agent-ide": {
|
|
@@ -9,7 +9,8 @@ export function createDeclarationTargets(managerFor: LspManagerProvider): TextTa
|
|
|
9
9
|
id: "lsp-declaration-target",
|
|
10
10
|
async tryResolve(value, context) {
|
|
11
11
|
const reference = parseCodeViewReference(value, "symbol");
|
|
12
|
-
|
|
12
|
+
// #name belongs to the rename pre-edit handler, not declaration-text fallback.
|
|
13
|
+
if (reference === undefined || value.endsWith("#name")) return { kind: "not-handled" };
|
|
13
14
|
if (reference.selector === undefined)
|
|
14
15
|
return {
|
|
15
16
|
kind: "rejected",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-image",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./src/index.ts",
|
|
6
6
|
"exports": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"pi-agent-resource": "0.7.
|
|
13
|
+
"pi-agent-resource": "0.7.3"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@earendil-works/pi-coding-agent": "*"
|