dsh-chief 1.5.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 +63 -0
- package/README.en.md +281 -129
- package/README.md +286 -134
- package/api-routes.js +232 -2
- package/board-actions.js +1452 -2005
- package/board-handoff.js +709 -0
- package/board-schema.js +365 -7
- package/chief-approvals.js +6 -2
- package/chief-archives.js +1 -0
- package/chief-commands.js +1884 -3484
- package/chief-compaction.js +1 -0
- package/chief-executor.js +6 -1
- package/chief-models.js +112 -5
- package/chief-network.js +1098 -869
- package/chief-review.js +448 -51
- package/chief-state.js +1996 -2523
- package/chief-view.js +10 -4
- package/client.js +20318 -11591
- package/command-helpers.js +568 -0
- package/command-ops.js +1226 -0
- package/digest.js +29 -4
- package/idle-guard.js +233 -8
- package/index.js +6 -0
- package/locale/en.json +72 -1
- package/locale/zh.json +72 -1
- package/model-tools.js +46 -3
- package/network-harness.js +1047 -0
- package/package.json +13 -5
- package/runtime-hooks.js +316 -14
- package/safety/guard-walls.js +5 -0
- package/safety/invariant-guards.js +126 -6
- package/safety/tool-gate.js +2 -0
- package/state-media.js +173 -0
- package/state-schema.js +1505 -0
- package/subagent-runtime.js +85 -4
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,
|
|
@@ -25,9 +26,10 @@ import {
|
|
|
25
26
|
beginChiefActiveWork,
|
|
26
27
|
endChiefActiveWork,
|
|
27
28
|
getChiefActiveWork,
|
|
29
|
+
summarizeLlmLedger,
|
|
28
30
|
} from './chief-state.js'
|
|
29
31
|
import { listChiefModels, callChiefLlm } from './chief-models.js'
|
|
30
|
-
import { collectClusterPeerProgress, listPeerDirectory } from './chief-network.js'
|
|
32
|
+
import { collectClusterPeerProgress, listPeerDirectory, computeBubbleState } from './chief-network.js'
|
|
31
33
|
|
|
32
34
|
let idleAutoPilotHook = null
|
|
33
35
|
|
|
@@ -404,7 +406,7 @@ export async function getChiefView(deps, sessionId, { regenerate = false, autoSu
|
|
|
404
406
|
const isFresh = !rawInput || (hasSaved && view.narrative.hash === inputHash)
|
|
405
407
|
const cooledForAuto = Date.now() - lastSummaryAt >= AUTO_SUMMARY_COOLDOWN_MS
|
|
406
408
|
const cooledForChat = Date.now() - lastSummaryAt >= CHAT_OPPORTUNISTIC_SUMMARY_COOLDOWN_MS
|
|
407
|
-
const allowBackgroundSummary = runMode === 'managed' && autoSummarize && !isFresh && cooledForAuto
|
|
409
|
+
const allowBackgroundSummary = Boolean(effCfgBefore.sessionEnabled) && runMode === 'managed' && autoSummarize && !isFresh && cooledForAuto
|
|
408
410
|
const allowChatSummary = Boolean(chatTriggered) && !isFresh && cooledForChat
|
|
409
411
|
|
|
410
412
|
// Opportunistically refresh stale narrative in background after Chief chats (60s debounce),
|
|
@@ -497,12 +499,13 @@ export async function getChiefView(deps, sessionId, { regenerate = false, autoSu
|
|
|
497
499
|
}
|
|
498
500
|
}
|
|
499
501
|
|
|
500
|
-
const ownWsBeforeStop =
|
|
502
|
+
const ownWsBeforeStop = (latestState.workspaces && latestState.workspaces[rootId]) || emptyWorkspace()
|
|
501
503
|
const effectiveConfigBeforeStop = resolveWorkspaceConfig(latestState, rootId)
|
|
502
504
|
if (
|
|
503
505
|
!_skipAutoPilotCheck
|
|
504
506
|
&& rootId
|
|
505
507
|
&& rootId !== 'global'
|
|
508
|
+
&& effectiveConfigBeforeStop.sessionEnabled
|
|
506
509
|
&& (effectiveConfigBeforeStop.autoPilot || effectiveConfigBeforeStop.runMode === 'managed')
|
|
507
510
|
&& effectiveConfigBeforeStop.runMode === 'managed'
|
|
508
511
|
&& !effectiveConfigBeforeStop.stopped
|
|
@@ -519,7 +522,7 @@ export async function getChiefView(deps, sessionId, { regenerate = false, autoSu
|
|
|
519
522
|
|
|
520
523
|
const finalState = loadChiefState()
|
|
521
524
|
const finalView = clusterView(finalState, rootId)
|
|
522
|
-
const ownWs =
|
|
525
|
+
const ownWs = (finalState.workspaces && finalState.workspaces[rootId]) || emptyWorkspace()
|
|
523
526
|
const effectiveConfig = resolveWorkspaceConfig(finalState, rootId)
|
|
524
527
|
const narrativeAt = hasLatestSaved
|
|
525
528
|
? (latestView.narrative.at || 0)
|
|
@@ -566,6 +569,9 @@ export async function getChiefView(deps, sessionId, { regenerate = false, autoSu
|
|
|
566
569
|
inquiries: (Array.isArray(ownWs.inquiries) ? ownWs.inquiries : []).slice(-12).reverse(),
|
|
567
570
|
guardWalls: listGuardWalls({ cwd: resolveSessionWorkspaceCwd(deps, rootId) }),
|
|
568
571
|
activeWork: getChiefActiveWork(rootId),
|
|
572
|
+
llmLedger: summarizeLlmLedger(ownWs.llmLedger, effectiveConfig),
|
|
573
|
+
alertEvents: (Array.isArray(ownWs.alertEvents) ? ownWs.alertEvents : []).slice(-12),
|
|
574
|
+
bubble: computeBubbleState(deps, rootId, finalState, directory),
|
|
569
575
|
auditLog: (Array.isArray(ownWs.auditLog) ? ownWs.auditLog : []).slice(-50).reverse(),
|
|
570
576
|
}
|
|
571
577
|
}
|