my-durable 0.0.77 → 0.0.79
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/apps/dpi-backend/src/config.ts +6 -2
- package/apps/dpi-backend/src/git.ts +51 -20
- package/apps/dpi-backend/src/pairing.ts +3 -1
- package/apps/dpi-backend/src/salvage.ts +70 -4
- package/apps/dpi-backend/src/store.ts +171 -2
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/index-CGMattPL.js +82 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/{index-h81haD43.css → index-CkTw4GSI.css} +1 -1
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/index.html +2 -2
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/git-rules.ts +38 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/git-store.ts +32 -12
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/hub.ts +26 -2
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/GitPanel.vue +59 -2
- package/apps/dpi-playground/apps/dpi-playground-hub/src/mux.ts +44 -4
- package/apps/dpi-playground/apps/dpi-playground-hub/src/tunnel-transport.ts +52 -6
- package/apps/dpi-sdk/src/models.ts +74 -6
- package/apps/dpi-sdk/src/node/config.ts +13 -2
- package/apps/dpi-sdk/src/node/ops.ts +33 -6
- package/apps/dpi-sdk/src/node/registry-migration.ts +76 -3
- package/apps/dpi-tui/src/pairing.ts +15 -11
- package/apps/dpi-tui/src/views.ts +1 -1
- package/apps/dpi-tui/src/welcome.ts +9 -4
- package/package.json +1 -1
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/index-CRSjEtI_.js +0 -82
|
@@ -239,7 +239,7 @@ export function renderNetwork(
|
|
|
239
239
|
const seen = d.lastSeenAt ? ageOf(d.lastSeenAt) : "never";
|
|
240
240
|
label =
|
|
241
241
|
`${dot} ${c.bold(row.label)}${row.current ? c.accent(" ▌") : ""} ${c.muted(`[${d.kind}]`)} ` +
|
|
242
|
-
`${c.muted(d.transport === "tunnel" ? "tunnel" : "lan")} ${c.muted(d.lastStatus === "online" ? seen : `${
|
|
242
|
+
`${c.muted(d.transport === "tunnel" ? "tunnel" : "lan")} ${c.muted(d.lastStatus === "online" ? seen : `${oneLine(d.lastStatus)} · ${seen}`)}`;
|
|
243
243
|
} else {
|
|
244
244
|
const selected = row.sessionId === opts.currentSessionId;
|
|
245
245
|
const marker = selected ? c.accent("▌") : " ";
|
|
@@ -21,7 +21,7 @@ import type { App, DeviceRef } from "./app.ts";
|
|
|
21
21
|
import { Picker } from "./pickers.ts";
|
|
22
22
|
import { parsePairArgs, runPairing, type PairArgs } from "./pairing.ts";
|
|
23
23
|
import { c } from "./theme.ts";
|
|
24
|
-
import { sanitizeTerminal } from "./sanitize.ts";
|
|
24
|
+
import { oneLine, sanitizeTerminal } from "./sanitize.ts";
|
|
25
25
|
|
|
26
26
|
const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
|
|
27
27
|
|
|
@@ -277,8 +277,11 @@ export class WelcomePicker extends Picker {
|
|
|
277
277
|
/** Open the welcome screen overlay. `notice` names an unreachable auto-connect. */
|
|
278
278
|
export function showWelcome(app: App, opts: { notice?: string } = {}) {
|
|
279
279
|
const devices = app.registry?.list() ?? [];
|
|
280
|
+
// run-8 U6: oneLine, not just sanitizeTerminal — a hostile device JSON
|
|
281
|
+
// error.message carries LFs, and truncateToWidth passes an embedded LF
|
|
282
|
+
// through inside ONE logical row (probe: forged row + cursor drift).
|
|
280
283
|
const subtitle = opts.notice
|
|
281
|
-
? c.err(
|
|
284
|
+
? c.err(oneLine(opts.notice))
|
|
282
285
|
: c.muted("This is the app — connect a device to get started:");
|
|
283
286
|
let picked = false; // an action was chosen: closing the overlay is a step, not a quit
|
|
284
287
|
app.overlay(
|
|
@@ -426,7 +429,7 @@ async function welcomeLocal(app: App) {
|
|
|
426
429
|
const id = suggestDeviceId(probe.info.hostname, probe.info.name);
|
|
427
430
|
stepPicker(
|
|
428
431
|
app,
|
|
429
|
-
`Local backend: ${
|
|
432
|
+
`Local backend: ${oneLine(probe.info.name || probe.info.hostname || url)}`,
|
|
430
433
|
[{ value: "open", label: `Save as "${id}" and open`, description: `${url} │ token from DPI_TOKEN / backend.env` }],
|
|
431
434
|
// local.token was read BEFORE a first boot may have written backend.env —
|
|
432
435
|
// re-resolve, the file exists now.
|
|
@@ -454,7 +457,9 @@ function welcomeSwitch(app: App) {
|
|
|
454
457
|
async function saveAndOpen(app: App, id: string, url: string, token: string, name?: string) {
|
|
455
458
|
if (!app.registry) return app.flash("No registry — start with --url/--token.", true);
|
|
456
459
|
try {
|
|
457
|
-
|
|
460
|
+
// run-8 U6: the device-supplied name is persisted for EVERY later render —
|
|
461
|
+
// collapse and bound it at the write boundary, not per render site.
|
|
462
|
+
app.registry.upsert({ id, name: oneLine(name || id).slice(0, 128) || id, url, kind: "url", source: "ui", token });
|
|
458
463
|
} catch (e) {
|
|
459
464
|
app.flash((e as Error).message, true);
|
|
460
465
|
return showWelcome(app);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "my-durable",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.79",
|
|
4
4
|
"description": "Durable Pi — the durable agent network: hub web UI, device backend daemon, TUI admin and the shared SDK, packaged as one runnable monorepo install",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|