ai-agentmanager 1.0.1 → 1.1.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 +22 -0
- package/README.md +76 -4
- package/bin/agentmgr.js +10 -3
- package/docs/architecture.md +1 -0
- package/docs/images/agents.jpg +0 -0
- package/docs/images/conflict-radar.jpg +0 -0
- package/package.json +1 -1
- package/public/app.js +518 -11
- package/public/icons/icon-192.png +0 -0
- package/public/icons/icon-512.png +0 -0
- package/public/icons/icon.svg +1 -0
- package/public/index.html +97 -0
- package/public/manifest.webmanifest +16 -0
- package/public/style.css +69 -3
- package/src/cleanup.js +185 -0
- package/src/cli.js +181 -0
- package/src/config.js +4 -0
- package/src/doctor.js +113 -0
- package/src/engines/antigravity.js +1 -1
- package/src/engines/claude.js +22 -5
- package/src/engines/codex.js +1 -1
- package/src/engines/index.js +8 -0
- package/src/judge.js +12 -0
- package/src/manager.js +65 -12
- package/src/server.js +44 -2
- package/src/teams.js +984 -0
- package/src/tracker.js +11 -1
package/src/tracker.js
CHANGED
|
@@ -95,6 +95,12 @@ export function bugFromRef(ref, source) {
|
|
|
95
95
|
return { key: ref, url: null, source };
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
/** The Jira key when the text starts with a Jira link ("https://x.atlassian.net/browse/ABC-1 fix it" → "ABC-1"). */
|
|
99
|
+
export function leadingJiraKey(text) {
|
|
100
|
+
const first = String(text ?? '').trimStart().match(/^<?(https?:\/\/\S+)/);
|
|
101
|
+
return first?.[1].match(JIRA_KEY)?.[1] ?? null;
|
|
102
|
+
}
|
|
103
|
+
|
|
98
104
|
/** Extract PR and bug references from free text. */
|
|
99
105
|
export function extractRefs(text, bugPatterns = []) {
|
|
100
106
|
const prs = [];
|
|
@@ -132,7 +138,7 @@ function textOf(content) {
|
|
|
132
138
|
* subsequent calls only parse newly appended lines.
|
|
133
139
|
*/
|
|
134
140
|
export function scanTranscript(file, cursor, bugPatterns = []) {
|
|
135
|
-
const result = { prs: [], bugs: [], title: null, lastPrompt: null, cost: null, lastActivity: null };
|
|
141
|
+
const result = { prs: [], bugs: [], title: null, lastPrompt: null, cost: null, lastActivity: null, lastMessageAt: null };
|
|
136
142
|
// Token usage per API response, kept on the cursor so incremental scans accumulate.
|
|
137
143
|
cursor.usage ??= new Map();
|
|
138
144
|
let fd;
|
|
@@ -160,6 +166,10 @@ export function scanTranscript(file, cursor, bugPatterns = []) {
|
|
|
160
166
|
} catch {
|
|
161
167
|
continue;
|
|
162
168
|
}
|
|
169
|
+
// The last real message: resuming a session appends bookkeeping lines, which have no timestamp.
|
|
170
|
+
if ((rec.type === 'user' || rec.type === 'assistant') && !rec.isMeta && rec.timestamp > (result.lastMessageAt ?? '')) {
|
|
171
|
+
result.lastMessageAt = rec.timestamp;
|
|
172
|
+
}
|
|
163
173
|
switch (rec.type) {
|
|
164
174
|
case 'pr-link':
|
|
165
175
|
if (rec.prUrl) result.prs.push({ ...prFromUrl(rec.prUrl, 'session'), number: rec.prNumber ?? null });
|