@workser/engine 0.1.11 → 0.1.13
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/dist/src/session.js +2 -1
- package/dist/src/tools/files.js +8 -2
- package/package.json +1 -1
package/dist/src/session.js
CHANGED
|
@@ -13,7 +13,8 @@ const DELTA_FLUSH_CHARS = 200;
|
|
|
13
13
|
const DELTA_FLUSH_MS = 150;
|
|
14
14
|
/** Thinking a turn may put on the event stream; the rest is dropped (the answer is not). */
|
|
15
15
|
const REASONING_MAX_CHARS = 20_000;
|
|
16
|
-
|
|
16
|
+
/** Workser Code's default model (owner 2026-11-10); a job normally names its own (core picks it). Claude Sonnet 4.5 retires 30 Nov 2026. */
|
|
17
|
+
const DEFAULT_MODEL = 'deepseek/deepseek-v4.1-flash-1017';
|
|
17
18
|
const MAX_OUTPUT_IN_EVENT = 4_000;
|
|
18
19
|
/**
|
|
19
20
|
* OpenCode's agent loop, run where WE choose (plan D1, "loop in our service"):
|
package/dist/src/tools/files.js
CHANGED
|
@@ -67,8 +67,14 @@ export const readTool = {
|
|
|
67
67
|
if (!kind)
|
|
68
68
|
throw new Error(`File not found: ${filepath}`);
|
|
69
69
|
const bytes = await ctx.place.readFile(filepath);
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
// Said so the model stops trying: on 9 Nov a job spent four turns resizing and re-reading photos it could never see.
|
|
71
|
+
if (isBinary(bytes)) {
|
|
72
|
+
if (/\.(png|jpe?g|gif|webp|avif|bmp|ico|svgz|tiff?)$/i.test(filepath)) {
|
|
73
|
+
throw new Error(`${filepath} is an image, and read only shows text: converting or resizing it will not change that. ` +
|
|
74
|
+
`Check an image with a command instead (identify for its size and format), or look at the page that shows it in the browser.`);
|
|
75
|
+
}
|
|
76
|
+
throw new Error(`Cannot read binary file: ${filepath}. read only shows text files; inspect this one with a command instead.`);
|
|
77
|
+
}
|
|
72
78
|
const all = new TextDecoder().decode(bytes).split('\n');
|
|
73
79
|
if (all.length > 0 && all[all.length - 1] === '')
|
|
74
80
|
all.pop();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workser/engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Workser's coding engine for the 'loop in our service' mode: OpenCode's agent contract (its prompts, tool schemas and edit semantics, vendored from v1.18.23) running on Node, with every file and shell action going through a Place — so the machine can be a remote sandbox and no model key is ever on it.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|