@arnilo/prism-coding-agent 0.1.4 → 0.1.5

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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.5] - 2026-08-11
4
+
5
+ ### Changed
6
+ - Removed `ReadToolOptions.autoResizeImages` (breaking, documented). The flag was inert without `transformImage`; untyped callers now fail closed with a `TypeError` naming `transformImage` before any path resolution or filesystem access. See [migration](../../docs/migration.md) `0.1.4 → 0.1.5`.
7
+
3
8
  ## [0.1.0] - 2026-08-09
4
9
 
5
10
  ### Changed
package/dist/read.d.ts CHANGED
@@ -11,8 +11,7 @@
11
11
  * - **Image resize is host-owned.** pi resizes images to ≤2000×2000 via a photon/WASM +
12
12
  * `worker_threads` helper (`utils/image-process.js`); this package rejects oversize images by
13
13
  * `stat`/`buffer.length` against `maxImageBytes` and accepts an optional `transformImage`
14
- * callback for host-provided resizing. `autoResizeImages` is deprecated — it only takes effect
15
- * when paired with `transformImage`.
14
+ * callback for host-provided resizing.
16
15
  * - Abort + all read failures return a Prism `error` result (pi throws/rejects). Prism's
17
16
  * `dispatchToolCall` would catch a throw anyway, but returning a clean error result is predictable
18
17
  * for direct-`execute` callers and matches the package's `shell` tool.
@@ -84,11 +83,6 @@ export interface ReadOperations {
84
83
  export interface ReadToolOptions {
85
84
  /** Structured pre-execution policy checked before filesystem access. */
86
85
  executionPolicy?: ExecutionPolicy;
87
- /**
88
- * @deprecated Use `transformImage` instead. When `transformImage` is absent this flag is ignored.
89
- * When both are set, `transformImage` runs and `image.resized` is `true` on success.
90
- */
91
- autoResizeImages?: boolean;
92
86
  /** Reject image reads larger than this many bytes (default {@link DEFAULT_MAX_IMAGE_BYTES}). */
93
87
  maxImageBytes?: number;
94
88
  /** Maximum raw bytes scanned to reach one text page (default 64 MiB). */
package/dist/read.js CHANGED
@@ -11,8 +11,7 @@
11
11
  * - **Image resize is host-owned.** pi resizes images to ≤2000×2000 via a photon/WASM +
12
12
  * `worker_threads` helper (`utils/image-process.js`); this package rejects oversize images by
13
13
  * `stat`/`buffer.length` against `maxImageBytes` and accepts an optional `transformImage`
14
- * callback for host-provided resizing. `autoResizeImages` is deprecated — it only takes effect
15
- * when paired with `transformImage`.
14
+ * callback for host-provided resizing.
16
15
  * - Abort + all read failures return a Prism `error` result (pi throws/rejects). Prism's
17
16
  * `dispatchToolCall` would catch a throw anyway, but returning a clean error result is predictable
18
17
  * for direct-`execute` callers and matches the package's `shell` tool.
@@ -287,9 +286,6 @@ async function loadImageBuffer(absolutePath, mimeType, ops, options) {
287
286
  throw new Error(`Transformed image is ${formatSize(buffer.length)}, exceeds ${formatSize(options.maxImageBytes)} limit.`);
288
287
  }
289
288
  }
290
- else if (options.autoResizeImages) {
291
- // Deprecated flag without a transformer — intentionally ignored for backward compatibility.
292
- }
293
289
  return { buffer, resized };
294
290
  }
295
291
  function errorResult(toolCallId, message) {
@@ -301,6 +297,9 @@ function errorResult(toolCallId, message) {
301
297
  };
302
298
  }
303
299
  export function createReadTool(cwd, options) {
300
+ if (options && "autoResizeImages" in options) {
301
+ throw new TypeError('Read tool: "autoResizeImages" was removed in 0.1.5; use "transformImage" instead.');
302
+ }
304
303
  const ops = options?.operations ?? defaultReadOperations;
305
304
  const maxLines = validateCodingLimit("maxLines", options?.maxLines ?? DEFAULT_MAX_LINES, HARD_MAX_LINES);
306
305
  const maxBytes = validateCodingLimit("maxBytes", options?.maxBytes ?? DEFAULT_MAX_BYTES, HARD_MAX_BYTES);
@@ -351,7 +350,6 @@ export function createReadTool(cwd, options) {
351
350
  const { buffer, resized } = await loadImageBuffer(allowedPath, mimeType, ops, {
352
351
  maxImageBytes,
353
352
  transformImage: options?.transformImage,
354
- autoResizeImages: options?.autoResizeImages,
355
353
  signal: context.signal,
356
354
  });
357
355
  options?.readPathSet?.add(allowedPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arnilo/prism-coding-agent",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Optional coding-agent tools (shell, read, write, edit, repo_list, repo_search, glob, delete, move, opt-in Git/check/ask-user-decision, and durable plan/checkpoint helpers) package for Prism.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,8 +28,8 @@
28
28
  "diff": "^9.0.0"
29
29
  },
30
30
  "peerDependencies": {
31
- "@arnilo/prism": "0.1.4",
32
- "@arnilo/prism-workflows": "0.1.4"
31
+ "@arnilo/prism": "0.1.5",
32
+ "@arnilo/prism-workflows": "0.1.5"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@arnilo/prism": "file:../..",