@try-works/dsh-minimal-router 0.2.1 → 0.2.3
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/client/index.js +49 -19
- package/package.json +1 -1
package/client/index.js
CHANGED
|
@@ -65290,13 +65290,22 @@ var OverviewCss = [
|
|
|
65290
65290
|
".router-meter-track { position: relative; width: 100%; height: 6px; flex-shrink: 0; border-radius: var(--radius-pill); background: var(--color-line-panel); }",
|
|
65291
65291
|
".router-meter-indicator { border-radius: var(--radius-pill); }",
|
|
65292
65292
|
".router-meter-tick { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--color-bg); }",
|
|
65293
|
-
|
|
65294
|
-
|
|
65293
|
+
/* F-37-51: the session list reads like the recent-calls list - one row per
|
|
65294
|
+
session, the kit checkbox first, the id reduced to its tail. */
|
|
65295
|
+
".router-sessions { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--color-line-rule); padding-top: var(--spacing-4); width: 100%; }",
|
|
65296
|
+
".router-sessions-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--spacing-4); padding-bottom: var(--spacing-2); }",
|
|
65295
65297
|
".router-sessions-label { font-family: var(--font-mono); font-size: var(--text-caps); line-height: var(--leading-caps); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-meta); }",
|
|
65296
|
-
".router-sessions-
|
|
65297
|
-
".router-session-row { display: flex; align-items: center; gap: var(--spacing-4); border-top: 1px solid var(--color-line-rule); padding:
|
|
65298
|
-
".router-session-
|
|
65299
|
-
".router-session-
|
|
65298
|
+
".router-sessions-count { font-family: var(--font-mono); font-size: var(--text-meta); line-height: var(--leading-meta); color: var(--color-meta); }",
|
|
65299
|
+
".router-session-row { display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-4); border-top: 1px solid var(--color-line-rule); padding: 7px 0; }",
|
|
65300
|
+
".router-session-control { display: flex; align-items: center; gap: var(--spacing-3); flex: 1 1 auto; min-width: 0; cursor: pointer; }",
|
|
65301
|
+
".router-session-check { width: 14px; height: 14px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 1px solid var(--color-line-field); border-radius: var(--radius-chip); color: transparent; }",
|
|
65302
|
+
'.router-session-check[aria-checked="true"] { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-bg); }',
|
|
65303
|
+
".router-session-tick { font-family: var(--font-mono); font-size: var(--text-caps); line-height: var(--leading-caps); }",
|
|
65304
|
+
".router-session-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-ui); font-size: var(--text-label); line-height: var(--leading-label); color: var(--color-ink); }",
|
|
65305
|
+
".router-session-state { font-family: var(--font-mono); font-size: var(--text-meta); color: var(--color-meta); flex-shrink: 0; }",
|
|
65306
|
+
'.router-session-row[data-session-state="on"] .router-session-state { color: var(--color-ink); }',
|
|
65307
|
+
".router-session-meta { flex-shrink: 0; font-family: var(--font-mono); font-size: var(--text-meta); line-height: var(--leading-meta); color: var(--color-meta); }",
|
|
65308
|
+
".router-session-empty { border-top: 1px solid var(--color-line-rule); padding: 8px 0; font-family: var(--font-ui); font-size: var(--text-meta); color: var(--color-meta); }",
|
|
65300
65309
|
".router-meter-status { font-family: var(--font-mono); font-size: var(--text-meta); line-height: var(--leading-meta); color: var(--color-meta); overflow-wrap: anywhere; }",
|
|
65301
65310
|
/* The page's own error line (the one error role) and the recent-calls list:
|
|
65302
65311
|
classes, not inline styles (F-34-15). The two remaining inline values are
|
|
@@ -65610,8 +65619,13 @@ var ToggleSessionRouting = Command_exports.make(
|
|
|
65610
65619
|
});
|
|
65611
65620
|
})
|
|
65612
65621
|
);
|
|
65613
|
-
var OverviewSessionLabel = (row) => row.title !== null && row.title.length > 0 ? row.title : row.id;
|
|
65614
|
-
var
|
|
65622
|
+
var OverviewSessionLabel = (row) => row.title !== null && row.title.length > 0 ? row.title : OverviewSessionShortId(row.id);
|
|
65623
|
+
var OverviewSessionShortId = (id2) => id2.length <= 8 ? id2 : "\u2026" + id2.slice(-8);
|
|
65624
|
+
var OverviewSessionMeta = (row) => {
|
|
65625
|
+
const at = row.updatedAt === null ? "" : row.updatedAt.slice(11, 16);
|
|
65626
|
+
const hasTitle = row.title !== null && row.title.length > 0;
|
|
65627
|
+
return [row.live ? "live" : null, at.length === 0 ? null : at, hasTitle ? OverviewSessionShortId(row.id) : null].filter((part) => part !== null).join(" \xB7 ");
|
|
65628
|
+
};
|
|
65615
65629
|
var OverviewDef = Html_exports.component({
|
|
65616
65630
|
name: "Overview",
|
|
65617
65631
|
props: Schema_exports.Struct({
|
|
@@ -65758,20 +65772,29 @@ var Overview = OverviewDef.make({
|
|
|
65758
65772
|
)
|
|
65759
65773
|
});
|
|
65760
65774
|
const sessions2 = model.sessions;
|
|
65775
|
+
const onCount = sessions2.filter((row) => row.enabled).length;
|
|
65761
65776
|
const sessionsCard = h3.div.class("router-sessions").attr("data-sessions-card", "").children(
|
|
65762
65777
|
h3.div.class("router-sessions-head").children(
|
|
65763
65778
|
h3.span.class("router-sessions-label").children("Sessions \xB7 routing"),
|
|
65764
|
-
h3.span.class("router-sessions-
|
|
65779
|
+
h3.span.class("router-sessions-count").children(
|
|
65780
|
+
sessions2.length === 0 ? "none" : `${onCount} of ${sessions2.length} on`
|
|
65781
|
+
)
|
|
65765
65782
|
),
|
|
65766
|
-
...sessions2.length === 0 ? [h3.p.class("router-
|
|
65767
|
-
(row) => h3.div.class("router-session-row").attr("data-session-row", row.id).children(
|
|
65768
|
-
h3
|
|
65769
|
-
|
|
65770
|
-
|
|
65771
|
-
|
|
65772
|
-
|
|
65773
|
-
|
|
65774
|
-
|
|
65783
|
+
...sessions2.length === 0 ? [h3.p.class("router-session-empty").children("No recent sessions")] : sessions2.map(
|
|
65784
|
+
(row) => h3.div.class("router-session-row").attr("data-session-row", row.id).attr("data-session-state", row.enabled ? "on" : "off").children(
|
|
65785
|
+
Checkbox(h3, {
|
|
65786
|
+
key: "session-routing-" + row.id,
|
|
65787
|
+
props: { checked: row.enabled, id: "session-routing-" + row.id },
|
|
65788
|
+
onEmit: {
|
|
65789
|
+
Toggled: ({ checked: checked2 }) => OverviewMessage.RequestedToggleSession({ sessionId: row.id, enabled: checked2 })
|
|
65790
|
+
},
|
|
65791
|
+
view: (checkbox) => h3.label.class("router-session-control").children(
|
|
65792
|
+
checkbox.root(h3.button.class("router-session-check")).children(checkbox.indicator(h3.span.class("router-session-tick"))),
|
|
65793
|
+
h3.span.class("router-session-title").children(OverviewSessionLabel(row)),
|
|
65794
|
+
h3.span.class("router-session-state").children(row.enabled ? "on" : "off")
|
|
65795
|
+
)
|
|
65796
|
+
}),
|
|
65797
|
+
h3.span.class("router-session-meta").children(OverviewSessionMeta(row))
|
|
65775
65798
|
)
|
|
65776
65799
|
)
|
|
65777
65800
|
);
|
|
@@ -66956,6 +66979,11 @@ var EvidenceContentCss = `
|
|
|
66956
66979
|
.router-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
|
|
66957
66980
|
.router-card[data-card-density="models"] { padding: var(--spacing-5); }
|
|
66958
66981
|
.router-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
|
|
66982
|
+
/* Owner report (2026-12-05): a long model name beside the title squeezed "Ceiling"
|
|
66983
|
+
into "Ceilin g". The title is nowrap and never shrinks; the meta takes the
|
|
66984
|
+
remaining width and wraps there. */
|
|
66985
|
+
.router-card-head .router-card-label { flex: 0 0 auto; white-space: nowrap; }
|
|
66986
|
+
.router-card-head .router-card-meta { flex: 1 1 auto; min-width: 0; text-align: right; overflow-wrap: anywhere; }
|
|
66959
66987
|
.router-card-label { font-family: ${SANS}; font-size: var(--text-title); line-height: var(--leading-title); font-weight: 500; letter-spacing: var(--tracking-none); text-transform: none; color: ${INK}; }
|
|
66960
66988
|
.router-card-meta { font-family: ${MONO}; font-size: var(--text-meta); line-height: var(--leading-meta); letter-spacing: var(--tracking-none); text-transform: none; color: ${MUTED}; }
|
|
66961
66989
|
/* Board sub-labels are caps (CONTEXT BANDS, CURRENT DECISION); card titles are T2. */
|
|
@@ -67662,7 +67690,9 @@ var RoutingPage = Html_exports.component({
|
|
|
67662
67690
|
h3.div.class("router-caps-label").children("Concurrency ceiling"),
|
|
67663
67691
|
h3.div.class("router-ceiling").children(
|
|
67664
67692
|
h3.span.class("router-ceiling-value").children(snapshot2 === null ? "\u2014" : String(active2)),
|
|
67665
|
-
h3.span.class("router-ceiling-unit").children(
|
|
67693
|
+
h3.span.class("router-ceiling-unit").children(
|
|
67694
|
+
snapshot2 === null ? "active" : `active \xB7 limit ${Number.isFinite(snapshot2.engineMax) ? String(snapshot2.engineMax) : "\u2014"}`
|
|
67695
|
+
)
|
|
67666
67696
|
),
|
|
67667
67697
|
Meter(h3, {
|
|
67668
67698
|
key: "ceiling",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@try-works/dsh-minimal-router",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "DSH local router plugin: per-session auto-routing between a local engine and remote models, evidence pages, and a plugin-owned engine provider.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|