|
|
@@ -205,7 +205,7 @@ interface FsPolicyExec {
|
|
|
|
|
|
## Read outcome (consumer / read rendering)
|
|
|
|
|
|
-A text read is bounded by line window, byte cap, and backend limits. The outcome the model-facing `read` tool renders is purely presentational; there is no `full`/`partial` view — authorization is freshness-based (the tool emits `fs/observed` with the stat's version directly), so any windowed read can authorize a later write/edit when the file is unchanged. Read windowing and this outcome shape live in `dsh-tool-fs` (the executor that owns the read), not in the policy plugin.
|
|
|
+A text read is bounded by line window, byte cap, and backend limits. After the byte cap is reached, scanning continues without retaining more lines so `totalLines` remains exact. The outcome the model-facing `read` tool renders is purely presentational; there is no `full`/`partial` view — authorization is freshness-based (the tool emits `fs/observed` with the stat's version directly), so any windowed read can authorize a later write/edit when the file is unchanged. Read windowing and this outcome shape live in `dsh-tool-fs` (the executor that owns the read), not in the policy plugin.
|
|
|
|
|
|
```ts type-equiv
|
|
|
/** Outcome of a bounded text read — what {@link formatReadOutput} renders. */
|
|
|
@@ -214,9 +214,9 @@ interface FileReadOutcome {
|
|
|
offset: number
|
|
|
/** Returned lines, already numbered. */
|
|
|
lines: FileTextLine[]
|
|
|
- /** Total line count in the file, unless `truncatedByBytes` stopped scanning early. */
|
|
|
+ /** Exact total line count in the file. */
|
|
|
totalLines: number
|
|
|
- /** Whether selected output hit the byte cap before EOF or the requested limit. */
|
|
|
+ /** Whether selected output hit the byte cap. */
|
|
|
truncatedByBytes?: true
|
|
|
}
|
|
|
```
|