@firefunc-agent/runner 0.9.37 → 0.9.40
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/README.md +21 -0
- package/dist/activity.d.ts +2 -0
- package/dist/activity.js +3 -0
- package/dist/alive.d.ts +8 -0
- package/dist/alive.js +29 -0
- package/dist/api.d.ts +32 -0
- package/dist/api.js +18 -2
- package/dist/ask-replace.d.ts +6 -0
- package/dist/ask-replace.js +49 -0
- package/dist/awake-timer.d.ts +8 -0
- package/dist/awake-timer.js +30 -0
- package/dist/brief.js +2 -2
- package/dist/build-info.json +2 -2
- package/dist/clean-up.d.ts +29 -0
- package/dist/clean-up.js +131 -0
- package/dist/cli.js +57 -6
- package/dist/config.d.ts +7 -0
- package/dist/cut.d.ts +2 -0
- package/dist/cut.js +20 -3
- package/dist/daemon.js +115 -5
- package/dist/disk-reclaim.d.ts +40 -0
- package/dist/disk-reclaim.js +95 -0
- package/dist/drives.d.ts +29 -0
- package/dist/drives.js +270 -0
- package/dist/engine-account.d.ts +1 -1
- package/dist/engine-account.js +12 -1
- package/dist/engines/types.d.ts +1 -1
- package/dist/exec.js +5 -6
- package/dist/firefunc/automations.js +3 -3
- package/dist/firefunc/main.js +1 -1
- package/dist/firefunc/oauth-login.js +1 -1
- package/dist/gh-repos.d.ts +41 -0
- package/dist/gh-repos.js +68 -0
- package/dist/git-auth.d.ts +1 -0
- package/dist/git-auth.js +1 -1
- package/dist/held.d.ts +4 -2
- package/dist/held.js +19 -5
- package/dist/job.d.ts +1 -0
- package/dist/job.js +148 -33
- package/dist/keep-local.d.ts +1 -0
- package/dist/keep-local.js +63 -0
- package/dist/local-tools.d.ts +31 -0
- package/dist/local-tools.js +178 -0
- package/dist/machine-logins.d.ts +4 -0
- package/dist/machine-logins.js +31 -0
- package/dist/mcp-login.d.ts +3 -0
- package/dist/mcp-login.js +34 -4
- package/dist/mcp-tools.d.ts +23 -0
- package/dist/mcp-tools.js +122 -0
- package/dist/mcp.d.ts +8 -0
- package/dist/mcp.js +37 -3
- package/dist/pool.d.ts +1 -0
- package/dist/pool.js +1 -0
- package/dist/pr-title.d.ts +1 -0
- package/dist/pr-title.js +7 -0
- package/dist/repo-path.d.ts +15 -0
- package/dist/repo-path.js +56 -0
- package/dist/resources.d.ts +38 -0
- package/dist/resources.js +47 -1
- package/dist/restart-idle.d.ts +1 -0
- package/dist/restart-idle.js +20 -5
- package/dist/run-folders.d.ts +25 -0
- package/dist/run-folders.js +89 -0
- package/dist/viewer.d.ts +1 -1
- package/dist/viewer.js +3 -1
- package/dist/work-dir.d.ts +30 -0
- package/dist/work-dir.js +153 -22
- package/dist/worktrees.d.ts +7 -0
- package/dist/worktrees.js +26 -5
- package/package.json +1 -1
package/dist/worktrees.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { rmSync } from 'node:fs';
|
|
1
|
+
import { existsSync, rmSync } from 'node:fs';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
|
-
import { workRoots } from './work-dir.js';
|
|
4
|
-
import { basename } from 'node:path';
|
|
3
|
+
import { runRoots, workRoots } from './work-dir.js';
|
|
4
|
+
import { basename, join } from 'node:path';
|
|
5
|
+
import { RESERVED_FOLDERS, RUN_MARKER } from './run-folders.js';
|
|
5
6
|
import { exec } from './exec.js';
|
|
6
7
|
import { isAlive, killOrphans, reviewCopiesOf } from './orphans.js';
|
|
7
8
|
import { listHeld } from './held.js';
|
|
@@ -34,8 +35,28 @@ export function isRunnerWorktree(path, opts = {}) {
|
|
|
34
35
|
.replace(/[\\/]+$/, '')
|
|
35
36
|
.split(/[\\/]/)
|
|
36
37
|
.pop() ?? '';
|
|
37
|
-
|
|
38
|
-
tempRoots(platform, opts.tmp ?? tmpdir(), opts.roots ?? workRoots()).has(clean.slice(0, cut)))
|
|
38
|
+
if (RUNNER_WORKTREE_NAME.test(name) &&
|
|
39
|
+
tempRoots(platform, opts.tmp ?? tmpdir(), opts.roots ?? workRoots()).has(clean.slice(0, cut))) {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
return isLayoutRunFolder(path, opts);
|
|
43
|
+
}
|
|
44
|
+
export function isLayoutRunFolder(path, opts = {}) {
|
|
45
|
+
const platform = opts.platform ?? process.platform;
|
|
46
|
+
const parts = canonicalPathOn(path, platform).split('/');
|
|
47
|
+
if (parts.length < 3)
|
|
48
|
+
return false;
|
|
49
|
+
const name = parts[parts.length - 1];
|
|
50
|
+
const group = parts[parts.length - 2];
|
|
51
|
+
const parent = parts.slice(0, -2).join('/');
|
|
52
|
+
if (!/^[A-Za-z0-9._-]+$/.test(name) || name.startsWith('.'))
|
|
53
|
+
return false;
|
|
54
|
+
if (!group || group.startsWith('.') || RESERVED_FOLDERS.has(group.toLowerCase()))
|
|
55
|
+
return false;
|
|
56
|
+
const roots = new Set((opts.layoutRoots ?? runRoots()).map((r) => canonicalPathOn(r, platform)));
|
|
57
|
+
if (!roots.has(parent))
|
|
58
|
+
return false;
|
|
59
|
+
return (opts.hasMarker ?? ((p) => existsSync(join(p, RUN_MARKER))))(path);
|
|
39
60
|
}
|
|
40
61
|
export async function worktreesOf(checkout) {
|
|
41
62
|
const r = await exec('git', ['-C', checkout, 'worktree', 'list', '--porcelain'], {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firefunc-agent/runner",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.40",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "FireFunc self-hosted runner — an always-on daemon that runs YOUR local coding agent (Claude Code, Codex, Gemini CLI, Cursor CLI, Copilot CLI, Antigravity) on work FireFunc routes to it, opens pull requests, and reports back. Your machine, your subscriptions.",
|