@workser/engine 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/dist/src/session.d.ts +2 -0
- package/dist/src/session.js +9 -1
- package/package.json +4 -3
package/dist/src/session.d.ts
CHANGED
|
@@ -113,3 +113,5 @@ export declare class CoreSession implements EngineSession {
|
|
|
113
113
|
private runTool;
|
|
114
114
|
private context;
|
|
115
115
|
}
|
|
116
|
+
/** What an ask says the AI agent wants to do, by permission (`mcp`: a connected MCP server's tool, from the runner). */
|
|
117
|
+
export declare function askVerb(permission: string): string;
|
package/dist/src/session.js
CHANGED
|
@@ -487,7 +487,7 @@ export class CoreSession {
|
|
|
487
487
|
const asked = await this.options.ask({
|
|
488
488
|
kind: 'permission',
|
|
489
489
|
title: request.title.slice(0, 300),
|
|
490
|
-
message: `The AI agent wants to ${request.permission
|
|
490
|
+
message: `The AI agent wants to ${askVerb(request.permission)}:\n${request.detail.slice(0, 3_000)}`,
|
|
491
491
|
action_summary: request.detail.slice(0, 500),
|
|
492
492
|
payload: { permission: request.permission, patterns: request.patterns },
|
|
493
493
|
});
|
|
@@ -502,6 +502,14 @@ export class CoreSession {
|
|
|
502
502
|
};
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
+
/** What an ask says the AI agent wants to do, by permission (`mcp`: a connected MCP server's tool, from the runner). */
|
|
506
|
+
export function askVerb(permission) {
|
|
507
|
+
if (permission === 'bash')
|
|
508
|
+
return 'run a command';
|
|
509
|
+
if (permission === 'mcp')
|
|
510
|
+
return 'use a connected tool';
|
|
511
|
+
return 'change a file';
|
|
512
|
+
}
|
|
505
513
|
function randomId() {
|
|
506
514
|
return Math.random().toString(36).slice(2, 12);
|
|
507
515
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workser/engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
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",
|
|
@@ -21,10 +21,11 @@
|
|
|
21
21
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
22
22
|
"test": "rm -rf dist && tsc -p tsconfig.json && node --test dist/test/*.test.js",
|
|
23
23
|
"prepublishOnly": "rm -rf dist && NODE_OPTIONS=--max-old-space-size=3072 tsc -p tsconfig.json && node scripts/check-pack.mjs",
|
|
24
|
-
"check:pack": "node scripts/check-pack.mjs"
|
|
24
|
+
"check:pack": "node scripts/check-pack.mjs",
|
|
25
|
+
"release": "npm version patch && npm publish"
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
27
|
-
"@workser/runtime": "^0.1.
|
|
28
|
+
"@workser/runtime": "^0.1.9"
|
|
28
29
|
},
|
|
29
30
|
"peerDependencies": {
|
|
30
31
|
"e2b": ">=1"
|