@staff0rd/assist 0.523.0 → 0.524.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 +321 -321
- package/dist/index.js +56 -41
- 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.524.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -29659,15 +29659,8 @@ function broadcast(clients, msg) {
|
|
|
29659
29659
|
}
|
|
29660
29660
|
}
|
|
29661
29661
|
|
|
29662
|
-
// src/commands/sessions/daemon/
|
|
29663
|
-
function
|
|
29664
|
-
id,
|
|
29665
|
-
name,
|
|
29666
|
-
title,
|
|
29667
|
-
generatedTitle,
|
|
29668
|
-
subtitle,
|
|
29669
|
-
commandType,
|
|
29670
|
-
harness,
|
|
29662
|
+
// src/commands/sessions/daemon/toSessionRunInfo.ts
|
|
29663
|
+
function toSessionRunInfo({
|
|
29671
29664
|
status: status3,
|
|
29672
29665
|
startedAt,
|
|
29673
29666
|
runningMs,
|
|
@@ -29680,27 +29673,12 @@ function toSessionInfo({
|
|
|
29680
29673
|
serverOrigin,
|
|
29681
29674
|
assistArgs,
|
|
29682
29675
|
cwd,
|
|
29683
|
-
claudeSessionId,
|
|
29684
|
-
restored,
|
|
29685
|
-
error,
|
|
29686
29676
|
activity: activity2,
|
|
29687
|
-
autoRun,
|
|
29688
|
-
autoAdvance,
|
|
29689
|
-
starred,
|
|
29690
29677
|
usedPct,
|
|
29691
|
-
|
|
29692
|
-
pendingPrPreview,
|
|
29693
|
-
undurable,
|
|
29678
|
+
error,
|
|
29694
29679
|
closing
|
|
29695
29680
|
}) {
|
|
29696
29681
|
return {
|
|
29697
|
-
id,
|
|
29698
|
-
name,
|
|
29699
|
-
title,
|
|
29700
|
-
generatedTitle,
|
|
29701
|
-
subtitle,
|
|
29702
|
-
commandType,
|
|
29703
|
-
harness,
|
|
29704
29682
|
status: status3,
|
|
29705
29683
|
startedAt,
|
|
29706
29684
|
runningMs,
|
|
@@ -29712,20 +29690,54 @@ function toSessionInfo({
|
|
|
29712
29690
|
port: serverPort,
|
|
29713
29691
|
remoteOrigin: serverOrigin ?? originForCwd(cwd),
|
|
29714
29692
|
assistArgs,
|
|
29693
|
+
activity: activity2,
|
|
29694
|
+
usedPct,
|
|
29695
|
+
error,
|
|
29696
|
+
closing
|
|
29697
|
+
};
|
|
29698
|
+
}
|
|
29699
|
+
|
|
29700
|
+
// src/commands/sessions/daemon/toSessionInfo.ts
|
|
29701
|
+
function toSessionInfo(session) {
|
|
29702
|
+
const {
|
|
29703
|
+
id,
|
|
29704
|
+
name,
|
|
29705
|
+
title,
|
|
29706
|
+
generatedTitle,
|
|
29707
|
+
subtitle,
|
|
29708
|
+
commandType,
|
|
29709
|
+
harness,
|
|
29715
29710
|
cwd,
|
|
29711
|
+
launchedFrom,
|
|
29712
|
+
claudeSessionId,
|
|
29713
|
+
restored,
|
|
29714
|
+
autoRun,
|
|
29715
|
+
autoAdvance,
|
|
29716
|
+
starred,
|
|
29717
|
+
design,
|
|
29718
|
+
pendingPrPreview,
|
|
29719
|
+
undurable
|
|
29720
|
+
} = session;
|
|
29721
|
+
return {
|
|
29722
|
+
...toSessionRunInfo(session),
|
|
29723
|
+
id,
|
|
29724
|
+
name,
|
|
29725
|
+
title,
|
|
29726
|
+
generatedTitle,
|
|
29727
|
+
subtitle,
|
|
29728
|
+
commandType,
|
|
29729
|
+
harness,
|
|
29730
|
+
cwd,
|
|
29731
|
+
launchedFrom,
|
|
29716
29732
|
claudeSessionId,
|
|
29717
29733
|
repoGroup: repoGroupForCwd(cwd),
|
|
29718
29734
|
restored,
|
|
29719
|
-
error,
|
|
29720
|
-
activity: activity2,
|
|
29721
29735
|
autoRun,
|
|
29722
29736
|
autoAdvance,
|
|
29723
29737
|
starred,
|
|
29724
|
-
usedPct,
|
|
29725
29738
|
design,
|
|
29726
29739
|
pendingPrPreview,
|
|
29727
|
-
undurable
|
|
29728
|
-
closing
|
|
29740
|
+
undurable
|
|
29729
29741
|
};
|
|
29730
29742
|
}
|
|
29731
29743
|
|
|
@@ -29998,7 +30010,8 @@ function createPiSession(id, prompt, cwd, holdPty) {
|
|
|
29998
30010
|
initialPrompt: prompt
|
|
29999
30011
|
};
|
|
30000
30012
|
}
|
|
30001
|
-
function createRunSession(id, runName, runArgs, cwd, meta
|
|
30013
|
+
function createRunSession(id, { runName, runArgs, cwd, meta, launchedFrom }) {
|
|
30014
|
+
const serverMeta = meta ?? serverRunMeta(runName, cwd);
|
|
30002
30015
|
return {
|
|
30003
30016
|
...sessionBase(id, "running"),
|
|
30004
30017
|
name: `run: ${runName}`,
|
|
@@ -30007,9 +30020,10 @@ function createRunSession(id, runName, runArgs, cwd, meta = serverRunMeta(runNam
|
|
|
30007
30020
|
runName,
|
|
30008
30021
|
runArgs,
|
|
30009
30022
|
cwd,
|
|
30010
|
-
|
|
30011
|
-
|
|
30012
|
-
|
|
30023
|
+
launchedFrom,
|
|
30024
|
+
server: serverMeta.server || void 0,
|
|
30025
|
+
serverPort: serverMeta.port,
|
|
30026
|
+
serverOrigin: serverMeta.origin
|
|
30013
30027
|
};
|
|
30014
30028
|
}
|
|
30015
30029
|
|
|
@@ -30614,8 +30628,9 @@ var PrPreviewCoordinator = class {
|
|
|
30614
30628
|
|
|
30615
30629
|
// src/commands/sessions/daemon/logSpawnedSession.ts
|
|
30616
30630
|
function logSpawnedSession(session) {
|
|
30631
|
+
const launchedFrom = session.launchedFrom ? ` launched from ${session.launchedFrom}` : "";
|
|
30617
30632
|
daemonLog(
|
|
30618
|
-
`session ${session.id} spawned: ${session.name} [${session.commandType}] ${session.cwd ?? ""}`
|
|
30633
|
+
`session ${session.id} spawned: ${session.name} [${session.commandType}] ${session.cwd ?? ""}${launchedFrom}`
|
|
30619
30634
|
);
|
|
30620
30635
|
}
|
|
30621
30636
|
|
|
@@ -33667,10 +33682,8 @@ var SessionManager = class {
|
|
|
33667
33682
|
addAgent(targetId, prompt, harness) {
|
|
33668
33683
|
return addAgentToStream(this.treeCtx(), targetId, prompt, harness);
|
|
33669
33684
|
}
|
|
33670
|
-
spawnRun(
|
|
33671
|
-
return this.spawnWith(
|
|
33672
|
-
(id) => createRunSession(id, runName, runArgs, cwd, meta)
|
|
33673
|
-
);
|
|
33685
|
+
spawnRun(request) {
|
|
33686
|
+
return this.spawnWith((id) => createRunSession(id, request));
|
|
33674
33687
|
}
|
|
33675
33688
|
liveServerRun(origin, excludeId) {
|
|
33676
33689
|
return liveServerRun(this.sessions, origin, excludeId);
|
|
@@ -33783,6 +33796,7 @@ function handleCreateRun(client, m, d) {
|
|
|
33783
33796
|
const runName = d.runName;
|
|
33784
33797
|
const cwd = d.cwd;
|
|
33785
33798
|
const runArgs = d.runArgs ?? [];
|
|
33799
|
+
const launchedFrom = d.launchedFrom;
|
|
33786
33800
|
const meta = serverRunMeta(runName, cwd);
|
|
33787
33801
|
if (meta.server && meta.origin) {
|
|
33788
33802
|
const existing = m.liveServerRun(meta.origin);
|
|
@@ -33794,6 +33808,7 @@ function handleCreateRun(client, m, d) {
|
|
|
33794
33808
|
type: "run-conflict",
|
|
33795
33809
|
runName,
|
|
33796
33810
|
cwd,
|
|
33811
|
+
launchedFrom,
|
|
33797
33812
|
existing: serverConflictInfo(existing)
|
|
33798
33813
|
});
|
|
33799
33814
|
return;
|
|
@@ -33807,7 +33822,7 @@ function handleCreateRun(client, m, d) {
|
|
|
33807
33822
|
}
|
|
33808
33823
|
sendTo(client, {
|
|
33809
33824
|
type: "created",
|
|
33810
|
-
sessionId: m.spawnRun(runName, runArgs, cwd, meta),
|
|
33825
|
+
sessionId: m.spawnRun({ runName, runArgs, cwd, meta, launchedFrom }),
|
|
33811
33826
|
isNew: true
|
|
33812
33827
|
});
|
|
33813
33828
|
}
|