koneck 2.111.0 → 2.112.0

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/engine.d.ts CHANGED
@@ -146,6 +146,19 @@ export declare function finishedWithoutBuilding(task: string, usedMutatingTool:
146
146
  * others write a long status report admitting they stopped early; treating either as a final
147
147
  * answer ends the run mid-investigation.
148
148
  */
149
+ /**
150
+ * Whether a plan step is a checkpoint with the person rather than work to do.
151
+ *
152
+ * These are steps the model writes when it means to stop and let the user decide: present a
153
+ * proposal, get approval, wait for confirmation, ask before proceeding. KONECK's "do not stop while
154
+ * steps remain" nudge would drive straight through them, which is how a proposal got "approved" by
155
+ * nobody. So they are recognised and the run stops at them.
156
+ *
157
+ * Deliberately about waiting on a person, not about caution in general. "Review the code" is work
158
+ * the model does; "wait for the user to review" is a stop. The tell is a second person or an act of
159
+ * permission — present/show/ask/confirm/approve/await, aimed at the user.
160
+ */
161
+ export declare function stepAwaitsUser(text: string): boolean;
149
162
  export declare function announcesMoreWork(text: string): boolean;
150
163
  export declare function buildClient(config: AgentConfig): OpenAI;
151
164
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAc5B,OAAO,EACE,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAuBtC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAMvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAetC,OAAO,EAAwD,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtG,OAAO,EAA2B,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAIlB,OAAO,EAA0D,KAAK,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AM,CAAC;IACnB,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAGD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,WAAW,EACnB,eAAe,CAAC,EAAE,OAAO,EAAE,EAC3B,MAAM,CAAC,EAAE,YAAY,GACpB,OAAO,CAAC,YAAY,CAAC,CAiLvB"}
package/dist/engine.js CHANGED
@@ -545,6 +545,36 @@ export function finishedWithoutBuilding(task, usedMutatingTool) {
545
545
  * others write a long status report admitting they stopped early; treating either as a final
546
546
  * answer ends the run mid-investigation.
547
547
  */
548
+ /**
549
+ * Whether a plan step is a checkpoint with the person rather than work to do.
550
+ *
551
+ * These are steps the model writes when it means to stop and let the user decide: present a
552
+ * proposal, get approval, wait for confirmation, ask before proceeding. KONECK's "do not stop while
553
+ * steps remain" nudge would drive straight through them, which is how a proposal got "approved" by
554
+ * nobody. So they are recognised and the run stops at them.
555
+ *
556
+ * Deliberately about waiting on a person, not about caution in general. "Review the code" is work
557
+ * the model does; "wait for the user to review" is a stop. The tell is a second person or an act of
558
+ * permission — present/show/ask/confirm/approve/await, aimed at the user.
559
+ */
560
+ export function stepAwaitsUser(text) {
561
+ const t = ` ${text.toLowerCase()} `;
562
+ // An explicit request for the user's input or leave to continue.
563
+ if (/\b(await|wait for|waiting for|pending)\b[^.]*\b(user|approval|confirmation|response|reply|feedback|go-?ahead|sign-?off|decision|input)\b/.test(t)) {
564
+ return true;
565
+ }
566
+ if (/\b(get|obtain|request|seek|need)\b[^.]*\b(approval|confirmation|sign-?off|permission|the user'?s? (ok|okay|go-?ahead|decision|feedback))\b/.test(t)) {
567
+ return true;
568
+ }
569
+ // Presenting or asking, directed at the user.
570
+ if (/\b(present|show|share|send|give)\b[^.]*\bto (the )?(user|you)\b/.test(t))
571
+ return true;
572
+ if (/\b(ask|confirm|check) (with )?(the )?(user|you)\b/.test(t))
573
+ return true;
574
+ if (/\bproposal to (the )?(user|you)\b/.test(t))
575
+ return true;
576
+ return false;
577
+ }
548
578
  export function announcesMoreWork(text) {
549
579
  const trimmed = text.trim();
550
580
  if (!trimmed)
@@ -2784,6 +2814,28 @@ detectedContext = { current: 0 }) {
2784
2814
  // again immediately, which is the proof it had not finished and knew it.
2785
2815
  const unfinished = planRef.current.steps.filter(step => step.state === 'todo' || step.state === 'doing');
2786
2816
  const nextStep = unfinished[0];
2817
+ /*
2818
+ * A plan step that waits for the user stops the run, rather than being nudged past.
2819
+ *
2820
+ * The continuation nudge exists to stop a model stalling mid-build — "do not stop while steps
2821
+ * remain". But a plan whose next step is "present the proposal to the user", "get approval",
2822
+ * "wait for confirmation" is a step that is supposed to stop, and nudging it onward overrides
2823
+ * the user's say-so. Reported exactly: a proposal presented, no answer given, and the run
2824
+ * continued anyway — with the model writing "user said continue" to account for a step it was
2825
+ * pushed through. Nobody said continue; KONECK's own nudge did.
2826
+ *
2827
+ * So when the next unfinished step reads as a checkpoint with the person, the run ends and
2828
+ * hands back, which is what the step asked for.
2829
+ */
2830
+ if (nextStep && stepAwaitsUser(nextStep.text)) {
2831
+ config.onAwaitingUser?.(nextStep.text);
2832
+ if (!silent) {
2833
+ tui.printWarning(`Waiting for you: the plan's next step is "${nextStep.text}". `
2834
+ + `KONECK has stopped here rather than deciding on your behalf — say how to proceed.`);
2835
+ }
2836
+ // Not a nudge, not a failure: a deliberate hand-back. The plan is kept as it stands.
2837
+ return true;
2838
+ }
2787
2839
  // A cut loop is answered first and on its own. The general nudge tells the model to carry
2788
2840
  // on with what it was describing, which is precisely what it was stuck describing — so
2789
2841
  // sending that instead would restart the loop with encouragement.
@@ -3214,6 +3266,40 @@ detectedContext = { current: 0 }) {
3214
3266
  : '');
3215
3267
  }
3216
3268
  }
3269
+ else if (effectiveName === 'ask_user') {
3270
+ /*
3271
+ * The model asked the person a question and must now wait for the answer.
3272
+ *
3273
+ * The intentional counterpart to the plan-step guard: rather than KONECK inferring that a
3274
+ * step wants the user, the model says so outright by calling this. The turn ends and
3275
+ * control returns — the run does not continue on a guessed answer, which is the whole
3276
+ * failure this exists to prevent.
3277
+ */
3278
+ let asked = {};
3279
+ try {
3280
+ asked = JSON.parse(tc.arguments);
3281
+ }
3282
+ catch { /* handled below */ }
3283
+ const question = typeof asked.question === 'string' ? asked.question.trim() : '';
3284
+ if (question === '') {
3285
+ result = 'ERROR: ask_user needs a "question" string.';
3286
+ }
3287
+ else {
3288
+ const options = Array.isArray(asked.options)
3289
+ ? asked.options.map(String).filter(Boolean) : [];
3290
+ config.onAskUser?.(question, options);
3291
+ if (!silent) {
3292
+ tui.printWarning(`The model is waiting for you:\n ${question}`
3293
+ + (options.length ? `\n Options: ${options.join(', ')}` : ''));
3294
+ }
3295
+ // The tool call needs an answer in the transcript so the session can resume cleanly when
3296
+ // the person replies — their reply is the next user message, which answers it.
3297
+ messages.push({ role: 'tool', tool_call_id: tc.id,
3298
+ content: 'ASKED THE USER — waiting for their reply. Do not proceed until they answer.' });
3299
+ trajectory?.add({ t: 'stop', at: Date.now(), reason: 'asked the user: ' + question });
3300
+ return true;
3301
+ }
3302
+ }
3217
3303
  else if (effectiveName === 'plan') {
3218
3304
  let parsedPlan = {};
3219
3305
  try {