@ddtcorex/dsh-maestro-config 0.3.0 → 0.3.1
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
|
@@ -3304,10 +3304,6 @@ function MaestroSettingsTab({ rpcCall, configRpcCall }) {
|
|
|
3304
3304
|
call(MAESTRO_ENDPOINTS.getConfig, {}).then((saved) => setConfig((prev) => ({ ...prev, ...saved }))).catch(() => {
|
|
3305
3305
|
});
|
|
3306
3306
|
if (configRpcCall) {
|
|
3307
|
-
configRpcCall("get", { domain: "supervisor" }).then((res) => {
|
|
3308
|
-
if (res?.ok && res.value?.model) setConfig((prev) => ({ ...prev, supervisorModel: res.value.model }));
|
|
3309
|
-
}).catch(() => {
|
|
3310
|
-
});
|
|
3311
3307
|
Promise.all([cfgGet("guard").catch(() => ({})), cfgGet("guardBlacklist").catch(() => ({ patterns: [], placeholders: {} })), cfgGet("supervisor").catch(() => ({})), cfgGet("notifier").catch(() => ({}))]).then(([g, bl, sup, not]) => {
|
|
3312
3308
|
setGuard(g ?? {});
|
|
3313
3309
|
const pats = Array.isArray(bl?.patterns) ? bl.patterns : [];
|
|
@@ -3416,13 +3412,6 @@ function MaestroSettingsTab({ rpcCall, configRpcCall }) {
|
|
|
3416
3412
|
const saveField = async (field, value) => {
|
|
3417
3413
|
setError(null);
|
|
3418
3414
|
setConfig((prev) => ({ ...prev, [field]: value }));
|
|
3419
|
-
if (field === "supervisorModel" && configRpcCall) {
|
|
3420
|
-
try {
|
|
3421
|
-
const res = await configRpcCall("set", { domain: "supervisor", patch: { model: value } });
|
|
3422
|
-
if (res?.ok) return;
|
|
3423
|
-
} catch {
|
|
3424
|
-
}
|
|
3425
|
-
}
|
|
3426
3415
|
try {
|
|
3427
3416
|
await call(MAESTRO_ENDPOINTS.saveConfig, { [field]: value });
|
|
3428
3417
|
} catch (err) {
|
|
@@ -3474,7 +3463,6 @@ function MaestroSettingsTab({ rpcCall, configRpcCall }) {
|
|
|
3474
3463
|
{ style: { display: "flex", flexDirection: "column" } },
|
|
3475
3464
|
(0, import_react.createElement)(ToggleRow, { title: "Re-review on push", description: "When new commits are pushed, trigger an automatic re-review.", checked: config.autoRereviewOnPush === true, onChange: (v) => saveField("autoRereviewOnPush", v) }),
|
|
3476
3465
|
(0, import_react.createElement)(SettingRow, { title: "Global review model", description: "Model for automated reviews. Empty = DSH default.", control: (0, import_react.createElement)(ReviewModelSelector, { value: config.reviewModel ?? null, catalog, fallbackValue: catalog?.current ?? null, fallbackLabel: "Use DSH default", onChange: (v) => saveField("reviewModel", v), label: null }) }),
|
|
3477
|
-
(0, import_react.createElement)(SettingRow, { title: "Supervisor model", description: "Model for auto-fixing DSH Web crashes.", control: (0, import_react.createElement)(ReviewModelSelector, { value: config.supervisorModel ?? null, catalog, fallbackValue: catalog?.current ?? null, fallbackLabel: "Use DSH default", onChange: (v) => saveField("supervisorModel", v), label: null }) }),
|
|
3478
3466
|
(0, import_react.createElement)(ProjectMappingsEditor, { mappings: config.projectMappings ?? [], onChange: (mappings) => saveField("projectMappings", mappings), catalog, globalReviewModel: config.reviewModel ?? null })
|
|
3479
3467
|
),
|
|
3480
3468
|
guard: (0, import_react.createElement)(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaestroSettings.d.ts","sourceRoot":"","sources":["../../../src/client/MaestroSettings.tsx"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AAisCH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,aAAa,CAAC,EAAE,GAAG,CAAA;CAAE;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"MaestroSettings.d.ts","sourceRoot":"","sources":["../../../src/client/MaestroSettings.tsx"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AAisCH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,aAAa,CAAC,EAAE,GAAG,CAAA;CAAE;;;;;;;;;mBAsYmE,GAAG;;gBAoBzK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maestro-card.d.ts","sourceRoot":"","sources":["../../../src/client/maestro-card.jsx"],"names":[],"mappings":"AAweA;;;;;;;;
|
|
1
|
+
{"version":3,"file":"maestro-card.d.ts","sourceRoot":"","sources":["../../../src/client/maestro-card.jsx"],"names":[],"mappings":"AAweA;;;;;;;;gBA2bC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ddtcorex/dsh-maestro-config",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Maestro Config — shared settings service for the dsh-maestro-* suite over the single namespaced store (~/.dsh/maestro/settings.json)",
|
|
6
6
|
"type": "module",
|
|
@@ -1400,11 +1400,6 @@ export function MaestroSettingsTab({ rpcCall, configRpcCall }: { rpcCall: any; c
|
|
|
1400
1400
|
.then((saved) => setConfig((prev: any) => ({ ...prev, ...saved })))
|
|
1401
1401
|
.catch(() => {})
|
|
1402
1402
|
if (configRpcCall) {
|
|
1403
|
-
configRpcCall('get', { domain: 'supervisor' })
|
|
1404
|
-
.then((res: any) => {
|
|
1405
|
-
if (res?.ok && res.value?.model) setConfig((prev: any) => ({ ...prev, supervisorModel: res.value.model }))
|
|
1406
|
-
})
|
|
1407
|
-
.catch(() => {})
|
|
1408
1403
|
Promise.all([cfgGet('guard').catch(() => ({})), cfgGet('guardBlacklist').catch(() => ({ patterns: [], placeholders: {} })), cfgGet('supervisor').catch(() => ({})), cfgGet('notifier').catch(() => ({}))])
|
|
1409
1404
|
.then(([g, bl, sup, not]) => {
|
|
1410
1405
|
setGuard(g ?? {})
|
|
@@ -1516,12 +1511,6 @@ export function MaestroSettingsTab({ rpcCall, configRpcCall }: { rpcCall: any; c
|
|
|
1516
1511
|
const saveField = async (field: string, value: unknown) => {
|
|
1517
1512
|
setError(null)
|
|
1518
1513
|
setConfig((prev: any) => ({ ...prev, [field]: value }))
|
|
1519
|
-
if (field === 'supervisorModel' && configRpcCall) {
|
|
1520
|
-
try {
|
|
1521
|
-
const res = await configRpcCall('set', { domain: 'supervisor', patch: { model: value } })
|
|
1522
|
-
if (res?.ok) return
|
|
1523
|
-
} catch {}
|
|
1524
|
-
}
|
|
1525
1514
|
try {
|
|
1526
1515
|
await call(MAESTRO_ENDPOINTS.saveConfig, { [field]: value })
|
|
1527
1516
|
} catch (err: any) {
|
|
@@ -1574,7 +1563,6 @@ export function MaestroSettingsTab({ rpcCall, configRpcCall }: { rpcCall: any; c
|
|
|
1574
1563
|
{ style: { display: 'flex', flexDirection: 'column' } },
|
|
1575
1564
|
h(ToggleRow as any, { title: 'Re-review on push', description: 'When new commits are pushed, trigger an automatic re-review.', checked: config.autoRereviewOnPush === true, onChange: (v: boolean) => saveField('autoRereviewOnPush', v) }),
|
|
1576
1565
|
h(SettingRow as any, { title: 'Global review model', description: 'Model for automated reviews. Empty = DSH default.', control: h(ReviewModelSelector as any, { value: config.reviewModel ?? null, catalog, fallbackValue: catalog?.current ?? null, fallbackLabel: 'Use DSH default', onChange: (v: any) => saveField('reviewModel', v), label: null }) }),
|
|
1577
|
-
h(SettingRow as any, { title: 'Supervisor model', description: 'Model for auto-fixing DSH Web crashes.', control: h(ReviewModelSelector as any, { value: config.supervisorModel ?? null, catalog, fallbackValue: catalog?.current ?? null, fallbackLabel: 'Use DSH default', onChange: (v: any) => saveField('supervisorModel', v), label: null }) }),
|
|
1578
1566
|
h(ProjectMappingsEditor as any, { mappings: config.projectMappings ?? [], onChange: (mappings: any) => saveField('projectMappings', mappings), catalog, globalReviewModel: config.reviewModel ?? null }),
|
|
1579
1567
|
),
|
|
1580
1568
|
guard: h(
|
|
@@ -578,15 +578,7 @@ export function MaestroSettingsTab({ rpcCall, configRpcCall }) {
|
|
|
578
578
|
call(MAESTRO_ENDPOINTS.getConfig, {})
|
|
579
579
|
.then(saved => setConfig(prev => ({ ...prev, ...saved })))
|
|
580
580
|
.catch(() => { /* first run, no config saved yet — keep defaults */ })
|
|
581
|
-
// Supervisor model may be stored via generic config service when review not installed — try fallback
|
|
582
581
|
if (configRpcCall) {
|
|
583
|
-
configRpcCall('get', { domain: 'supervisor' })
|
|
584
|
-
.then(res => {
|
|
585
|
-
if (res?.ok && res.value?.model) {
|
|
586
|
-
setConfig(prev => ({ ...prev, supervisorModel: res.value.model }))
|
|
587
|
-
}
|
|
588
|
-
})
|
|
589
|
-
.catch(() => { /* supervisor domain not yet set or config service unavailable */ })
|
|
590
582
|
// Task 3: load Guard/Blacklist/Supervisor/Notifier domains
|
|
591
583
|
Promise.all([
|
|
592
584
|
cfgGet('guard').catch(() => ({})),
|
|
@@ -688,16 +680,6 @@ export function MaestroSettingsTab({ rpcCall, configRpcCall }) {
|
|
|
688
680
|
const saveField = async (field, value) => {
|
|
689
681
|
setError(null)
|
|
690
682
|
setConfig(prev => ({ ...prev, [field]: value }))
|
|
691
|
-
// Supervisor model can be saved via generic config service when review not installed (independent install)
|
|
692
|
-
if (field === 'supervisorModel' && configRpcCall) {
|
|
693
|
-
try {
|
|
694
|
-
const res = await configRpcCall('set', { domain: 'supervisor', patch: { model: value } })
|
|
695
|
-
if (res?.ok) return
|
|
696
|
-
// Fall through to review RPC if generic set fails
|
|
697
|
-
} catch (e) {
|
|
698
|
-
// Fall through to review RPC
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
683
|
try {
|
|
702
684
|
await call(MAESTRO_ENDPOINTS.saveConfig, { [field]: value })
|
|
703
685
|
} catch (err) {
|
|
@@ -817,19 +799,6 @@ export function MaestroSettingsTab({ rpcCall, configRpcCall }) {
|
|
|
817
799
|
}),
|
|
818
800
|
),
|
|
819
801
|
|
|
820
|
-
h('div', { style: sectionStyle },
|
|
821
|
-
h('h4', { style: headingStyle }, 'Supervisor LLM'),
|
|
822
|
-
h('p', { style: captionStyle }, 'Model used by the supervisor debug-agent to auto-fix DSH Web crashes. Empty = DSH default (or Review model if set). Uses the same provider catalog as Review.'),
|
|
823
|
-
h(ReviewModelSelector, {
|
|
824
|
-
value: config.supervisorModel ?? null,
|
|
825
|
-
catalog,
|
|
826
|
-
fallbackValue: catalog?.current ?? null,
|
|
827
|
-
fallbackLabel: 'Use DSH default',
|
|
828
|
-
onChange: v => saveField('supervisorModel', v),
|
|
829
|
-
label: 'Supervisor model',
|
|
830
|
-
}),
|
|
831
|
-
),
|
|
832
|
-
|
|
833
802
|
h('div', { style: sectionStyle },
|
|
834
803
|
h('h4', { style: headingStyle }, 'Projects'),
|
|
835
804
|
h(ProjectMappingsEditor, { mappings: config.projectMappings ?? [], onChange: mappings => saveField('projectMappings', mappings), catalog, globalReviewModel: config.reviewModel ?? null }),
|