dsh-tiddlywiki 0.22.4 → 0.22.5
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/LICENSE +21 -21
- package/README.md +5 -1
- package/cordis.patch.yml +13 -13
- package/lib/client.js +1 -1
- package/lib/index.js +249 -31
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
- package/src/client/markdown-editor.ts +128 -128
- package/src/client/settings-page.ts +4 -0
- package/src/client/state.ts +39 -39
- package/src/client/theme-sync.ts +327 -327
- package/src/client/toast.ts +22 -22
- package/src/host/config.ts +9 -0
- package/src/host/ready-policy.ts +108 -0
- package/src/host/wiki.ts +164 -35
- package/src/index.ts +35 -2
package/lib/index.js
CHANGED
|
@@ -893,6 +893,91 @@ function parseSince(since) {
|
|
|
893
893
|
return Number.isNaN(ms) ? void 0 : ms;
|
|
894
894
|
}
|
|
895
895
|
//#endregion
|
|
896
|
+
//#region src/host/ready-policy.ts
|
|
897
|
+
/**
|
|
898
|
+
* TiddlyWiki child readiness policy (v0.22.5).
|
|
899
|
+
*
|
|
900
|
+
* WHY THIS MODULE EXISTS — the production incident it fixes:
|
|
901
|
+
* a 5000-tiddler / 26MB wiki on a cold file cache needed ~44s from `spawn` to
|
|
902
|
+
* TW's own "Serving on http://127.0.0.1:…" line (verified from the /status ring
|
|
903
|
+
* buffer: spawn 01:43:51 → first stdout 01:44:35). The old code had a single
|
|
904
|
+
* hard 20s deadline, so it threw `wiki server did not become ready in time`,
|
|
905
|
+
* which:
|
|
906
|
+
* 1. aborted the whole startup pipeline (config load / seeds / clip bridge)
|
|
907
|
+
* even though the wiki WAS coming up;
|
|
908
|
+
* 2. wrote `health = 'failed'` + a sticky error that nothing ever cleared —
|
|
909
|
+
* no one re-probed after the deadline, so `/status` (panel, FAB, tooltip)
|
|
910
|
+
* kept reporting a fault while TW served normally.
|
|
911
|
+
*
|
|
912
|
+
* The policy is now three-staged:
|
|
913
|
+
* soft window (default 60s, configurable 5s–600s) — ONE warning, keep waiting;
|
|
914
|
+
* hard window (3× the soft window) — the attempt fails;
|
|
915
|
+
* late watch (see wiki.ts) — a live child that answers
|
|
916
|
+
* later still clears the fault.
|
|
917
|
+
*
|
|
918
|
+
* The loop is deliberately pure: `probe` / `isAlive` / clock / `sleep` are all
|
|
919
|
+
* injected, so `scripts/verify-ready-policy.mjs` drives it with a virtual clock
|
|
920
|
+
* (no real TW, no wall-clock flakiness).
|
|
921
|
+
*
|
|
922
|
+
* @module dsh-tiddlywiki/host/ready-policy
|
|
923
|
+
*/
|
|
924
|
+
/** Default soft readiness window: a slow boot only warns, it does not fail. */
|
|
925
|
+
const READY_TIMEOUT_DEFAULT_MS = 6e4;
|
|
926
|
+
/** Lower bound accepted from config (below this a big wiki would still be flaky). */
|
|
927
|
+
const READY_TIMEOUT_MIN_MS = 5e3;
|
|
928
|
+
/** Upper bound accepted from config. */
|
|
929
|
+
const READY_TIMEOUT_MAX_MS = 6e5;
|
|
930
|
+
/** Hard window = soft × this factor; only then is the attempt declared failed. */
|
|
931
|
+
const READY_HARD_FACTOR = 3;
|
|
932
|
+
/** Poll cadence while inside the soft window. */
|
|
933
|
+
const READY_POLL_MS = 500;
|
|
934
|
+
/** Slower cadence once the soft window passed (a slow boot needs patience, not 2 Hz). */
|
|
935
|
+
const READY_SLOW_POLL_MS = 2e3;
|
|
936
|
+
/**
|
|
937
|
+
* Normalize a configured readiness window. Anything non-finite / non-positive
|
|
938
|
+
* falls back to the default; the result is clamped into [MIN, MAX] so a typo in
|
|
939
|
+
* the settings page can neither fail at 0ms nor hold startup for hours.
|
|
940
|
+
*/
|
|
941
|
+
function normalizeReadyTimeoutMs(value) {
|
|
942
|
+
return Math.min(READY_TIMEOUT_MAX_MS, Math.max(READY_TIMEOUT_MIN_MS, typeof value === "number" && Number.isFinite(value) && value > 0 ? Math.floor(value) : READY_TIMEOUT_DEFAULT_MS));
|
|
943
|
+
}
|
|
944
|
+
/** The hard deadline derived from a (possibly unnormalized) soft window. */
|
|
945
|
+
function readyHardTimeoutMs(softMs) {
|
|
946
|
+
return normalizeReadyTimeoutMs(softMs) * 3;
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* Poll until the child answers, exits, or the hard deadline passes.
|
|
950
|
+
*
|
|
951
|
+
* Returns instead of throwing so the caller owns the health/error bookkeeping;
|
|
952
|
+
* a probe that rejects counts as "not ready yet" (TW closes the socket while it
|
|
953
|
+
* is still loading, and that is not an error).
|
|
954
|
+
*/
|
|
955
|
+
async function awaitReady(deps) {
|
|
956
|
+
const now = deps.now ?? (() => Date.now());
|
|
957
|
+
const sleep = deps.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
|
|
958
|
+
const soft = normalizeReadyTimeoutMs(deps.softTimeoutMs);
|
|
959
|
+
const hard = soft * 3;
|
|
960
|
+
const startedAt = now();
|
|
961
|
+
let warned = false;
|
|
962
|
+
for (;;) {
|
|
963
|
+
if (!deps.isAlive()) return "exited";
|
|
964
|
+
let ok = false;
|
|
965
|
+
try {
|
|
966
|
+
ok = await deps.probe();
|
|
967
|
+
} catch {
|
|
968
|
+
ok = false;
|
|
969
|
+
}
|
|
970
|
+
if (ok) return "ready";
|
|
971
|
+
const elapsed = now() - startedAt;
|
|
972
|
+
if (!warned && elapsed >= soft) {
|
|
973
|
+
warned = true;
|
|
974
|
+
deps.onSlow?.(elapsed, hard);
|
|
975
|
+
}
|
|
976
|
+
if (elapsed >= hard) return "timeout";
|
|
977
|
+
await sleep(elapsed >= soft ? READY_SLOW_POLL_MS : 500);
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
//#endregion
|
|
896
981
|
//#region src/host/wiki.ts
|
|
897
982
|
/**
|
|
898
983
|
* WikiServer — the TiddlyWiki 5 child-process lifecycle (design doc §9, D3).
|
|
@@ -927,10 +1012,10 @@ const PATH_PREFIX = "/dsh-tiddlywiki";
|
|
|
927
1012
|
const TW_PROXY_PREFIX = `${PATH_PREFIX}/tw`;
|
|
928
1013
|
/** The proxy base path (trailing slash) handed to browsers / TW's frontend. */
|
|
929
1014
|
const TW_PROXY_PATH = `${TW_PROXY_PREFIX}/`;
|
|
930
|
-
/**
|
|
931
|
-
const
|
|
932
|
-
/**
|
|
933
|
-
const
|
|
1015
|
+
/** Late-ready watch: cadence and lifetime after the hard deadline passed. */
|
|
1016
|
+
const LATE_READY_POLL_MS = 5e3;
|
|
1017
|
+
/** How long the late-ready watch keeps probing a child that outlived the deadline. */
|
|
1018
|
+
const LATE_READY_WINDOW_MS = 10 * 6e4;
|
|
934
1019
|
/** Backoff ceiling for crash restarts. */
|
|
935
1020
|
const MAX_RESTART_BACKOFF_MS = 3e4;
|
|
936
1021
|
/** SIGTERM → SIGKILL escalation grace. */
|
|
@@ -967,6 +1052,12 @@ var WikiServer = class {
|
|
|
967
1052
|
/** Set by a successful readiness probe; a crash BEFORE readiness means the
|
|
968
1053
|
* auto-chosen port may have been taken, so it is re-probed on restart. */
|
|
969
1054
|
wasReady = false;
|
|
1055
|
+
/** Soft readiness window (ms, default 60s) — runtime-editable via {@link setReadyTimeout}. */
|
|
1056
|
+
readyTimeoutMs;
|
|
1057
|
+
/** Pending tick of the late-ready watch (v0.22.5), unref'ed. */
|
|
1058
|
+
lateReadyTimer;
|
|
1059
|
+
/** End timestamp of the armed late-ready watch (undefined = not armed). */
|
|
1060
|
+
lateReadyWatchUntil;
|
|
970
1061
|
constructor(options) {
|
|
971
1062
|
this.options = options;
|
|
972
1063
|
this.wikiPath = resolve(options.wikiRoot, options.wiki);
|
|
@@ -975,6 +1066,7 @@ var WikiServer = class {
|
|
|
975
1066
|
name: options.wiki
|
|
976
1067
|
};
|
|
977
1068
|
this.logLimit = options.logBufferLimit ?? LOG_BUFFER_LIMIT;
|
|
1069
|
+
this.readyTimeoutMs = normalizeReadyTimeoutMs(options.readyTimeoutMs);
|
|
978
1070
|
}
|
|
979
1071
|
/**
|
|
980
1072
|
* The wiki folder this server currently serves (v0.22.0: mutable — a runtime
|
|
@@ -1021,6 +1113,24 @@ var WikiServer = class {
|
|
|
1021
1113
|
get url() {
|
|
1022
1114
|
return this.port === void 0 ? void 0 : `http://127.0.0.1:${this.port}`;
|
|
1023
1115
|
}
|
|
1116
|
+
/**
|
|
1117
|
+
* Update the readiness window (v0.22.5).
|
|
1118
|
+
*
|
|
1119
|
+
* Applies to the NEXT start()/restart(): the settings page saves
|
|
1120
|
+
* `startup.readyTimeoutMs` and the host calls this on every config change, so
|
|
1121
|
+
* a user with an even slower wiki can raise it without restarting dsh web.
|
|
1122
|
+
* Values are clamped by ready-policy.ts (5s–600s; anything invalid → default).
|
|
1123
|
+
*/
|
|
1124
|
+
setReadyTimeout(value) {
|
|
1125
|
+
const next = normalizeReadyTimeoutMs(value);
|
|
1126
|
+
if (next === this.readyTimeoutMs) return;
|
|
1127
|
+
this.readyTimeoutMs = next;
|
|
1128
|
+
this.log(`ready timeout → ${next}ms (hard deadline ${readyHardTimeoutMs(next)}ms)`);
|
|
1129
|
+
}
|
|
1130
|
+
/** The soft readiness window currently in effect (settings page / diagnostics). */
|
|
1131
|
+
get currentReadyTimeoutMs() {
|
|
1132
|
+
return this.readyTimeoutMs;
|
|
1133
|
+
}
|
|
1024
1134
|
/** The currently bound port (undefined until first spawn). */
|
|
1025
1135
|
get currentPort() {
|
|
1026
1136
|
return this.port;
|
|
@@ -1092,6 +1202,7 @@ var WikiServer = class {
|
|
|
1092
1202
|
async startOnce() {
|
|
1093
1203
|
this.stopping = false;
|
|
1094
1204
|
this.restartDelay = 1e3;
|
|
1205
|
+
this.clearLateReadyWatch();
|
|
1095
1206
|
this.error = void 0;
|
|
1096
1207
|
await this.ensureWiki();
|
|
1097
1208
|
if (this.child !== void 0) return this.status();
|
|
@@ -1150,32 +1261,118 @@ var WikiServer = class {
|
|
|
1150
1261
|
await this.waitReady();
|
|
1151
1262
|
return this.status();
|
|
1152
1263
|
}
|
|
1153
|
-
/**
|
|
1264
|
+
/**
|
|
1265
|
+
* Preemptive Basic header for the readiness probe. Locked-down mode
|
|
1266
|
+
* (`username` configured) puts /status behind TW's `readers` list: an
|
|
1267
|
+
* anonymous probe gets 401 forever and the wiki would never be reported
|
|
1268
|
+
* ready. Shared with the late-ready watch below.
|
|
1269
|
+
*/
|
|
1270
|
+
authHeaders() {
|
|
1271
|
+
if (this.options.username === void 0 || this.options.username.length === 0) return void 0;
|
|
1272
|
+
return { authorization: `Basic ${Buffer.from(`${this.options.username}:${this.options.password ?? ""}`, "utf8").toString("base64")}` };
|
|
1273
|
+
}
|
|
1274
|
+
/** One /status probe: true = 200 OK. Never throws (a refused socket while TW
|
|
1275
|
+
* is still loading is "not ready yet", not an error). */
|
|
1276
|
+
async probeStatus(headers) {
|
|
1277
|
+
if (this.port === void 0) return false;
|
|
1278
|
+
try {
|
|
1279
|
+
return (await fetch(`http://127.0.0.1:${this.port}/status`, {
|
|
1280
|
+
signal: AbortSignal.timeout(2e3),
|
|
1281
|
+
...headers !== void 0 ? { headers } : {}
|
|
1282
|
+
})).ok;
|
|
1283
|
+
} catch {
|
|
1284
|
+
return false;
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
/**
|
|
1288
|
+
* Wait for readiness (v0.22.5 policy, see ready-policy.ts).
|
|
1289
|
+
*
|
|
1290
|
+
* Throws only when the child EXITED before ready, or when the HARD deadline
|
|
1291
|
+
* (3× the soft window) passed with the child still silent. Passing the soft
|
|
1292
|
+
* window is a warning, not a verdict: a 5000-tiddler wiki can legitimately
|
|
1293
|
+
* need 40s+ on a cold cache, and failing there aborted seeding/config/clip
|
|
1294
|
+
* bridge for a wiki that was about to serve. On a hard timeout the child is
|
|
1295
|
+
* LEFT RUNNING and a bounded late-ready watch is armed, so `/status` stops
|
|
1296
|
+
* reporting a fault the moment TW really answers.
|
|
1297
|
+
*/
|
|
1154
1298
|
async waitReady() {
|
|
1155
|
-
const
|
|
1156
|
-
const
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
}))
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1299
|
+
const headers = this.authHeaders();
|
|
1300
|
+
const outcome = await awaitReady({
|
|
1301
|
+
probe: () => this.probeStatus(headers),
|
|
1302
|
+
isAlive: () => this.child !== void 0,
|
|
1303
|
+
softTimeoutMs: this.readyTimeoutMs,
|
|
1304
|
+
onSlow: (elapsedMs, hardTimeoutMs) => {
|
|
1305
|
+
this.health = "starting";
|
|
1306
|
+
this.error = void 0;
|
|
1307
|
+
this.log(`slow start: /status not ready after ${Math.round(elapsedMs / 1e3)}s — still loading (hard deadline ${Math.round(hardTimeoutMs / 1e3)}s)`);
|
|
1308
|
+
}
|
|
1309
|
+
});
|
|
1310
|
+
if (outcome === "ready") {
|
|
1311
|
+
this.health = "running";
|
|
1312
|
+
this.wasReady = true;
|
|
1313
|
+
this.error = void 0;
|
|
1314
|
+
this.log("ready: /status 200");
|
|
1315
|
+
return;
|
|
1316
|
+
}
|
|
1317
|
+
if (outcome === "timeout") {
|
|
1318
|
+
const hard = readyHardTimeoutMs(this.readyTimeoutMs);
|
|
1319
|
+
this.health = "failed";
|
|
1320
|
+
this.error = `wiki server did not become ready in time (${Math.round(hard / 1e3)}s)`;
|
|
1321
|
+
this.log(this.error);
|
|
1322
|
+
this.armLateReadyWatch();
|
|
1323
|
+
throw new Error(this.error);
|
|
1324
|
+
}
|
|
1325
|
+
throw new Error("wiki process exited before ready");
|
|
1326
|
+
}
|
|
1327
|
+
/**
|
|
1328
|
+
* Keep a low-frequency probe on a child that outlived the readiness deadline
|
|
1329
|
+
* (v0.22.5). Bounded and `unref`ed (never holds the process open); cancelled
|
|
1330
|
+
* by stop() and superseded by the next start(). It only ever PROMOTES the
|
|
1331
|
+
* status — it never spawns, kills, or writes anything.
|
|
1332
|
+
*/
|
|
1333
|
+
armLateReadyWatch() {
|
|
1334
|
+
const child = this.child;
|
|
1335
|
+
if (child === void 0 || this.stopping || this.lateReadyTimer !== void 0 || this.lateReadyWatchUntil !== void 0) return;
|
|
1336
|
+
const deadline = Date.now() + LATE_READY_WINDOW_MS;
|
|
1337
|
+
this.lateReadyWatchUntil = deadline;
|
|
1338
|
+
const headers = this.authHeaders();
|
|
1339
|
+
this.log(`late-ready watch armed (up to ${Math.round(LATE_READY_WINDOW_MS / 6e4)}min)`);
|
|
1340
|
+
const tick = async () => {
|
|
1341
|
+
this.lateReadyTimer = void 0;
|
|
1342
|
+
if (this.stopping || this.child !== child || this.health === "running") {
|
|
1343
|
+
this.lateReadyWatchUntil = void 0;
|
|
1344
|
+
return;
|
|
1345
|
+
}
|
|
1346
|
+
if (await this.probeStatus(headers)) {
|
|
1347
|
+
this.health = "running";
|
|
1348
|
+
this.wasReady = true;
|
|
1349
|
+
this.error = void 0;
|
|
1350
|
+
this.lateReadyWatchUntil = void 0;
|
|
1351
|
+
this.log("ready (late): /status 200 — cleared the stale startup failure");
|
|
1352
|
+
return;
|
|
1353
|
+
}
|
|
1354
|
+
if (Date.now() >= deadline) {
|
|
1355
|
+
this.lateReadyWatchUntil = void 0;
|
|
1356
|
+
this.log("late-ready watch gave up (child never answered /status)");
|
|
1357
|
+
return;
|
|
1176
1358
|
}
|
|
1177
|
-
|
|
1359
|
+
this.lateReadyTimer = setTimeout(() => {
|
|
1360
|
+
tick();
|
|
1361
|
+
}, LATE_READY_POLL_MS);
|
|
1362
|
+
this.lateReadyTimer.unref?.();
|
|
1363
|
+
};
|
|
1364
|
+
this.lateReadyTimer = setTimeout(() => {
|
|
1365
|
+
tick();
|
|
1366
|
+
}, LATE_READY_POLL_MS);
|
|
1367
|
+
this.lateReadyTimer.unref?.();
|
|
1368
|
+
}
|
|
1369
|
+
/** Cancel a pending late-ready watch (stop / new attempt / teardown). */
|
|
1370
|
+
clearLateReadyWatch() {
|
|
1371
|
+
if (this.lateReadyTimer !== void 0) {
|
|
1372
|
+
clearTimeout(this.lateReadyTimer);
|
|
1373
|
+
this.lateReadyTimer = void 0;
|
|
1178
1374
|
}
|
|
1375
|
+
this.lateReadyWatchUntil = void 0;
|
|
1179
1376
|
}
|
|
1180
1377
|
scheduleRestart() {
|
|
1181
1378
|
if (this.stopping || this.restartTimer !== void 0) return;
|
|
@@ -1221,6 +1418,7 @@ var WikiServer = class {
|
|
|
1221
1418
|
clearTimeout(this.restartTimer);
|
|
1222
1419
|
this.restartTimer = void 0;
|
|
1223
1420
|
}
|
|
1421
|
+
this.clearLateReadyWatch();
|
|
1224
1422
|
const child = this.child;
|
|
1225
1423
|
this.child = void 0;
|
|
1226
1424
|
if (child !== void 0 && child.exitCode === null && child.signalCode === null) {
|
|
@@ -9124,6 +9322,7 @@ const DEFAULTS = {
|
|
|
9124
9322
|
sendToAgent: { enabled: true },
|
|
9125
9323
|
allArticles: { pageSize: 10 }
|
|
9126
9324
|
},
|
|
9325
|
+
startup: { readyTimeoutMs: READY_TIMEOUT_DEFAULT_MS },
|
|
9127
9326
|
uiLanguage: "",
|
|
9128
9327
|
auth: {
|
|
9129
9328
|
username: "",
|
|
@@ -9254,6 +9453,10 @@ function apply(ctx, rawConfig = {}) {
|
|
|
9254
9453
|
auth: {
|
|
9255
9454
|
...DEFAULTS.auth,
|
|
9256
9455
|
...rawConfig.auth ?? {}
|
|
9456
|
+
},
|
|
9457
|
+
startup: {
|
|
9458
|
+
...DEFAULTS.startup,
|
|
9459
|
+
...rawConfig.startup ?? {}
|
|
9257
9460
|
}
|
|
9258
9461
|
};
|
|
9259
9462
|
let wikiPath = join(config.wikiRoot, config.wiki);
|
|
@@ -9265,7 +9468,8 @@ function apply(ctx, rawConfig = {}) {
|
|
|
9265
9468
|
git: config.git,
|
|
9266
9469
|
ui: config.ui,
|
|
9267
9470
|
uiLanguage: config.uiLanguage,
|
|
9268
|
-
bridge: config.bridge
|
|
9471
|
+
bridge: config.bridge,
|
|
9472
|
+
startup: config.startup
|
|
9269
9473
|
});
|
|
9270
9474
|
const eff = () => configStore.get();
|
|
9271
9475
|
const effectiveNoteTag = () => {
|
|
@@ -9348,8 +9552,18 @@ function apply(ctx, rawConfig = {}) {
|
|
|
9348
9552
|
wiki: config.wiki,
|
|
9349
9553
|
port: config.port,
|
|
9350
9554
|
username: config.auth.username,
|
|
9351
|
-
password: config.auth.password
|
|
9555
|
+
password: config.auth.password,
|
|
9556
|
+
readyTimeoutMs: config.startup.readyTimeoutMs
|
|
9352
9557
|
});
|
|
9558
|
+
/**
|
|
9559
|
+
* Readiness window from the EFFECTIVE config (v0.22.5): the settings page
|
|
9560
|
+
* saves `startup.readyTimeoutMs`, and this re-applies it to the running
|
|
9561
|
+
* server — it takes effect on the next start()/restart() without a dsh web
|
|
9562
|
+
* restart. Values are clamped by host/ready-policy.ts.
|
|
9563
|
+
*/
|
|
9564
|
+
const applyServerTuning = () => {
|
|
9565
|
+
server.setReadyTimeout(eff().startup?.readyTimeoutMs);
|
|
9566
|
+
};
|
|
9353
9567
|
let clientCache;
|
|
9354
9568
|
let clientPort;
|
|
9355
9569
|
const client = () => {
|
|
@@ -9508,6 +9722,7 @@ function apply(ctx, rawConfig = {}) {
|
|
|
9508
9722
|
}
|
|
9509
9723
|
await configStore.load(client());
|
|
9510
9724
|
applyPrompt();
|
|
9725
|
+
applyServerTuning();
|
|
9511
9726
|
if (disposed) {
|
|
9512
9727
|
await server.stop().catch(() => void 0);
|
|
9513
9728
|
return;
|
|
@@ -9673,7 +9888,10 @@ function apply(ctx, rawConfig = {}) {
|
|
|
9673
9888
|
getWikiPath: () => wikiPath,
|
|
9674
9889
|
twRoot: resolveTwRoot,
|
|
9675
9890
|
config: configStore,
|
|
9676
|
-
onConfigChanged: () =>
|
|
9891
|
+
onConfigChanged: () => {
|
|
9892
|
+
applyPrompt();
|
|
9893
|
+
applyServerTuning();
|
|
9894
|
+
},
|
|
9677
9895
|
getPrompt: () => ({
|
|
9678
9896
|
enabled: eff().prompt?.enabled !== false,
|
|
9679
9897
|
mode: normalizePromptMode(eff().prompt?.mode),
|
|
@@ -9718,6 +9936,6 @@ function apply(ctx, rawConfig = {}) {
|
|
|
9718
9936
|
}, "dsh-tiddlywiki: host teardown");
|
|
9719
9937
|
}
|
|
9720
9938
|
//#endregion
|
|
9721
|
-
export { AGENT_WRITTEN_TAG, ALL_ARTICLES_MARKER_TITLE, ALL_ARTICLES_TEXT, ALL_ARTICLES_TITLE, AutoCommitter, CLIP_BRIDGE_BOOKMARKLET, CLIP_BRIDGE_DEFAULT_PORT, CLIP_BRIDGE_DOC_TEXT, CLIP_BRIDGE_DOC_TITLE, CLIP_BRIDGE_DRAG_HREF, CLIP_BRIDGE_MARKER_TITLE, ClipBridge, ConfigStore, DEFAULT_NOTE_TYPE, DEFAULT_PROMPT_MODE, DOC_NOTE_TAG, DOC_NOTE_TEXT, DOC_NOTE_TITLE, DSH_DOCS_TAG, GitFace, HOME_DEFAULT_TIDDLERS, HOME_INDEX_ITEMS, HOME_INDEX_MARKER_TITLE, HUMAN_EDITED_TAG, LOCATION_STATE_VERSION, MARKDOWN_PLUGIN, MASKED_SECRET, MENUBAR_THEME_MARKER_TITLE, MENUBAR_THEME_TEXT, MENUBAR_THEME_TIDDLER, MISSING_TYPE_FILTER, PATH_PREFIX, PROMPT_GOVERNANCE_BLOCKS, PROMPT_MODES, PROMPT_SECTION_NAME, PROMPT_SECTION_ORDER, RENDER_BUNDLE_TEXT, RENDER_MARKER_TITLE, RENDER_PLUGIN_FILE, RENDER_PLUGIN_TITLE, SEED_DEFS, SEED_MARKER_VERSION, SEND_TO_AGENT_BUNDLE_TEXT, SEND_TO_AGENT_MARKER_TITLE, SEND_TO_AGENT_PLUGIN_TITLE, SESSION_SUMMARY_PREFIX, STARTER_DOCS_ITEMS, STARTER_DOCS_MARKER_TITLE, TEXT_LIST_FILTER, TRASH_INDEX_TITLE, TRASH_PREFIX, TW_PROXY_PATH, TW_PROXY_PREFIX, TW_WEB_HOST_DEFAULT, TW_WEB_HOST_TIDDLER, TiddlyWebClient, TrashIndexUnavailableError, UI_STYLES_MARKER_TITLE, UI_STYLE_ITEMS, WikiServer, WriteConflictError, apply, assertNoConflict, assertPublicImageUrl, buildBinaryTiddler, buildClipTiddler, buildImageNoteTiddler, buildPromptText, buildWriteTiddler, bundledCatalog, checkAllSeeds, cleanTiddler, clearLocationState, deepMerge, defaultLocationStateFile, defineTool, docNoteText, downloadClipImage, dshHomePath, ensureLanguage, ensurePlugin, ensureTwWebHost, escapeInline, escapePromptBraces, expandEnvPath, flattenTiddlerFields, flushPendingWrites, hashText, hostAllowed, imageExtensionForMime, inject, isBinaryType, isPrivateAddress, isSafeUrl, listWikiCandidates, locationPath, maskConfigSecrets, name, needsRestartAfterSeeds, normalizeLocation, normalizePromptMode, normalizeThemes, openInTwEditor, parseClipPayload, parseSeedMarker, pickImageMime, readActiveThemeName, readLocationState, readSeedMarker, readWikiInfo, registerAdminRoutes, registerRoutes, registerTiddlywikiTools, removeSeedById, resolveClipTitle, resolveTwRoot, runAllSeeds, runSeedById, sanitizeTwFragment, seedAllArticles, seedClipBridge, seedDocNote, seedHomeIndex, seedMenubarTheme, seedRenderRoute, seedSendToAgent, seedStarterDocs, seedUiStyles, stripMaskedSecrets, switchWiki, tiddlywikiToolSummary, toolSignatureLines, unseedClipBridge, waitForFileWrite, writeLocationState, writeSeedMarker, writeSessionSummary, writeWikiInfo };
|
|
9939
|
+
export { AGENT_WRITTEN_TAG, ALL_ARTICLES_MARKER_TITLE, ALL_ARTICLES_TEXT, ALL_ARTICLES_TITLE, AutoCommitter, CLIP_BRIDGE_BOOKMARKLET, CLIP_BRIDGE_DEFAULT_PORT, CLIP_BRIDGE_DOC_TEXT, CLIP_BRIDGE_DOC_TITLE, CLIP_BRIDGE_DRAG_HREF, CLIP_BRIDGE_MARKER_TITLE, ClipBridge, ConfigStore, DEFAULT_NOTE_TYPE, DEFAULT_PROMPT_MODE, DOC_NOTE_TAG, DOC_NOTE_TEXT, DOC_NOTE_TITLE, DSH_DOCS_TAG, GitFace, HOME_DEFAULT_TIDDLERS, HOME_INDEX_ITEMS, HOME_INDEX_MARKER_TITLE, HUMAN_EDITED_TAG, LOCATION_STATE_VERSION, MARKDOWN_PLUGIN, MASKED_SECRET, MENUBAR_THEME_MARKER_TITLE, MENUBAR_THEME_TEXT, MENUBAR_THEME_TIDDLER, MISSING_TYPE_FILTER, PATH_PREFIX, PROMPT_GOVERNANCE_BLOCKS, PROMPT_MODES, PROMPT_SECTION_NAME, PROMPT_SECTION_ORDER, READY_HARD_FACTOR, READY_POLL_MS, READY_SLOW_POLL_MS, READY_TIMEOUT_DEFAULT_MS, READY_TIMEOUT_MAX_MS, READY_TIMEOUT_MIN_MS, RENDER_BUNDLE_TEXT, RENDER_MARKER_TITLE, RENDER_PLUGIN_FILE, RENDER_PLUGIN_TITLE, SEED_DEFS, SEED_MARKER_VERSION, SEND_TO_AGENT_BUNDLE_TEXT, SEND_TO_AGENT_MARKER_TITLE, SEND_TO_AGENT_PLUGIN_TITLE, SESSION_SUMMARY_PREFIX, STARTER_DOCS_ITEMS, STARTER_DOCS_MARKER_TITLE, TEXT_LIST_FILTER, TRASH_INDEX_TITLE, TRASH_PREFIX, TW_PROXY_PATH, TW_PROXY_PREFIX, TW_WEB_HOST_DEFAULT, TW_WEB_HOST_TIDDLER, TiddlyWebClient, TrashIndexUnavailableError, UI_STYLES_MARKER_TITLE, UI_STYLE_ITEMS, WikiServer, WriteConflictError, apply, assertNoConflict, assertPublicImageUrl, awaitReady, buildBinaryTiddler, buildClipTiddler, buildImageNoteTiddler, buildPromptText, buildWriteTiddler, bundledCatalog, checkAllSeeds, cleanTiddler, clearLocationState, deepMerge, defaultLocationStateFile, defineTool, docNoteText, downloadClipImage, dshHomePath, ensureLanguage, ensurePlugin, ensureTwWebHost, escapeInline, escapePromptBraces, expandEnvPath, flattenTiddlerFields, flushPendingWrites, hashText, hostAllowed, imageExtensionForMime, inject, isBinaryType, isPrivateAddress, isSafeUrl, listWikiCandidates, locationPath, maskConfigSecrets, name, needsRestartAfterSeeds, normalizeLocation, normalizePromptMode, normalizeReadyTimeoutMs, normalizeThemes, openInTwEditor, parseClipPayload, parseSeedMarker, pickImageMime, readActiveThemeName, readLocationState, readSeedMarker, readWikiInfo, readyHardTimeoutMs, registerAdminRoutes, registerRoutes, registerTiddlywikiTools, removeSeedById, resolveClipTitle, resolveTwRoot, runAllSeeds, runSeedById, sanitizeTwFragment, seedAllArticles, seedClipBridge, seedDocNote, seedHomeIndex, seedMenubarTheme, seedRenderRoute, seedSendToAgent, seedStarterDocs, seedUiStyles, stripMaskedSecrets, switchWiki, tiddlywikiToolSummary, toolSignatureLines, unseedClipBridge, waitForFileWrite, writeLocationState, writeSeedMarker, writeSessionSummary, writeWikiInfo };
|
|
9722
9940
|
|
|
9723
9941
|
//# sourceMappingURL=index.js.map
|