@staff0rd/assist 0.469.5 → 0.470.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/README.md +2 -0
- package/dist/commands/sessions/web/bundle.js +394 -394
- package/dist/index.js +30 -2
- 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.470.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -506,7 +506,8 @@ var assistConfigSchema = z2.strictObject({
|
|
|
506
506
|
windowsDaemonPort: z2.number().optional(),
|
|
507
507
|
windowsVersionCheck: z2.enum(["block", "warn", "off"]).default("block"),
|
|
508
508
|
includeCommittedChanges: z2.boolean().default(false),
|
|
509
|
-
topBar: z2.boolean().default(true)
|
|
509
|
+
topBar: z2.boolean().default(true),
|
|
510
|
+
floatWaiting: z2.boolean().default(false)
|
|
510
511
|
}).optional(),
|
|
511
512
|
database: z2.strictObject({
|
|
512
513
|
url: z2.string().optional()
|
|
@@ -10396,6 +10397,12 @@ function sessionLayout(_req, res) {
|
|
|
10396
10397
|
respondJson(res, 200, { topBar });
|
|
10397
10398
|
}
|
|
10398
10399
|
|
|
10400
|
+
// src/commands/sessions/web/sessionView.ts
|
|
10401
|
+
function sessionView(_req, res) {
|
|
10402
|
+
const floatWaiting = loadConfig().sessions?.floatWaiting ?? false;
|
|
10403
|
+
respondJson(res, 200, { floatWaiting });
|
|
10404
|
+
}
|
|
10405
|
+
|
|
10399
10406
|
// src/commands/config/setNestedValue.ts
|
|
10400
10407
|
function isPlainObject(val) {
|
|
10401
10408
|
return val !== null && typeof val === "object" && !Array.isArray(val);
|
|
@@ -10935,6 +10942,7 @@ var routes2 = {
|
|
|
10935
10942
|
"GET /api/jira-site": jiraSite,
|
|
10936
10943
|
"GET /api/harness": harnessCapabilities,
|
|
10937
10944
|
"GET /api/session-layout": sessionLayout,
|
|
10945
|
+
"GET /api/session-view": sessionView,
|
|
10938
10946
|
"GET /api/pr-status": prStatus,
|
|
10939
10947
|
"GET /api/server-runs": handleServerRuns,
|
|
10940
10948
|
"GET /api/pr-list": prList,
|
|
@@ -27494,6 +27502,7 @@ function toSessionInfo({
|
|
|
27494
27502
|
startedAt,
|
|
27495
27503
|
runningMs,
|
|
27496
27504
|
runningSince,
|
|
27505
|
+
waitingSince,
|
|
27497
27506
|
runName,
|
|
27498
27507
|
runArgs,
|
|
27499
27508
|
server,
|
|
@@ -27526,6 +27535,7 @@ function toSessionInfo({
|
|
|
27526
27535
|
startedAt,
|
|
27527
27536
|
runningMs,
|
|
27528
27537
|
runningSince,
|
|
27538
|
+
waitingSince,
|
|
27529
27539
|
runName,
|
|
27530
27540
|
runArgs,
|
|
27531
27541
|
server,
|
|
@@ -27768,6 +27778,7 @@ function sessionBase(id, status3) {
|
|
|
27768
27778
|
/* why: runningMs counts only running stretches, so a session that starts
|
|
27769
27779
|
* waiting (idle, awaiting first input) has no open stretch to stamp. */
|
|
27770
27780
|
runningSince: status3 === "running" ? startedAt : null,
|
|
27781
|
+
waitingSince: status3 === "waiting" ? startedAt : null,
|
|
27771
27782
|
scrollback: ""
|
|
27772
27783
|
};
|
|
27773
27784
|
}
|
|
@@ -27976,7 +27987,13 @@ function setStatus2(session, newStatus) {
|
|
|
27976
27987
|
session.runningMs += now - session.runningSince;
|
|
27977
27988
|
}
|
|
27978
27989
|
session.runningSince = newStatus === "running" ? now : null;
|
|
27990
|
+
session.waitingSince = newStatus === "waiting" ? now : null;
|
|
27979
27991
|
session.status = newStatus;
|
|
27992
|
+
if (newStatus === "waiting") {
|
|
27993
|
+
daemonLog(
|
|
27994
|
+
`session ${session.id} waiting since ${new Date(now).toISOString()}`
|
|
27995
|
+
);
|
|
27996
|
+
}
|
|
27980
27997
|
}
|
|
27981
27998
|
|
|
27982
27999
|
// src/commands/sessions/daemon/worktree/watchGitState.ts
|
|
@@ -29290,6 +29307,7 @@ function errorSession(id, persisted, error) {
|
|
|
29290
29307
|
startedAt: persisted.startedAt,
|
|
29291
29308
|
runningMs: persisted.runningMs ?? 0,
|
|
29292
29309
|
runningSince: null,
|
|
29310
|
+
waitingSince: null,
|
|
29293
29311
|
pty: null,
|
|
29294
29312
|
runName: persisted.runName,
|
|
29295
29313
|
runArgs: persisted.runArgs,
|
|
@@ -29336,6 +29354,7 @@ function restoredSession(base, persisted, pty2, status3) {
|
|
|
29336
29354
|
startedAt,
|
|
29337
29355
|
runningMs: persisted.runningMs ?? 0,
|
|
29338
29356
|
runningSince: status3 === "running" ? startedAt : null,
|
|
29357
|
+
waitingSince: status3 === "waiting" ? startedAt : null,
|
|
29339
29358
|
pty: pty2,
|
|
29340
29359
|
claudeSessionId: persisted.claudeSessionId,
|
|
29341
29360
|
restored: true,
|
|
@@ -29382,6 +29401,7 @@ function notRestoredStub(base, persisted) {
|
|
|
29382
29401
|
startedAt: persisted.startedAt,
|
|
29383
29402
|
runningMs: persisted.runningMs ?? 0,
|
|
29384
29403
|
runningSince: null,
|
|
29404
|
+
waitingSince: null,
|
|
29385
29405
|
pty: null,
|
|
29386
29406
|
runName: persisted.runName,
|
|
29387
29407
|
runArgs: persisted.runArgs,
|
|
@@ -29397,6 +29417,7 @@ function updatedSession(id, persisted) {
|
|
|
29397
29417
|
startedAt: persisted.startedAt,
|
|
29398
29418
|
runningMs: persisted.runningMs ?? 0,
|
|
29399
29419
|
runningSince: null,
|
|
29420
|
+
waitingSince: null,
|
|
29400
29421
|
pty: null
|
|
29401
29422
|
};
|
|
29402
29423
|
}
|
|
@@ -30655,6 +30676,7 @@ function createAssistSession(id, assistArgs, cwd, meta, holdPty) {
|
|
|
30655
30676
|
startedAt,
|
|
30656
30677
|
runningMs: 0,
|
|
30657
30678
|
runningSince: startedAt,
|
|
30679
|
+
waitingSince: null,
|
|
30658
30680
|
...startOrHoldPty(
|
|
30659
30681
|
() => spawnPty(["assist", ...assistArgs], cwd, id),
|
|
30660
30682
|
holdPty
|
|
@@ -30676,6 +30698,7 @@ function resumeSession(id, sessionId, cwd, name) {
|
|
|
30676
30698
|
startedAt,
|
|
30677
30699
|
runningMs: 0,
|
|
30678
30700
|
runningSince: null,
|
|
30701
|
+
waitingSince: startedAt,
|
|
30679
30702
|
pty: spawnClaude2({ resumeSessionId: sessionId, cwd, sessionId: id }),
|
|
30680
30703
|
scrollback: "",
|
|
30681
30704
|
cwd,
|
|
@@ -31444,6 +31467,11 @@ var sessionsConfigHelp = [
|
|
|
31444
31467
|
setter: "assist config set sessions.topBar false -g",
|
|
31445
31468
|
note: "set false to keep the active session's phase, elapsed, restored indicator, toggles and actions on its card instead of a sticky top bar above the terminal (default on)"
|
|
31446
31469
|
},
|
|
31470
|
+
{
|
|
31471
|
+
key: "sessions.floatWaiting",
|
|
31472
|
+
setter: "assist config set sessions.floatWaiting true -g",
|
|
31473
|
+
note: "float sessions that have been waiting on input for a few seconds above the other unstarred cards in the sidebar (default off)"
|
|
31474
|
+
},
|
|
31447
31475
|
{
|
|
31448
31476
|
key: "worktree.enabled",
|
|
31449
31477
|
setter: "assist config set worktree.enabled true -g --repo",
|