@wibeco/bridge 0.2.8 → 0.2.9
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.
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
startPresenceSession,
|
|
19
19
|
stopPresenceSession,
|
|
20
20
|
updatePresenceSession
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-DSMXRUNM.js";
|
|
22
22
|
|
|
23
23
|
// src/cli/commands.ts
|
|
24
24
|
import { access, cp, mkdir, readFile, writeFile } from "fs/promises";
|
|
@@ -258,7 +258,7 @@ async function emitCommand(adapter, eventName, input) {
|
|
|
258
258
|
task_paths: metrics.task_paths
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
|
-
} else if (mappedEvent.kind === "lifecycle.after" && metrics && metrics.task_paths.length > 0) {
|
|
261
|
+
} else if (mappedEvent.kind === "lifecycle.after" && metrics && metrics.task_paths.length > 0 && (metrics.task_lines_added > 0 || metrics.task_lines_deleted > 0)) {
|
|
262
262
|
mappedEvent = {
|
|
263
263
|
...mappedEvent,
|
|
264
264
|
kind: "response.completed",
|
|
@@ -365,6 +365,7 @@ async function shareProgressCommand(options, cwd = process.cwd()) {
|
|
|
365
365
|
throw new Error("Progress confidence must be between 0 and 1.");
|
|
366
366
|
}
|
|
367
367
|
const repo = await detectRepository(cwd);
|
|
368
|
+
const workingTree = repo ? await detectWorkingTreeMetrics(repo.root) : void 0;
|
|
368
369
|
const event = createHookEvent({
|
|
369
370
|
source: projectConfig.adapter,
|
|
370
371
|
kind: "progress.shared",
|
|
@@ -372,7 +373,12 @@ async function shareProgressCommand(options, cwd = process.cwd()) {
|
|
|
372
373
|
summary,
|
|
373
374
|
...title ? { title } : {},
|
|
374
375
|
...options.phase ? { phase: options.phase } : {},
|
|
375
|
-
...options.confidence !== void 0 ? { confidence: options.confidence } : {}
|
|
376
|
+
...options.confidence !== void 0 ? { confidence: options.confidence } : {},
|
|
377
|
+
...workingTree ? {
|
|
378
|
+
paths: workingTree.paths,
|
|
379
|
+
lines_added: workingTree.linesAdded,
|
|
380
|
+
lines_deleted: workingTree.linesDeleted
|
|
381
|
+
} : {}
|
|
376
382
|
},
|
|
377
383
|
...repo ? { repo } : {}
|
|
378
384
|
});
|
|
@@ -388,7 +388,9 @@ function toEnvelope(event, options) {
|
|
|
388
388
|
summary: event.metadata.summary,
|
|
389
389
|
paths,
|
|
390
390
|
phase: event.metadata.phase,
|
|
391
|
-
confidence: event.metadata.confidence
|
|
391
|
+
confidence: event.metadata.confidence,
|
|
392
|
+
lines_added: typeof event.metadata.lines_added === "number" ? event.metadata.lines_added : void 0,
|
|
393
|
+
lines_deleted: typeof event.metadata.lines_deleted === "number" ? event.metadata.lines_deleted : void 0
|
|
392
394
|
} : event.kind === "file.changed" ? {
|
|
393
395
|
paths,
|
|
394
396
|
tool: event.source,
|
|
@@ -757,9 +759,6 @@ async function updatePresenceSession(source, sessionId, event, cwd = process.cwd
|
|
|
757
759
|
...typeof event.metadata.path === "string" ? [event.metadata.path] : []
|
|
758
760
|
];
|
|
759
761
|
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
|
-
}
|
|
763
762
|
const category = toolCategory(event);
|
|
764
763
|
if (category) {
|
|
765
764
|
state.toolCounts[category] = (state.toolCounts[category] ?? 0) + 1;
|
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-6P6IVLMW.js";
|
|
10
10
|
import {
|
|
11
11
|
runPresenceHeartbeat
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DSMXRUNM.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