dual-brain 0.2.30 → 0.3.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/.dual-brain/docs/claude-code-extension-points.md +32 -0
- package/.dual-brain/docs/data-tools-capabilities.md +181 -0
- package/.dual-brain/docs/ecosystem-tools.md +91 -0
- package/.dual-brain/docs/panel-handoff.md +124 -0
- package/.dual-brain/docs/ruflo-analysis.md +48 -0
- package/bin/dual-brain.mjs +56 -56
- package/dist/mcp-server/index.d.ts +27 -0
- package/dist/mcp-server/index.js +359 -0
- package/dist/mcp-server/index.js.map +1 -0
- package/dist/src/agent-protocol.d.ts +163 -0
- package/dist/src/agent-protocol.js +368 -0
- package/dist/src/agent-protocol.js.map +1 -0
- package/dist/src/agents/registry.d.ts +52 -0
- package/dist/src/agents/registry.js +393 -0
- package/dist/src/agents/registry.js.map +1 -0
- package/dist/src/awareness.d.ts +93 -0
- package/dist/src/awareness.js +406 -0
- package/dist/src/awareness.js.map +1 -0
- package/dist/src/brief.d.ts +48 -0
- package/dist/src/brief.js +179 -0
- package/dist/src/brief.js.map +1 -0
- package/dist/src/calibration.d.ts +32 -0
- package/dist/src/calibration.js +133 -0
- package/dist/src/calibration.js.map +1 -0
- package/dist/src/checkpoint.d.ts +33 -0
- package/dist/src/checkpoint.js +99 -0
- package/dist/src/checkpoint.js.map +1 -0
- package/dist/src/ci-triage.d.ts +33 -0
- package/dist/src/ci-triage.js +193 -0
- package/dist/src/ci-triage.js.map +1 -0
- package/dist/src/cognitive-loop.d.ts +56 -0
- package/dist/src/cognitive-loop.js +495 -0
- package/dist/src/cognitive-loop.js.map +1 -0
- package/dist/src/collaboration.d.ts +147 -0
- package/dist/src/collaboration.js +438 -0
- package/dist/src/collaboration.js.map +1 -0
- package/dist/src/context-intel.d.ts +47 -0
- package/dist/src/context-intel.js +156 -0
- package/dist/src/context-intel.js.map +1 -0
- package/dist/src/context.d.ts +53 -0
- package/dist/src/context.js +332 -0
- package/dist/src/context.js.map +1 -0
- package/dist/src/continuity.d.ts +89 -0
- package/dist/src/continuity.js +230 -0
- package/dist/src/continuity.js.map +1 -0
- package/dist/src/cost-tracker.d.ts +47 -0
- package/dist/src/cost-tracker.js +170 -0
- package/dist/src/cost-tracker.js.map +1 -0
- package/dist/src/debrief.d.ts +53 -0
- package/dist/src/debrief.js +222 -0
- package/dist/src/debrief.js.map +1 -0
- package/dist/src/decide.d.ts +96 -0
- package/dist/src/decide.js +744 -0
- package/dist/src/decide.js.map +1 -0
- package/dist/src/decompose.d.ts +39 -0
- package/dist/src/decompose.js +218 -0
- package/dist/src/decompose.js.map +1 -0
- package/dist/src/detect.d.ts +91 -0
- package/dist/src/detect.js +544 -0
- package/dist/src/detect.js.map +1 -0
- package/dist/src/dispatch.d.ts +154 -0
- package/dist/src/dispatch.js +1306 -0
- package/dist/src/dispatch.js.map +1 -0
- package/dist/src/doctor.d.ts +421 -0
- package/dist/src/doctor.js +1689 -0
- package/dist/src/doctor.js.map +1 -0
- package/dist/src/engine.d.ts +70 -0
- package/dist/src/engine.js +155 -0
- package/dist/src/engine.js.map +1 -0
- package/dist/src/envelope.d.ts +36 -0
- package/dist/src/envelope.js +80 -0
- package/dist/src/envelope.js.map +1 -0
- package/dist/src/failure-memory.d.ts +55 -0
- package/dist/src/failure-memory.js +175 -0
- package/dist/src/failure-memory.js.map +1 -0
- package/dist/src/fx.d.ts +87 -0
- package/dist/src/fx.js +272 -0
- package/dist/src/fx.js.map +1 -0
- package/dist/src/governance.d.ts +93 -0
- package/dist/src/governance.js +261 -0
- package/dist/src/governance.js.map +1 -0
- package/dist/src/handoff.d.ts +11 -0
- package/dist/src/handoff.js +90 -0
- package/dist/src/handoff.js.map +1 -0
- package/dist/src/head-protocol.d.ts +76 -0
- package/dist/src/head-protocol.js +109 -0
- package/dist/src/head-protocol.js.map +1 -0
- package/dist/src/head.d.ts +222 -0
- package/dist/src/head.js +765 -0
- package/dist/src/head.js.map +1 -0
- package/dist/src/health.d.ts +132 -0
- package/dist/src/health.js +435 -0
- package/dist/src/health.js.map +1 -0
- package/dist/src/inbox.d.ts +70 -0
- package/dist/src/inbox.js +218 -0
- package/dist/src/inbox.js.map +1 -0
- package/dist/src/index.d.ts +33 -0
- package/dist/src/index.js +38 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/install-hooks.d.ts +13 -0
- package/dist/src/install-hooks.js +88 -0
- package/dist/src/install-hooks.js.map +1 -0
- package/dist/src/integrity.d.ts +59 -0
- package/dist/src/integrity.js +206 -0
- package/dist/src/integrity.js.map +1 -0
- package/dist/src/intelligence.d.ts +104 -0
- package/dist/src/intelligence.js +391 -0
- package/dist/src/intelligence.js.map +1 -0
- package/dist/src/ledger.d.ts +54 -0
- package/dist/src/ledger.js +179 -0
- package/dist/src/ledger.js.map +1 -0
- package/dist/src/living-docs.d.ts +14 -0
- package/dist/src/living-docs.js +197 -0
- package/dist/src/living-docs.js.map +1 -0
- package/dist/src/memory-tiers.d.ts +37 -0
- package/dist/src/memory-tiers.js +160 -0
- package/dist/src/memory-tiers.js.map +1 -0
- package/dist/src/model-profiles.d.ts +65 -0
- package/dist/src/model-profiles.js +568 -0
- package/dist/src/model-profiles.js.map +1 -0
- package/dist/src/models.d.ts +58 -0
- package/dist/src/models.js +327 -0
- package/dist/src/models.js.map +1 -0
- package/dist/src/narrative.d.ts +54 -0
- package/dist/src/narrative.js +163 -0
- package/dist/src/narrative.js.map +1 -0
- package/dist/src/nextstep.d.ts +16 -0
- package/dist/src/nextstep.js +103 -0
- package/dist/src/nextstep.js.map +1 -0
- package/dist/src/observer.d.ts +18 -0
- package/dist/src/observer.js +251 -0
- package/dist/src/observer.js.map +1 -0
- package/dist/src/outcome.d.ts +110 -0
- package/dist/src/outcome.js +377 -0
- package/dist/src/outcome.js.map +1 -0
- package/dist/src/pipeline.d.ts +167 -0
- package/dist/src/pipeline.js +1503 -0
- package/dist/src/pipeline.js.map +1 -0
- package/dist/src/playbook.d.ts +59 -0
- package/dist/src/playbook.js +238 -0
- package/dist/src/playbook.js.map +1 -0
- package/dist/src/pr-agent.d.ts +97 -0
- package/dist/src/pr-agent.js +195 -0
- package/dist/src/pr-agent.js.map +1 -0
- package/dist/src/predictive.d.ts +57 -0
- package/dist/src/predictive.js +230 -0
- package/dist/src/predictive.js.map +1 -0
- package/dist/src/profile.d.ts +294 -0
- package/dist/src/profile.js +1347 -0
- package/dist/src/profile.js.map +1 -0
- package/dist/src/prompt-audit.d.ts +22 -0
- package/dist/src/prompt-audit.js +194 -0
- package/dist/src/prompt-audit.js.map +1 -0
- package/dist/src/prompt-intel.d.ts +12 -0
- package/dist/src/prompt-intel.js +321 -0
- package/dist/src/prompt-intel.js.map +1 -0
- package/dist/src/provider-context.d.ts +121 -0
- package/dist/src/provider-context.js +222 -0
- package/dist/src/provider-context.js.map +1 -0
- package/dist/src/provider-manager.d.ts +92 -0
- package/dist/src/provider-manager.js +428 -0
- package/dist/src/provider-manager.js.map +1 -0
- package/dist/src/receipt.d.ts +87 -0
- package/dist/src/receipt.js +326 -0
- package/dist/src/receipt.js.map +1 -0
- package/dist/src/recommendations.d.ts +13 -0
- package/dist/src/recommendations.js +291 -0
- package/dist/src/recommendations.js.map +1 -0
- package/dist/src/redact.d.ts +15 -0
- package/dist/src/redact.js +129 -0
- package/dist/src/redact.js.map +1 -0
- package/dist/src/replit.d.ts +397 -0
- package/dist/src/replit.js +1160 -0
- package/dist/src/replit.js.map +1 -0
- package/dist/src/repo.d.ts +149 -0
- package/dist/src/repo.js +416 -0
- package/dist/src/repo.js.map +1 -0
- package/dist/src/revert.d.ts +30 -0
- package/dist/src/revert.js +166 -0
- package/dist/src/revert.js.map +1 -0
- package/dist/src/room.d.ts +102 -0
- package/dist/src/room.js +212 -0
- package/dist/src/room.js.map +1 -0
- package/dist/src/routing-advisor.d.ts +57 -0
- package/dist/src/routing-advisor.js +221 -0
- package/dist/src/routing-advisor.js.map +1 -0
- package/dist/src/self-correct.d.ts +40 -0
- package/dist/src/self-correct.js +137 -0
- package/dist/src/self-correct.js.map +1 -0
- package/dist/src/session-lock.d.ts +35 -0
- package/dist/src/session-lock.js +134 -0
- package/dist/src/session-lock.js.map +1 -0
- package/dist/src/session.d.ts +267 -0
- package/dist/src/session.js +1660 -0
- package/dist/src/session.js.map +1 -0
- package/dist/src/settings-tui.d.ts +5 -0
- package/dist/src/settings-tui.js +422 -0
- package/dist/src/settings-tui.js.map +1 -0
- package/dist/src/setup-flow.d.ts +63 -0
- package/dist/src/setup-flow.js +233 -0
- package/dist/src/setup-flow.js.map +1 -0
- package/dist/src/signal.d.ts +19 -0
- package/dist/src/signal.js +122 -0
- package/dist/src/signal.js.map +1 -0
- package/dist/src/simmer.d.ts +85 -0
- package/dist/src/simmer.js +224 -0
- package/dist/src/simmer.js.map +1 -0
- package/dist/src/state-export.d.ts +129 -0
- package/dist/src/state-export.js +233 -0
- package/dist/src/state-export.js.map +1 -0
- package/dist/src/strategy.d.ts +54 -0
- package/dist/src/strategy.js +95 -0
- package/dist/src/strategy.js.map +1 -0
- package/dist/src/subscription.d.ts +40 -0
- package/dist/src/subscription.js +189 -0
- package/dist/src/subscription.js.map +1 -0
- package/dist/src/templates.d.ts +208 -0
- package/dist/src/templates.js +238 -0
- package/dist/src/templates.js.map +1 -0
- package/dist/src/test.d.ts +9 -0
- package/dist/src/test.js +1173 -0
- package/dist/src/test.js.map +1 -0
- package/dist/src/think-engine.d.ts +67 -0
- package/dist/src/think-engine.js +412 -0
- package/dist/src/think-engine.js.map +1 -0
- package/dist/src/tui.d.ts +71 -0
- package/dist/src/tui.js +242 -0
- package/dist/src/tui.js.map +1 -0
- package/dist/src/types.d.ts +177 -0
- package/dist/src/types.js +6 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/update-check.d.ts +7 -0
- package/dist/src/update-check.js +36 -0
- package/dist/src/update-check.js.map +1 -0
- package/dist/src/wave-planner.d.ts +30 -0
- package/dist/src/wave-planner.js +281 -0
- package/dist/src/wave-planner.js.map +1 -0
- package/hooks/head-guard.sh +41 -0
- package/hooks/task-classifier.mjs +328 -0
- package/hooks/vibe-router.mjs +387 -0
- package/package.json +29 -153
- package/src/agents/registry.mjs +0 -405
- package/src/awareness.mjs +0 -425
- package/src/brief.mjs +0 -266
- package/src/calibration.mjs +0 -148
- package/src/checkpoint.mjs +0 -109
- package/src/ci-triage.mjs +0 -191
- package/src/cognitive-loop.mjs +0 -562
- package/src/collaboration.mjs +0 -545
- package/src/context-intel.mjs +0 -158
- package/src/context.mjs +0 -389
- package/src/continuity.mjs +0 -298
- package/src/cost-tracker.mjs +0 -184
- package/src/debrief.mjs +0 -228
- package/src/decide.mjs +0 -1099
- package/src/decompose.mjs +0 -331
- package/src/detect.mjs +0 -702
- package/src/dispatch.mjs +0 -1447
- package/src/doctor.mjs +0 -1607
- package/src/envelope.mjs +0 -139
- package/src/failure-memory.mjs +0 -178
- package/src/fx.mjs +0 -276
- package/src/governance.mjs +0 -279
- package/src/handoff.mjs +0 -87
- package/src/head-protocol.mjs +0 -128
- package/src/head.mjs +0 -952
- package/src/health.mjs +0 -528
- package/src/inbox.mjs +0 -195
- package/src/index.mjs +0 -44
- package/src/install-hooks.mjs +0 -100
- package/src/integrity.mjs +0 -245
- package/src/intelligence.mjs +0 -447
- package/src/ledger.mjs +0 -196
- package/src/living-docs.mjs +0 -210
- package/src/memory-tiers.mjs +0 -193
- package/src/models.mjs +0 -363
- package/src/narrative.mjs +0 -169
- package/src/nextstep.mjs +0 -100
- package/src/observer.mjs +0 -241
- package/src/outcome.mjs +0 -400
- package/src/pipeline.mjs +0 -1711
- package/src/playbook.mjs +0 -257
- package/src/pr-agent.mjs +0 -214
- package/src/predictive.mjs +0 -250
- package/src/profile.mjs +0 -1411
- package/src/prompt-audit.mjs +0 -231
- package/src/prompt-intel.mjs +0 -325
- package/src/provider-context.mjs +0 -257
- package/src/receipt.mjs +0 -344
- package/src/recommendations.mjs +0 -296
- package/src/redact.mjs +0 -192
- package/src/replit.mjs +0 -1210
- package/src/repo.mjs +0 -445
- package/src/revert.mjs +0 -149
- package/src/routing-advisor.mjs +0 -204
- package/src/self-correct.mjs +0 -147
- package/src/session-lock.mjs +0 -160
- package/src/session.mjs +0 -1655
- package/src/settings-tui.mjs +0 -373
- package/src/setup-flow.mjs +0 -223
- package/src/signal.mjs +0 -115
- package/src/simmer.mjs +0 -241
- package/src/strategy.mjs +0 -235
- package/src/subscription.mjs +0 -212
- package/src/templates.mjs +0 -260
- package/src/think-engine.mjs +0 -428
- package/src/tui.mjs +0 -276
- package/src/update-check.mjs +0 -35
- package/src/wave-planner.mjs +0 -294
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
export interface TaskShape {
|
|
2
|
+
type: string;
|
|
3
|
+
scope: 'small' | 'medium' | 'large';
|
|
4
|
+
risk: 'low' | 'medium' | 'high' | 'critical';
|
|
5
|
+
reversibility: 'easy' | 'moderate' | 'hard';
|
|
6
|
+
ambiguity: 'low' | 'medium' | 'high';
|
|
7
|
+
riskSignals: string[];
|
|
8
|
+
ambiguitySignals: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface Material {
|
|
11
|
+
touchedFiles: string[];
|
|
12
|
+
fragileAreas: Array<{
|
|
13
|
+
file: string;
|
|
14
|
+
reason: string;
|
|
15
|
+
}>;
|
|
16
|
+
existingPatterns: string[];
|
|
17
|
+
value: 'low' | 'medium' | 'high';
|
|
18
|
+
userOwnedChanges: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface Relationship {
|
|
21
|
+
shouldAsk: boolean;
|
|
22
|
+
likelyMismatch: boolean;
|
|
23
|
+
wrongAssumption: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface ModeResult {
|
|
26
|
+
primary: string;
|
|
27
|
+
confidence: number;
|
|
28
|
+
scores: Record<string, number>;
|
|
29
|
+
signals: string[];
|
|
30
|
+
}
|
|
31
|
+
export interface SituationModel {
|
|
32
|
+
raw: string;
|
|
33
|
+
explicitAsk: string;
|
|
34
|
+
inferredGoal: string | null;
|
|
35
|
+
urgency: 'low' | 'medium' | 'high';
|
|
36
|
+
isQuestion: boolean;
|
|
37
|
+
isShort: boolean;
|
|
38
|
+
taskShape: TaskShape;
|
|
39
|
+
material: Material;
|
|
40
|
+
relationship: Relationship;
|
|
41
|
+
mode: ModeResult;
|
|
42
|
+
ambiguity: 'low' | 'medium' | 'high';
|
|
43
|
+
risk: 'low' | 'medium' | 'high' | 'critical';
|
|
44
|
+
reversibility: 'easy' | 'moderate' | 'hard';
|
|
45
|
+
scope: 'small' | 'medium' | 'large';
|
|
46
|
+
novelty: string;
|
|
47
|
+
materialValue: 'low' | 'medium' | 'high';
|
|
48
|
+
userStress: string;
|
|
49
|
+
contextVolatility: string;
|
|
50
|
+
priorFailures: number;
|
|
51
|
+
}
|
|
52
|
+
export interface UncertaintyEntry {
|
|
53
|
+
claim: string;
|
|
54
|
+
confidence: number;
|
|
55
|
+
basis: string;
|
|
56
|
+
wouldChangeIf: string;
|
|
57
|
+
}
|
|
58
|
+
export interface ConfidenceSummary {
|
|
59
|
+
level: 'sufficient' | 'partial' | 'insufficient';
|
|
60
|
+
score: number;
|
|
61
|
+
gaps: string[];
|
|
62
|
+
blockers?: Array<{
|
|
63
|
+
claim: string;
|
|
64
|
+
wouldResolve: string;
|
|
65
|
+
}>;
|
|
66
|
+
entryCount?: number;
|
|
67
|
+
}
|
|
68
|
+
export interface Obligation {
|
|
69
|
+
priority: 'critical' | 'high' | 'medium';
|
|
70
|
+
description: string;
|
|
71
|
+
type: string;
|
|
72
|
+
trigger: string;
|
|
73
|
+
}
|
|
74
|
+
export interface Noticing {
|
|
75
|
+
type: string;
|
|
76
|
+
severity: 'low' | 'medium' | 'high';
|
|
77
|
+
observation: string;
|
|
78
|
+
shouldSurface: boolean;
|
|
79
|
+
}
|
|
80
|
+
export interface Action {
|
|
81
|
+
type: string;
|
|
82
|
+
mode: string;
|
|
83
|
+
fitness?: number;
|
|
84
|
+
}
|
|
85
|
+
export interface DeliberationResult {
|
|
86
|
+
depth: string;
|
|
87
|
+
action: Action;
|
|
88
|
+
rationale: string;
|
|
89
|
+
confidence: ConfidenceSummary;
|
|
90
|
+
obligations: Obligation[];
|
|
91
|
+
surfaceNoticings: Noticing[];
|
|
92
|
+
shouldAskUser: boolean;
|
|
93
|
+
uncertainties: string[];
|
|
94
|
+
}
|
|
95
|
+
export interface TurnHistory {
|
|
96
|
+
count: number;
|
|
97
|
+
lastActions: string[];
|
|
98
|
+
failureStreak: number;
|
|
99
|
+
sameActionCount: number;
|
|
100
|
+
avgConfidence?: number;
|
|
101
|
+
}
|
|
102
|
+
export interface HeadState {
|
|
103
|
+
sessionId: string;
|
|
104
|
+
declaredGoal: string | null;
|
|
105
|
+
originalScope: number | null;
|
|
106
|
+
turns: Array<{
|
|
107
|
+
timestamp: number;
|
|
108
|
+
depth: string;
|
|
109
|
+
action: string;
|
|
110
|
+
confidence: number;
|
|
111
|
+
obligationCount: number;
|
|
112
|
+
noticingCount: number;
|
|
113
|
+
}>;
|
|
114
|
+
dispatches: Array<{
|
|
115
|
+
ts: number;
|
|
116
|
+
type: string;
|
|
117
|
+
objective: string;
|
|
118
|
+
outcome: string;
|
|
119
|
+
durationMs: number;
|
|
120
|
+
}>;
|
|
121
|
+
contextEstimate: {
|
|
122
|
+
messages: number;
|
|
123
|
+
estimatedTokens: number;
|
|
124
|
+
};
|
|
125
|
+
lastActivity: number;
|
|
126
|
+
created: number;
|
|
127
|
+
}
|
|
128
|
+
export interface ProcessTurnOutput {
|
|
129
|
+
situation: SituationModel;
|
|
130
|
+
depth: string;
|
|
131
|
+
uncertainties: UncertaintyEntry[];
|
|
132
|
+
obligations: Obligation[];
|
|
133
|
+
noticings: Noticing[];
|
|
134
|
+
result: DeliberationResult;
|
|
135
|
+
shouldAskUser: boolean;
|
|
136
|
+
shouldDispatch: boolean;
|
|
137
|
+
shouldClarify: boolean;
|
|
138
|
+
shouldThink: boolean;
|
|
139
|
+
action: Action;
|
|
140
|
+
rationale: string;
|
|
141
|
+
}
|
|
142
|
+
interface DepthSignals {
|
|
143
|
+
ambiguity?: string;
|
|
144
|
+
risk?: string;
|
|
145
|
+
reversibility?: string;
|
|
146
|
+
scope?: string;
|
|
147
|
+
priorFailures?: number;
|
|
148
|
+
novelty?: string;
|
|
149
|
+
materialValue?: string;
|
|
150
|
+
userStress?: string;
|
|
151
|
+
contextVolatility?: string;
|
|
152
|
+
taskShape?: {
|
|
153
|
+
type?: string;
|
|
154
|
+
};
|
|
155
|
+
type?: string;
|
|
156
|
+
}
|
|
157
|
+
interface Context {
|
|
158
|
+
files?: string[];
|
|
159
|
+
recentFiles?: string[];
|
|
160
|
+
priorFailures?: number;
|
|
161
|
+
patterns?: string[];
|
|
162
|
+
uncommittedFiles?: string[];
|
|
163
|
+
novelty?: string;
|
|
164
|
+
volatility?: string;
|
|
165
|
+
staleContext?: boolean;
|
|
166
|
+
contextAge?: string;
|
|
167
|
+
recentFailures?: unknown[];
|
|
168
|
+
hasTests?: Record<string, boolean>;
|
|
169
|
+
opportunities?: string[];
|
|
170
|
+
_priorWasProposal?: boolean;
|
|
171
|
+
_isFirstTurn?: boolean;
|
|
172
|
+
[key: string]: unknown;
|
|
173
|
+
}
|
|
174
|
+
export declare const HEAD_VALUES: Record<string, string>;
|
|
175
|
+
/**
|
|
176
|
+
* Assess how much deliberation this situation deserves.
|
|
177
|
+
* Returns 'reflexive' | 'light' | 'full' | 'deep'
|
|
178
|
+
*/
|
|
179
|
+
export declare function assessDepth(signals: DepthSignals): 'reflexive' | 'light' | 'full' | 'deep';
|
|
180
|
+
/**
|
|
181
|
+
* Build a situation model from user input and context.
|
|
182
|
+
*/
|
|
183
|
+
export declare function perceive(message: string, context?: Context): SituationModel;
|
|
184
|
+
/**
|
|
185
|
+
* Detect user's conversational mode from message signals.
|
|
186
|
+
*/
|
|
187
|
+
export declare function detectMode(message: string, context?: Context): ModeResult;
|
|
188
|
+
/**
|
|
189
|
+
* Build an uncertainty ledger from the situation model.
|
|
190
|
+
*/
|
|
191
|
+
export declare function assessUncertainty(situation: SituationModel, context?: Context): UncertaintyEntry[];
|
|
192
|
+
/**
|
|
193
|
+
* Overall confidence from the uncertainty ledger.
|
|
194
|
+
*/
|
|
195
|
+
export declare function summarizeConfidence(ledger: UncertaintyEntry[]): ConfidenceSummary;
|
|
196
|
+
/**
|
|
197
|
+
* Derive which care obligations are active given the current situation.
|
|
198
|
+
*/
|
|
199
|
+
export declare function deriveObligations(situation: SituationModel): Obligation[];
|
|
200
|
+
export declare function queryRecentTurns(state: HeadState, n?: number): TurnHistory;
|
|
201
|
+
/**
|
|
202
|
+
* Passive observation layer.
|
|
203
|
+
*/
|
|
204
|
+
export declare function notice(situation: SituationModel, state: HeadState, context?: Context): Noticing[];
|
|
205
|
+
/**
|
|
206
|
+
* Full deliberation pipeline.
|
|
207
|
+
*/
|
|
208
|
+
export declare function deliberate(situation: SituationModel, uncertaintyLedger: UncertaintyEntry[], obligations: Obligation[], noticings: Noticing[], state: HeadState): DeliberationResult;
|
|
209
|
+
/**
|
|
210
|
+
* Process a complete turn through the cognitive pipeline.
|
|
211
|
+
*/
|
|
212
|
+
export declare function processTurn(state: HeadState, userMessage: string, context?: Context): ProcessTurnOutput;
|
|
213
|
+
export declare function loadState(): HeadState;
|
|
214
|
+
export declare function freshState(): HeadState;
|
|
215
|
+
export declare function saveState(state: HeadState): void;
|
|
216
|
+
export declare function recordDispatchOutcome(state: HeadState, outcome: {
|
|
217
|
+
type?: string;
|
|
218
|
+
objective?: string;
|
|
219
|
+
status?: string;
|
|
220
|
+
durationMs?: number;
|
|
221
|
+
}): void;
|
|
222
|
+
export {};
|