@mstar-harness/dsh 3.1.0 → 3.1.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/dist/gates/system-prompt.d.ts +7 -4
- package/dist/index.js +13 -16
- package/dist/types.d.ts +14 -0
- package/package.json +1 -1
|
@@ -37,10 +37,13 @@
|
|
|
37
37
|
* re-registration, in zero-config and explicit-config deployments alike.
|
|
38
38
|
* - The context provider reuses the catalog's unified machine-summary
|
|
39
39
|
* source (`buildCatalogSources` — the SAME builder the engine-status
|
|
40
|
-
* pre-step catalog row uses) and projects
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
40
|
+
* pre-step catalog row uses) and projects the SLIM digest (plan
|
|
41
|
+
* `20260820-dsh-engine-status-slim` Task 2): the version watermark
|
|
42
|
+
* ALWAYS, plus ONE `workflow … | plans: …` line only when the active set
|
|
43
|
+
* selects a lifecycle (`state.selection.kind === 'active'`). Harness dir
|
|
44
|
+
* and enforcement live in `mstar:harness-rules`; residuals / leases /
|
|
45
|
+
* direction / iteration-gate detail stay exclusive to the pre-step row.
|
|
46
|
+
* v3 (plan `20260819-workflow-dsh-viz` Task 3): the
|
|
44
47
|
* digest reads ONLY the catalog row (`state` — itself aggregated from the
|
|
45
48
|
* SELECTED workflow snapshot + project registers) — no direct
|
|
46
49
|
* status.json / snapshot file reads to change. The build is TTL-memoized
|
package/dist/index.js
CHANGED
|
@@ -5656,6 +5656,8 @@ function harnessStateSource(harnessDir) {
|
|
|
5656
5656
|
const executionPolicy = asRecord(snapshot.execution_policy);
|
|
5657
5657
|
return {
|
|
5658
5658
|
selection,
|
|
5659
|
+
workflowType: str(snapshot.type),
|
|
5660
|
+
workflowStatus: str(snapshot.status),
|
|
5659
5661
|
plans,
|
|
5660
5662
|
residuals,
|
|
5661
5663
|
residualFindings,
|
|
@@ -5678,6 +5680,8 @@ function harnessStateSource(harnessDir) {
|
|
|
5678
5680
|
function selectionErrorState(selection, rollup, harnessDir, compass) {
|
|
5679
5681
|
return {
|
|
5680
5682
|
selection,
|
|
5683
|
+
workflowType: null,
|
|
5684
|
+
workflowStatus: null,
|
|
5681
5685
|
plans: [],
|
|
5682
5686
|
residuals: [],
|
|
5683
5687
|
residualFindings: null,
|
|
@@ -8123,7 +8127,6 @@ function engineStatusProvider(ctx, resolver, bootHarnessDir) {
|
|
|
8123
8127
|
};
|
|
8124
8128
|
}
|
|
8125
8129
|
var DIGEST_PLAN_CAP = 8;
|
|
8126
|
-
var DIGEST_LEASE_CAP = 4;
|
|
8127
8130
|
function joinCapped(items, cap, separator, render) {
|
|
8128
8131
|
const visible = items.slice(0, cap).map(render);
|
|
8129
8132
|
if (items.length > cap)
|
|
@@ -8131,23 +8134,17 @@ function joinCapped(items, cap, separator, render) {
|
|
|
8131
8134
|
return visible.join(separator);
|
|
8132
8135
|
}
|
|
8133
8136
|
function engineStatusSummary(source) {
|
|
8134
|
-
const lines = [
|
|
8135
|
-
`mstar engine status: v${source.version} | harness ${stripInterpolationHazard(source.harnessDir ?? "none")} | enforcement ${source.enforcement.hard ? "hard" : "soft"}`
|
|
8136
|
-
];
|
|
8137
|
-
const iteration = source.iteration;
|
|
8138
|
-
if (iteration !== undefined) {
|
|
8139
|
-
const gate2 = iteration.gate;
|
|
8140
|
-
const codes = gate2.violations.map((v) => v.code).join(", ");
|
|
8141
|
-
lines.push(`iteration ${stripInterpolationHazard(iteration.iterationId)}: gate ${gate2.ok ? "PASS" : `FAIL (${codes})`} | transition ${gate2.transition} | all plans done ${gate2.all_plans_done}`);
|
|
8142
|
-
}
|
|
8137
|
+
const lines = [`mstar engine status: v${source.version}`];
|
|
8143
8138
|
const state = source.state;
|
|
8144
8139
|
if (state !== null) {
|
|
8145
|
-
const
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8140
|
+
const selection = state.selection;
|
|
8141
|
+
if (selection.kind === "active") {
|
|
8142
|
+
const pending = state.plans.filter((p) => p.status !== "Done");
|
|
8143
|
+
const plans = pending.length === 0 ? "none" : joinCapped(pending, DIGEST_PLAN_CAP, " ", (p) => `${stripInterpolationHazard(p.id)}(${stripInterpolationHazard(p.status)})`);
|
|
8144
|
+
const workflowType = stripInterpolationHazard(state.workflowType ?? "unknown");
|
|
8145
|
+
const workflowStatus = stripInterpolationHazard(state.workflowStatus ?? "unknown");
|
|
8146
|
+
lines.push(`workflow ${stripInterpolationHazard(selection.workflowId)} (${workflowType}) ${workflowStatus} | plans: ${plans}`);
|
|
8147
|
+
}
|
|
8151
8148
|
}
|
|
8152
8149
|
return lines.join(`
|
|
8153
8150
|
`);
|
package/dist/types.d.ts
CHANGED
|
@@ -199,6 +199,20 @@ export interface MstarHarnessState {
|
|
|
199
199
|
* read).
|
|
200
200
|
*/
|
|
201
201
|
readonly selection: WorkflowSelectionView;
|
|
202
|
+
/**
|
|
203
|
+
* The selected workflow snapshot's top-level `type` (`plan` / `iteration`),
|
|
204
|
+
* projected loose (`string`) like `HarnessPlanView.status`. ALWAYS-present
|
|
205
|
+
* nullable scalar (lossless JSON, never omitted): missing/empty → `null`;
|
|
206
|
+
* `null` on selection error (no snapshot read). Added for the slim
|
|
207
|
+
* `mstar:engine-status` digest (plan `20260820-dsh-engine-status-slim`).
|
|
208
|
+
*/
|
|
209
|
+
readonly workflowType: string | null;
|
|
210
|
+
/**
|
|
211
|
+
* The selected workflow snapshot's top-level lifecycle `status`
|
|
212
|
+
* (`running` / `paused`; a terminal word for a stale-but-registered entry,
|
|
213
|
+
* decision D3). Same ALWAYS-present nullable discipline as `workflowType`.
|
|
214
|
+
*/
|
|
215
|
+
readonly workflowStatus: string | null;
|
|
202
216
|
/** Registered plan rows (`plan_id`/`id` + `status`), snapshot plans[] order. */
|
|
203
217
|
readonly plans: readonly HarnessPlanView[];
|
|
204
218
|
/** Open `residual_findings` counts by severity (non-zero only). */
|
package/package.json
CHANGED