@hamp10/agentforge 0.2.38 → 0.2.39
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/package.json +1 -1
- package/scripts/check-task-semantics.js +14 -0
- package/src/worker.js +10 -1
package/package.json
CHANGED
|
@@ -282,6 +282,20 @@ try {
|
|
|
282
282
|
'tracked same-name nested project copies should not pollute current page source discovery'
|
|
283
283
|
);
|
|
284
284
|
git(fixture.repo, ['restore', '--', nestedAlphaRel]);
|
|
285
|
+
const untrackedGammaRel = 'public_html/domains/gamma.html';
|
|
286
|
+
writeFileSync(
|
|
287
|
+
path.join(fixture.repo, untrackedGammaRel),
|
|
288
|
+
'<!doctype html><html><body><main><section><h1>Gamma</h1><p>New scoped page.</p></section></main></body></html>'
|
|
289
|
+
);
|
|
290
|
+
assert.equal(
|
|
291
|
+
worker._buildIncompleteScopedUiTargetsNudge(
|
|
292
|
+
[{ root: fixture.repo, head: fixture.head, initialDirtyPaths: [] }],
|
|
293
|
+
'Work on the Example.com listing pages for Alpha.ai, Beta.ai, and Gamma.ai. Make all three pages visually polished.'
|
|
294
|
+
),
|
|
295
|
+
'',
|
|
296
|
+
'new untracked scoped page files should count as touched UI targets'
|
|
297
|
+
);
|
|
298
|
+
rmSync(path.join(fixture.repo, untrackedGammaRel), { force: true });
|
|
285
299
|
const projectsRoot = mkdtempSync(path.join(tmpdir(), 'agentforge-project-list-'));
|
|
286
300
|
let agentWorkspace = null;
|
|
287
301
|
try {
|
package/src/worker.js
CHANGED
|
@@ -1540,9 +1540,18 @@ export class AgentForgeWorker extends EventEmitter {
|
|
|
1540
1540
|
this._gitOutput(baseline.root, ['diff', '--numstat'], 10000),
|
|
1541
1541
|
'working tree'
|
|
1542
1542
|
);
|
|
1543
|
+
const initialDirty = new Set(baseline.initialDirtyPaths || []);
|
|
1544
|
+
const untracked = String(this._gitOutput(baseline.root, ['ls-files', '--others', '--exclude-standard'], 10000) || '')
|
|
1545
|
+
.split('\n')
|
|
1546
|
+
.map(line => line.trim())
|
|
1547
|
+
.filter(Boolean)
|
|
1548
|
+
.filter(rel => uiFileRe.test(rel))
|
|
1549
|
+
.filter(rel => !initialDirty.has(rel))
|
|
1550
|
+
.filter(rel => !this._isNestedProjectCopyRel(baseline.root, rel, baseline.head || 'HEAD'));
|
|
1543
1551
|
const changedFiles = [...committed, ...working]
|
|
1544
1552
|
.filter(stat => uiFileRe.test(stat.path))
|
|
1545
|
-
.map(stat => stat.path)
|
|
1553
|
+
.map(stat => stat.path)
|
|
1554
|
+
.concat(untracked);
|
|
1546
1555
|
if (changedFiles.length === 0) continue;
|
|
1547
1556
|
|
|
1548
1557
|
const touchedSlugs = new Set();
|