@hyperdrive.bot/paseo-server 0.3.41 → 0.3.42
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/server/server/agent/agent-manager.d.ts +15 -0
- package/dist/server/server/agent/agent-manager.js +142 -25
- package/dist/server/server/agent/providers/claude/background-task-tracker.d.ts +38 -1
- package/dist/server/server/agent/providers/claude/background-task-tracker.js +114 -9
- package/dist/server/server/agent/providers/claude/background-work-kinds.d.ts +95 -0
- package/dist/server/server/agent/providers/claude/background-work-kinds.js +73 -0
- package/dist/server/server/agent/providers/claude/pty-session-launcher.js +3 -0
- package/dist/server/server/agent/providers/claude/transport/pty.d.ts +17 -0
- package/dist/server/server/agent/providers/claude/transport/pty.js +51 -1
- package/dist/server/server/agent/providers/claude/transport/tmux.d.ts +74 -0
- package/dist/server/server/agent/providers/claude/transport/tmux.js +157 -0
- package/dist/server/server/agent/providers/claude/transport/types.d.ts +6 -0
- package/dist/server/server/agent/providers/opencode-agent.d.ts +7 -0
- package/dist/server/server/agent/providers/opencode-agent.js +51 -1
- package/dist/server/server/workspace-directory.js +32 -14
- package/dist/server/web-ui/_expo/static/js/web/{index-cb251ddad56c08c3021036af3a43fc0f.js → index-9c3bcdc334cf1c08001b6bea510e0292.js} +17 -17
- package/dist/server/web-ui/_expo/static/js/web/index-9c3bcdc334cf1c08001b6bea510e0292.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{index-cb251ddad56c08c3021036af3a43fc0f.js.gz → index-9c3bcdc334cf1c08001b6bea510e0292.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{index-cb251ddad56c08c3021036af3a43fc0f.js.map.br → index-9c3bcdc334cf1c08001b6bea510e0292.js.map.br} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{index-cb251ddad56c08c3021036af3a43fc0f.js.map.gz → index-9c3bcdc334cf1c08001b6bea510e0292.js.map.gz} +0 -0
- package/dist/server/web-ui/index.html +1 -1
- package/dist/server/web-ui/index.html.br +0 -0
- package/dist/server/web-ui/index.html.gz +0 -0
- package/package.json +6 -6
- package/dist/server/web-ui/_expo/static/js/web/index-cb251ddad56c08c3021036af3a43fc0f.js.br +0 -0
|
@@ -44,6 +44,28 @@ export function workspaceIdsOnCheckout(workspaces, cwd) {
|
|
|
44
44
|
.filter((workspace) => !workspace.archivedAt && resolve(workspace.cwd) === resolvedCwd)
|
|
45
45
|
.map((workspace) => workspace.workspaceId);
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Build the bucket-derivation input for one agent snapshot.
|
|
49
|
+
*
|
|
50
|
+
* Exists so every call site in this file feeds `deriveAgentStateBucket` the
|
|
51
|
+
* SAME shape. It previously did not: two call sites hand-built the object and
|
|
52
|
+
* both omitted `activeChildCount`, so server-derived workspace buckets could
|
|
53
|
+
* never see armed background work while the app-side derivation could. The same
|
|
54
|
+
* agent then bucketed as "done" in the workspace list and "running" on its
|
|
55
|
+
* kanban card. One helper, one shape, no drift.
|
|
56
|
+
*/
|
|
57
|
+
function toBucketInput(agent) {
|
|
58
|
+
return {
|
|
59
|
+
status: agent.status,
|
|
60
|
+
pendingPermissionCount: agent.pendingPermissions?.length ?? 0,
|
|
61
|
+
requiresAttention: agent.requiresAttention,
|
|
62
|
+
attentionReason: agent.attentionReason ?? null,
|
|
63
|
+
// Monitors, crons and backgrounded shells still alive on this agent. Live
|
|
64
|
+
// SUBAGENTS are not counted here — they arrive as their own snapshots and
|
|
65
|
+
// are attributed to the delegation root in applyAgentBucketContributions.
|
|
66
|
+
activeChildCount: agent.activeBackgroundTaskCount ?? 0,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
47
69
|
export class WorkspaceDirectory {
|
|
48
70
|
constructor(deps) {
|
|
49
71
|
this.deps = deps;
|
|
@@ -166,15 +188,13 @@ export class WorkspaceDirectory {
|
|
|
166
188
|
continue;
|
|
167
189
|
}
|
|
168
190
|
workspaceAgent = parentAgent;
|
|
169
|
-
|
|
191
|
+
// A live subagent means the ROOT's own turn is not in flight — it is
|
|
192
|
+
// waiting on delegated work that will hand control back by itself.
|
|
193
|
+
// That is "pending", not "running"; see agent-state-bucket.ts.
|
|
194
|
+
bucket = "pending";
|
|
170
195
|
}
|
|
171
196
|
else {
|
|
172
|
-
bucket = deriveAgentStateBucket(
|
|
173
|
-
status: agent.status,
|
|
174
|
-
pendingPermissionCount: agent.pendingPermissions?.length ?? 0,
|
|
175
|
-
requiresAttention: agent.requiresAttention,
|
|
176
|
-
attentionReason: agent.attentionReason ?? null,
|
|
177
|
-
});
|
|
197
|
+
bucket = deriveAgentStateBucket(toBucketInput(agent));
|
|
178
198
|
}
|
|
179
199
|
const workspaceId = workspaceAgent.workspaceId;
|
|
180
200
|
if (!workspaceId) {
|
|
@@ -210,7 +230,10 @@ export class WorkspaceDirectory {
|
|
|
210
230
|
existing.status = bucket;
|
|
211
231
|
}
|
|
212
232
|
const entries = terminalEntriesByWorkspaceId.get(workspaceId) ?? [];
|
|
213
|
-
entries.push({
|
|
233
|
+
entries.push({
|
|
234
|
+
bucket,
|
|
235
|
+
changedAtIso: new Date(activity.changedAt).toISOString(),
|
|
236
|
+
});
|
|
214
237
|
terminalEntriesByWorkspaceId.set(workspaceId, entries);
|
|
215
238
|
}
|
|
216
239
|
return terminalEntriesByWorkspaceId;
|
|
@@ -271,12 +294,7 @@ export class WorkspaceDirectory {
|
|
|
271
294
|
findNewestTimestampInBucket(contributingAgents, terminalEntries, winningBucket) {
|
|
272
295
|
const agentTimestamps = contributingAgents
|
|
273
296
|
.filter((agent) => {
|
|
274
|
-
const derived = deriveAgentStateBucket(
|
|
275
|
-
status: agent.status,
|
|
276
|
-
pendingPermissionCount: agent.pendingPermissions?.length ?? 0,
|
|
277
|
-
requiresAttention: agent.requiresAttention,
|
|
278
|
-
attentionReason: agent.attentionReason ?? null,
|
|
279
|
-
});
|
|
297
|
+
const derived = deriveAgentStateBucket(toBucketInput(agent));
|
|
280
298
|
return derived === winningBucket;
|
|
281
299
|
})
|
|
282
300
|
.map((agent) => {
|