@aefree/pi-plastic 0.7.6 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/README.md +48 -174
- package/docs/2026-10-06-development.md +101 -0
- package/docs/2026-10-06-diffs-and-patches.md +136 -0
- package/docs/2026-10-06-discovery.md +135 -0
- package/docs/2026-10-06-integrations.md +49 -0
- package/docs/2026-10-06-merging.md +153 -0
- package/docs/2026-10-06-safety-and-receipts.md +95 -0
- package/docs/2026-10-06-setup.md +101 -0
- package/docs/2026-10-06-shelvesets-and-reviews.md +113 -0
- package/docs/2026-10-06-status.md +116 -0
- package/docs/2026-10-06-tools-and-loading.md +64 -0
- package/docs/2026-10-06-workspace-operations.md +142 -0
- package/docs/README.md +65 -0
- package/extensions/bash-cm-diff-guard.ts +1 -1
- package/index.ts +4 -687
- package/package.json +10 -4
- package/skills/using-plastic/SKILL.md +11 -5
- package/skills/using-plastic/references/branch-management.md +5 -1
- package/skills/using-plastic/references/changeset-operations.md +9 -8
- package/skills/using-plastic/references/code-review-creation.md +25 -18
- package/skills/using-plastic/references/integration.md +9 -5
- package/skills/using-plastic/references/quick-reference.md +4 -4
- package/skills/using-plastic/references/reviewing-changes.md +10 -10
- package/skills/using-plastic/references/shelving.md +26 -11
- package/skills/using-plastic/references/troubleshooting.md +4 -4
- package/src/diff/local-snapshot.ts +74 -0
- package/src/diff/text.ts +187 -0
- package/src/domain/add-contract.ts +24 -0
- package/src/domain/branch-create-contract.ts +38 -0
- package/src/domain/branch-delete-contract.ts +15 -0
- package/src/domain/branches.ts +263 -0
- package/src/domain/checkin-contract.ts +70 -0
- package/src/domain/closeout-contract.ts +30 -0
- package/src/domain/copied-merge.ts +42 -0
- package/src/domain/diff-base-xml.ts +65 -0
- package/src/domain/diff-pending-xml.ts +34 -0
- package/src/domain/merge-output.ts +327 -0
- package/src/domain/paths.ts +253 -0
- package/src/domain/pending.ts +499 -0
- package/src/domain/removal-contract.ts +25 -0
- package/src/domain/revisions.ts +301 -0
- package/src/domain/server-merge-contract.ts +45 -0
- package/src/domain/server-merge-resolutions.ts +61 -0
- package/src/domain/status-xml.ts +122 -0
- package/src/domain/switch-contract.ts +60 -0
- package/src/domain/switch-policy.ts +95 -0
- package/src/domain/undo-contract.ts +24 -0
- package/src/domain/update-contract.ts +16 -0
- package/src/domain/workspace-merge-contract.ts +41 -0
- package/src/execution/add-command.ts +118 -0
- package/src/execution/branch-create-command.ts +118 -0
- package/src/execution/branch-list-command.ts +75 -0
- package/src/execution/checkin-command.ts +116 -0
- package/src/execution/cli-version.ts +31 -0
- package/src/execution/cm.ts +59 -0
- package/src/execution/code-review-find-command.ts +75 -0
- package/src/execution/context.ts +20 -0
- package/src/execution/diff-revisions-command.ts +74 -0
- package/src/execution/process.ts +260 -0
- package/src/execution/removal-command.ts +118 -0
- package/src/execution/server-merge-command.ts +92 -0
- package/src/execution/shelveset-list-command.ts +75 -0
- package/src/execution/status-command.ts +29 -0
- package/src/execution/status-xml-command.ts +72 -0
- package/src/execution/status-xml-limits.ts +1 -0
- package/src/execution/switch-command.ts +118 -0
- package/src/execution/test-seams.ts +10 -0
- package/src/execution/undo-command.ts +118 -0
- package/src/execution/update-command.ts +118 -0
- package/src/execution/workspace-list-command.ts +75 -0
- package/src/execution/workspace-merge-command.ts +118 -0
- package/src/operations/add-receipt.ts +37 -0
- package/src/operations/arguments.ts +3 -0
- package/src/operations/branch-create.ts +74 -0
- package/src/operations/branch-delete-receipt.ts +25 -0
- package/src/operations/branch-list.ts +94 -0
- package/src/operations/branch-reads.ts +94 -0
- package/src/operations/branches.ts +111 -0
- package/src/operations/checkin-receipt.ts +140 -0
- package/src/operations/checkin.ts +102 -0
- package/src/operations/closeout-receipt.ts +74 -0
- package/src/operations/closeout.ts +19 -0
- package/src/operations/code-review-find.ts +97 -0
- package/src/operations/consolidated-diff.ts +144 -0
- package/src/operations/diff-revisions.ts +157 -0
- package/src/operations/diff.ts +53 -0
- package/src/operations/merge.ts +26 -0
- package/src/operations/object-delete-receipt.ts +21 -0
- package/src/operations/object-write-receipt.ts +105 -0
- package/src/operations/patch-receipt.ts +96 -0
- package/src/operations/patch-support.ts +375 -0
- package/src/operations/patch.ts +25 -0
- package/src/operations/removal-receipt.ts +42 -0
- package/src/operations/reviews.ts +90 -0
- package/src/operations/server-merge.ts +130 -0
- package/src/operations/shelveset-list.ts +90 -0
- package/src/operations/shelvesets.ts +90 -0
- package/src/operations/status.ts +129 -0
- package/src/operations/switch-receipt.ts +85 -0
- package/src/operations/switch.ts +25 -0
- package/src/operations/undo-receipt.ts +37 -0
- package/src/operations/update-receipt.ts +35 -0
- package/src/operations/workspace-list.ts +92 -0
- package/src/operations/workspace-merge-receipt.ts +50 -0
- package/src/operations/workspace.ts +120 -0
- package/src/pi/add-output.ts +52 -0
- package/src/pi/arguments.ts +298 -0
- package/src/pi/branch-create-output.ts +83 -0
- package/src/pi/branch-delete-output.ts +46 -0
- package/src/pi/branch-list-output.ts +59 -0
- package/src/pi/branch-output.ts +63 -0
- package/src/pi/capability-diagnostics.ts +23 -0
- package/src/pi/checkin-output.ts +68 -0
- package/src/pi/closeout-output.ts +87 -0
- package/src/pi/code-review-find-output.ts +50 -0
- package/src/pi/diff-output.ts +66 -0
- package/src/pi/diff-revisions-output.ts +55 -0
- package/src/pi/object-delete-output.ts +15 -0
- package/src/pi/object-write-output.ts +54 -0
- package/src/pi/patch-output.ts +69 -0
- package/src/pi/register.ts +188 -0
- package/src/pi/removal-output.ts +59 -0
- package/src/pi/schemas.ts +146 -0
- package/src/pi/server-merge-output.ts +83 -0
- package/src/pi/shelveset-list-output.ts +50 -0
- package/src/pi/status-output.ts +149 -0
- package/src/pi/switch-output.ts +80 -0
- package/src/pi/tool-registry.ts +72 -0
- package/src/pi/undo-output.ts +52 -0
- package/src/pi/update-output.ts +48 -0
- package/src/pi/workspace-list-output.ts +53 -0
- package/src/pi/workspace-merge-output.ts +46 -0
- package/src/plastic-core.ts +14 -5775
- package/src/plastic-renderers.ts +102 -22
- package/src/plastic-tool-loading.ts +7 -12
- package/src/presentation/add-results.ts +5 -0
- package/src/presentation/branch-create.ts +7 -0
- package/src/presentation/branch-delete-results.ts +7 -0
- package/src/presentation/checkin-results.ts +14 -0
- package/src/presentation/closeout-results.ts +2 -0
- package/src/presentation/diff-results.ts +237 -0
- package/src/presentation/removal-results.ts +7 -0
- package/src/presentation/results.ts +84 -0
- package/src/presentation/switch-results.ts +7 -0
- package/src/presentation/undo-results.ts +5 -0
- package/src/presentation/update-results.ts +5 -0
- package/src/presentation/workspace-merge-results.ts +6 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Shelvesets and code reviews
|
|
2
|
+
|
|
3
|
+
[Documentation index](README.md) · [Find object IDs](2026-10-06-discovery.md) · [Safety and receipts](2026-10-06-safety-and-receipts.md)
|
|
4
|
+
|
|
5
|
+
Creation/application/update/deletion each returns its own bounded receipt. Preserve exact selectors and any earlier creation effects; do not chain on an inferred substring, hidden readback, or guessed namespace.
|
|
6
|
+
|
|
7
|
+
## Presentation versus CLI formatting
|
|
8
|
+
|
|
9
|
+
| Operation | Presentation | CLI template |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| Shelf create/apply; review create/update | `output="text"` or `output="json"`; default text | Creation review `format` remains an arbitrary CLI template |
|
|
12
|
+
| Shelf/review deletion | `format="text"` or `format="json"`; default text | No new custom output grammar |
|
|
13
|
+
| Shelf/review discovery | `output="text"` or `output="json"` | Native `format`/`dateFormat`; canonical ids source conflicts with meaningful templates |
|
|
14
|
+
|
|
15
|
+
Custom review creation stdout stays opaque even if it looks like an ID. Defaults, ordered controls/duplicates and qualifiers are preserved; the tool does not force a formatter to manufacture reusable identity.
|
|
16
|
+
|
|
17
|
+
## shelvesetCreate
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
plastic_shelvesetCreate(paths=["Assets/Example.txt"], comment="Save owned work", summaryFormat=true, output="json")
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
One exact command preserves paths/all/dependencies/summaryFormat and exclusive comment/commentsFile. Omitted/empty path lists retain existing selection behavior; inspect intent before relying on broad scope.
|
|
24
|
+
|
|
25
|
+
Only an entire supported emitted default or summary `sh:` scalar is created-identity evidence. No IDs are parsed from progress or fragments. Emitted qualifiers remain exact; requested/emitted namespace equivalence is not inferred.
|
|
26
|
+
|
|
27
|
+
Comment-less creation with configured PLASTICEDITOR is refused before dispatch because it could launch an editor. Supply comment/commentsFile rather than overriding the environment. A command-only preflight still dispatches zero CLI commands.
|
|
28
|
+
|
|
29
|
+
Successful emitted identity remains recorded if stderr warnings make completion uncertain. Root/Xlink/global effects and omitted other-repository information are not independently verified.
|
|
30
|
+
|
|
31
|
+
## shelvesetApply
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
plastic_shelvesetApply(shelveset="<exact observed shelf selector>", output="json")
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Preserve selector, ordered changePaths, preview/dontCheckout and the documented comparison method. No automatic conflict input, strategy switch, readback/retry or undo.
|
|
38
|
+
|
|
39
|
+
| Option | Meaning |
|
|
40
|
+
|---|---|
|
|
41
|
+
| `preflight=true` | Render command only; no CLI, no existence/conflict analysis |
|
|
42
|
+
| `preview=true` | Real CM dispatch; can prompt/fail and does not prove no effects |
|
|
43
|
+
| `dontCheckout` | Exact requested CLI policy; not proof of preservation |
|
|
44
|
+
| `comparisonMethod` | ignoreeol, ignorewhitespaces, ignoreeolandwhitespaces, recognizeall |
|
|
45
|
+
|
|
46
|
+
A tracked text change on the same clean base has conflict-free preview/apply evidence. An added-item case prompted for evil-twin resolution and failed. This does not establish general safe unattended conflict resolution.
|
|
47
|
+
|
|
48
|
+
Complete apply output does not prove applied items/cleanliness/restoration; observedAppliedItems remains null. The agent can inspect state and choose an authorized resolution rather than assuming rollback or replay safety.
|
|
49
|
+
|
|
50
|
+
## codeReviewCreate
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
plastic_codeReviewCreate(target="br:/main/owned-feature", title="Owned feature review", output="json")
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Preserve target/title and optional status/assignee/repository/format. **Assign someone only when requested.** Creating a review does not authorize changing another person's assignment or opening a real review conversation.
|
|
57
|
+
|
|
58
|
+
An entire supported default numeric/GUID scalar can be emitted identity evidence. Custom stdout is always opaque; repository scope and requested review attributes stay unverified. A separate explicitly scoped query may provide its own identity evidence, never hidden creation verification.
|
|
59
|
+
|
|
60
|
+
### Creation and find use different format grammars
|
|
61
|
+
|
|
62
|
+
Installed CM 11 help documents creation `{0}` as ID and `{1}` as GUID. The positional formatter below completed in a fresh owned fixture:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
plastic_codeReviewCreate(target="br:/main/owned-feature", title="Owned formatted review", format="{0}|{1}", output="json")
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The native receipt still reports observedCreatedIdentity=null for that custom format. A named `{id}|{title}` creation formatter failed with Invalid format string; no automatic substitution was performed.
|
|
69
|
+
|
|
70
|
+
`cm find review` is different: the sourced fields `{id}|{status}|{title}` work, but a find `{guid}` field failed. Do not infer support from inconsistent help examples. The canonical tool [ids source](2026-10-06-discovery.md#codereviewfind) returns numeric IDs without attempting GUID/title/status recovery.
|
|
71
|
+
|
|
72
|
+
## codeReviewUpdate
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
plastic_codeReviewUpdate(id="<observed review ID>", status="Reviewed", output="json")
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
One exact `codereview -e` command preserves ID/selector plus optional status/assignee/repository. Empty optional review controls retain their existing omitted-flag behavior. No status enum redesign, assignment, readback or retry is added.
|
|
79
|
+
|
|
80
|
+
An empty successful stdout means command completion, not verified requested state. In bounded fixtures, directly scoped observations still showed Under review after one requesting Reviewed update. The producer reports observedUpdatedState=null/effect not-proven; it does not infer cause, no-op, absence or eventual consistency.
|
|
81
|
+
|
|
82
|
+
The agent may investigate the exact review and select a further authorized action. Uncertainty is not permission to repeat the mutation until an observation matches expectations.
|
|
83
|
+
|
|
84
|
+
## Object deletion
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
plastic_shelvesetDelete(shelveset="<explicitly owned exact selector>", preflight=true)
|
|
88
|
+
plastic_codeReviewDelete(ids=["<explicitly owned ID>"], preflight=true)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Delete only when requested. Shelf deletion takes one scalar; review deletion preserves an ordered plural list, including duplicates, and optional exact repository spelling.
|
|
92
|
+
|
|
93
|
+
Preflight is a zero-CLI command preview, not existence/permission/readiness proof. Completion does not establish deletion of any/all objects, namespace equivalence, restoration, exclusivity, history effects or rollback. Native errors/core rejection preserve possible-start/partial/capture uncertainty; no hidden query/retry follows.
|
|
94
|
+
|
|
95
|
+
## Write/deletion bounds
|
|
96
|
+
|
|
97
|
+
| Bound | Create/apply/update | Delete |
|
|
98
|
+
|---|---|---|
|
|
99
|
+
| Ordered operands | Up to 256 where lists are supported | 1 shelf /1–256 review IDs |
|
|
100
|
+
| Controls | 4,096 UTF-16 code units | 4,096 UTF-16 code units |
|
|
101
|
+
| Aggregate request | 32,768 UTF-8 bytes | 32,768 UTF-8 bytes |
|
|
102
|
+
| Capture | 65,536 stdout /16384 stderr bytes |Same |
|
|
103
|
+
| Compact receipt | 524,288 UTF-8 bytes | 131,072 UTF-8 bytes |
|
|
104
|
+
|
|
105
|
+
Strict known keys, booleans, Unicode, list ownership and non-option operands are checked before dispatch. Explicit null, sparse/oversized lists, invalid modes and conflicting comments fail. Request/list snapshots precede await; aliases retain canonical precedence.
|
|
106
|
+
|
|
107
|
+
Writes expose full admitted stdout as opaque command output. Only supported whole creation scalars become identity. Apply/update/repository observed-state fields remain null; scope requested-only/rollback not-proven. Unpaired Unicode and inconsistent overflow/truncation claims fail semantic validation.
|
|
108
|
+
|
|
109
|
+
Shared retirement is the existing 30 second deadline plus bounded grace, not proof the process stopped. Failed applying calls can have effects; retained identity/partial effects survive uncertainty. See [safety and receipts](2026-10-06-safety-and-receipts.md#respond-to-failure-without-inventing-recovery).
|
|
110
|
+
|
|
111
|
+
## Workflow references
|
|
112
|
+
|
|
113
|
+
For operational guidance, load only [shelving](../skills/using-plastic/references/shelving.md) or [code-review creation](../skills/using-plastic/references/code-review-creation.md) when relevant. These remain package-local skill references, not instructions to create test fixtures, assign people or execute every example.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Status
|
|
2
|
+
|
|
3
|
+
[Documentation index](README.md) · [Discovery](2026-10-06-discovery.md) · [Receipt semantics](2026-10-06-safety-and-receipts.md)
|
|
4
|
+
|
|
5
|
+
`plastic_status` observes pending items or standard merge hints. Choose a source deliberately; unsupported/failed output is not retried in another mode.
|
|
6
|
+
|
|
7
|
+
## Choose a source
|
|
8
|
+
|
|
9
|
+
| Source | Select it with | Provides | Important boundary |
|
|
10
|
+
|---|---|---|---|
|
|
11
|
+
| Standard | Default, or `source="text"` | Short-output summary and text-derived merge hints | Read completeness unknown; not machine-verified conflict counts |
|
|
12
|
+
| Machine | `machineReadable=true` or `source="machine"` | Parsed item rows, optional revision/source path, counts and diagnostics | Requested CLI scope, partial/lossy reads possible; no standard merge-state observation |
|
|
13
|
+
| XML | `source="xml"` | Strict UTF-8 absolute pending paths and moved source paths | Opt-in workspace-wide snapshot; no base revisions; Windows CM 11 source validation |
|
|
14
|
+
|
|
15
|
+
Tool-call examples:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
plastic_status(source="xml", maxItems=20)
|
|
19
|
+
plastic_status(source="machine", maxItems=20, includeRevId=true)
|
|
20
|
+
plastic_status(format="text")
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`format="text"|"json"` changes presentation, not the native DTO. `source` is independent of presentation. Omitting `source` preserves `machineReadable` behavior.
|
|
24
|
+
|
|
25
|
+
Conflicting controls fail before execution:
|
|
26
|
+
|
|
27
|
+
- `source="text"` or `source="xml"` with `machineReadable=true`.
|
|
28
|
+
- `source="machine"` with explicit `machineReadable=false`.
|
|
29
|
+
- XML with `short=true` or `includeRevId=true`.
|
|
30
|
+
|
|
31
|
+
## Common result fields
|
|
32
|
+
|
|
33
|
+
Status declares `action="status"`. Standard/machine routes use `schemaVersion: 1`; XML uses `schemaVersion: 2`. Inspect `ok`, `completeness`, `data.mode`, diagnostics, summary basis, and returned/omitted counts.
|
|
34
|
+
|
|
35
|
+
Rows default to 100 and cap at 500. Identity fields are excluded or rejected when unsupported, never clipped into plausible paths/revisions. A summary can describe more parsed records than the returned projection.
|
|
36
|
+
|
|
37
|
+
| Concept | Meaning |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `completeness.read` | Complete/incomplete/unknown source interpretation |
|
|
40
|
+
| `completeness.capture` | Complete/unknown capture evidence for these routes |
|
|
41
|
+
| `completeness.projection` | Whether the declared projection is complete |
|
|
42
|
+
| Summary basis | Distinguishes parsed records from short-output classification |
|
|
43
|
+
| Diagnostics | Evidence counters; a row can be both parsed and malformed/unsupported |
|
|
44
|
+
|
|
45
|
+
A successful partial read is not a complete clean workspace. Native errors contain bounded sanitized code/message; unsupported CLI output is `command_failed`, not guessed capability absence.
|
|
46
|
+
|
|
47
|
+
## XML
|
|
48
|
+
|
|
49
|
+
XML yields `data.mode="xml"`, absolute CLI-observed paths, `pathBasis="absolute"`, and workspace-wide scope even when workdir is a subdirectory. Moved `Path` is the destination and `OldPath` is the source.
|
|
50
|
+
|
|
51
|
+
- Supported codes: CH, AD, DE, LD, MV, PR; types: enTextFile/enDirectory.
|
|
52
|
+
- Unsupported codes/types, duplicates, foreign/unknown important structures, malformed XML, warnings/errors, nonempty stderr, or command/capture failure reject the observation.
|
|
53
|
+
- `baseRevisionAvailability="unavailable"`: changeset, size, and similarity never become per-item revisions.
|
|
54
|
+
- Exact Unicode code points and emitted path spelling remain unchanged, including observed drive-letter case; no normalization/encoding guessing.
|
|
55
|
+
- Text/JSON is synthesized from this one XML snapshot. No text/version commands are added.
|
|
56
|
+
|
|
57
|
+
`@xmldom/xmldom` 0.9.12 parses strict application/xml, rejects warnings/errors, and conservatively rejects DTD/entity declaration tokens even in comments/CDATA. Literal U+FFFD is unsupported by the parser policy, not automatically evidence of CLI decoding loss. Numeric references use the same strict parser policy.
|
|
58
|
+
|
|
59
|
+
`includeRaw=true` adds bounded, source-labelled XML to presentation only with a privacy warning. It may expose repository/server/workspace metadata; it never enters the compact native DTO.
|
|
60
|
+
|
|
61
|
+
### XML bounds
|
|
62
|
+
|
|
63
|
+
| Bound | Limit |
|
|
64
|
+
|---|---|
|
|
65
|
+
| Stdout/document | 1 MiB raw bytes |
|
|
66
|
+
| Stderr | 64 KiB |
|
|
67
|
+
| Process timeout | 30 seconds |
|
|
68
|
+
| Element depth | 16 |
|
|
69
|
+
| Source records | 20,000 |
|
|
70
|
+
| Path/source path | 4,096 UTF-16 code units |
|
|
71
|
+
| Status code | 64 code units |
|
|
72
|
+
| Accumulated other scalar text | 8,192 code units |
|
|
73
|
+
| Returned rows | 100 default, 500 maximum |
|
|
74
|
+
| Compact DTO | 131,072 UTF-8 bytes |
|
|
75
|
+
|
|
76
|
+
Invalid UTF-8, declaration/BOM disagreement, overflow, abort, or failed capture withholds reusable identities. Whole-document parsing is synchronous: depth/record/string checks follow DOM allocation and cancellation checks occur at parse boundaries, not midparse. The raw-byte cap bounds that phase; the process deadline is not a hard JS parser deadline.
|
|
77
|
+
|
|
78
|
+
## Machine
|
|
79
|
+
|
|
80
|
+
Machine yields `data.mode="machine"`, requestedShort, parsed-record summary, parse diagnostics, and itemCount. Rows include statusCode/kind/path/isDirectory and, when observed, decimal revisionId and moved sourcePath. Paths can be absolute; they are deliberately CLI-observed identities.
|
|
81
|
+
|
|
82
|
+
- `parsed` counts all parsed records; returned/omitted/excluded/overCap describe projection and identity exclusions.
|
|
83
|
+
- Summary totals precede projection. They are not independently verified workspace-wide counts.
|
|
84
|
+
- Header repository/server identities, cwd, internal normalized paths, and raw output are not canonical DTO fields.
|
|
85
|
+
- Recognized blank/header records are not pending items.
|
|
86
|
+
- The CLI no-base revision `-1` is omitted, not reusable. Malformed tokens such as `41.5` withhold revision identity and make the read incomplete; a numeric prefix is never recovered.
|
|
87
|
+
- Malformed/unsupported records or ambiguous legacy moves can produce a successful partial read, not complete status.
|
|
88
|
+
- Successful stderr makes read/capture unknown without publishing stderr.
|
|
89
|
+
|
|
90
|
+
### Encoding limitations
|
|
91
|
+
|
|
92
|
+
U+FFFD in a path/source path causes exclusion from reusable identities and incomplete read. This also excludes literal replacement-character filenames because capture cannot distinguish them from loss.
|
|
93
|
+
|
|
94
|
+
On Windows, `?` in identity-bearing paths is also excluded: the tested CM machine formatter substituted unsupported characters before capture. POSIX `?` filenames remain supported.
|
|
95
|
+
|
|
96
|
+
The tested Windows client emitted OEM 437 bytes for some Latin text and replaced Japanese/emoji with `?`. `--encoding=utf-8` did not change that machine-output behavior; it is documented for XML. Streaming UTF-8 decoding preserves multibyte boundaries, but does not convert OEM bytes or recover originals. No XML fallback or general Windows Unicode round-trip guarantee is implied.
|
|
97
|
+
|
|
98
|
+
### Machine bounds
|
|
99
|
+
|
|
100
|
+
Paths: 4,096 characters; revision IDs: 128; status codes: 64; returned rows: 100 default/500 maximum; compact DTO: 131,072 UTF-8 bytes. Unsupported identity-bearing fields are excluded, not clipped. DTO overflow fails closed.
|
|
101
|
+
|
|
102
|
+
Legacy machine/standard raw presentation (`includeRaw`, `details.rawResult`) and subprocess capture are not bounded by this DTO cap. Omit raw output for normal agent use. Text adds no version lookup; legacy JSON can use a cached `cm version` observation outside DTO provenance.
|
|
103
|
+
|
|
104
|
+
## Standard
|
|
105
|
+
|
|
106
|
+
Standard yields short-output classifications (`summaryBasis="short_output_classification"`) and text hints (`mergeHints.basis="text_hints"`). Counts include `other`; merge hints are not machine-verified conflict/readiness counts.
|
|
107
|
+
|
|
108
|
+
Read completeness is unknown. Both existing status commands must succeed; there is no alternate-source fallback/retry. `requestedShort` describes requested scope, not unselected pending items.
|
|
109
|
+
|
|
110
|
+
## Failures and follow-up
|
|
111
|
+
|
|
112
|
+
Public codes include `command_failed`, `aborted`, `capture_incomplete`, `invalid_producer_data`, and `output_overflow`. XML schemaVersion 2 additionally emits `unsupported_source` for structurally valid but unadmitted record codes/types (including binary files), and `malformed_output` for invalid XML or observation-contract data. Parser bounds use `output_overflow`; transport truncation/timeouts use `capture_incomplete`. Unsupported records are not admitted or partially projected; malformed/unsafe data takes precedence over unsupported profiles. Errors expose only fixed messages/codes, not XML, record values or workdir paths, even with `includeRaw=true`.
|
|
113
|
+
|
|
114
|
+
Parser rejections retain `read="incomplete"`, `capture="complete"`, `projection=false`: bytes were captured, not accepted as a complete read. Command/capture failures retain unknown capture. `invalid_producer_data` remains reserved for unexpected producer/internal DTO validation failures. This is an additive extension of the v2 error-code union (enum consumers must handle the new codes); v1 and successful v2 shapes are unchanged, and existing v2 error envelopes remain valid. Generic historical failures without retained XML do not establish a particular unsupported type. Inspect host-native rejection as well as DTO `ok`.
|
|
115
|
+
|
|
116
|
+
Use the declared scope/completeness to choose a further authorized inspection. The separate strict XML/base protocol in [diff](2026-10-06-diffs-and-patches.md#loaded-bases-and-snapshots) is not a status-tool fallback; checkin and merge readiness have their own source admission.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Tools and loading
|
|
2
|
+
|
|
3
|
+
[Documentation index](README.md) · [Tool-by-tool routing](README.md#look-up-a-tool)
|
|
4
|
+
|
|
5
|
+
Pi Plastic registers **27 core tools** with output schemas, plus `plastic_tool_search`. The loader describes/activates capabilities and intentionally has no core receipt schema.
|
|
6
|
+
|
|
7
|
+
## Capability loader
|
|
8
|
+
|
|
9
|
+
When a tool is inactive, use the smallest sufficient capability search:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
plastic_tool_search(query="review pending changes")
|
|
13
|
+
plastic_tool_search(toolNames=["plastic_patch"])
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Matches are bounded, include workflow/safety guidance, and enable selected tools for the **next model request**. Activation is additive: it does not remove built-ins or other extensions' tools.
|
|
17
|
+
|
|
18
|
+
| Controls | Meaning |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `query` | Capability/workflow text |
|
|
21
|
+
| `toolNames` | Up to four exact public tool names |
|
|
22
|
+
| `limit` | 1–4 matches; default is the single best capability match |
|
|
23
|
+
|
|
24
|
+
Use exact names only when you actually need those tools. Browsing the catalog does not require enabling everything. The [index](README.md#look-up-a-tool) maps every registered tool to its semantic reference.
|
|
25
|
+
|
|
26
|
+
`plastic_workspaceCreate` is not registered or discoverable: the package does not yet provide the paired safe workspace-cleanup capability. It is not an alternative to the read-only `plastic_workspaceList` tool.
|
|
27
|
+
|
|
28
|
+
## Loading modes
|
|
29
|
+
|
|
30
|
+
Set `PI_PLASTIC_TOOL_LOADING_MODE` before starting Pi:
|
|
31
|
+
|
|
32
|
+
| Mode | Initial package tools | Use |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `balanced` | Loader, `plastic_status`, `plastic_currentBranch` | Default; inspect first and activate task capabilities as needed |
|
|
35
|
+
| `loader-only` | Loader | Maximum initial schema reduction |
|
|
36
|
+
| `all-active` | All 27 core tools; loader omitted from the active set | Controlled comparison or intentional full exposure |
|
|
37
|
+
|
|
38
|
+
Inactive tools remain registered. Prior loader additions on the active session branch are restored on startup, resume, fork, and reload.
|
|
39
|
+
|
|
40
|
+
## Ownership and fallback
|
|
41
|
+
|
|
42
|
+
Pi's canonical `sourceInfo` identifies this package's effective tools before activation, deferral, or restoration.
|
|
43
|
+
|
|
44
|
+
If ownership of the tools/loader cannot be established:
|
|
45
|
+
|
|
46
|
+
- Preserve the existing active set exactly.
|
|
47
|
+
- Do not defer, remove, or activate a same-named tool that could belong to another extension.
|
|
48
|
+
- An effective package loader may report known tools already active, but cannot activate unowned inactive names.
|
|
49
|
+
|
|
50
|
+
On a sourceInfo-capable host, providers without native deferred definitions still receive the current active set after a loader call. This is not a claim that every provider or RPC transport preserves every receipt.
|
|
51
|
+
|
|
52
|
+
## Tool families
|
|
53
|
+
|
|
54
|
+
| Family | Purpose |
|
|
55
|
+
|---|---|
|
|
56
|
+
| Status and discovery | Observe pending paths, branch paths/existence, workspace records, shelf IDs, review IDs |
|
|
57
|
+
| Workspace operations | Add/undo/update/check in, create/delete/switch branches, request delete/change removal |
|
|
58
|
+
| Merging | Workspace merge/finalization, server merge, staged branch closeout |
|
|
59
|
+
| Diffs and patches | Compare explicitly scoped content or generate a review artifact—not patch application |
|
|
60
|
+
| Shelvesets and reviews | Create/apply/delete shelvesets; create/update/delete code reviews |
|
|
61
|
+
|
|
62
|
+
Use status to list changed paths. Use diff when content evidence is needed, not as routine ceremony. Use preflight only when scope is broad/ambiguous, a compound operation needs inspection, or the user asks for it; its meaning varies by tool.
|
|
63
|
+
|
|
64
|
+
Read [safety and receipts](2026-10-06-safety-and-receipts.md) before chaining mutations. [Workflow skill references](../skills/using-plastic/SKILL.md) supply task-specific guidance; loading a tool is not authorization to mutate.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Workspace operations
|
|
2
|
+
|
|
3
|
+
[Documentation index](README.md) · [Safety and receipts](2026-10-06-safety-and-receipts.md) · [Merging](2026-10-06-merging.md)
|
|
4
|
+
|
|
5
|
+
These tools act on explicitly requested workspace/branch scope. Command completion and resulting-state verification are separate. Prefer exact paths; broad directory/wildcard intent is not an exclusivity or containment guarantee for every operation.
|
|
6
|
+
|
|
7
|
+
## Choose an operation
|
|
8
|
+
|
|
9
|
+
| Tool | Intent | Receipt boundary |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| add | Add requested path operands | Added-item identity remains unverified |
|
|
12
|
+
| update | Update with dontmerge/noinput | Changed items, branch/head, preservation and cleanliness unverified |
|
|
13
|
+
| undo | Undo requested paths | Restored bytes, undone-item count and cleanliness unverified |
|
|
14
|
+
| checkin | Check in selected pending work | Can admit an emitted root changeset; head/link/alias/Xlink/exhaustion unverified |
|
|
15
|
+
| branchCreate | Create a hierarchical branch | Command completion, not observed created-branch identity |
|
|
16
|
+
| branchDelete | Delete an exact branch | Command completion, not deletion/history/rollback proof |
|
|
17
|
+
| switchBranch | Apply pending policy and switch | Ordered stage evidence; post-observation may remain uncertain |
|
|
18
|
+
| resolveDeleteChangeConflict | Request source-side removal | Not verified conflict resolution or retention |
|
|
19
|
+
|
|
20
|
+
Examples below are Pi tool calls and assume separately authorized mutation targets.
|
|
21
|
+
|
|
22
|
+
## add
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
plastic_add(paths=["Assets/Example.txt"])
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
One `cm add` attempt preserves ordered path expressions, duplicates, spaces/Unicode, relative/absolute paths, directories and requested wildcards. It does not rewrite or expand them in the producer.
|
|
29
|
+
|
|
30
|
+
The array is not an option/stdin channel. Hyphen-leading or whitespace-prefixed switches and `-` are rejected; use `./-name` for a literal hyphen-leading filename. No automatic recursion/coparent/ignorefailed flags, containment inference, readback/retry/undo/checkin, format or preflight is added.
|
|
31
|
+
|
|
32
|
+
Valid complete exit 0, including admitted warnings, establishes command-completed only. Requested operand count is not a verified added-item count; expanded/other-workspace/symlink/Xlink scope and preservation stay unverified. The separate internal checkin add path is unchanged.
|
|
33
|
+
|
|
34
|
+
## update
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
plastic_update()
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Only workdir is accepted. Dispatch remains `cm update --dontmerge --noinput`, at most once, with no status/version/verification read or retry. No preview API is added.
|
|
41
|
+
|
|
42
|
+
Complete exit 0, including admitted warnings, is not a verified no-op, changed-file list, workspace root, branch/head, preservation, cleanliness or merge readiness. Opaque progress is not returned as structured state. Failure stops dependent core closeout before merge/checkin.
|
|
43
|
+
|
|
44
|
+
## undo
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
plastic_undo(paths=["Assets/Example.txt"])
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Undo can irreversibly discard work.** The one-command path preserves exact requested expressions, ordering and duplicates. Broad paths/patterns do not certify exclusive scope.
|
|
51
|
+
|
|
52
|
+
Reject CLI options/filters such as `--added`, `--unchanged`, `-r`, `--symlink`, whitespace-prefixed flags and stdin `-`. A filter without a path could imply destructive cwd-wide scope. Use `./-name` for a literal. No automatic filters/recursion/symlink/force flags, backup, preview/format, readback/retry or rollback.
|
|
53
|
+
|
|
54
|
+
Even complete exit 0 cannot establish restored bytes, preservation or zero pending items. Choose independent scoped inspection when needed.
|
|
55
|
+
|
|
56
|
+
## checkin
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
plastic_checkin(paths=["Assets/Example.txt"], message="Implement feature", includeAll=false, includePrivate=false)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Inspect the declared selection defaults before omitting paths or enabling broad/private scope. `preflight=true` reads pending scope once and does not mutate; it is not a zero-command plan. `updateAfter` remains blocked before dispatch.
|
|
63
|
+
|
|
64
|
+
The admitted Windows CM 11 source profile covers STATUS/pending and nonce-framed CI_START/STAGE/CO/AD/DE/MV/CHANGESET records, plus the narrow copied-path CP extension. Original Unicode, decimal-string changeset IDs, explicit branch prefixes and complete emitted server tails are preserved.
|
|
65
|
+
|
|
66
|
+
Only one admitted root changeset on successful complete capture supports `changeset-created`. Empty output/exit 0 alone does not. Unknown/malformed/full-tail records, incomplete capture and invalid UTF-8 fail before projection.
|
|
67
|
+
|
|
68
|
+
### Existing recovery, not general retry permission
|
|
69
|
+
|
|
70
|
+
Eligible complete admitted failures may use the existing path fallback or sensitive-filtered private add/retry path. Timeout, abort, launch/capture uncertainty and unadmitted evidence never authorize retry.
|
|
71
|
+
|
|
72
|
+
Per-step attempts/captures/effects retain successful earlier adds/checkins after later failure. Failed post/recovery reads stay null; even empty pending after failed checkin is not completion proof. Non-preflight core failures reject, preventing compound continuation based on a presentation string.
|
|
73
|
+
|
|
74
|
+
### Checkin bounds
|
|
75
|
+
|
|
76
|
+
At most 8 steps, 500 admitted source records per observation, one aggregate 100-reference projection budget with explicit omissions, 131,072-byte UTF-8 receipt and 24,000-byte presentation. Whole identity references cap 4,096 code units and are never trimmed into plausible selectors.
|
|
77
|
+
|
|
78
|
+
## branchCreate
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
plastic_branchCreate(branch="owned-feature", parent="/main")
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Use an explicit parent independently of the loaded branch. If omitted, relative names require directly observed standard-status loaded branch; compact changeset-only status or a changeset-owner query cannot provide the parent.
|
|
85
|
+
|
|
86
|
+
- Qualified relative names/parents are rejected rather than losing scope; use a full qualified hierarchical target.
|
|
87
|
+
- Full hierarchical qualified targets remain verbatim.
|
|
88
|
+
- Top-level creation requires explicit `allowRootBranch=true`.
|
|
89
|
+
- A successful complete exit 0, even empty stdout, supports command completion with observedCreatedIdentity=null/effect not-proven.
|
|
90
|
+
- No automatic switch, verification query or branch-create preflight is added.
|
|
91
|
+
|
|
92
|
+
## branchDelete
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
plastic_branchDelete(branch="/main/owned-feature", preflight=true)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
One exact bounded branch operand and deleteChangesets policy are recorded. `deleteChangesets` defaults false; enable history deletion only with explicit intent. Preflight is a zero-CLI command plan, not existence/permission/readiness analysis. `format="text"|"json"` is presentation.
|
|
99
|
+
|
|
100
|
+
Relative/qualified spelling is preserved; options/stdin/unsafe text are rejected. Complete exit 0 does not prove deleted branch identity, history effects, scope or rollback. Possible-start/nonzero/incomplete failures remain uncertain, with no query, retry or switch-back. Core non-preflight failures reject.
|
|
101
|
+
|
|
102
|
+
## switchBranch
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
plastic_switchBranch(branch="/main/owned-feature", pendingChanges="cancel", preflight=true)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The closed v1 receipt distinguishes preflight, already-loaded, canceled, blocked, switched, command-completed-unverified, failed and uncertain. Earlier shelf/switch completion and possible effects remain after later failure; shelveset identity, preservation, alias equivalence, Xlink results and rollback are not invented.
|
|
109
|
+
|
|
110
|
+
Admission requires directly observed standard loaded branch and strict complete pending evidence. Compact changeset ownership is not a loaded branch; malformed/lossy/skipped pending rows never mean clean.
|
|
111
|
+
|
|
112
|
+
Targets are bounded hierarchical selectors. Already-loaded comparison requires exact branch and, if requested, exact repository/server spelling. A completed switch with failed/mismatched post-read or unverified qualification returns an error retaining completion—not verified switched.
|
|
113
|
+
|
|
114
|
+
### Pending policies
|
|
115
|
+
|
|
116
|
+
- Tracked bring is blocked; explicit cancel with pending is canceled.
|
|
117
|
+
- Private-only/defaulted cancel, bring, or shelve can switch directly without a shelf under the existing policy.
|
|
118
|
+
- Tracked shelve creates a shelf then uses silent/noinput switch.
|
|
119
|
+
- Recovery is limited to the complete exit 1 empty-stdout workspace-specific no-changes error plus an admitted read proving no tracked pending. Failed recovery stops, never substitutes empty.
|
|
120
|
+
- Failed shelving retains uncertain preservation even if recovery observes the target. No automatic undo, shelf apply/delete, update/checkin or switch-back follows.
|
|
121
|
+
|
|
122
|
+
Preflight performs 2 local reads. Direct application uses 4 commands, shelving 5, eligible recovery at most 6; observations are not atomic. Pending capture: 1 MiB stdout/64 KiB stderr, 20,000 records. Other steps: 64 KiB/16 KiB. Receipt: 6 steps/131072 UTF-8 bytes; identities 4,096 code units and admitted standard-header grammar.
|
|
123
|
+
|
|
124
|
+
## resolveDeleteChangeConflict
|
|
125
|
+
|
|
126
|
+
```text
|
|
127
|
+
plastic_resolveDeleteChangeConflict(paths=["Assets/Example.txt"], keepOnDisk=true, preflight=true)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
One `cm remove [--nodisk] <operands...>` requests source-side deletion. `keepOnDisk=true` is the default; explicit false omits nodisk and permits disk deletion. Requested retention is not a preservation guarantee, and requested operand count is not a resolved-item count.
|
|
131
|
+
|
|
132
|
+
Directory removal is recursive under client defaults. Deliberate directories/wildcards/absolute operands do not certify exclusive scope, containment, symlink, other-workspace or Xlink effects. No automatic flags/expansion/backup/readback or merge continuation.
|
|
133
|
+
|
|
134
|
+
Reject option/stdin operands and bare case-insensitive, outer-whitespace `private`/`controlled` mode tokens anywhere. For literal names use `./private`, `./controlled`, `./-name`, or a full path. Preflight is zero CLI; format selects text/JSON. Completed output, including admitted warnings, proves remove completion only; resolution/items/preservation/pending/workspace facts remain null.
|
|
135
|
+
|
|
136
|
+
## Shared capture and input limits
|
|
137
|
+
|
|
138
|
+
Add/undo/remove path lists: 1–256 operands, 4,096 UTF-16 code units each, 32,768 aggregate UTF-8 operand bytes; workdir 4096. Branch/checkin controls have their own aggregate schema/argv gates; see the loaded schema and operation-specific bounds above.
|
|
139
|
+
|
|
140
|
+
Selected single-command captures retain 64 KiB stdout/16 KiB stderr with fatal UTF-8/BOM preserved. Nominal retirement is 30 seconds plus 5 seconds TERM→KILL grace and at most 5 seconds additional drain. Earlier abort/capture failure can initiate that grace sooner. Retirement preserves genuine observed lifecycle facts but is not process-stop or rollback proof.
|
|
141
|
+
|
|
142
|
+
Nonzero/partial/invalid-UTF-8/overflow/abort/missing-terminal outcomes remain failed/uncertain as declared. Core failures reject, while native failures return their receipt. Legacy read and internal collectors are not globally migrated by these bounds. See [transport limitations](2026-10-06-development.md#structured-api-and-transport) for SDK normalization and foreign-hook behavior.
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Pi Plastic documentation
|
|
2
|
+
|
|
3
|
+
[Package overview](../README.md) · [Workflow skill](../skills/using-plastic/SKILL.md)
|
|
4
|
+
|
|
5
|
+
This is the public manual shipped with the package. Start with a task, then read only the relevant tool family. Topic filenames keep their creation-date prefix; the titles below are the navigation surface.
|
|
6
|
+
|
|
7
|
+
## Choose a task
|
|
8
|
+
|
|
9
|
+
| I want to… | Read |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Install or update the package; configure CM/diff | [Setup](2026-10-06-setup.md) |
|
|
12
|
+
| Enable a capability without loading every tool | [Tools and loading](2026-10-06-tools-and-loading.md#loading-modes) |
|
|
13
|
+
| Understand what a result proves, or respond to uncertainty | [Safety and receipts](2026-10-06-safety-and-receipts.md) |
|
|
14
|
+
| Inspect pending paths and merge hints | [Status](2026-10-06-status.md) |
|
|
15
|
+
| Find branches, workspaces, shelvesets, or review IDs | [Discovery](2026-10-06-discovery.md) |
|
|
16
|
+
| Add/undo/check in files, switch branches, create/delete a branch | [Workspace operations](2026-10-06-workspace-operations.md) |
|
|
17
|
+
| Choose workspace merge versus server merge versus closeout | [Merging](2026-10-06-merging.md#choose-a-route) |
|
|
18
|
+
| Review local/historical changes or generate a patch | [Diffs and patches](2026-10-06-diffs-and-patches.md) |
|
|
19
|
+
| Save/apply/delete a shelf or manage a review | [Shelvesets and reviews](2026-10-06-shelvesets-and-reviews.md) |
|
|
20
|
+
| Understand display, footer, or ignore/cloak behavior | [Integrations](2026-10-06-integrations.md) |
|
|
21
|
+
| Run tests, understand schema/transport behavior, or change the package | [Development](2026-10-06-development.md) |
|
|
22
|
+
|
|
23
|
+
## Look up a tool
|
|
24
|
+
|
|
25
|
+
Argument descriptions in the loaded tool schema are the source for exact call parameters. The pages below explain semantics, defaults, bounds, and follow-up decisions; they are not alternate parsers or automatic recovery instructions.
|
|
26
|
+
|
|
27
|
+
| Tool | Reference |
|
|
28
|
+
|---|---|
|
|
29
|
+
| `plastic_tool_search` | [Tools and loading](2026-10-06-tools-and-loading.md#capability-loader) |
|
|
30
|
+
| `plastic_status` | [Status sources](2026-10-06-status.md#choose-a-source) |
|
|
31
|
+
| `plastic_currentBranch` | [Current branch](2026-10-06-discovery.md#currentbranch) |
|
|
32
|
+
| `plastic_branchExists` | [Branch existence](2026-10-06-discovery.md#branchexists) |
|
|
33
|
+
| `plastic_branchList` | [Branch list](2026-10-06-discovery.md#branchlist) |
|
|
34
|
+
| `plastic_workspaceList` | [Workspace list](2026-10-06-discovery.md#workspacelist) |
|
|
35
|
+
| `plastic_shelvesetList` | [Shelveset IDs](2026-10-06-discovery.md#shelvesetlist) |
|
|
36
|
+
| `plastic_codeReviewFind` | [Review IDs](2026-10-06-discovery.md#codereviewfind) |
|
|
37
|
+
| `plastic_add` | [Add](2026-10-06-workspace-operations.md#add) |
|
|
38
|
+
| `plastic_update` | [Update](2026-10-06-workspace-operations.md#update) |
|
|
39
|
+
| `plastic_undo` | [Undo](2026-10-06-workspace-operations.md#undo) |
|
|
40
|
+
| `plastic_checkin` | [Checkin](2026-10-06-workspace-operations.md#checkin) |
|
|
41
|
+
| `plastic_branchCreate` | [Branch creation](2026-10-06-workspace-operations.md#branchcreate) |
|
|
42
|
+
| `plastic_branchDelete` | [Branch deletion](2026-10-06-workspace-operations.md#branchdelete) |
|
|
43
|
+
| `plastic_switchBranch` | [Switching](2026-10-06-workspace-operations.md#switchbranch) |
|
|
44
|
+
| `plastic_resolveDeleteChangeConflict` | [Delete/change removal](2026-10-06-workspace-operations.md#resolvedeletechangeconflict) |
|
|
45
|
+
| `plastic_merge` | [Workspace merge](2026-10-06-merging.md#merge-and-finalizemerge) |
|
|
46
|
+
| `plastic_finalizeMerge` | [Finalization](2026-10-06-merging.md#merge-and-finalizemerge) |
|
|
47
|
+
| `plastic_mergeBranches` | [Server merge](2026-10-06-merging.md#mergebranches) |
|
|
48
|
+
| `plastic_mergeToBranch` | [Closeout](2026-10-06-merging.md#mergetobranch) |
|
|
49
|
+
| `plastic_diff` | [Diff modes](2026-10-06-diffs-and-patches.md#diff-modes) |
|
|
50
|
+
| `plastic_patch` | [Patch generation](2026-10-06-diffs-and-patches.md#patch-generation) |
|
|
51
|
+
| `plastic_shelvesetCreate` | [Shelf creation](2026-10-06-shelvesets-and-reviews.md#shelvesetcreate) |
|
|
52
|
+
| `plastic_shelvesetApply` | [Shelf application](2026-10-06-shelvesets-and-reviews.md#shelvesetapply) |
|
|
53
|
+
| `plastic_shelvesetDelete` | [Object deletion](2026-10-06-shelvesets-and-reviews.md#object-deletion) |
|
|
54
|
+
| `plastic_codeReviewCreate` | [Review creation](2026-10-06-shelvesets-and-reviews.md#codereviewcreate) |
|
|
55
|
+
| `plastic_codeReviewUpdate` | [Review update](2026-10-06-shelvesets-and-reviews.md#codereviewupdate) |
|
|
56
|
+
| `plastic_codeReviewDelete` | [Object deletion](2026-10-06-shelvesets-and-reviews.md#object-deletion) |
|
|
57
|
+
|
|
58
|
+
## Reading results as an agent
|
|
59
|
+
|
|
60
|
+
1. Load the smallest sufficient capability through `plastic_tool_search` when it is inactive.
|
|
61
|
+
2. Read the tool schema and only the relevant reference section. Use [the workflow skill](../skills/using-plastic/SKILL.md) when the task calls for operational guidance.
|
|
62
|
+
3. Use structured output where available. Inspect `ok`, completeness, scope, effects, and any unattempted stages; don't recover facts by scraping presentation text.
|
|
63
|
+
4. Choose further read-only inspection or an authorized resolution when evidence is incomplete. A failed command may have effects; uncertainty is not permission to replay it.
|
|
64
|
+
|
|
65
|
+
The package does not automatically load this manual into every agent context. The same-package links are readable relative to the installed skill/package, without a separate reference-reader dependency.
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./shared/bash-command-guards";
|
|
7
7
|
|
|
8
8
|
const BLOCK_MESSAGE =
|
|
9
|
-
"`cm diff` is blocked in Pi because it can launch a GUI window and hang CLI automation. Use `plastic_status` when only changed paths are needed. Do not diff routinely; when change-boundary evidence is necessary, use
|
|
9
|
+
"`cm diff` is blocked in Pi because it can launch a GUI window and hang CLI automation. Use `plastic_status` when only changed paths are needed. Do not diff routinely; when change-boundary evidence is necessary, use `plastic_diff` with explicit mode=file, revisions, or workspace and bounded scope.";
|
|
10
10
|
|
|
11
11
|
const CM_EXECUTABLE = String.raw`(?:"(?:[^"]*[\\/])?cm(?:\.exe)?"|'(?:[^']*[\\/])?cm(?:\.exe)?'|(?:[^"'\s]*[\\/])?cm(?:\.exe)?)`;
|
|
12
12
|
const DIFF_SUBCOMMAND = String.raw`(?:diff|differences)`;
|