@ddtcorex/dsh-maestro-core 0.11.0 → 0.11.2
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/cordis.patch.yml +11 -1
- package/lib/client.js +11 -10
- package/lib/plugin.js +79 -36
- package/lib/snapshot.d.ts +3 -2
- package/lib/snapshot.js +3 -2
- package/lib/types/client/config/MaestroSettings.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client/config/MaestroSettings.tsx +4 -2
- package/src/client/sync/SyncPanel.tsx +1 -1
- package/src/client/sync/index.tsx +4 -4
- package/src/host/plugin.ts +61 -24
- package/src/host/snapshot.ts +3 -2
package/cordis.patch.yml
CHANGED
|
@@ -40,4 +40,14 @@
|
|
|
40
40
|
# carries only the row's inject (not the module's); without webServer
|
|
41
41
|
# the row fails on harnesses that provide webServer after rows apply (DSH 0.1.5-rc.1+).
|
|
42
42
|
inject: ['connection', 'webServer']
|
|
43
|
-
config: {}
|
|
43
|
+
config: {}
|
|
44
|
+
|
|
45
|
+
# DSH 0.2.x resolves `webServer` for `ctx.connection.rpc.handle` on the
|
|
46
|
+
# `connection` row own fiber, so a row-level inject cannot reach it. `inject`
|
|
47
|
+
# replaces the base list, hence `webRuntime` (the base row needs it for
|
|
48
|
+
# trustedHosts) is repeated. Identical in every maestro package that registers
|
|
49
|
+
# RPC channels, so each one stays installable alone.
|
|
50
|
+
- id: connection
|
|
51
|
+
inject:
|
|
52
|
+
- webRuntime
|
|
53
|
+
- webServer
|
package/lib/client.js
CHANGED
|
@@ -285,6 +285,7 @@ var t = {
|
|
|
285
285
|
bgLayer2: "var(--dsw-alias-bg-layer-2)",
|
|
286
286
|
bgLayer3: "var(--dsw-alias-bg-layer-3)",
|
|
287
287
|
borderL2: "var(--dsw-alias-border-l2)",
|
|
288
|
+
borderL4: "var(--dsw-alias-border-l4)",
|
|
288
289
|
labelPrimary: "var(--dsw-alias-label-primary)",
|
|
289
290
|
labelSecondary: "var(--dsw-alias-label-secondary)",
|
|
290
291
|
labelTertiary: "var(--dsw-alias-label-tertiary)",
|
|
@@ -785,11 +786,11 @@ function MaestroSettingsTab({ configRpcCall, supervisorRpcCall }) {
|
|
|
785
786
|
},
|
|
786
787
|
"aria-label": meta.label,
|
|
787
788
|
style: {
|
|
788
|
-
|
|
789
|
-
padding: "
|
|
790
|
-
border:
|
|
791
|
-
borderRadius:
|
|
792
|
-
background:
|
|
789
|
+
minHeight: 44,
|
|
790
|
+
padding: "6px 12px",
|
|
791
|
+
border: "0.5px solid var(--dsw-alias-border-l4)",
|
|
792
|
+
borderRadius: "var(--dsw-radius-md)",
|
|
793
|
+
background: t.bgLayer3,
|
|
793
794
|
color: t.labelPrimary,
|
|
794
795
|
font: "inherit",
|
|
795
796
|
fontSize: 13
|
|
@@ -2350,7 +2351,7 @@ function SyncPanel(props) {
|
|
|
2350
2351
|
"aria-invalid": hostFieldError ? "true" : void 0
|
|
2351
2352
|
}
|
|
2352
2353
|
),
|
|
2353
|
-
hostFieldError ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "data-sync-field-error": "", role: "alert", "data-testid": "sync-ssh-host-error", style: {
|
|
2354
|
+
hostFieldError ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "data-sync-field-error": "", role: "alert", "data-testid": "sync-ssh-host-error", style: { fontSize: 12, lineHeight: "16px", color: "var(--dsw-alias-state-error-primary)", overflowWrap: "anywhere" }, children: hostFieldError }) : null,
|
|
2354
2355
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { "data-sync-ssh-row": "", children: [
|
|
2355
2356
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Button2, { variant: "outline", "data-testid": "sync-save-host", disabled: checking || busy || hostInput.trim().length === 0, onClick: () => void s.saveRemoteHost(hostInput.trim()), children: "Save" }),
|
|
2356
2357
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Button2, { variant: "primary", "data-testid": "sync-check-connection", disabled: checking || busy || hostInput.trim().length === 0, busy: checking, onClick: () => void handleCheck(), children: checking ? "Checking\u2026" : "Check connection" })
|
|
@@ -2779,8 +2780,8 @@ button[data-sync-stat]:focus-visible { outline: 2px solid var(--dsw-alias-border
|
|
|
2779
2780
|
}
|
|
2780
2781
|
/* SSH configuration \u2014 user-filled target, explicit check, nothing auto-probes */
|
|
2781
2782
|
[data-sync-ssh] { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--dsw-alias-border-l1); border-radius: 10px; background: var(--dsw-alias-bg-layer-2); }
|
|
2782
|
-
[data-sync-ssh-label] { font-size: 11px; color: var(--dsw-alias-label-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
|
|
2783
|
-
[data-sync-ssh-input] { min-height: 44px; padding:
|
|
2783
|
+
[data-sync-ssh-label] { font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
|
|
2784
|
+
[data-sync-ssh-input] { min-height: 44px; padding: 6px 12px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: var(--dsw-radius-md); background: var(--dsw-alias-bg-layer-3); color: var(--dsw-alias-label-primary); font: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; width: 100%; box-sizing: border-box; }
|
|
2784
2785
|
[data-sync-ssh-input]:focus-visible { outline: 2px solid var(--dsw-alias-border-l2); outline-offset: 2px; }
|
|
2785
2786
|
[data-sync-ssh-input]:disabled { opacity: 0.6; }
|
|
2786
2787
|
[data-sync-ssh-row] { display: flex; gap: 8px; flex-wrap: wrap; }
|
|
@@ -2793,7 +2794,7 @@ button[data-sync-stat]:focus-visible { outline: 2px solid var(--dsw-alias-border
|
|
|
2793
2794
|
[data-r2-config-label] { font-size: 11px; color: var(--dsw-alias-label-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
|
|
2794
2795
|
[data-r2-field] { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
2795
2796
|
[data-r2-field-label] { font-size: 12px; font-weight: 600; color: var(--dsw-alias-label-primary); }
|
|
2796
|
-
[data-r2-field-input] { min-height: 44px; padding:
|
|
2797
|
+
[data-r2-field-input] { min-height: 44px; padding: 6px 12px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: var(--dsw-radius-md); background: var(--dsw-alias-bg-layer-3); color: var(--dsw-alias-label-primary); font: inherit; width: 100%; box-sizing: border-box; }
|
|
2797
2798
|
[data-r2-field-input]:focus-visible { outline: 2px solid var(--dsw-alias-border-l2); outline-offset: 2px; }
|
|
2798
2799
|
[data-r2-field-input]:disabled { opacity: 0.6; }
|
|
2799
2800
|
[data-r2-field-hint] { font-size: 11px; line-height: 14px; color: var(--dsw-alias-label-tertiary); }
|
|
@@ -2811,7 +2812,7 @@ button[data-sync-stat]:focus-visible { outline: 2px solid var(--dsw-alias-border
|
|
|
2811
2812
|
[data-r2-config-row] > [data-sync-btn] { flex: 1 1 0; }
|
|
2812
2813
|
[data-r2-config-hint] { font-size: 11px; line-height: 14px; color: var(--dsw-alias-label-secondary); }
|
|
2813
2814
|
@media (max-width: 640px) {
|
|
2814
|
-
[data-sync-ssh-row] > [data-sync-btn] { min-height:
|
|
2815
|
+
[data-sync-ssh-row] > [data-sync-btn] { min-height: 44px !important; }
|
|
2815
2816
|
}
|
|
2816
2817
|
|
|
2817
2818
|
/* iOS 16px field floor hold (dsh-maestro-mobile zoom guard).
|
package/lib/plugin.js
CHANGED
|
@@ -1073,6 +1073,48 @@ function ensureSystemdKeepalive(ctx) {
|
|
|
1073
1073
|
}
|
|
1074
1074
|
catch { }
|
|
1075
1075
|
}
|
|
1076
|
+
/**
|
|
1077
|
+
* Run `body` once every service in `names` is active, without holding up this row.
|
|
1078
|
+
*
|
|
1079
|
+
* `inject` is empty on purpose (see its declaration), so the row activates as soon
|
|
1080
|
+
* as its entry loads — before the `tools` and `skills` fibers are active.
|
|
1081
|
+
* `ctx.get` is strict: ReflectService resolves a service only while the fiber
|
|
1082
|
+
* providing it is active, so reading those services during `apply()` returned
|
|
1083
|
+
* undefined and every tool and skill registration was dropped — silently, because
|
|
1084
|
+
* each registration guards on the lookup answering. A child fiber carries its own
|
|
1085
|
+
* inject list and activates on those services independently, which keeps them off
|
|
1086
|
+
* the boot resume scan's dependency path. A host without the registry mixin has no
|
|
1087
|
+
* child-fiber primitive and registers immediately, which is correct when the
|
|
1088
|
+
* services are already active.
|
|
1089
|
+
*
|
|
1090
|
+
* @param ctx — the row's context.
|
|
1091
|
+
* @param names — service names the body needs; each is a separate child fiber's
|
|
1092
|
+
* dependency list, so one absent service cannot suppress the others.
|
|
1093
|
+
* @param body — registration callback, receiving the scoped child context.
|
|
1094
|
+
*/
|
|
1095
|
+
function whenServicesActive(ctx, names, body) {
|
|
1096
|
+
try {
|
|
1097
|
+
if (typeof ctx.inject === 'function') {
|
|
1098
|
+
ctx.inject(names, body);
|
|
1099
|
+
return;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
catch (e) {
|
|
1103
|
+
try {
|
|
1104
|
+
ctx.logger?.warn?.(`[supervisor] ${names.join('/')} fiber failed: ${e?.message ?? String(e)}`);
|
|
1105
|
+
}
|
|
1106
|
+
catch { }
|
|
1107
|
+
}
|
|
1108
|
+
try {
|
|
1109
|
+
body(ctx);
|
|
1110
|
+
}
|
|
1111
|
+
catch (e) {
|
|
1112
|
+
try {
|
|
1113
|
+
ctx.logger?.warn?.(`[supervisor] ${names.join('/')} registration failed: ${e?.message ?? String(e)}`);
|
|
1114
|
+
}
|
|
1115
|
+
catch { }
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1076
1118
|
export function apply(ctx, config = {}) {
|
|
1077
1119
|
// The whole body is wrapped: per AGENTS.md, apply() must never throw
|
|
1078
1120
|
// synchronously or let a rejected promise escape, no matter what fails
|
|
@@ -1083,36 +1125,46 @@ export function apply(ctx, config = {}) {
|
|
|
1083
1125
|
ensureSystemdKeepalive(ctx);
|
|
1084
1126
|
}
|
|
1085
1127
|
catch { }
|
|
1086
|
-
|
|
1087
|
-
const skills =
|
|
1088
|
-
if (skills?.registerProvider)
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
}
|
|
1128
|
+
whenServicesActive(ctx, ['skills'], (scoped) => {
|
|
1129
|
+
const skills = scoped.get?.('skills') ?? scoped.skills;
|
|
1130
|
+
if (!skills?.registerProvider)
|
|
1131
|
+
return;
|
|
1132
|
+
scoped.effect(() => {
|
|
1133
|
+
let unregister;
|
|
1134
|
+
try {
|
|
1135
|
+
// Package-root skills/ is resolved at runtime by walking to the
|
|
1136
|
+
// nearest package.json (robust to lib/ vs src/host/ layouts).
|
|
1137
|
+
unregister = skills.registerProvider(() => makeSkillProvider(resolveSkillsDir(__dirname)));
|
|
1138
|
+
}
|
|
1139
|
+
catch (e) {
|
|
1140
|
+
scoped.logger?.warn?.(`[supervisor] skill provider failed: ${e?.message ?? String(e)}`);
|
|
1141
|
+
}
|
|
1142
|
+
return () => { try {
|
|
1143
|
+
unregister?.();
|
|
1144
|
+
}
|
|
1145
|
+
catch { } };
|
|
1146
|
+
}, 'supervisor:skill');
|
|
1147
|
+
});
|
|
1148
|
+
whenServicesActive(ctx, ['tools'], (scoped) => {
|
|
1149
|
+
try {
|
|
1150
|
+
scoped.effect(() => registerRestartTool(scoped), 'supervisor:restart-tool');
|
|
1151
|
+
}
|
|
1152
|
+
catch (e) {
|
|
1153
|
+
try {
|
|
1154
|
+
scoped.logger?.warn?.(`[supervisor] restart tool effect failed: ${e?.message ?? String(e)}`);
|
|
1155
|
+
}
|
|
1156
|
+
catch { }
|
|
1104
1157
|
}
|
|
1105
|
-
}
|
|
1106
|
-
catch { }
|
|
1107
|
-
try {
|
|
1108
|
-
ctx.effect(() => registerRestartTool(ctx), 'supervisor:restart-tool');
|
|
1109
|
-
}
|
|
1110
|
-
catch (e) {
|
|
1111
1158
|
try {
|
|
1112
|
-
|
|
1159
|
+
scoped.effect(() => registerResumeToolHealthService(scoped), 'supervisor:resume-tool-health');
|
|
1113
1160
|
}
|
|
1114
|
-
catch {
|
|
1115
|
-
|
|
1161
|
+
catch (e) {
|
|
1162
|
+
try {
|
|
1163
|
+
scoped.logger?.warn?.(`[supervisor] resume-tool-health effect failed: ${e?.message ?? String(e)}`);
|
|
1164
|
+
}
|
|
1165
|
+
catch { }
|
|
1166
|
+
}
|
|
1167
|
+
});
|
|
1116
1168
|
try {
|
|
1117
1169
|
ctx.effect(() => registerSessionHealthService(ctx, config), 'supervisor:session-health');
|
|
1118
1170
|
}
|
|
@@ -1122,15 +1174,6 @@ export function apply(ctx, config = {}) {
|
|
|
1122
1174
|
}
|
|
1123
1175
|
catch { }
|
|
1124
1176
|
}
|
|
1125
|
-
try {
|
|
1126
|
-
ctx.effect(() => registerResumeToolHealthService(ctx), 'supervisor:resume-tool-health');
|
|
1127
|
-
}
|
|
1128
|
-
catch (e) {
|
|
1129
|
-
try {
|
|
1130
|
-
ctx.logger?.warn?.(`[supervisor] resume-tool-health effect failed: ${e?.message ?? String(e)}`);
|
|
1131
|
-
}
|
|
1132
|
-
catch { }
|
|
1133
|
-
}
|
|
1134
1177
|
ctx.effect(() => {
|
|
1135
1178
|
let disposed = false;
|
|
1136
1179
|
let timer = null;
|
package/lib/snapshot.d.ts
CHANGED
|
@@ -17,7 +17,8 @@ export interface SnapshotDeps {
|
|
|
17
17
|
copyFile?: (src: string, dest: string, mode: number) => void;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Entries under the harness home directory that the last-known-good snapshot
|
|
21
|
+
* deliberately never copies.
|
|
21
22
|
*
|
|
22
23
|
* The LKG exists to recover a boot that fails while loading the plugin tree, so
|
|
23
24
|
* it holds boot **configuration**: `profiles/` (the plugin tree with its
|
|
@@ -41,7 +42,7 @@ export interface SnapshotDeps {
|
|
|
41
42
|
*/
|
|
42
43
|
export declare const LKG_EXCLUDED_ENTRIES: readonly string[];
|
|
43
44
|
/**
|
|
44
|
-
* True when a
|
|
45
|
+
* True when a path relative to the harness home must never enter (or leave) the LKG.
|
|
45
46
|
*
|
|
46
47
|
* The named entries match the first path segment; `*.log` matches by basename
|
|
47
48
|
* anywhere, because append-only logs are data at any depth and a restored stale
|
package/lib/snapshot.js
CHANGED
|
@@ -2,7 +2,8 @@ import * as fs from 'node:fs';
|
|
|
2
2
|
import * as path from 'node:path';
|
|
3
3
|
import * as crypto from 'node:crypto';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Entries under the harness home directory that the last-known-good snapshot
|
|
6
|
+
* deliberately never copies.
|
|
6
7
|
*
|
|
7
8
|
* The LKG exists to recover a boot that fails while loading the plugin tree, so
|
|
8
9
|
* it holds boot **configuration**: `profiles/` (the plugin tree with its
|
|
@@ -31,7 +32,7 @@ export const LKG_EXCLUDED_ENTRIES = [
|
|
|
31
32
|
'.supervisor',
|
|
32
33
|
];
|
|
33
34
|
/**
|
|
34
|
-
* True when a
|
|
35
|
+
* True when a path relative to the harness home must never enter (or leave) the LKG.
|
|
35
36
|
*
|
|
36
37
|
* The named entries match the first path segment; `*.log` matches by basename
|
|
37
38
|
* anywhere, because append-only logs are data at any depth and a restored stale
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaestroSettings.d.ts","sourceRoot":"","sources":["../../../../src/client/config/MaestroSettings.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"MaestroSettings.d.ts","sourceRoot":"","sources":["../../../../src/client/config/MaestroSettings.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA8VH,wBAAgB,kBAAkB,CAAC,EAAE,aAAa,EAAE,iBAAiB,EAAE,EAAE;IAAE,aAAa,CAAC,EAAE,GAAG,CAAC;IAAC,iBAAiB,CAAC,EAAE,GAAG,CAAA;CAAE;;;;;;;;;mBAgY8C,GAAG;;gBAkBzK"}
|
package/package.json
CHANGED
|
@@ -21,6 +21,7 @@ const t = {
|
|
|
21
21
|
bgLayer2: 'var(--dsw-alias-bg-layer-2)',
|
|
22
22
|
bgLayer3: 'var(--dsw-alias-bg-layer-3)',
|
|
23
23
|
borderL2: 'var(--dsw-alias-border-l2)',
|
|
24
|
+
borderL4: 'var(--dsw-alias-border-l4)',
|
|
24
25
|
labelPrimary: 'var(--dsw-alias-label-primary)',
|
|
25
26
|
labelSecondary: 'var(--dsw-alias-label-secondary)',
|
|
26
27
|
labelTertiary: 'var(--dsw-alias-label-tertiary)',
|
|
@@ -619,8 +620,9 @@ export function MaestroSettingsTab({ configRpcCall, supervisorRpcCall }: { confi
|
|
|
619
620
|
},
|
|
620
621
|
'aria-label': meta.label,
|
|
621
622
|
style: {
|
|
622
|
-
|
|
623
|
-
|
|
623
|
+
minHeight: 44, padding: '6px 12px', border: '0.5px solid var(--dsw-alias-border-l4)',
|
|
624
|
+
borderRadius: 'var(--dsw-radius-md)', background: t.bgLayer3 as string,
|
|
625
|
+
color: t.labelPrimary as string, font: 'inherit', fontSize: 13,
|
|
624
626
|
},
|
|
625
627
|
},
|
|
626
628
|
h('option', { value: 'default' }, `Default (${meta.defaultTier})`),
|
|
@@ -156,7 +156,7 @@ export function SyncPanel(props: { ctx: any }): React.ReactElement {
|
|
|
156
156
|
aria-invalid={hostFieldError ? 'true' : undefined}
|
|
157
157
|
/>
|
|
158
158
|
{hostFieldError ? (
|
|
159
|
-
<span data-sync-field-error="" role="alert" data-testid="sync-ssh-host-error" style={{
|
|
159
|
+
<span data-sync-field-error="" role="alert" data-testid="sync-ssh-host-error" style={{ fontSize: 12, lineHeight: '16px', color: 'var(--dsw-alias-state-error-primary)', overflowWrap: 'anywhere' }}>
|
|
160
160
|
{hostFieldError}
|
|
161
161
|
</span>
|
|
162
162
|
) : null}
|
|
@@ -255,8 +255,8 @@ button[data-sync-stat]:focus-visible { outline: 2px solid var(--dsw-alias-border
|
|
|
255
255
|
}
|
|
256
256
|
/* SSH configuration — user-filled target, explicit check, nothing auto-probes */
|
|
257
257
|
[data-sync-ssh] { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--dsw-alias-border-l1); border-radius: 10px; background: var(--dsw-alias-bg-layer-2); }
|
|
258
|
-
[data-sync-ssh-label] { font-size: 11px; color: var(--dsw-alias-label-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
|
|
259
|
-
[data-sync-ssh-input] { min-height: 44px; padding:
|
|
258
|
+
[data-sync-ssh-label] { font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
|
|
259
|
+
[data-sync-ssh-input] { min-height: 44px; padding: 6px 12px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: var(--dsw-radius-md); background: var(--dsw-alias-bg-layer-3); color: var(--dsw-alias-label-primary); font: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; width: 100%; box-sizing: border-box; }
|
|
260
260
|
[data-sync-ssh-input]:focus-visible { outline: 2px solid var(--dsw-alias-border-l2); outline-offset: 2px; }
|
|
261
261
|
[data-sync-ssh-input]:disabled { opacity: 0.6; }
|
|
262
262
|
[data-sync-ssh-row] { display: flex; gap: 8px; flex-wrap: wrap; }
|
|
@@ -269,7 +269,7 @@ button[data-sync-stat]:focus-visible { outline: 2px solid var(--dsw-alias-border
|
|
|
269
269
|
[data-r2-config-label] { font-size: 11px; color: var(--dsw-alias-label-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
|
|
270
270
|
[data-r2-field] { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
271
271
|
[data-r2-field-label] { font-size: 12px; font-weight: 600; color: var(--dsw-alias-label-primary); }
|
|
272
|
-
[data-r2-field-input] { min-height: 44px; padding:
|
|
272
|
+
[data-r2-field-input] { min-height: 44px; padding: 6px 12px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: var(--dsw-radius-md); background: var(--dsw-alias-bg-layer-3); color: var(--dsw-alias-label-primary); font: inherit; width: 100%; box-sizing: border-box; }
|
|
273
273
|
[data-r2-field-input]:focus-visible { outline: 2px solid var(--dsw-alias-border-l2); outline-offset: 2px; }
|
|
274
274
|
[data-r2-field-input]:disabled { opacity: 0.6; }
|
|
275
275
|
[data-r2-field-hint] { font-size: 11px; line-height: 14px; color: var(--dsw-alias-label-tertiary); }
|
|
@@ -287,7 +287,7 @@ button[data-sync-stat]:focus-visible { outline: 2px solid var(--dsw-alias-border
|
|
|
287
287
|
[data-r2-config-row] > [data-sync-btn] { flex: 1 1 0; }
|
|
288
288
|
[data-r2-config-hint] { font-size: 11px; line-height: 14px; color: var(--dsw-alias-label-secondary); }
|
|
289
289
|
@media (max-width: 640px) {
|
|
290
|
-
[data-sync-ssh-row] > [data-sync-btn] { min-height:
|
|
290
|
+
[data-sync-ssh-row] > [data-sync-btn] { min-height: 44px !important; }
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
/* iOS 16px field floor hold (dsh-maestro-mobile zoom guard).
|
package/src/host/plugin.ts
CHANGED
|
@@ -1076,6 +1076,41 @@ function ensureSystemdKeepalive(ctx: any): void {
|
|
|
1076
1076
|
} catch {}
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
|
+
/**
|
|
1080
|
+
* Run `body` once every service in `names` is active, without holding up this row.
|
|
1081
|
+
*
|
|
1082
|
+
* `inject` is empty on purpose (see its declaration), so the row activates as soon
|
|
1083
|
+
* as its entry loads — before the `tools` and `skills` fibers are active.
|
|
1084
|
+
* `ctx.get` is strict: ReflectService resolves a service only while the fiber
|
|
1085
|
+
* providing it is active, so reading those services during `apply()` returned
|
|
1086
|
+
* undefined and every tool and skill registration was dropped — silently, because
|
|
1087
|
+
* each registration guards on the lookup answering. A child fiber carries its own
|
|
1088
|
+
* inject list and activates on those services independently, which keeps them off
|
|
1089
|
+
* the boot resume scan's dependency path. A host without the registry mixin has no
|
|
1090
|
+
* child-fiber primitive and registers immediately, which is correct when the
|
|
1091
|
+
* services are already active.
|
|
1092
|
+
*
|
|
1093
|
+
* @param ctx — the row's context.
|
|
1094
|
+
* @param names — service names the body needs; each is a separate child fiber's
|
|
1095
|
+
* dependency list, so one absent service cannot suppress the others.
|
|
1096
|
+
* @param body — registration callback, receiving the scoped child context.
|
|
1097
|
+
*/
|
|
1098
|
+
function whenServicesActive(ctx: any, names: string[], body: (scoped: any) => void): void {
|
|
1099
|
+
try {
|
|
1100
|
+
if (typeof ctx.inject === 'function') {
|
|
1101
|
+
ctx.inject(names, body)
|
|
1102
|
+
return
|
|
1103
|
+
}
|
|
1104
|
+
} catch (e: any) {
|
|
1105
|
+
try { ctx.logger?.warn?.(`[supervisor] ${names.join('/')} fiber failed: ${e?.message ?? String(e)}`) } catch {}
|
|
1106
|
+
}
|
|
1107
|
+
try {
|
|
1108
|
+
body(ctx)
|
|
1109
|
+
} catch (e: any) {
|
|
1110
|
+
try { ctx.logger?.warn?.(`[supervisor] ${names.join('/')} registration failed: ${e?.message ?? String(e)}`) } catch {}
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1079
1114
|
export function apply(ctx: any, config: SupervisorPluginConfig = {}): void {
|
|
1080
1115
|
// The whole body is wrapped: per AGENTS.md, apply() must never throw
|
|
1081
1116
|
// synchronously or let a rejected promise escape, no matter what fails
|
|
@@ -1083,26 +1118,34 @@ export function apply(ctx: any, config: SupervisorPluginConfig = {}): void {
|
|
|
1083
1118
|
// error-reporting logger call itself throwing).
|
|
1084
1119
|
try {
|
|
1085
1120
|
try { ensureSystemdKeepalive(ctx) } catch {}
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
}
|
|
1121
|
+
|
|
1122
|
+
whenServicesActive(ctx, ['skills'], (scoped) => {
|
|
1123
|
+
const skills: any = scoped.get?.('skills') ?? scoped.skills
|
|
1124
|
+
if (!skills?.registerProvider) return
|
|
1125
|
+
scoped.effect(() => {
|
|
1126
|
+
let unregister: (() => void) | undefined
|
|
1127
|
+
try {
|
|
1128
|
+
// Package-root skills/ is resolved at runtime by walking to the
|
|
1129
|
+
// nearest package.json (robust to lib/ vs src/host/ layouts).
|
|
1130
|
+
unregister = skills.registerProvider(() => makeSkillProvider(resolveSkillsDir(__dirname)))
|
|
1131
|
+
} catch (e: any) { scoped.logger?.warn?.(`[supervisor] skill provider failed: ${e?.message ?? String(e)}`) }
|
|
1132
|
+
return () => { try { unregister?.() } catch {} }
|
|
1133
|
+
}, 'supervisor:skill')
|
|
1134
|
+
})
|
|
1135
|
+
|
|
1136
|
+
whenServicesActive(ctx, ['tools'], (scoped) => {
|
|
1137
|
+
try {
|
|
1138
|
+
scoped.effect(() => registerRestartTool(scoped), 'supervisor:restart-tool')
|
|
1139
|
+
} catch (e: any) {
|
|
1140
|
+
try { scoped.logger?.warn?.(`[supervisor] restart tool effect failed: ${e?.message ?? String(e)}`) } catch {}
|
|
1098
1141
|
}
|
|
1099
|
-
} catch {}
|
|
1100
1142
|
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1143
|
+
try {
|
|
1144
|
+
scoped.effect(() => registerResumeToolHealthService(scoped), 'supervisor:resume-tool-health')
|
|
1145
|
+
} catch (e: any) {
|
|
1146
|
+
try { scoped.logger?.warn?.(`[supervisor] resume-tool-health effect failed: ${e?.message ?? String(e)}`) } catch {}
|
|
1147
|
+
}
|
|
1148
|
+
})
|
|
1106
1149
|
|
|
1107
1150
|
try {
|
|
1108
1151
|
ctx.effect(() => registerSessionHealthService(ctx, config), 'supervisor:session-health')
|
|
@@ -1110,12 +1153,6 @@ export function apply(ctx: any, config: SupervisorPluginConfig = {}): void {
|
|
|
1110
1153
|
try { ctx.logger?.warn?.(`[supervisor] session-health effect failed: ${e?.message ?? String(e)}`) } catch {}
|
|
1111
1154
|
}
|
|
1112
1155
|
|
|
1113
|
-
try {
|
|
1114
|
-
ctx.effect(() => registerResumeToolHealthService(ctx), 'supervisor:resume-tool-health')
|
|
1115
|
-
} catch (e: any) {
|
|
1116
|
-
try { ctx.logger?.warn?.(`[supervisor] resume-tool-health effect failed: ${e?.message ?? String(e)}`) } catch {}
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
1156
|
ctx.effect(() => {
|
|
1120
1157
|
let disposed = false
|
|
1121
1158
|
let timer: ReturnType<typeof setTimeout> | null = null
|
package/src/host/snapshot.ts
CHANGED
|
@@ -23,7 +23,8 @@ export interface SnapshotDeps {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Entries under the harness home directory that the last-known-good snapshot
|
|
27
|
+
* deliberately never copies.
|
|
27
28
|
*
|
|
28
29
|
* The LKG exists to recover a boot that fails while loading the plugin tree, so
|
|
29
30
|
* it holds boot **configuration**: `profiles/` (the plugin tree with its
|
|
@@ -53,7 +54,7 @@ export const LKG_EXCLUDED_ENTRIES: readonly string[] = [
|
|
|
53
54
|
]
|
|
54
55
|
|
|
55
56
|
/**
|
|
56
|
-
* True when a
|
|
57
|
+
* True when a path relative to the harness home must never enter (or leave) the LKG.
|
|
57
58
|
*
|
|
58
59
|
* The named entries match the first path segment; `*.log` matches by basename
|
|
59
60
|
* anywhere, because append-only logs are data at any depth and a restored stale
|