@staff0rd/assist 0.700.0 → 0.701.0
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/commands/sessions/web/bundle.js +355 -355
- package/dist/index.js +32 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.701.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -540,10 +540,13 @@ function resolveRepoWriteLabel(globalRaw, origin) {
|
|
|
540
540
|
}
|
|
541
541
|
|
|
542
542
|
// src/shared/stripLegacyConfigKeys.ts
|
|
543
|
-
var legacyConfigKeys = ["news"];
|
|
544
543
|
function stripLegacyConfigKeys(config) {
|
|
545
544
|
const stripped = { ...config };
|
|
546
|
-
|
|
545
|
+
const news = stripped.news;
|
|
546
|
+
if (news && typeof news === "object" && "feeds" in news) {
|
|
547
|
+
const { feeds: _feeds, ...rest } = news;
|
|
548
|
+
stripped.news = rest;
|
|
549
|
+
}
|
|
547
550
|
return stripped;
|
|
548
551
|
}
|
|
549
552
|
|
|
@@ -831,6 +834,9 @@ var assistConfigShape = {
|
|
|
831
834
|
miro: z3.strictObject({
|
|
832
835
|
extracts: z3.record(z3.string(), miroExtractSchema).optional()
|
|
833
836
|
}).optional(),
|
|
837
|
+
news: z3.strictObject({
|
|
838
|
+
showInNav: z3.boolean().default(false)
|
|
839
|
+
}).optional(),
|
|
834
840
|
deny: z3.array(
|
|
835
841
|
z3.strictObject({
|
|
836
842
|
pattern: z3.string(),
|
|
@@ -12355,6 +12361,15 @@ var miroConfigHelp = [
|
|
|
12355
12361
|
}
|
|
12356
12362
|
];
|
|
12357
12363
|
|
|
12364
|
+
// src/commands/news/newsConfigHelp.ts
|
|
12365
|
+
var newsConfigHelp = [
|
|
12366
|
+
{
|
|
12367
|
+
key: "news.showInNav",
|
|
12368
|
+
setter: "assist config set news.showInNav true",
|
|
12369
|
+
note: "show the News tab in the web UI top nav (default false); /news stays reachable by URL either way"
|
|
12370
|
+
}
|
|
12371
|
+
];
|
|
12372
|
+
|
|
12358
12373
|
// src/commands/prs/prsConfigHelp.ts
|
|
12359
12374
|
var prsRaiseConfigHelp = [
|
|
12360
12375
|
{
|
|
@@ -12790,6 +12805,7 @@ var configHelpEntries = [
|
|
|
12790
12805
|
...litellmConfigHelp,
|
|
12791
12806
|
...mermaidConfigHelp,
|
|
12792
12807
|
...miroConfigHelp,
|
|
12808
|
+
...newsConfigHelp,
|
|
12793
12809
|
...prsConfigHelp,
|
|
12794
12810
|
...ravendbConfigHelp,
|
|
12795
12811
|
...readTimeConfigHelp,
|
|
@@ -13366,6 +13382,12 @@ async function listNewsItems(_req, res) {
|
|
|
13366
13382
|
respondJson(res, 200, cachedItems);
|
|
13367
13383
|
}
|
|
13368
13384
|
|
|
13385
|
+
// src/commands/sessions/web/newsNavConfig.ts
|
|
13386
|
+
function newsNavConfig(_req, res) {
|
|
13387
|
+
const showInNav = loadConfig().news?.showInNav ?? false;
|
|
13388
|
+
respondJson(res, 200, { showInNav });
|
|
13389
|
+
}
|
|
13390
|
+
|
|
13369
13391
|
// src/commands/sessions/web/listScopedRules.ts
|
|
13370
13392
|
import path27 from "path";
|
|
13371
13393
|
|
|
@@ -15484,6 +15506,7 @@ var routes2 = {
|
|
|
15484
15506
|
"GET /api/server-runs": handleServerRuns,
|
|
15485
15507
|
"GET /api/pr-list": prList,
|
|
15486
15508
|
"GET /api/news/items": listNewsItems,
|
|
15509
|
+
"GET /api/news/nav": newsNavConfig,
|
|
15487
15510
|
"GET /api/releases/state": releasesState,
|
|
15488
15511
|
"GET /api/releases/configured": releasesConfigured,
|
|
15489
15512
|
"GET /api/usage/history": listUsageHistory,
|
|
@@ -25990,6 +26013,7 @@ async function add2(url) {
|
|
|
25990
26013
|
function registerNews(program2) {
|
|
25991
26014
|
const newsCommand = program2.command("news").description("Manage RSS news feeds");
|
|
25992
26015
|
newsCommand.command("add").description("Add an RSS feed URL").argument("<url>", "RSS feed URL").action(add2);
|
|
26016
|
+
configHelp(newsCommand, newsConfigHelp);
|
|
25993
26017
|
}
|
|
25994
26018
|
|
|
25995
26019
|
// src/commands/piHook.ts
|
|
@@ -39913,6 +39937,7 @@ async function discardTree(session, discarded, notify2) {
|
|
|
39913
39937
|
holdFailedDiscard(session, removal.reason, notify2);
|
|
39914
39938
|
return;
|
|
39915
39939
|
}
|
|
39940
|
+
session.releasedFromClone = session.worktree.clone;
|
|
39916
39941
|
session.worktree = void 0;
|
|
39917
39942
|
}
|
|
39918
39943
|
discarded();
|
|
@@ -39967,7 +39992,8 @@ function resolveClone(cwd) {
|
|
|
39967
39992
|
function orphanedWatcherFor(sessions, dismissed) {
|
|
39968
39993
|
if (dismissed.watcher === true || !dismissed.cwd) return void 0;
|
|
39969
39994
|
if (!liveWatcherFor(sessions)) return void 0;
|
|
39970
|
-
const
|
|
39995
|
+
const known = dismissed.worktree?.clone ?? dismissed.releasedFromClone;
|
|
39996
|
+
const clone = known ? canonicalTreePath(known) : resolveClone(dismissed.cwd);
|
|
39971
39997
|
const watcher = liveWatcherFor(sessions, clone);
|
|
39972
39998
|
if (!watcher) return void 0;
|
|
39973
39999
|
const kept = [...sessions.values()].some(
|
|
@@ -40104,6 +40130,7 @@ async function resolveCloseDurability(session, finalize, notify2) {
|
|
|
40104
40130
|
`session ${session.id} closing: worktree ${tree.path} is gone from disk \u2014 released with nothing to land, not landed work`
|
|
40105
40131
|
);
|
|
40106
40132
|
if (tree.removable) await reapWorktree(tree.path);
|
|
40133
|
+
if (session.worktree) session.releasedFromClone = session.worktree.clone;
|
|
40107
40134
|
session.worktree = void 0;
|
|
40108
40135
|
session.undurable = void 0;
|
|
40109
40136
|
session.closing = void 0;
|
|
@@ -44691,6 +44718,7 @@ function setSessionCwd(sessions, id, cwd) {
|
|
|
44691
44718
|
const from = s.cwd;
|
|
44692
44719
|
s.cwd = cwd;
|
|
44693
44720
|
s.worktree = detectExistingWorktree(cwd);
|
|
44721
|
+
s.releasedFromClone = void 0;
|
|
44694
44722
|
daemonLog(
|
|
44695
44723
|
`session ${id} cwd moved: ${from ?? "(none)"} -> ${cwd}${s.worktree ? ` (bound worktree of ${s.worktree.clone})` : ""}`
|
|
44696
44724
|
);
|