@goodandready/dsh-moa 0.2.58 → 0.2.59

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/lib/client.js CHANGED
@@ -523,7 +523,7 @@ window.__ModuleLoader__.load({
523
523
  ),
524
524
  emptyWarning ? React.createElement(
525
525
  'div',
526
- { style: { fontSize: 11, color: 'var(--dsw-alias-state-warning-primary, #e6a23c)', marginTop: 2 } },
526
+ { style: { fontSize: 11, color: 'var(--dsw-alias-state-warning-primary)', marginTop: 2 } },
527
527
  emptyWarning
528
528
  ) : null
529
529
  )
@@ -1246,7 +1246,7 @@ window.__ModuleLoader__.load({
1246
1246
  /* Companion Plugin Badge */
1247
1247
  React.createElement(
1248
1248
  'div',
1249
- { style: { marginLeft: 'auto', fontSize: 11, color: 'var(--dsw-alias-label-tertiary, #888)', display: 'flex', alignItems: 'center', gap: 4 } },
1249
+ { style: { marginLeft: 'auto', fontSize: 11, color: 'var(--dsw-alias-label-tertiary)', display: 'flex', alignItems: 'center', gap: 4 } },
1250
1250
  '🔗 Companion: ',
1251
1251
  React.createElement(
1252
1252
  'a',
@@ -1254,7 +1254,7 @@ window.__ModuleLoader__.load({
1254
1254
  href: 'https://github.com/goodandready/dsh-time-machine',
1255
1255
  target: '_blank',
1256
1256
  rel: 'noopener noreferrer',
1257
- style: { color: 'var(--dsw-alias-state-brand-primary, #3b82f6)', textDecoration: 'underline' },
1257
+ style: { color: 'var(--dsw-alias-state-brand-primary)', textDecoration: 'underline' },
1258
1258
  },
1259
1259
  'dsh-time-machine'
1260
1260
  )
@@ -1262,7 +1262,7 @@ window.__ModuleLoader__.load({
1262
1262
  ),
1263
1263
 
1264
1264
  loading && React.createElement('div', { style: { padding: '16px 0', fontSize: 12, color: 'var(--dsw-alias-label-secondary)' } }, '⏳ Loading workbench data...'),
1265
- error && React.createElement('div', { style: { padding: '8px 12px', background: '#fee2e2', color: '#b91c1c', borderRadius: 6, fontSize: 12, marginTop: 8 } }, error),
1265
+ error && React.createElement('div', { style: { padding: '8px 12px', background: 'color-mix(in srgb, var(--dsw-alias-state-error-primary) 12%, transparent)', color: 'var(--dsw-alias-state-error-primary)', border: '1px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 30%, transparent)', borderRadius: 6, fontSize: 12, marginTop: 8 } }, error),
1266
1266
 
1267
1267
  /* File Matrix */
1268
1268
  !loading && !error && allFiles.length === 0 && React.createElement(
@@ -1312,7 +1312,7 @@ window.__ModuleLoader__.load({
1312
1312
  fileScores.map((scoreItem) => {
1313
1313
  const isChecked = selectedCand === scoreItem.candidateIndex
1314
1314
  const scoreVal = scoreItem.score || 7
1315
- const scoreBg = scoreVal >= 8 ? '#10b981' : (scoreVal >= 5 ? '#f59e0b' : '#ef4444')
1315
+ const scoreBg = scoreVal >= 8 ? 'var(--dsw-alias-state-success-primary)' : (scoreVal >= 5 ? 'var(--dsw-alias-state-warning-primary)' : 'var(--dsw-alias-state-error-primary)')
1316
1316
 
1317
1317
  return React.createElement(
1318
1318
  'label',
@@ -1324,9 +1324,9 @@ window.__ModuleLoader__.load({
1324
1324
  gap: 8,
1325
1325
  cursor: 'pointer',
1326
1326
  padding: '6px 8px',
1327
- background: isChecked ? 'rgba(59, 130, 246, 0.08)' : 'transparent',
1327
+ background: isChecked ? 'color-mix(in srgb, var(--dsw-alias-state-brand-primary) 8%, transparent)' : 'transparent',
1328
1328
  borderRadius: 6,
1329
- border: isChecked ? '1px solid var(--dsw-alias-state-brand-primary, #3b82f6)' : '1px solid transparent',
1329
+ border: isChecked ? '1px solid var(--dsw-alias-state-brand-primary)' : '1px solid transparent',
1330
1330
  },
1331
1331
  },
1332
1332
  React.createElement('input', {
@@ -1334,7 +1334,7 @@ window.__ModuleLoader__.load({
1334
1334
  name: 'file-' + file,
1335
1335
  checked: isChecked,
1336
1336
  onChange: () => setSelections((prev) => ({ ...prev, [file]: scoreItem.candidateIndex })),
1337
- style: { marginTop: 3, accentColor: 'var(--dsw-alias-state-brand-primary, #3b82f6)' },
1337
+ style: { marginTop: 3, accentColor: 'var(--dsw-alias-state-brand-primary)' },
1338
1338
  }),
1339
1339
  React.createElement(
1340
1340
  'div',
@@ -1360,12 +1360,12 @@ window.__ModuleLoader__.load({
1360
1360
  ),
1361
1361
  scoreItem.pros && React.createElement(
1362
1362
  'div',
1363
- { style: { fontSize: 11, color: '#16a34a', marginTop: 2 } },
1363
+ { style: { fontSize: 11, color: 'var(--dsw-alias-state-success-primary)', marginTop: 2 } },
1364
1364
  '⭐ ' + (t('workbench.pros') || 'Pros:') + ' ' + scoreItem.pros
1365
1365
  ),
1366
1366
  scoreItem.cons && React.createElement(
1367
1367
  'div',
1368
- { style: { fontSize: 11, color: '#dc2626', marginTop: 1 } },
1368
+ { style: { fontSize: 11, color: 'var(--dsw-alias-state-error-primary)', marginTop: 1 } },
1369
1369
  '⚠️ ' + (t('workbench.cons') || 'Cons:') + ' ' + scoreItem.cons
1370
1370
  )
1371
1371
  )
@@ -1404,7 +1404,7 @@ window.__ModuleLoader__.load({
1404
1404
 
1405
1405
  assembleError && React.createElement(
1406
1406
  'div',
1407
- { style: { padding: '8px 12px', background: '#fee2e2', color: '#b91c1c', borderRadius: 6, fontSize: 12, marginTop: 8 } },
1407
+ { style: { padding: '8px 12px', background: 'color-mix(in srgb, var(--dsw-alias-state-error-primary) 12%, transparent)', color: 'var(--dsw-alias-state-error-primary)', border: '1px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 30%, transparent)', borderRadius: 6, fontSize: 12, marginTop: 8 } },
1408
1408
  assembleError
1409
1409
  ),
1410
1410
 
@@ -1415,15 +1415,15 @@ window.__ModuleLoader__.load({
1415
1415
  style: {
1416
1416
  marginTop: 10,
1417
1417
  padding: '12px',
1418
- background: 'rgba(16, 185, 129, 0.05)',
1419
- border: '1px solid #10b981',
1418
+ background: 'color-mix(in srgb, var(--dsw-alias-state-success-primary) 6%, transparent)',
1419
+ border: '1px solid color-mix(in srgb, var(--dsw-alias-state-success-primary) 40%, transparent)',
1420
1420
  borderRadius: 8,
1421
1421
  },
1422
1422
  },
1423
1423
  React.createElement(
1424
1424
  'div',
1425
1425
  { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: 8 } },
1426
- React.createElement('div', { style: { fontWeight: 700, fontSize: 13, color: '#047857' } }, '✨ Harmonization Complete! Top Model: ' + (assembleResult.topModel || 'Master')),
1426
+ React.createElement('div', { style: { fontWeight: 700, fontSize: 13, color: 'var(--dsw-alias-state-success-primary)' } }, '✨ Harmonization Complete! Top Model: ' + (assembleResult.topModel || 'Master')),
1427
1427
  React.createElement(
1428
1428
  'span',
1429
1429
  {
@@ -1431,7 +1431,7 @@ window.__ModuleLoader__.load({
1431
1431
  fontSize: 11,
1432
1432
  fontWeight: 700,
1433
1433
  color: '#fff',
1434
- background: assembleResult.judgeAudit?.passed ? '#10b981' : '#ef4444',
1434
+ background: assembleResult.judgeAudit?.passed ? 'var(--dsw-alias-state-success-primary)' : 'var(--dsw-alias-state-error-primary)',
1435
1435
  padding: '2px 8px',
1436
1436
  borderRadius: 4,
1437
1437
  },
@@ -1468,7 +1468,7 @@ window.__ModuleLoader__.load({
1468
1468
 
1469
1469
  promoted && React.createElement(
1470
1470
  'div',
1471
- { style: { fontSize: 12, fontWeight: 600, color: '#059669', marginTop: 4 } },
1471
+ { style: { fontSize: 12, fontWeight: 600, color: 'var(--dsw-alias-state-success-primary)', marginTop: 4 } },
1472
1472
  t('workbench.promoted_ok') || '✅ Harmonized deliverable promoted to workspace root!'
1473
1473
  )
1474
1474
  )
@@ -2187,7 +2187,7 @@ window.__ModuleLoader__.load({
2187
2187
  ),
2188
2188
  React.createElement(
2189
2189
  'div',
2190
- { style: { fontSize: 11, color: 'var(--dsw-alias-label-tertiary, #888)', marginLeft: 22, marginTop: 2, display: 'flex', alignItems: 'center', gap: 4 } },
2190
+ { style: { fontSize: 11, color: 'var(--dsw-alias-label-tertiary)', marginLeft: 22, marginTop: 2, display: 'flex', alignItems: 'center', gap: 4 } },
2191
2191
  '🔗 ' + (t('aggregator.workbench_companion') || 'Companion Plugin:'),
2192
2192
  React.createElement(
2193
2193
  'a',
@@ -2195,7 +2195,7 @@ window.__ModuleLoader__.load({
2195
2195
  href: 'https://github.com/goodandready/dsh-time-machine',
2196
2196
  target: '_blank',
2197
2197
  rel: 'noopener noreferrer',
2198
- style: { color: 'var(--dsw-alias-state-brand-primary, #3b82f6)', textDecoration: 'underline' },
2198
+ style: { color: 'var(--dsw-alias-state-brand-primary)', textDecoration: 'underline' },
2199
2199
  },
2200
2200
  'dsh-time-machine'
2201
2201
  ),
package/lib/history.js CHANGED
@@ -137,33 +137,6 @@ function normalizeRunRecord(record) {
137
137
  }
138
138
  }
139
139
 
140
- /**
141
- * Appends a completed MoA run record to the history file synchronously (preserves sync API).
142
- * Performs automatic size-based rotation.
143
- */
144
- export function recordMoaRun(record, filePath = getDefaultHistoryFile()) {
145
- try {
146
- const dir = path.dirname(filePath)
147
- if (!fs.existsSync(dir)) {
148
- fs.mkdirSync(dir, { recursive: true })
149
- }
150
-
151
- rotateHistoryFileIfNeeded(filePath)
152
-
153
- const entry = normalizeRunRecord(record)
154
- const line = JSON.stringify(entry) + '\n'
155
- fs.appendFileSync(filePath, line, 'utf8')
156
- invalidateHistoryCache()
157
- return entry
158
- } catch (err) {
159
- logger.warn('[dsh-moa] Failed to record run to history:', err)
160
- return null
161
- }
162
- }
163
-
164
- /**
165
- * Asynchronously appends a completed MoA run record without blocking the event loop.
166
- */
167
140
  export async function recordMoaRunAsync(record, filePath = getDefaultHistoryFile()) {
168
141
  try {
169
142
  const dir = path.dirname(filePath)
package/lib/moa-llm.js CHANGED
@@ -176,13 +176,3 @@ export function createLlmCaller(ctx) {
176
176
  }
177
177
  }
178
178
 
179
-
180
- export function callConfigEquals(a, b) {
181
- if (!a || !b) return false
182
- if (a.provider !== b.provider) return false
183
- if (a.model !== b.model) return false
184
- if (a.temperature !== b.temperature) return false
185
- if (a.maxTokens !== b.maxTokens) return false
186
- if (a.reasoningEffort !== b.reasoningEffort) return false
187
- return true
188
- }
package/lib/pricing.js CHANGED
@@ -68,8 +68,9 @@ export function loadCachedCatalog(cachePath = getDefaultCacheFile()) {
68
68
  }
69
69
  }
70
70
  } catch {
71
- // Ignore read/parse errors
71
+ resetMemoryCatalog()
72
72
  }
73
+ resetMemoryCatalog()
73
74
  memoryCatalog = {}
74
75
  memoryCachePath = cachePath
75
76
  return memoryCatalog
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-moa",
3
- "version": "0.2.58",
3
+ "version": "0.2.59",
4
4
  "description": "Mixture of Agents (MoA) plugin for DeepSeek Harness with /moa slash command",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -64,5 +64,9 @@
64
64
  "@deepseek-ai/dsh-settings": {
65
65
  "optional": true
66
66
  }
67
+ },
68
+ "devDependencies": {
69
+ "react": "^18.3.1",
70
+ "react-dom": "^18.3.1"
67
71
  }
68
72
  }