blun-king-cli 9.1.396 → 9.1.397

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/LIESMICH.txt CHANGED
@@ -381,6 +381,17 @@ Anweisung wie "Zeig mir den letzten Telegram-Verlauf" das passende Werkzeug im
381
381
  selben Modellschritt erhalten, während Begrüßungen und fachfremde Anfragen keine
382
382
  zusätzlichen Schemata laden.
383
383
 
384
+ Abschlussbedingungen mit Laufzeitbeleg
385
+ --------------------------------------
386
+
387
+ Ab BLUN King 9.1.397 kann ein autonomes Ziel mit ausdrücklich gesetzter
388
+ Abschlussbedingung nicht mehr allein aufgrund einer Textbehauptung als fertig
389
+ markiert werden. Vor dem Abschluss muss ein aktueller Prüf-Checkpoint vorliegen,
390
+ der auf mindestens einem erfolgreichen Laufzeitwerkzeug beruht und als verifiziert
391
+ eingestuft ist. Fehlt dieser Beleg, bleibt das Ziel aktiv und King erhält eine
392
+ konkrete Nachbesserung statt einer falschen Fertigmeldung. Ziele ohne ausdrücklich
393
+ gesetzte Abschlussbedingung behalten ihr bisheriges Verhalten.
394
+
384
395
  Angehängte Bilder werden weiterhin mit ReadMediaFile gelesen. Bild-, Video- und
385
396
  Spracherzeugung laufen asynchron, sodass die Konsole während der Verarbeitung
386
397
  nutzbar bleibt. GenerateVideo kann außerdem einen abgeschlossenen Bildauftrag
package/README.md CHANGED
@@ -391,6 +391,16 @@ Anweisung wie „Zeig mir den letzten Telegram-Verlauf“ das passende Werkzeug
391
391
  selben Modellschritt erhalten, während Begrüßungen und fachfremde Anfragen keine
392
392
  zusätzlichen Schemata laden.
393
393
 
394
+ ## Abschlussbedingungen mit Laufzeitbeleg
395
+
396
+ Ab BLUN King 9.1.397 kann ein autonomes Ziel mit ausdrücklich gesetzter
397
+ Abschlussbedingung nicht mehr allein aufgrund einer Textbehauptung als fertig
398
+ markiert werden. Vor dem Abschluss muss ein aktueller Prüf-Checkpoint vorliegen,
399
+ der auf mindestens einem erfolgreichen Laufzeitwerkzeug beruht und als verifiziert
400
+ eingestuft ist. Fehlt dieser Beleg, bleibt das Ziel aktiv und King erhält eine
401
+ konkrete Nachbesserung statt einer falschen Fertigmeldung. Ziele ohne ausdrücklich
402
+ gesetzte Abschlussbedingung behalten ihr bisheriges Verhalten.
403
+
394
404
  Angehängte Bilder werden weiterhin mit `ReadMediaFile` gelesen. Bild-, Video-
395
405
  und Spracherzeugung laufen asynchron, sodass die Konsole während der Verarbeitung
396
406
  nutzbar bleibt. `GenerateVideo` kann außerdem einen abgeschlossenen Bildauftrag
@@ -0,0 +1,57 @@
1
+ 'use strict';
2
+
3
+ function hasCompletionCriterion(goal) {
4
+ return typeof goal?.completionCriterion === 'string'
5
+ && goal.completionCriterion.trim().length > 0;
6
+ }
7
+
8
+ function successfulRuntimeEvidence(checkpoint) {
9
+ const successfulTools = Number(checkpoint?.evidenceReceipt?.successfulTools);
10
+ return Number.isSafeInteger(successfulTools) && successfulTools > 0;
11
+ }
12
+
13
+ function evaluateGoalCompletionEvidence(goal) {
14
+ if (!hasCompletionCriterion(goal)) {
15
+ return {
16
+ required: false,
17
+ allPassed: true,
18
+ result: 'satisfied',
19
+ gaps: [],
20
+ };
21
+ }
22
+
23
+ const checkpoint = goal?.actionCheckpoint;
24
+ if (!checkpoint || typeof checkpoint !== 'object' || Array.isArray(checkpoint)) {
25
+ return {
26
+ required: true,
27
+ allPassed: false,
28
+ result: 'needs_revision',
29
+ gaps: ['Save a verify-phase action checkpoint before completing the goal.'],
30
+ };
31
+ }
32
+
33
+ const gaps = [];
34
+ if (checkpoint.phase !== 'verify') {
35
+ gaps.push('The latest action checkpoint must be in the verify phase.');
36
+ }
37
+ if (checkpoint.evidenceBasis !== 'runtime_tool') {
38
+ gaps.push('The completion proof must come from a runtime tool.');
39
+ }
40
+ if (checkpoint.epistemicState !== 'verified') {
41
+ gaps.push('The completion proof must be classified as verified.');
42
+ }
43
+ if (!successfulRuntimeEvidence(checkpoint)) {
44
+ gaps.push('The runtime evidence receipt must contain at least one successful tool result.');
45
+ }
46
+
47
+ return {
48
+ required: true,
49
+ allPassed: gaps.length === 0,
50
+ result: gaps.length === 0 ? 'satisfied' : 'needs_revision',
51
+ gaps,
52
+ };
53
+ }
54
+
55
+ module.exports = {
56
+ evaluateGoalCompletionEvidence,
57
+ };
package/blun.mjs CHANGED
@@ -21447,6 +21447,7 @@ var { projectSoulText } = createRequire(import.meta.url)("./bin/soul-organizatio
21447
21447
  var { soulFileInstruction } = createRequire(import.meta.url)("./bin/soul-preservation-policy.cjs");
21448
21448
  var { readProfilePersona, resolveSoulFile } = createRequire(import.meta.url)("./bin/profile-identity-resolution.cjs");
21449
21449
  var { advanceActionEvidenceReceipt, assertActionCheckpointEvidenceBasis, assertActionCheckpointRevision, emptyActionEvidenceReceipt, normalizeActionCheckpoint, projectActionCheckpoint } = createRequire(import.meta.url)("./bin/cognitive-action-checkpoint.cjs");
21450
+ var { evaluateGoalCompletionEvidence } = createRequire(import.meta.url)("./bin/goal-completion-evidence-policy.cjs");
21450
21451
  async function prepareSystemPromptContext(kaos, brandHome, options) {
21451
21452
  const additionalDirs = normalizeAdditionalDirs(options?.additionalDirs ?? []);
21452
21453
  const [cwdListing, agentsMdResult, additionalDirsInfo] = await Promise.all([
@@ -230394,6 +230395,10 @@ var init_goal$1 = __esmMin((() => {
230394
230395
  async markComplete(input = {}, actor = "model") {
230395
230396
  const state = this.state;
230396
230397
  if (state === void 0 || state.status !== "active") return null;
230398
+ const completionEvidence = evaluateGoalCompletionEvidence(state);
230399
+ if (!completionEvidence.allPassed) {
230400
+ throw new BlunError(ErrorCodes.GOAL_STATUS_INVALID, `Completion criterion needs revision: ${completionEvidence.gaps.join(" ")} Run the required verification, save a runtime-backed verify checkpoint, then mark the goal complete.`);
230401
+ }
230397
230402
  const mcInjector = this.agent.injection?.getMissionContractInjector();
230398
230403
  if (mcInjector) {
230399
230404
  const evaluation = mcInjector.evaluate();
@@ -262710,7 +262715,7 @@ var init_outcome_prompts = __esmMin((() => {}));
262710
262715
  //#region ../../packages/agent-core/src/tools/builtin/goal/update-goal.md?raw
262711
262716
  var update_goal_default;
262712
262717
  var init_update_goal$1 = __esmMin((() => {
262713
- update_goal_default = "Update the current autonomous goal. Set `status` only for a lifecycle change. After a coherent work slice, save `actionCheckpoint` with a monotone revision, the last verified result, exact next action, expected evidence, and an explicit evidence basis. Use `runtime_tool` only when a successful tool in this turn measured the result; use `user_statement` for a direct user assertion, `external_report` for a report not independently measured here, and `carried_forward` only when the last verified text is unchanged. Classify knowledge as `verified`, `credible_unverified`, `hypothesis`, `uncertain_memory`, `stale`, or `unknown`; never present a weaker state as verified, and preserve the state on carry-forward. Start at revision 1 and increment the currently projected revision by exactly one; stale writers fail closed. This is durable progress state, not permission, and should change only when the facts change. A checkpoint-only call keeps the goal active.\n\n- `active` — resume a paused or blocked goal when the user explicitly asks you to work on that goal.\n- `complete` — the objective is fully satisfied, all files are written, all tests pass, and any stated validation has passed.\n- `blocked` — a genuine external condition or required user decision prevents progress.\n- `paused` — set the goal aside for now.\n\nDo not mark complete after a plan or partial result. If useful work remains, checkpoint it and continue. Do not ask for permission merely to execute an already authorized checkpoint; ask only at a real rights boundary or missing user decision.\n";
262718
+ update_goal_default = "Update the current autonomous goal. Set `status` only for a lifecycle change. After a coherent work slice, save `actionCheckpoint` with a monotone revision, the last verified result, exact next action, expected evidence, and an explicit evidence basis. Use `runtime_tool` only when a successful tool in this turn measured the result; use `user_statement` for a direct user assertion, `external_report` for a report not independently measured here, and `carried_forward` only when the last verified text is unchanged. Classify knowledge as `verified`, `credible_unverified`, `hypothesis`, `uncertain_memory`, `stale`, or `unknown`; never present a weaker state as verified, and preserve the state on carry-forward. Start at revision 1 and increment the currently projected revision by exactly one; stale writers fail closed. This is durable progress state, not permission, and should change only when the facts change. A checkpoint-only call keeps the goal active.\n\n- `active` — resume a paused or blocked goal when the user explicitly asks you to work on that goal.\n- `complete` — the objective is fully satisfied, all files are written, all tests pass, and any stated validation has passed. When the goal has a completion criterion, first save a `verify` checkpoint with `runtime_tool`, `verified`, and a successful runtime evidence receipt.\n- `blocked` — a genuine external condition or required user decision prevents progress.\n- `paused` — set the goal aside for now.\n\nDo not mark complete after a plan or partial result. If useful work remains, checkpoint it and continue. Do not ask for permission merely to execute an already authorized checkpoint; ask only at a real rights boundary or missing user decision.\n";
262714
262719
  }));
262715
262720
  //#endregion
262716
262721
  //#region ../../packages/agent-core/src/tools/builtin/goal/update-goal.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "9.1.396",
3
+ "version": "9.1.397",
4
4
  "description": "BLUN CLI - your own AI agent with a Telegram channel. Get it done. With BLUN.",
5
5
  "license": "MIT",
6
6
  "bin": {