@arnilo/prism-coding-agent 0.0.24 → 0.0.25
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 +10 -0
- package/README.md +1 -1
- package/dist/ask-user-decision.js +25 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.25] - 2026-08-06
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- `ask_user_decision` durable elicitation hook maps onto shared pending decisions (blocking `ask()` unchanged for process-local path).
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
- Released with exact 0.0.25 graph.
|
|
10
|
+
|
|
11
|
+
See [migration guide](../../docs/migration.md) for the 0.0.24 → 0.0.25 notes.
|
|
12
|
+
|
|
3
13
|
## [0.0.24] - 2026-08-04
|
|
4
14
|
|
|
5
15
|
### Added
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @arnilo/prism-coding-agent
|
|
2
2
|
|
|
3
|
-
Optional first-party coding tools package for [Prism](https://www.npmjs.com/package/@arnilo/prism). Provides host shell/filesystem/repository tools — `shell`, `read`, `write`, `edit`, `repo_list`, `repo_search`, `glob`, `delete`, `move` — plus opt-in structured Git/check tools via `createGitTools()`, opt-in `createAskUserDecisionTool({ ask })
|
|
3
|
+
Optional first-party coding tools package for [Prism](https://www.npmjs.com/package/@arnilo/prism). Provides host shell/filesystem/repository tools — `shell`, `read`, `write`, `edit`, `repo_list`, `repo_search`, `glob`, `delete`, `move` — plus opt-in structured Git/check tools via `createGitTools()`, opt-in `createAskUserDecisionTool({ ask })` (durable runs surface as shared elicitation decisions), and durable plan/checkpoint helpers for workflow composition — as Prism `ToolDefinition` objects. **Inert until a host imports it and registers the tools into a `ToolRegistry`.** No tool is auto-registered; hosts pick factories (or filter aggregator output) and may mix in their own `ToolDefinition`s.
|
|
4
4
|
|
|
5
5
|
Behavior is a behavioral port of the pi coding agent's `bash`/`read`/`write`/`edit` tools, adapted to Prism's `ToolDefinition` / `ToolResult` contracts (no `@earendil-works/*` or `typebox` dependencies). List/search/glob/Git are native Prism tools (hand-rolled glob; no picomatch/ripgrep).
|
|
6
6
|
|
|
@@ -257,6 +257,31 @@ export function createAskUserDecisionTool(options) {
|
|
|
257
257
|
required: ["question", "options"],
|
|
258
258
|
additionalProperties: false,
|
|
259
259
|
},
|
|
260
|
+
// Shared elicitation mapping (Phase 8): a durable gated run surfaces this call as a
|
|
261
|
+
// kind:"elicitation" pending decision; the answer payload resolves it without executing ask().
|
|
262
|
+
// The full UX payload (question + options with pros/cons) rides on the schema's extension key.
|
|
263
|
+
elicitation: (args) => {
|
|
264
|
+
let parsed;
|
|
265
|
+
try {
|
|
266
|
+
parsed = parseAskUserDecisionArgs(args, limits);
|
|
267
|
+
}
|
|
268
|
+
catch {
|
|
269
|
+
return undefined; // malformed args fall back to plain tool approval; execute reports the parse error
|
|
270
|
+
}
|
|
271
|
+
return {
|
|
272
|
+
schema: {
|
|
273
|
+
...askUserDecisionResumeSchema(parsed),
|
|
274
|
+
"x-prism-ask-user-decision": toAskUserDecisionSuspendData(parsed),
|
|
275
|
+
},
|
|
276
|
+
reason: parsed.question,
|
|
277
|
+
validate: (payload) => {
|
|
278
|
+
resolveAskUserDecisionAnswer(payload, parsed.selectionMode, parsed.options, {
|
|
279
|
+
allowCustom: parsed.allowCustom,
|
|
280
|
+
maxCustomTextBytes: limits.maxCustomTextBytes,
|
|
281
|
+
});
|
|
282
|
+
},
|
|
283
|
+
};
|
|
284
|
+
},
|
|
260
285
|
async execute(args, context) {
|
|
261
286
|
const toolCallId = context.toolCallId;
|
|
262
287
|
if (context.signal?.aborted)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arnilo/prism-coding-agent",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
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.0.
|
|
32
|
-
"@arnilo/prism-workflows": "0.0.
|
|
31
|
+
"@arnilo/prism": "0.0.25",
|
|
32
|
+
"@arnilo/prism-workflows": "0.0.25"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@arnilo/prism": "file:../..",
|