@wibeco/bridge 0.2.7 → 0.2.8
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.
|
@@ -735,13 +735,13 @@ async function updatePresenceSession(source, sessionId, event, cwd = process.cwd
|
|
|
735
735
|
);
|
|
736
736
|
state.linesDeleted = isHeartbeat && state.linesDeleted > MAX_SESSION_LINE_COUNT ? workingDelta : Math.max(state.linesDeleted, workingDelta);
|
|
737
737
|
}
|
|
738
|
-
if (event.kind === "file.changed" && workingLinesAdded !== void 0 && state.taskBaselineLinesAdded !== void 0) {
|
|
738
|
+
if ((event.kind === "file.changed" || event.kind === "lifecycle.after") && workingLinesAdded !== void 0 && state.taskBaselineLinesAdded !== void 0) {
|
|
739
739
|
state.taskLinesAdded = Math.max(
|
|
740
740
|
state.taskLinesAdded,
|
|
741
741
|
Math.max(0, workingLinesAdded - state.taskBaselineLinesAdded)
|
|
742
742
|
);
|
|
743
743
|
}
|
|
744
|
-
if (event.kind === "file.changed" && workingLinesDeleted !== void 0 && state.taskBaselineLinesDeleted !== void 0) {
|
|
744
|
+
if ((event.kind === "file.changed" || event.kind === "lifecycle.after") && workingLinesDeleted !== void 0 && state.taskBaselineLinesDeleted !== void 0) {
|
|
745
745
|
state.taskLinesDeleted = Math.max(
|
|
746
746
|
state.taskLinesDeleted,
|
|
747
747
|
Math.max(0, workingLinesDeleted - state.taskBaselineLinesDeleted)
|
|
@@ -757,6 +757,9 @@ async function updatePresenceSession(source, sessionId, event, cwd = process.cwd
|
|
|
757
757
|
...typeof event.metadata.path === "string" ? [event.metadata.path] : []
|
|
758
758
|
];
|
|
759
759
|
state.paths = [.../* @__PURE__ */ new Set([...state.paths, ...paths])].slice(0, 2e3);
|
|
760
|
+
if (event.kind === "lifecycle.after" && state.taskPaths.length === 0) {
|
|
761
|
+
state.taskPaths = [...new Set(paths)].slice(0, 2e3);
|
|
762
|
+
}
|
|
760
763
|
const category = toolCategory(event);
|
|
761
764
|
if (category) {
|
|
762
765
|
state.toolCounts[category] = (state.toolCounts[category] ?? 0) + 1;
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
startPresenceSession,
|
|
19
19
|
stopPresenceSession,
|
|
20
20
|
updatePresenceSession
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-44GDPIWM.js";
|
|
22
22
|
|
|
23
23
|
// src/cli/commands.ts
|
|
24
24
|
import { access, cp, mkdir, readFile, writeFile } from "fs/promises";
|
|
@@ -194,7 +194,7 @@ async function emitCommand(adapter, eventName, input) {
|
|
|
194
194
|
const mapper = adapter === "cursor" ? mapCursorHook : adapter === "claude-code" ? mapClaudeCodeHook : mapCodexHook;
|
|
195
195
|
let mappedEvent = mapper(eventName, input);
|
|
196
196
|
const repo = await detectRepository(process.cwd());
|
|
197
|
-
if (repo && (mappedEvent.kind === "session.started" || mappedEvent.kind === "session.ended" || mappedEvent.kind === "lifecycle.before" || mappedEvent.kind === "presence.heartbeat" || mappedEvent.kind === "file.changed")) {
|
|
197
|
+
if (repo && (mappedEvent.kind === "session.started" || mappedEvent.kind === "session.ended" || mappedEvent.kind === "lifecycle.before" || mappedEvent.kind === "lifecycle.after" || mappedEvent.kind === "presence.heartbeat" || mappedEvent.kind === "file.changed")) {
|
|
198
198
|
const workingTree = await detectWorkingTreeMetrics(repo.root);
|
|
199
199
|
if (workingTree) {
|
|
200
200
|
mappedEvent = {
|
|
@@ -264,7 +264,6 @@ async function emitCommand(adapter, eventName, input) {
|
|
|
264
264
|
kind: "response.completed",
|
|
265
265
|
metadata: {
|
|
266
266
|
...mappedEvent.metadata,
|
|
267
|
-
title: "Agent update",
|
|
268
267
|
paths: metrics.task_paths,
|
|
269
268
|
lines_added: metrics.task_lines_added,
|
|
270
269
|
lines_deleted: metrics.task_lines_deleted
|
package/dist/cli.js
CHANGED
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
setupCommand,
|
|
7
7
|
shareProgressCommand,
|
|
8
8
|
statusCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-G66F67CK.js";
|
|
10
10
|
import {
|
|
11
11
|
runPresenceHeartbeat
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-44GDPIWM.js";
|
|
13
13
|
|
|
14
14
|
// src/cli.ts
|
|
15
15
|
var HELP = `wibe-bridge <command>
|
package/dist/codex-hook.js
CHANGED
package/dist/index.js
CHANGED