dsh-chief 1.6.0 → 1.7.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/CHANGELOG.md +31 -0
- package/README.en.md +277 -123
- package/README.md +283 -129
- package/api-routes.js +193 -2
- package/board-actions.js +1452 -2060
- package/board-handoff.js +709 -0
- package/board-schema.js +35 -2
- package/chief-approvals.js +6 -2
- package/chief-commands.js +1884 -3486
- package/chief-executor.js +6 -1
- package/chief-network.js +1098 -869
- package/chief-review.js +193 -3
- package/chief-state.js +1996 -3078
- package/chief-view.js +7 -4
- package/client.js +12237 -8021
- package/command-helpers.js +568 -0
- package/command-ops.js +1226 -0
- package/digest.js +25 -3
- package/index.js +6 -0
- package/locale/en.json +4 -4
- package/locale/zh.json +4 -4
- package/model-tools.js +40 -2
- package/network-harness.js +1047 -0
- package/package.json +8 -2
- package/runtime-hooks.js +69 -2
- package/safety/guard-walls.js +5 -0
- package/safety/invariant-guards.js +125 -6
- package/safety/tool-gate.js +2 -0
- package/state-media.js +173 -0
- package/state-schema.js +1505 -0
- package/subagent-runtime.js +57 -3
package/chief-view.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
loadChiefState,
|
|
18
18
|
mutateChiefState,
|
|
19
19
|
computeClusterSig,
|
|
20
|
+
emptyWorkspace,
|
|
20
21
|
ensureWorkspace,
|
|
21
22
|
clusterView,
|
|
22
23
|
shortAgentBriefName,
|
|
@@ -28,7 +29,7 @@ import {
|
|
|
28
29
|
summarizeLlmLedger,
|
|
29
30
|
} from './chief-state.js'
|
|
30
31
|
import { listChiefModels, callChiefLlm } from './chief-models.js'
|
|
31
|
-
import { collectClusterPeerProgress, listPeerDirectory } from './chief-network.js'
|
|
32
|
+
import { collectClusterPeerProgress, listPeerDirectory, computeBubbleState } from './chief-network.js'
|
|
32
33
|
|
|
33
34
|
let idleAutoPilotHook = null
|
|
34
35
|
|
|
@@ -405,7 +406,7 @@ export async function getChiefView(deps, sessionId, { regenerate = false, autoSu
|
|
|
405
406
|
const isFresh = !rawInput || (hasSaved && view.narrative.hash === inputHash)
|
|
406
407
|
const cooledForAuto = Date.now() - lastSummaryAt >= AUTO_SUMMARY_COOLDOWN_MS
|
|
407
408
|
const cooledForChat = Date.now() - lastSummaryAt >= CHAT_OPPORTUNISTIC_SUMMARY_COOLDOWN_MS
|
|
408
|
-
const allowBackgroundSummary = runMode === 'managed' && autoSummarize && !isFresh && cooledForAuto
|
|
409
|
+
const allowBackgroundSummary = Boolean(effCfgBefore.sessionEnabled) && runMode === 'managed' && autoSummarize && !isFresh && cooledForAuto
|
|
409
410
|
const allowChatSummary = Boolean(chatTriggered) && !isFresh && cooledForChat
|
|
410
411
|
|
|
411
412
|
// Opportunistically refresh stale narrative in background after Chief chats (60s debounce),
|
|
@@ -498,12 +499,13 @@ export async function getChiefView(deps, sessionId, { regenerate = false, autoSu
|
|
|
498
499
|
}
|
|
499
500
|
}
|
|
500
501
|
|
|
501
|
-
const ownWsBeforeStop =
|
|
502
|
+
const ownWsBeforeStop = (latestState.workspaces && latestState.workspaces[rootId]) || emptyWorkspace()
|
|
502
503
|
const effectiveConfigBeforeStop = resolveWorkspaceConfig(latestState, rootId)
|
|
503
504
|
if (
|
|
504
505
|
!_skipAutoPilotCheck
|
|
505
506
|
&& rootId
|
|
506
507
|
&& rootId !== 'global'
|
|
508
|
+
&& effectiveConfigBeforeStop.sessionEnabled
|
|
507
509
|
&& (effectiveConfigBeforeStop.autoPilot || effectiveConfigBeforeStop.runMode === 'managed')
|
|
508
510
|
&& effectiveConfigBeforeStop.runMode === 'managed'
|
|
509
511
|
&& !effectiveConfigBeforeStop.stopped
|
|
@@ -520,7 +522,7 @@ export async function getChiefView(deps, sessionId, { regenerate = false, autoSu
|
|
|
520
522
|
|
|
521
523
|
const finalState = loadChiefState()
|
|
522
524
|
const finalView = clusterView(finalState, rootId)
|
|
523
|
-
const ownWs =
|
|
525
|
+
const ownWs = (finalState.workspaces && finalState.workspaces[rootId]) || emptyWorkspace()
|
|
524
526
|
const effectiveConfig = resolveWorkspaceConfig(finalState, rootId)
|
|
525
527
|
const narrativeAt = hasLatestSaved
|
|
526
528
|
? (latestView.narrative.at || 0)
|
|
@@ -569,6 +571,7 @@ export async function getChiefView(deps, sessionId, { regenerate = false, autoSu
|
|
|
569
571
|
activeWork: getChiefActiveWork(rootId),
|
|
570
572
|
llmLedger: summarizeLlmLedger(ownWs.llmLedger, effectiveConfig),
|
|
571
573
|
alertEvents: (Array.isArray(ownWs.alertEvents) ? ownWs.alertEvents : []).slice(-12),
|
|
574
|
+
bubble: computeBubbleState(deps, rootId, finalState, directory),
|
|
572
575
|
auditLog: (Array.isArray(ownWs.auditLog) ? ownWs.auditLog : []).slice(-50).reverse(),
|
|
573
576
|
}
|
|
574
577
|
}
|