conductor-bridge 1.0.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/README.md +69 -0
- package/dist/bridge/index.d.ts +8 -0
- package/dist/bridge/index.d.ts.map +1 -0
- package/dist/bridge/index.js +8 -0
- package/dist/bridge/index.js.map +1 -0
- package/dist/bridge/json-interchange.d.ts +94 -0
- package/dist/bridge/json-interchange.d.ts.map +1 -0
- package/dist/bridge/json-interchange.js +301 -0
- package/dist/bridge/json-interchange.js.map +1 -0
- package/dist/cli/commands/amend.d.ts +12 -0
- package/dist/cli/commands/amend.d.ts.map +1 -0
- package/dist/cli/commands/amend.js +205 -0
- package/dist/cli/commands/amend.js.map +1 -0
- package/dist/cli/commands/daemon.d.ts +12 -0
- package/dist/cli/commands/daemon.d.ts.map +1 -0
- package/dist/cli/commands/daemon.js +60 -0
- package/dist/cli/commands/daemon.js.map +1 -0
- package/dist/cli/commands/dispatch.d.ts +12 -0
- package/dist/cli/commands/dispatch.d.ts.map +1 -0
- package/dist/cli/commands/dispatch.js +207 -0
- package/dist/cli/commands/dispatch.js.map +1 -0
- package/dist/cli/commands/handoff.d.ts +31 -0
- package/dist/cli/commands/handoff.d.ts.map +1 -0
- package/dist/cli/commands/handoff.js +273 -0
- package/dist/cli/commands/handoff.js.map +1 -0
- package/dist/cli/commands/init.d.ts +12 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +301 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/status.d.ts +12 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +206 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/index.d.ts +17 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +148 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/handoff/encryption.d.ts +85 -0
- package/dist/handoff/encryption.d.ts.map +1 -0
- package/dist/handoff/encryption.js +308 -0
- package/dist/handoff/encryption.js.map +1 -0
- package/dist/handoff/index.d.ts +8 -0
- package/dist/handoff/index.d.ts.map +1 -0
- package/dist/handoff/index.js +10 -0
- package/dist/handoff/index.js.map +1 -0
- package/dist/handoff/mycelium-arc.d.ts +116 -0
- package/dist/handoff/mycelium-arc.d.ts.map +1 -0
- package/dist/handoff/mycelium-arc.js +410 -0
- package/dist/handoff/mycelium-arc.js.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +71 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/index.d.ts +10 -0
- package/dist/parsers/index.d.ts.map +1 -0
- package/dist/parsers/index.js +12 -0
- package/dist/parsers/index.js.map +1 -0
- package/dist/parsers/plan-parser.d.ts +29 -0
- package/dist/parsers/plan-parser.d.ts.map +1 -0
- package/dist/parsers/plan-parser.js +503 -0
- package/dist/parsers/plan-parser.js.map +1 -0
- package/dist/parsers/spec-parser.d.ts +10 -0
- package/dist/parsers/spec-parser.d.ts.map +1 -0
- package/dist/parsers/spec-parser.js +382 -0
- package/dist/parsers/spec-parser.js.map +1 -0
- package/dist/parsers/state-parser.d.ts +21 -0
- package/dist/parsers/state-parser.d.ts.map +1 -0
- package/dist/parsers/state-parser.js +378 -0
- package/dist/parsers/state-parser.js.map +1 -0
- package/dist/parsers/types.d.ts +190 -0
- package/dist/parsers/types.d.ts.map +1 -0
- package/dist/parsers/types.js +7 -0
- package/dist/parsers/types.js.map +1 -0
- package/dist/schemas/cognitive-state.d.ts +1523 -0
- package/dist/schemas/cognitive-state.d.ts.map +1 -0
- package/dist/schemas/cognitive-state.js +328 -0
- package/dist/schemas/cognitive-state.js.map +1 -0
- package/dist/schemas/enums.d.ts +124 -0
- package/dist/schemas/enums.d.ts.map +1 -0
- package/dist/schemas/enums.js +108 -0
- package/dist/schemas/enums.js.map +1 -0
- package/dist/schemas/index.d.ts +9 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +9 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/sync/adhd-continuity.d.ts +91 -0
- package/dist/sync/adhd-continuity.d.ts.map +1 -0
- package/dist/sync/adhd-continuity.js +302 -0
- package/dist/sync/adhd-continuity.js.map +1 -0
- package/dist/sync/convergence-tracker.d.ts +111 -0
- package/dist/sync/convergence-tracker.d.ts.map +1 -0
- package/dist/sync/convergence-tracker.js +299 -0
- package/dist/sync/convergence-tracker.js.map +1 -0
- package/dist/sync/index.d.ts +11 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +15 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/state-sync.d.ts +105 -0
- package/dist/sync/state-sync.d.ts.map +1 -0
- package/dist/sync/state-sync.js +403 -0
- package/dist/sync/state-sync.js.map +1 -0
- package/dist/sync/watcher.d.ts +90 -0
- package/dist/sync/watcher.d.ts.map +1 -0
- package/dist/sync/watcher.js +281 -0
- package/dist/sync/watcher.js.map +1 -0
- package/dist/utils/atomic-write.d.ts +31 -0
- package/dist/utils/atomic-write.d.ts.map +1 -0
- package/dist/utils/atomic-write.js +69 -0
- package/dist/utils/atomic-write.js.map +1 -0
- package/dist/utils/error-handling.d.ts +70 -0
- package/dist/utils/error-handling.d.ts.map +1 -0
- package/dist/utils/error-handling.js +109 -0
- package/dist/utils/error-handling.js.map +1 -0
- package/dist/utils/file-lock.d.ts +46 -0
- package/dist/utils/file-lock.d.ts.map +1 -0
- package/dist/utils/file-lock.js +117 -0
- package/dist/utils/file-lock.js.map +1 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +12 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/rlm-navigator.d.ts +160 -0
- package/dist/utils/rlm-navigator.d.ts.map +1 -0
- package/dist/utils/rlm-navigator.js +368 -0
- package/dist/utils/rlm-navigator.js.map +1 -0
- package/dist/utils/safe-path.d.ts +44 -0
- package/dist/utils/safe-path.d.ts.map +1 -0
- package/dist/utils/safe-path.js +96 -0
- package/dist/utils/safe-path.js.map +1 -0
- package/dist/utils/timed-io.d.ts +51 -0
- package/dist/utils/timed-io.d.ts.map +1 -0
- package/dist/utils/timed-io.js +128 -0
- package/dist/utils/timed-io.js.map +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mycelium Arc - Cross-Agent Handoff Module
|
|
3
|
+
*
|
|
4
|
+
* Packages cognitive state for transfer between AI agents (Claude ↔ Gemini).
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - Momentum preservation with break penalty calculation
|
|
8
|
+
* - ADHD-friendly resume summaries
|
|
9
|
+
* - Safety constraints (never persist RED burnout)
|
|
10
|
+
* - 24h auto-expiry
|
|
11
|
+
* - Optional machine-bound encryption
|
|
12
|
+
*/
|
|
13
|
+
import { randomUUID } from 'crypto';
|
|
14
|
+
import { encrypt, decrypt, createEncryptionConfig, getMachineId, isExpired, getTimeUntilExpiry, } from './encryption.js';
|
|
15
|
+
// ============================================================================
|
|
16
|
+
// Constants
|
|
17
|
+
// ============================================================================
|
|
18
|
+
const HANDOFF_VERSION = '1.0.0';
|
|
19
|
+
// Momentum penalty per break duration (hours)
|
|
20
|
+
const MOMENTUM_PENALTIES = {
|
|
21
|
+
CONTINUOUS: 0, // < 5 min
|
|
22
|
+
SHORT_BREAK: 0.1, // 5-30 min
|
|
23
|
+
LONG_BREAK: 0.3, // 30min - 4hr
|
|
24
|
+
NEW_SESSION: 0.6, // > 4hr
|
|
25
|
+
};
|
|
26
|
+
// Momentum phase degradation order
|
|
27
|
+
const MOMENTUM_ORDER = [
|
|
28
|
+
'peak',
|
|
29
|
+
'rolling',
|
|
30
|
+
'building',
|
|
31
|
+
'cold_start',
|
|
32
|
+
'declining',
|
|
33
|
+
'crashed',
|
|
34
|
+
];
|
|
35
|
+
// ============================================================================
|
|
36
|
+
// Safety Constraints
|
|
37
|
+
// ============================================================================
|
|
38
|
+
/**
|
|
39
|
+
* Sanitize cognitive state for handoff.
|
|
40
|
+
*
|
|
41
|
+
* SAFETY: Never persist RED burnout state.
|
|
42
|
+
* Downgrades to ORANGE so receiving agent knows recovery is needed
|
|
43
|
+
* but doesn't inherit emergency state.
|
|
44
|
+
*/
|
|
45
|
+
function sanitizeCognitiveState(state) {
|
|
46
|
+
const sanitized = { ...state };
|
|
47
|
+
// SAFETY: Never persist RED burnout
|
|
48
|
+
if (sanitized.burnoutLevel === 'RED') {
|
|
49
|
+
sanitized.burnoutLevel = 'ORANGE';
|
|
50
|
+
// Add note about downgrade
|
|
51
|
+
sanitized.keyInsights = sanitized.keyInsights || [];
|
|
52
|
+
sanitized.keyInsights.unshift('[SAFETY] Burnout was RED at handoff - downgraded to ORANGE for safety');
|
|
53
|
+
}
|
|
54
|
+
// Ensure timestamp is current
|
|
55
|
+
sanitized.timestamp = new Date().toISOString();
|
|
56
|
+
return sanitized;
|
|
57
|
+
}
|
|
58
|
+
// ============================================================================
|
|
59
|
+
// Momentum Calculation
|
|
60
|
+
// ============================================================================
|
|
61
|
+
/**
|
|
62
|
+
* Calculate momentum penalty based on break duration.
|
|
63
|
+
*/
|
|
64
|
+
export function calculateMomentumPenalty(breakDurationMs) {
|
|
65
|
+
const hours = breakDurationMs / (1000 * 60 * 60);
|
|
66
|
+
if (hours < 5 / 60)
|
|
67
|
+
return MOMENTUM_PENALTIES.CONTINUOUS;
|
|
68
|
+
if (hours < 0.5)
|
|
69
|
+
return MOMENTUM_PENALTIES.SHORT_BREAK;
|
|
70
|
+
if (hours < 4)
|
|
71
|
+
return MOMENTUM_PENALTIES.LONG_BREAK;
|
|
72
|
+
return MOMENTUM_PENALTIES.NEW_SESSION;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Apply momentum penalty and return adjusted phase.
|
|
76
|
+
*/
|
|
77
|
+
export function applyMomentumPenalty(currentPhase, penalty) {
|
|
78
|
+
if (penalty === 0)
|
|
79
|
+
return currentPhase;
|
|
80
|
+
const currentIndex = MOMENTUM_ORDER.indexOf(currentPhase);
|
|
81
|
+
if (currentIndex === -1)
|
|
82
|
+
return 'cold_start';
|
|
83
|
+
// Calculate degradation steps (1 step per 0.2 penalty)
|
|
84
|
+
const steps = Math.ceil(penalty / 0.2);
|
|
85
|
+
const newIndex = Math.min(currentIndex + steps, MOMENTUM_ORDER.length - 1);
|
|
86
|
+
return MOMENTUM_ORDER[newIndex];
|
|
87
|
+
}
|
|
88
|
+
// ============================================================================
|
|
89
|
+
// Resume Summary Generation
|
|
90
|
+
// ============================================================================
|
|
91
|
+
/**
|
|
92
|
+
* Generate ADHD-friendly resume summary.
|
|
93
|
+
*
|
|
94
|
+
* Designed for quick context restoration:
|
|
95
|
+
* - What were we doing?
|
|
96
|
+
* - What's the current status?
|
|
97
|
+
* - What's next?
|
|
98
|
+
*/
|
|
99
|
+
function generateResumeSummary(arc) {
|
|
100
|
+
const { cognitive, adjustedMomentum, momentumPenalty } = arc;
|
|
101
|
+
const lines = [];
|
|
102
|
+
// Header with momentum context
|
|
103
|
+
if (momentumPenalty > 0) {
|
|
104
|
+
const penaltyPercent = Math.round(momentumPenalty * 100);
|
|
105
|
+
lines.push(`## Resume Point (${penaltyPercent}% momentum penalty applied)`);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
lines.push('## Resume Point');
|
|
109
|
+
}
|
|
110
|
+
lines.push('');
|
|
111
|
+
// Current goal (most important for ADHD)
|
|
112
|
+
if (cognitive.currentGoal) {
|
|
113
|
+
lines.push(`**Goal**: ${cognitive.currentGoal}`);
|
|
114
|
+
lines.push('');
|
|
115
|
+
}
|
|
116
|
+
// Quick status
|
|
117
|
+
lines.push('**Status**:');
|
|
118
|
+
lines.push(`- Energy: ${cognitive.energyLevel}`);
|
|
119
|
+
lines.push(`- Burnout: ${cognitive.burnoutLevel}`);
|
|
120
|
+
lines.push(`- Momentum: ${adjustedMomentum}`);
|
|
121
|
+
if (cognitive.convergenceAttractor) {
|
|
122
|
+
lines.push(`- Mode: ${cognitive.convergenceAttractor}`);
|
|
123
|
+
}
|
|
124
|
+
lines.push('');
|
|
125
|
+
// Active tasks (max 3 for working memory)
|
|
126
|
+
const activeTasks = cognitive.activeTasks.filter((t) => t.status === 'in_progress');
|
|
127
|
+
if (activeTasks.length > 0) {
|
|
128
|
+
lines.push('**In Progress**:');
|
|
129
|
+
for (const task of activeTasks.slice(0, 3)) {
|
|
130
|
+
lines.push(`- ${task.description}`);
|
|
131
|
+
}
|
|
132
|
+
if (activeTasks.length > 3) {
|
|
133
|
+
lines.push(`- ... and ${activeTasks.length - 3} more`);
|
|
134
|
+
}
|
|
135
|
+
lines.push('');
|
|
136
|
+
}
|
|
137
|
+
// Blockers (critical for context)
|
|
138
|
+
if (cognitive.blockers && cognitive.blockers.length > 0) {
|
|
139
|
+
lines.push('**Blockers**:');
|
|
140
|
+
for (const blocker of cognitive.blockers.slice(0, 3)) {
|
|
141
|
+
lines.push(`- ${blocker}`);
|
|
142
|
+
}
|
|
143
|
+
lines.push('');
|
|
144
|
+
}
|
|
145
|
+
// Key insights (max 3)
|
|
146
|
+
if (cognitive.keyInsights && cognitive.keyInsights.length > 0) {
|
|
147
|
+
lines.push('**Key Insights**:');
|
|
148
|
+
for (const insight of cognitive.keyInsights.slice(0, 3)) {
|
|
149
|
+
lines.push(`- ${insight}`);
|
|
150
|
+
}
|
|
151
|
+
lines.push('');
|
|
152
|
+
}
|
|
153
|
+
// Recent decisions
|
|
154
|
+
if (cognitive.decisions && cognitive.decisions.length > 0) {
|
|
155
|
+
lines.push('**Recent Decisions**:');
|
|
156
|
+
for (const decision of cognitive.decisions.slice(0, 3)) {
|
|
157
|
+
lines.push(`- ${decision}`);
|
|
158
|
+
}
|
|
159
|
+
lines.push('');
|
|
160
|
+
}
|
|
161
|
+
// Completed count (progress visibility)
|
|
162
|
+
if (cognitive.completedTasks.length > 0) {
|
|
163
|
+
lines.push(`**Progress**: ${cognitive.completedTasks.length} tasks completed this session`);
|
|
164
|
+
}
|
|
165
|
+
return lines.join('\n');
|
|
166
|
+
}
|
|
167
|
+
// ============================================================================
|
|
168
|
+
// Handoff Creation
|
|
169
|
+
// ============================================================================
|
|
170
|
+
/**
|
|
171
|
+
* Create a handoff package from cognitive state.
|
|
172
|
+
*/
|
|
173
|
+
export function createHandoff(cognitive, sourceAgent, options = {}) {
|
|
174
|
+
const { targetAgent, encrypt: shouldEncrypt = true, machineBound = false, expiresInHours = 24, customPassphrase, } = options;
|
|
175
|
+
try {
|
|
176
|
+
// Sanitize state (safety constraints)
|
|
177
|
+
const sanitizedCognitive = sanitizeCognitiveState(cognitive);
|
|
178
|
+
// Calculate momentum penalty (assume immediate handoff for creation)
|
|
179
|
+
// Actual penalty will be recalculated on receive based on time delta
|
|
180
|
+
const momentumPenalty = 0;
|
|
181
|
+
const adjustedMomentum = sanitizedCognitive.momentumPhase;
|
|
182
|
+
// Create metadata
|
|
183
|
+
const handoffId = `handoff-${randomUUID().slice(0, 8)}`;
|
|
184
|
+
const now = new Date();
|
|
185
|
+
const expiresAt = new Date(now.getTime() + expiresInHours * 60 * 60 * 1000);
|
|
186
|
+
const metadata = {
|
|
187
|
+
handoffId,
|
|
188
|
+
createdAt: now.toISOString(),
|
|
189
|
+
expiresAt: expiresAt.toISOString(),
|
|
190
|
+
sourceAgent,
|
|
191
|
+
targetAgent,
|
|
192
|
+
sourceMachineId: machineBound ? getMachineId() : undefined,
|
|
193
|
+
version: HANDOFF_VERSION,
|
|
194
|
+
};
|
|
195
|
+
// Build arc (without summary first)
|
|
196
|
+
const arcWithoutSummary = {
|
|
197
|
+
metadata,
|
|
198
|
+
cognitive: sanitizedCognitive,
|
|
199
|
+
momentumPenalty,
|
|
200
|
+
adjustedMomentum,
|
|
201
|
+
};
|
|
202
|
+
// Generate resume summary
|
|
203
|
+
const resumeSummary = generateResumeSummary(arcWithoutSummary);
|
|
204
|
+
// Complete arc
|
|
205
|
+
const arc = {
|
|
206
|
+
...arcWithoutSummary,
|
|
207
|
+
resumeSummary,
|
|
208
|
+
};
|
|
209
|
+
// Serialize
|
|
210
|
+
const arcJson = JSON.stringify(arc, null, 2);
|
|
211
|
+
// Encrypt if requested
|
|
212
|
+
let payload;
|
|
213
|
+
if (shouldEncrypt) {
|
|
214
|
+
const encryptionConfig = createEncryptionConfig({
|
|
215
|
+
encrypt: true,
|
|
216
|
+
machineBound,
|
|
217
|
+
});
|
|
218
|
+
const encrypted = encrypt(arcJson, encryptionConfig, expiresInHours, customPassphrase);
|
|
219
|
+
payload = JSON.stringify(encrypted, null, 2);
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
payload = arcJson;
|
|
223
|
+
}
|
|
224
|
+
return {
|
|
225
|
+
success: true,
|
|
226
|
+
handoffId,
|
|
227
|
+
encrypted: shouldEncrypt,
|
|
228
|
+
expiresAt: expiresAt.toISOString(),
|
|
229
|
+
payload,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
return {
|
|
234
|
+
success: false,
|
|
235
|
+
handoffId: '',
|
|
236
|
+
encrypted: false,
|
|
237
|
+
expiresAt: '',
|
|
238
|
+
payload: '',
|
|
239
|
+
error: `Failed to create handoff: ${error instanceof Error ? error.message : String(error)}`,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
// ============================================================================
|
|
244
|
+
// Handoff Reception
|
|
245
|
+
// ============================================================================
|
|
246
|
+
/**
|
|
247
|
+
* Receive and unpack a handoff.
|
|
248
|
+
*/
|
|
249
|
+
export function receiveHandoff(payload, customPassphrase) {
|
|
250
|
+
try {
|
|
251
|
+
// Try to parse as JSON
|
|
252
|
+
const parsed = JSON.parse(payload);
|
|
253
|
+
// Check if it's encrypted (has algorithm field)
|
|
254
|
+
if ('algorithm' in parsed && 'ciphertext' in parsed) {
|
|
255
|
+
// It's an encrypted payload
|
|
256
|
+
const encrypted = parsed;
|
|
257
|
+
// Check expiry
|
|
258
|
+
if (isExpired(encrypted)) {
|
|
259
|
+
return {
|
|
260
|
+
success: false,
|
|
261
|
+
expired: true,
|
|
262
|
+
error: 'Handoff has expired',
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
// Decrypt
|
|
266
|
+
const decryptResult = decrypt(encrypted, customPassphrase);
|
|
267
|
+
if (!decryptResult.success) {
|
|
268
|
+
return {
|
|
269
|
+
success: false,
|
|
270
|
+
machineMismatch: decryptResult.machineMismatch,
|
|
271
|
+
error: decryptResult.error,
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
// Parse decrypted arc
|
|
275
|
+
const arc = JSON.parse(decryptResult.data);
|
|
276
|
+
return processReceivedArc(arc);
|
|
277
|
+
}
|
|
278
|
+
else if ('metadata' in parsed && 'cognitive' in parsed) {
|
|
279
|
+
// It's a plain arc
|
|
280
|
+
const arc = parsed;
|
|
281
|
+
return processReceivedArc(arc);
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
return {
|
|
285
|
+
success: false,
|
|
286
|
+
error: 'Invalid handoff format: missing required fields',
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
catch (error) {
|
|
291
|
+
return {
|
|
292
|
+
success: false,
|
|
293
|
+
error: `Failed to receive handoff: ${error instanceof Error ? error.message : String(error)}`,
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Process a received arc and apply momentum penalties.
|
|
299
|
+
*/
|
|
300
|
+
function processReceivedArc(arc) {
|
|
301
|
+
// Check expiry
|
|
302
|
+
const expiresAt = new Date(arc.metadata.expiresAt);
|
|
303
|
+
if (expiresAt < new Date()) {
|
|
304
|
+
return {
|
|
305
|
+
success: false,
|
|
306
|
+
expired: true,
|
|
307
|
+
error: 'Handoff has expired',
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
// Calculate actual break duration
|
|
311
|
+
const createdAt = new Date(arc.metadata.createdAt);
|
|
312
|
+
const breakDurationMs = Date.now() - createdAt.getTime();
|
|
313
|
+
// Calculate and apply momentum penalty
|
|
314
|
+
const momentumPenalty = calculateMomentumPenalty(breakDurationMs);
|
|
315
|
+
const adjustedMomentum = applyMomentumPenalty(arc.cognitive.momentumPhase, momentumPenalty);
|
|
316
|
+
// Update arc with actual penalties
|
|
317
|
+
const updatedArc = {
|
|
318
|
+
...arc,
|
|
319
|
+
momentumPenalty,
|
|
320
|
+
adjustedMomentum,
|
|
321
|
+
resumeSummary: generateResumeSummary({
|
|
322
|
+
...arc,
|
|
323
|
+
momentumPenalty,
|
|
324
|
+
adjustedMomentum,
|
|
325
|
+
}),
|
|
326
|
+
};
|
|
327
|
+
return {
|
|
328
|
+
success: true,
|
|
329
|
+
arc: updatedArc,
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
// ============================================================================
|
|
333
|
+
// Utility Functions
|
|
334
|
+
// ============================================================================
|
|
335
|
+
/**
|
|
336
|
+
* Get handoff status for display.
|
|
337
|
+
*/
|
|
338
|
+
export function getHandoffStatus(payload) {
|
|
339
|
+
try {
|
|
340
|
+
const parsed = JSON.parse(payload);
|
|
341
|
+
if ('algorithm' in parsed && 'ciphertext' in parsed) {
|
|
342
|
+
// Encrypted payload
|
|
343
|
+
const encrypted = parsed;
|
|
344
|
+
const expiry = getTimeUntilExpiry(encrypted);
|
|
345
|
+
return {
|
|
346
|
+
valid: true,
|
|
347
|
+
encrypted: true,
|
|
348
|
+
expired: expiry.expired,
|
|
349
|
+
timeRemaining: expiry.formatted,
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
else if ('metadata' in parsed) {
|
|
353
|
+
// Plain arc
|
|
354
|
+
const arc = parsed;
|
|
355
|
+
const expiresAt = new Date(arc.metadata.expiresAt);
|
|
356
|
+
const expired = expiresAt < new Date();
|
|
357
|
+
let timeRemaining;
|
|
358
|
+
if (expired) {
|
|
359
|
+
timeRemaining = 'Expired';
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
const diffMs = expiresAt.getTime() - Date.now();
|
|
363
|
+
const hours = Math.floor(diffMs / (1000 * 60 * 60));
|
|
364
|
+
const minutes = Math.floor((diffMs % (1000 * 60 * 60)) / (1000 * 60));
|
|
365
|
+
timeRemaining = hours > 0 ? `${hours}h ${minutes}m` : `${minutes}m`;
|
|
366
|
+
}
|
|
367
|
+
return {
|
|
368
|
+
valid: true,
|
|
369
|
+
encrypted: false,
|
|
370
|
+
expired,
|
|
371
|
+
timeRemaining,
|
|
372
|
+
handoffId: arc.metadata.handoffId,
|
|
373
|
+
sourceAgent: arc.metadata.sourceAgent,
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
return {
|
|
377
|
+
valid: false,
|
|
378
|
+
encrypted: false,
|
|
379
|
+
expired: false,
|
|
380
|
+
error: 'Invalid format',
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
catch {
|
|
384
|
+
return {
|
|
385
|
+
valid: false,
|
|
386
|
+
encrypted: false,
|
|
387
|
+
expired: false,
|
|
388
|
+
error: 'Failed to parse payload',
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Create a minimal cognitive snapshot for quick handoffs.
|
|
394
|
+
*/
|
|
395
|
+
export function createMinimalSnapshot(goal, options = {}) {
|
|
396
|
+
return {
|
|
397
|
+
sessionId: randomUUID(),
|
|
398
|
+
timestamp: new Date().toISOString(),
|
|
399
|
+
activeMode: 'focused',
|
|
400
|
+
activeParadigm: 'Cortex',
|
|
401
|
+
energyLevel: options.energyLevel ?? 'medium',
|
|
402
|
+
burnoutLevel: options.burnoutLevel ?? 'GREEN',
|
|
403
|
+
momentumPhase: options.momentumPhase ?? 'building',
|
|
404
|
+
currentGoal: goal,
|
|
405
|
+
activeTasks: [],
|
|
406
|
+
completedTasks: [],
|
|
407
|
+
keyInsights: options.insights,
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
//# sourceMappingURL=mycelium-arc.js.map
|
|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,IAAI,UAAU;QAClD,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,EAAE;QACf,cAAc,EAAE,EAAE;QAClB,WAAW,EAAE,OAAO,CAAC,QAAQ;KAC9B,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @cognitive/conductor-bridge
|
|
3
|
+
*
|
|
4
|
+
* TypeScript orchestration layer for multi-agent cognitive state management.
|
|
5
|
+
* Provides bidirectional sync with Python USD Substrate.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { writer, reader, SessionState, DocumentType } from '@cognitive/conductor-bridge';
|
|
10
|
+
*
|
|
11
|
+
* // Create a session state document
|
|
12
|
+
* const state: SessionState = {
|
|
13
|
+
* session_id: 'abc123',
|
|
14
|
+
* timestamp: new Date().toISOString(),
|
|
15
|
+
* active_mode: 'focused',
|
|
16
|
+
* active_paradigm: 'Cortex',
|
|
17
|
+
* energy_level: 'medium',
|
|
18
|
+
* burnout_level: 'GREEN',
|
|
19
|
+
* momentum_phase: 'building',
|
|
20
|
+
* };
|
|
21
|
+
*
|
|
22
|
+
* const doc = writer.createSessionStateDocument(state);
|
|
23
|
+
* await writer.writeToFile(doc, './cognitive_state.json');
|
|
24
|
+
*
|
|
25
|
+
* // Read back
|
|
26
|
+
* const loaded = await reader.readFromFile('./cognitive_state.json');
|
|
27
|
+
* const sessionState = reader.extractSessionState(loaded);
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export * from './schemas/index.js';
|
|
31
|
+
export { computeChecksum, verifyChecksum, JsonInterchangeWriter, JsonInterchangeReader, writer, reader, readFromFile, extractSessionState, } from './bridge/json-interchange.js';
|
|
32
|
+
export * from './parsers/index.js';
|
|
33
|
+
export { syncConductorToUSD, syncUSDToConductor, syncBidirectional, deriveMomentumFromTasks, deriveEnergyFromTasks, deriveCognitiveState, computeFileChecksum, hasFileChanged, type SyncConfig, type SyncResult, type DerivedCognitiveState, ConductorConvergenceTracker, extractStateVector, computeL2Norm, detectAttractor, analyzeTrajectory, type StateVector, type ConvergenceState, ConductorWatcher, createWatcher, type WatcherConfig, type WatcherStats, type WatcherEvent, detectBreakType, generateResumeSummary, createSessionHandoff, getRecoveryRecommendations, type BreakAnalysis, type ResumeSummary, type MomentumState, } from './sync/index.js';
|
|
34
|
+
export { SessionBreakType as ADHDSessionBreakType } from './sync/adhd-continuity.js';
|
|
35
|
+
export { encrypt, decrypt, getMachineId, verifyMachineId, isExpired, getTimeUntilExpiry, createEncryptionConfig, type EncryptionAlgorithm, type EncryptionConfig, type EncryptedPayload, type DecryptionResult, createHandoff, receiveHandoff, getHandoffStatus, createMinimalSnapshot, calculateMomentumPenalty, applyMomentumPenalty, type TaskContext, type CognitiveSnapshot, type HandoffMetadata, type HandoffOptions, type CreateHandoffResult, type ReceiveHandoffResult, } from './handoff/index.js';
|
|
36
|
+
export type { AgentType as HandoffAgentType, MomentumPhase as HandoffMomentumPhase, BurnoutLevel as HandoffBurnoutLevel, EnergyLevel as HandoffEnergyLevel, MyceliumArc as HandoffMyceliumArc, } from './handoff/mycelium-arc.js';
|
|
37
|
+
export declare const VERSION = "1.0.0";
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAKH,cAAc,oBAAoB,CAAC;AAMnC,OAAO,EACL,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,MAAM,EACN,MAAM,EACN,YAAY,EACZ,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AAKtC,cAAc,oBAAoB,CAAC;AAMnC,OAAO,EAEL,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,qBAAqB,EAE1B,2BAA2B,EAC3B,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EAErB,gBAAgB,EAChB,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,EAEjB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAC1B,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAMrF,OAAO,EAEL,OAAO,EACP,OAAO,EACP,YAAY,EACZ,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,sBAAsB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAErB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACV,SAAS,IAAI,gBAAgB,EAC7B,aAAa,IAAI,oBAAoB,EACrC,YAAY,IAAI,mBAAmB,EACnC,WAAW,IAAI,kBAAkB,EACjC,WAAW,IAAI,kBAAkB,GAClC,MAAM,2BAA2B,CAAC;AAKnC,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @cognitive/conductor-bridge
|
|
3
|
+
*
|
|
4
|
+
* TypeScript orchestration layer for multi-agent cognitive state management.
|
|
5
|
+
* Provides bidirectional sync with Python USD Substrate.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { writer, reader, SessionState, DocumentType } from '@cognitive/conductor-bridge';
|
|
10
|
+
*
|
|
11
|
+
* // Create a session state document
|
|
12
|
+
* const state: SessionState = {
|
|
13
|
+
* session_id: 'abc123',
|
|
14
|
+
* timestamp: new Date().toISOString(),
|
|
15
|
+
* active_mode: 'focused',
|
|
16
|
+
* active_paradigm: 'Cortex',
|
|
17
|
+
* energy_level: 'medium',
|
|
18
|
+
* burnout_level: 'GREEN',
|
|
19
|
+
* momentum_phase: 'building',
|
|
20
|
+
* };
|
|
21
|
+
*
|
|
22
|
+
* const doc = writer.createSessionStateDocument(state);
|
|
23
|
+
* await writer.writeToFile(doc, './cognitive_state.json');
|
|
24
|
+
*
|
|
25
|
+
* // Read back
|
|
26
|
+
* const loaded = await reader.readFromFile('./cognitive_state.json');
|
|
27
|
+
* const sessionState = reader.extractSessionState(loaded);
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
// ============================================================================
|
|
31
|
+
// Schemas and types (canonical definitions)
|
|
32
|
+
// ============================================================================
|
|
33
|
+
export * from './schemas/index.js';
|
|
34
|
+
// ============================================================================
|
|
35
|
+
// Bridge utilities
|
|
36
|
+
// Note: Excludes generateResumeSummary, calculateMomentumPenalty (use sync module versions)
|
|
37
|
+
// ============================================================================
|
|
38
|
+
export { computeChecksum, verifyChecksum, JsonInterchangeWriter, JsonInterchangeReader, writer, reader, readFromFile, extractSessionState, } from './bridge/json-interchange.js';
|
|
39
|
+
// ============================================================================
|
|
40
|
+
// Parsers
|
|
41
|
+
// ============================================================================
|
|
42
|
+
export * from './parsers/index.js';
|
|
43
|
+
// ============================================================================
|
|
44
|
+
// Sync utilities
|
|
45
|
+
// Note: SessionBreakType here shadows the one from schemas/enums
|
|
46
|
+
// ============================================================================
|
|
47
|
+
export {
|
|
48
|
+
// State sync
|
|
49
|
+
syncConductorToUSD, syncUSDToConductor, syncBidirectional, deriveMomentumFromTasks, deriveEnergyFromTasks, deriveCognitiveState, computeFileChecksum, hasFileChanged,
|
|
50
|
+
// Convergence tracking
|
|
51
|
+
ConductorConvergenceTracker, extractStateVector, computeL2Norm, detectAttractor, analyzeTrajectory,
|
|
52
|
+
// File watcher
|
|
53
|
+
ConductorWatcher, createWatcher,
|
|
54
|
+
// ADHD continuity (canonical versions of shared functions)
|
|
55
|
+
detectBreakType, generateResumeSummary, createSessionHandoff, getRecoveryRecommendations, } from './sync/index.js';
|
|
56
|
+
// Re-export SessionBreakType from sync (not schemas) for ADHD module consumers
|
|
57
|
+
export { SessionBreakType as ADHDSessionBreakType } from './sync/adhd-continuity.js';
|
|
58
|
+
// ============================================================================
|
|
59
|
+
// Handoff utilities
|
|
60
|
+
// Note: Uses its own type definitions for handoff-specific semantics
|
|
61
|
+
// ============================================================================
|
|
62
|
+
export {
|
|
63
|
+
// Encryption
|
|
64
|
+
encrypt, decrypt, getMachineId, verifyMachineId, isExpired, getTimeUntilExpiry, createEncryptionConfig,
|
|
65
|
+
// Mycelium Arc (with prefixed types to avoid schema conflicts)
|
|
66
|
+
createHandoff, receiveHandoff, getHandoffStatus, createMinimalSnapshot, calculateMomentumPenalty, applyMomentumPenalty, } from './handoff/index.js';
|
|
67
|
+
// ============================================================================
|
|
68
|
+
// Version
|
|
69
|
+
// ============================================================================
|
|
70
|
+
export const VERSION = '1.0.0';
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,+EAA+E;AAC/E,4CAA4C;AAC5C,+EAA+E;AAC/E,cAAc,oBAAoB,CAAC;AAEnC,+EAA+E;AAC/E,mBAAmB;AACnB,4FAA4F;AAC5F,+EAA+E;AAC/E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
|
+
export * from './types.js';
|
|
7
|
+
export { parseSpec, validateSpec } from './spec-parser.js';
|
|
8
|
+
export { parsePlan, stateToCheckbox, isValidTransition, findTask, countTasksByState, getNextPendingTask, } from './plan-parser.js';
|
|
9
|
+
export { parseState, isSessionStale, getSessionDuration, getStatusSummary, } from './state-parser.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parsers/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,YAAY,CAAC;AAG3B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EACL,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conductor Parsers
|
|
3
|
+
*
|
|
4
|
+
* Parsers for Conductor Markdown files (spec.md, plan.md, state.md).
|
|
5
|
+
*/
|
|
6
|
+
// Types
|
|
7
|
+
export * from './types.js';
|
|
8
|
+
// Parsers
|
|
9
|
+
export { parseSpec, validateSpec } from './spec-parser.js';
|
|
10
|
+
export { parsePlan, stateToCheckbox, isValidTransition, findTask, countTasksByState, getNextPendingTask, } from './plan-parser.js';
|
|
11
|
+
export { parseState, isSessionStale, getSessionDuration, getStatusSummary, } from './state-parser.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/parsers/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,QAAQ;AACR,cAAc,YAAY,CAAC;AAE3B,UAAU;AACV,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EACL,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plan Parser
|
|
3
|
+
*
|
|
4
|
+
* Parses Conductor plan.md files into structured data.
|
|
5
|
+
* Implements checkbox state machine for task tracking.
|
|
6
|
+
*/
|
|
7
|
+
import type { ParsedPlan, Task, CheckboxState, ParseResult } from './types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Convert state to checkbox marker
|
|
10
|
+
*/
|
|
11
|
+
export declare function stateToCheckbox(state: CheckboxState): string;
|
|
12
|
+
/**
|
|
13
|
+
* Check if state transition is valid
|
|
14
|
+
*/
|
|
15
|
+
export declare function isValidTransition(from: CheckboxState, to: CheckboxState): boolean;
|
|
16
|
+
export declare function parsePlan(content: string): ParseResult<ParsedPlan>;
|
|
17
|
+
/**
|
|
18
|
+
* Find a task by ID in a plan
|
|
19
|
+
*/
|
|
20
|
+
export declare function findTask(plan: ParsedPlan, taskId: string): Task | null;
|
|
21
|
+
/**
|
|
22
|
+
* Count tasks by state
|
|
23
|
+
*/
|
|
24
|
+
export declare function countTasksByState(plan: ParsedPlan): Record<CheckboxState, number>;
|
|
25
|
+
/**
|
|
26
|
+
* Get next pending task
|
|
27
|
+
*/
|
|
28
|
+
export declare function getNextPendingTask(plan: ParsedPlan): Task | null;
|
|
29
|
+
//# sourceMappingURL=plan-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-parser.d.ts","sourceRoot":"","sources":["../../src/parsers/plan-parser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,UAAU,EAGV,IAAI,EACJ,aAAa,EAEb,WAAW,EAEZ,MAAM,YAAY,CAAC;AAgDpB;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAW5D;AAYD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,GAAG,OAAO,CAEjF;AAsUD,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC,UAAU,CAAC,CAiHlE;AAMD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAMtE;AAWD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAajF;AAYD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,GAAG,IAAI,CAgBhE"}
|