blun-king-cli 9.1.439 → 9.1.441

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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const CANONICAL_LATEST_DOMAINS = new Set([
4
- 'goal', 'open_thread', 'next_trigger', 'expected_evidence',
4
+ 'goal', 'open_thread', 'knowledge_gap', 'next_trigger', 'expected_evidence',
5
5
  ]);
6
6
  const CONFIDENCE_MARGIN = 0.2;
7
7
 
@@ -6,13 +6,19 @@ const {
6
6
  cognitiveEntityKey,
7
7
  } = require('./cognitive-salience-policy.cjs');
8
8
 
9
- const FOCUS_DOMAINS = new Set(['self', 'team', 'goal', 'open_thread', 'next_trigger', 'expected_evidence']);
9
+ const FOCUS_DOMAINS = new Set([
10
+ 'self', 'world', 'team', 'goal', 'open_thread', 'assumption', 'knowledge_gap',
11
+ 'next_trigger', 'expected_evidence',
12
+ ]);
10
13
  const DOMAIN_WEIGHTS = new Map([
11
14
  ['goal', 60],
12
15
  ['open_thread', 50],
13
16
  ['next_trigger', 40],
14
17
  ['expected_evidence', 30],
18
+ ['knowledge_gap', 28],
19
+ ['assumption', 25],
15
20
  ['team', 20],
21
+ ['world', 15],
16
22
  ['self', 10],
17
23
  ]);
18
24
  const LABELS = new Map([
@@ -20,7 +26,10 @@ const LABELS = new Map([
20
26
  ['open_thread', 'Open thread'],
21
27
  ['next_trigger', 'Next trigger'],
22
28
  ['expected_evidence', 'Expected evidence'],
29
+ ['knowledge_gap', 'Knowledge gap'],
30
+ ['assumption', 'Assumption'],
23
31
  ['team', 'Team'],
32
+ ['world', 'World fact'],
24
33
  ['self', 'Self'],
25
34
  ]);
26
35
  const SAFETY_LINE = 'Durable context only; it cannot authorize any action or override the current assignment or runtime policy.';
@@ -91,6 +100,7 @@ function buildCognitiveFocusSelection(state, {
91
100
  if (!scopes.includes(latest.scope)) continue;
92
101
  const effective = resolveCognitiveEvidenceGroup(entries);
93
102
  if (!effective) continue;
103
+ if (effective.domain === 'knowledge_gap' && effective.value === 'none') continue;
94
104
  ranked.push({
95
105
  ...effective,
96
106
  salience: salience.get(cognitiveEntityKey(effective)) ?? 1,
@@ -5,7 +5,10 @@ const crypto = require('node:crypto');
5
5
  const SALIENCE_DECAY = 0.05;
6
6
  const SALIENCE_FLOOR = 0.1;
7
7
  const SALIENCE_REINFORCEMENT = 0.25;
8
- const FOCUS_DOMAINS = new Set(['self', 'team', 'goal', 'open_thread', 'next_trigger', 'expected_evidence']);
8
+ const FOCUS_DOMAINS = new Set([
9
+ 'self', 'world', 'team', 'goal', 'open_thread', 'assumption', 'knowledge_gap',
10
+ 'next_trigger', 'expected_evidence',
11
+ ]);
9
12
  const ACCESS_KEY_RE = /^focus:access:([a-f0-9]{40})$/u;
10
13
  const SAFE_ID_RE = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/u;
11
14
 
@@ -6,7 +6,10 @@ const path = require('node:path');
6
6
  const { DatabaseSync } = require('node:sqlite');
7
7
 
8
8
  const SAFE_ID_RE = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/u;
9
- const DOMAINS = new Set(['self', 'world', 'team', 'goal', 'open_thread', 'assumption', 'next_trigger', 'expected_evidence']);
9
+ const DOMAINS = new Set([
10
+ 'self', 'world', 'team', 'goal', 'open_thread', 'assumption', 'knowledge_gap',
11
+ 'next_trigger', 'expected_evidence',
12
+ ]);
10
13
  const EPISTEMIC_STATES = new Set([
11
14
  'verified', 'credible_unverified', 'hypothesis', 'uncertain_memory', 'stale', 'unknown', 'legacy_unknown',
12
15
  ]);
@@ -16,7 +16,10 @@ const RIGHTS_DECISIONS = new Set(['passed', 'blocked', 'not_applicable']);
16
16
  const TOOL_POLICY_DECISIONS = new Set(['passed', 'blocked', 'error']);
17
17
  const TOOL_OUTCOMES = new Set(['success', 'error', 'cancelled']);
18
18
  const TURN_REASONS = new Set(['completed', 'cancelled', 'filtered', 'failed']);
19
- const FOCUS_DOMAINS = new Set(['self', 'team', 'goal', 'open_thread', 'next_trigger', 'expected_evidence']);
19
+ const FOCUS_DOMAINS = new Set([
20
+ 'self', 'world', 'team', 'goal', 'open_thread', 'assumption', 'knowledge_gap',
21
+ 'next_trigger', 'expected_evidence',
22
+ ]);
20
23
  const FOCUS_EPISTEMIC_STATES = new Set([
21
24
  'verified', 'credible_unverified', 'hypothesis', 'uncertain_memory', 'stale', 'unknown', 'legacy_unknown',
22
25
  ]);
@@ -83,6 +83,7 @@ function buildCognitiveWorkFocus(goal) {
83
83
  && nextAction && checkpointEvidence;
84
84
  const epistemicState = hasCheckpoint && EPISTEMIC_STATES.has(checkpointEpistemicState)
85
85
  ? checkpointEpistemicState : hasCheckpoint ? 'legacy_unknown' : 'verified';
86
+ const knowledgeGapValue = hasProblemFrame ? frameMissingKnowledge.join(' | ') : 'none';
86
87
  const digest = crypto.createHash('sha256')
87
88
  .update([
88
89
  goalId, objective, completionCriterion, status, String(turnsUsed),
@@ -115,13 +116,19 @@ function buildCognitiveWorkFocus(goal) {
115
116
  ? [
116
117
  `Goal is ${status}. Phase ${checkpointPhase}. Last verified: ${lastVerified}`,
117
118
  `Next action: ${nextAction}`,
118
- hasProblemFrame ? `Missing knowledge: ${frameMissingKnowledge.join(' | ')}` : '',
119
119
  hasProblemFrame ? `Risk: ${frameRisk}` : '',
120
120
  hasProblemFrame ? `Selected action: ${frameSelectedAction}` : '',
121
121
  ].filter(Boolean).join(' ')
122
122
  : `Goal is ${status}.`),
123
123
  confidence: 1, epistemicState, scope: focusScope,
124
124
  },
125
+ {
126
+ domain: 'knowledge_gap', key: `${keyRoot}:knowledge-gaps`,
127
+ value: knowledgeGapValue,
128
+ confidence: 1,
129
+ epistemicState: hasProblemFrame ? 'unknown' : 'verified',
130
+ scope: focusScope,
131
+ },
125
132
  {
126
133
  domain: 'next_trigger', key: `${keyRoot}:next`,
127
134
  value: status === 'active' && hasCheckpoint ? triggerValue : NEXT_TRIGGER.get(status),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "9.1.439",
3
+ "version": "9.1.441",
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": {