@linxiraos/pi-messenger 1.1.0 → 1.3.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/CHANGELOG.md +741 -676
- package/LICENSE +45 -0
- package/README.md +424 -424
- package/THIRD-PARTY-NOTICES.txt +22951 -0
- package/config-overlay.ts +175 -171
- package/config.ts +221 -209
- package/crew/agents/crew-plan-sync.md +66 -64
- package/crew/agents/crew-planner.md +173 -172
- package/crew/agents/crew-reviewer.md +58 -58
- package/crew/agents/crew-worker.md +130 -129
- package/crew/agents.ts +507 -434
- package/crew/handlers/coordination.ts +350 -332
- package/crew/handlers/plan.ts +988 -906
- package/crew/handlers/review.ts +354 -333
- package/crew/handlers/revise.ts +400 -376
- package/crew/handlers/status.ts +303 -295
- package/crew/handlers/sync.ts +237 -233
- package/crew/handlers/task.ts +820 -792
- package/crew/handlers/team.ts +294 -235
- package/crew/handlers/work.ts +467 -425
- package/crew/id-allocator.ts +30 -30
- package/crew/index.ts +297 -257
- package/crew/live-progress.ts +58 -58
- package/crew/lobby.ts +504 -473
- package/crew/prompt.ts +262 -252
- package/crew/registry.ts +114 -114
- package/crew/spawn.ts +135 -111
- package/crew/state-autonomous.ts +163 -164
- package/crew/state-planning.ts +264 -263
- package/crew/state.ts +20 -20
- package/crew/store.ts +646 -642
- package/crew/task-actions.ts +162 -131
- package/crew/team/store.ts +572 -479
- package/crew/team/subagent-roles.ts +105 -87
- package/crew/team/types.ts +50 -50
- package/crew/types.ts +194 -194
- package/crew/utils/artifacts.ts +57 -62
- package/crew/utils/config.ts +158 -156
- package/crew/utils/discover.ts +221 -219
- package/crew/utils/install.ts +94 -85
- package/crew/utils/migrations.ts +126 -0
- package/crew/utils/progress.ts +191 -187
- package/crew/utils/result.ts +16 -16
- package/crew/utils/risk-labels.ts +5 -7
- package/crew/utils/task-format.ts +14 -14
- package/crew/utils/team-roles.ts +44 -28
- package/crew/utils/truncate.ts +76 -79
- package/crew/utils/verdict.ts +55 -55
- package/editor-binary.ts +150 -0
- package/editor-command.ts +107 -0
- package/editor-target.ts +40 -0
- package/feed.ts +321 -268
- package/handlers.ts +1041 -1107
- package/index.ts +1314 -1206
- package/install.mjs +187 -189
- package/lib.ts +587 -467
- package/overlay-actions.ts +519 -511
- package/overlay-coordinator.ts +150 -150
- package/overlay-render.ts +770 -676
- package/overlay.ts +872 -830
- package/package.json +64 -60
- package/paths.ts +60 -0
- package/skills/pi-messenger-crew/SKILL.md +375 -347
- package/store.ts +1147 -1139
- package/teamagent-command.ts +321 -0
- package/vitest.config.ts +10 -10
package/crew/live-progress.ts
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import type { AgentProgress } from "./utils/progress.ts";
|
|
2
|
-
|
|
3
|
-
export interface LiveWorkerInfo {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const liveWorkers = new Map<string, LiveWorkerInfo>();
|
|
13
|
-
const listeners = new Set<() => void>();
|
|
14
|
-
|
|
15
|
-
function getWorkerKey(cwd: string, taskId: string): string {
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function updateLiveWorker(cwd: string, taskId: string, info: Omit<LiveWorkerInfo, "cwd">): void {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function removeLiveWorker(cwd: string, taskId: string): void {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function getLiveWorkers(cwd?: string): ReadonlyMap<string, LiveWorkerInfo> {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function hasLiveWorkers(cwd?: string): boolean {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export function onLiveWorkersChanged(fn: () => void): () => void {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function notifyListeners(): void {
|
|
57
|
-
|
|
58
|
-
}
|
|
1
|
+
import type { AgentProgress } from "./utils/progress.ts";
|
|
2
|
+
|
|
3
|
+
export interface LiveWorkerInfo {
|
|
4
|
+
cwd: string;
|
|
5
|
+
taskId: string;
|
|
6
|
+
agent: string;
|
|
7
|
+
name: string;
|
|
8
|
+
progress: AgentProgress;
|
|
9
|
+
startedAt: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const liveWorkers = new Map<string, LiveWorkerInfo>();
|
|
13
|
+
const listeners = new Set<() => void>();
|
|
14
|
+
|
|
15
|
+
function getWorkerKey(cwd: string, taskId: string): string {
|
|
16
|
+
return `${cwd}::${taskId}`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function updateLiveWorker(cwd: string, taskId: string, info: Omit<LiveWorkerInfo, "cwd">): void {
|
|
20
|
+
liveWorkers.set(getWorkerKey(cwd, taskId), {
|
|
21
|
+
...info,
|
|
22
|
+
cwd,
|
|
23
|
+
});
|
|
24
|
+
notifyListeners();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function removeLiveWorker(cwd: string, taskId: string): void {
|
|
28
|
+
liveWorkers.delete(getWorkerKey(cwd, taskId));
|
|
29
|
+
notifyListeners();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function getLiveWorkers(cwd?: string): ReadonlyMap<string, LiveWorkerInfo> {
|
|
33
|
+
if (!cwd) return new Map(liveWorkers);
|
|
34
|
+
|
|
35
|
+
const filtered = new Map<string, LiveWorkerInfo>();
|
|
36
|
+
for (const info of liveWorkers.values()) {
|
|
37
|
+
if (info.cwd !== cwd) continue;
|
|
38
|
+
filtered.set(info.taskId, info);
|
|
39
|
+
}
|
|
40
|
+
return filtered;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function hasLiveWorkers(cwd?: string): boolean {
|
|
44
|
+
if (!cwd) return liveWorkers.size > 0;
|
|
45
|
+
for (const info of liveWorkers.values()) {
|
|
46
|
+
if (info.cwd === cwd) return true;
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function onLiveWorkersChanged(fn: () => void): () => void {
|
|
52
|
+
listeners.add(fn);
|
|
53
|
+
return () => listeners.delete(fn);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function notifyListeners(): void {
|
|
57
|
+
for (const fn of listeners) fn();
|
|
58
|
+
}
|