dahrk-node 0.1.12 → 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/main.js +9 -9
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -470,13 +470,13 @@ function toElicitQuestion(q) {
|
|
|
470
470
|
${lines.join("\n")}` : q.question;
|
|
471
471
|
return { prompt, options, ...q.multiSelect ? { multiSelect: true } : {} };
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
const
|
|
475
|
-
const q
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
(
|
|
479
|
-
return {
|
|
473
|
+
async function askQuestionsSequentially(questions, ask) {
|
|
474
|
+
const answers = [];
|
|
475
|
+
for (const q of questions) {
|
|
476
|
+
answers.push(await ask(toElicitQuestion(q)));
|
|
477
|
+
}
|
|
478
|
+
if (answers.length === 1) return answers[0];
|
|
479
|
+
return answers.map((a, i) => `Q${i + 1} (${questions[i].question}): ${a}`).join("\n");
|
|
480
480
|
}
|
|
481
481
|
function createAskUserQuestionTool(deps) {
|
|
482
482
|
const askTool = tool2(
|
|
@@ -484,7 +484,7 @@ function createAskUserQuestionTool(deps) {
|
|
|
484
484
|
"Ask the human a structured multiple-choice question and wait for their selection. Use this when you need the human to choose between options before you can continue.",
|
|
485
485
|
{ questions: z2.array(questionSchema).min(1) },
|
|
486
486
|
async (args) => {
|
|
487
|
-
const text = await
|
|
487
|
+
const text = await askQuestionsSequentially(args.questions, deps.ask);
|
|
488
488
|
return { content: [{ type: "text", text }] };
|
|
489
489
|
}
|
|
490
490
|
);
|
|
@@ -6103,7 +6103,7 @@ async function runStatus(inputs, deps) {
|
|
|
6103
6103
|
}
|
|
6104
6104
|
|
|
6105
6105
|
// src/main.ts
|
|
6106
|
-
var CLIENT_VERSION = "0.1.
|
|
6106
|
+
var CLIENT_VERSION = "0.1.13";
|
|
6107
6107
|
var DEFAULT_HUB_URL = "wss://api.dahrk.ai";
|
|
6108
6108
|
var list = (v) => (v ?? "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
6109
6109
|
var RUNTIMES2 = ["claude-code", "codex", "pi"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dahrk-node",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"tsup": "^8.3.5",
|
|
45
45
|
"tsx": "^4.19.0",
|
|
46
|
-
"@dahrk/
|
|
47
|
-
"@dahrk/
|
|
46
|
+
"@dahrk/edge": "0.1.0",
|
|
47
|
+
"@dahrk/executor-worktree": "0.1.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsup",
|