foundr-companion 0.1.7 → 0.1.8
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/dist/bridge/fleet/worker.mjs +1 -1
- package/dist/bridge/fleet/worker.mjs.map +1 -1
- package/dist/bridge/fleet/worktree.d.mts +29 -9
- package/dist/bridge/fleet/worktree.d.mts.map +1 -1
- package/dist/bridge/fleet/worktree.mjs +115 -20
- package/dist/bridge/fleet/worktree.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ export async function runMissionWorker({ mission, hostId, mcpUrl, bearer, leaseS
|
|
|
14
14
|
let adapter
|
|
15
15
|
try {
|
|
16
16
|
log(`mission ${mission.id}: ${mission.repo} @ ${mission.worktree_branch} — making worktree`)
|
|
17
|
-
const worktreePath = await ensureWorktree({
|
|
17
|
+
const worktreePath = await ensureWorktree({ repo: mission.repo, branch: mission.worktree_branch })
|
|
18
18
|
const codexHome = await stageWorkerCodexConfig({ worktreePath, mcpUrl, bearer })
|
|
19
19
|
await claimMission({ missionId: mission.id, hostId, repo: mission.repo, worktreeBranch: mission.worktree_branch, leaseSeconds })
|
|
20
20
|
log(`mission ${mission.id}: claimed, starting codex in ${worktreePath}`)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.mjs","sourceRoot":"","sources":["../../../src/bridge/fleet/worker.mjs"],"names":[],"mappings":"AAAA;;;+DAG+D;AAC/D,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,GAAE,CAAC,EAAE;;IACnH,MAAM,EAAE,cAAc,EAAE,sBAAsB,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;IAC9G,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,OA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
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/** Resolve a mission "repo" into { owner, name, cloneUrl }.
|
|
2
|
+
* - "owner/name" -> github https clone url
|
|
3
|
+
* - "https://github.com/owner/name" -> github https clone url
|
|
4
|
+
* - "git@github.com:owner/name(.git)" -> github https clone url
|
|
5
|
+
* - a local path / file:// / other git URL -> used verbatim as cloneUrl,
|
|
6
|
+
* owner/name derived from the basename (for flexibility + offline tests).
|
|
7
|
+
* Throws on empty/garbage. */
|
|
8
|
+
export function parseRepo(repo: any): {
|
|
9
|
+
owner: any;
|
|
10
|
+
name: any;
|
|
11
|
+
cloneUrl: string;
|
|
12
|
+
};
|
|
13
|
+
/** Ensure a local clone of the repo exists (cached under ~/.foundr-world/repos).
|
|
14
|
+
* Fresh clone if absent, otherwise best-effort fetch. Returns the clone path. */
|
|
15
|
+
export function ensureClone({ owner, name, cloneUrl }: {
|
|
16
|
+
owner: any;
|
|
17
|
+
name: any;
|
|
18
|
+
cloneUrl: any;
|
|
19
|
+
}): Promise<string>;
|
|
20
|
+
/** Ensure a git worktree for `branch` exists off the (cloned) repo; returns its
|
|
21
|
+
* path. Idempotent: re-calling returns the existing path. If `branch` exists
|
|
22
|
+
* locally or as origin/<branch>, it is checked out; otherwise a new branch is
|
|
23
|
+
* created off the repo's default branch (or baseRef when given). */
|
|
24
|
+
export function ensureWorktree({ repo, branch, baseRef }: {
|
|
25
|
+
repo: any;
|
|
6
26
|
branch: any;
|
|
7
|
-
baseRef
|
|
27
|
+
baseRef: any;
|
|
8
28
|
}): Promise<string>;
|
|
9
|
-
/** Remove a worktree (and prune the admin entry). */
|
|
10
|
-
export function removeWorktree({
|
|
11
|
-
|
|
29
|
+
/** Remove a worktree (and prune the admin entry). Best-effort. */
|
|
30
|
+
export function removeWorktree({ repo, worktreePath }: {
|
|
31
|
+
repo: any;
|
|
12
32
|
worktreePath: any;
|
|
13
33
|
}): Promise<void>;
|
|
14
34
|
//# sourceMappingURL=worktree.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.d.mts","sourceRoot":"","sources":["../../../src/bridge/fleet/worktree.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worktree.d.mts","sourceRoot":"","sources":["../../../src/bridge/fleet/worktree.mjs"],"names":[],"mappings":"AAaA;;;;;;+BAM+B;AAC/B;;;;EAwCC;AAED;kFACkF;AAClF;;;;oBAUC;AAgBD;;;qEAGqE;AACrE;;;;oBAqBC;AAED,kEAAkE;AAClE;;;kBAQC"}
|
|
@@ -2,31 +2,126 @@ import { execFile } from 'node:child_process'
|
|
|
2
2
|
import { promisify } from 'node:util'
|
|
3
3
|
import os from 'node:os'
|
|
4
4
|
import path from 'node:path'
|
|
5
|
+
import fs from 'node:fs/promises'
|
|
5
6
|
const run = promisify(execFile)
|
|
6
7
|
|
|
7
|
-
const
|
|
8
|
+
const ROOT = () => path.join(os.homedir(), '.foundr-world')
|
|
9
|
+
const REPOS_ROOT = () => path.join(ROOT(), 'repos')
|
|
10
|
+
const WORKTREES_ROOT = () => path.join(ROOT(), 'worktrees')
|
|
8
11
|
|
|
9
|
-
function sanitize(
|
|
12
|
+
function sanitize(s) { return String(s).replace(/[^A-Za-z0-9._-]+/g, '-') }
|
|
10
13
|
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
/** Resolve a mission "repo" into { owner, name, cloneUrl }.
|
|
15
|
+
* - "owner/name" -> github https clone url
|
|
16
|
+
* - "https://github.com/owner/name" -> github https clone url
|
|
17
|
+
* - "git@github.com:owner/name(.git)" -> github https clone url
|
|
18
|
+
* - a local path / file:// / other git URL -> used verbatim as cloneUrl,
|
|
19
|
+
* owner/name derived from the basename (for flexibility + offline tests).
|
|
20
|
+
* Throws on empty/garbage. */
|
|
21
|
+
export function parseRepo(repo) {
|
|
22
|
+
if (typeof repo !== 'string') throw new Error(`invalid repo: ${repo}`)
|
|
23
|
+
const raw = repo.trim()
|
|
24
|
+
if (!raw) throw new Error('empty repo')
|
|
25
|
+
|
|
26
|
+
const stripGit = (s) => s.replace(/\.git$/, '')
|
|
27
|
+
|
|
28
|
+
// git@github.com:owner/name(.git)
|
|
29
|
+
const ssh = raw.match(/^git@github\.com:([^/]+)\/([^/]+?)(?:\.git)?$/i)
|
|
30
|
+
if (ssh) {
|
|
31
|
+
const owner = ssh[1]
|
|
32
|
+
const name = ssh[2]
|
|
33
|
+
return { owner, name, cloneUrl: `https://github.com/${owner}/${name}.git` }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// https://github.com/owner/name(.git)
|
|
37
|
+
const https = raw.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?\/?$/i)
|
|
38
|
+
if (https) {
|
|
39
|
+
const owner = https[1]
|
|
40
|
+
const name = https[2]
|
|
41
|
+
return { owner, name, cloneUrl: `https://github.com/${owner}/${name}.git` }
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// owner/name shorthand (no scheme, no extra slashes, not a local path)
|
|
45
|
+
const shorthand = raw.match(/^([A-Za-z0-9._-]+)\/([A-Za-z0-9._-]+)$/)
|
|
46
|
+
if (shorthand && !raw.startsWith('.') && !raw.startsWith('~')) {
|
|
47
|
+
const owner = shorthand[1]
|
|
48
|
+
const name = stripGit(shorthand[2])
|
|
49
|
+
return { owner, name, cloneUrl: `https://github.com/${owner}/${name}.git` }
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Fallback: a local filesystem path, file:// URL, or some other git URL.
|
|
53
|
+
// Use it verbatim as the clone source; derive owner/name from the basename.
|
|
54
|
+
const cloneUrl = raw
|
|
55
|
+
const withoutScheme = raw.replace(/^[a-z][a-z0-9+.-]*:\/\//i, '')
|
|
56
|
+
const segments = stripGit(withoutScheme).split('/').filter(Boolean)
|
|
57
|
+
const name = segments[segments.length - 1]
|
|
58
|
+
const owner = segments.length >= 2 ? segments[segments.length - 2] : 'local'
|
|
59
|
+
if (!name) throw new Error(`invalid repo: ${repo}`)
|
|
60
|
+
return { owner, name, cloneUrl }
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Ensure a local clone of the repo exists (cached under ~/.foundr-world/repos).
|
|
64
|
+
* Fresh clone if absent, otherwise best-effort fetch. Returns the clone path. */
|
|
65
|
+
export async function ensureClone({ owner, name, cloneUrl }) {
|
|
66
|
+
const clonePath = path.join(REPOS_ROOT(), sanitize(owner), sanitize(name))
|
|
67
|
+
const hasGit = await fs.stat(path.join(clonePath, '.git')).then(() => true).catch(() => false)
|
|
68
|
+
if (!hasGit) {
|
|
69
|
+
await fs.mkdir(path.dirname(clonePath), { recursive: true })
|
|
70
|
+
await run('git', ['clone', cloneUrl, clonePath])
|
|
71
|
+
} else {
|
|
72
|
+
await run('git', ['-C', clonePath, 'fetch', '--all', '--prune']).catch(() => {})
|
|
73
|
+
}
|
|
74
|
+
return clonePath
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Resolve the repo's default branch ref to base a new branch on. */
|
|
78
|
+
async function defaultBaseRef(clonePath) {
|
|
79
|
+
const head = await run('git', ['-C', clonePath, 'symbolic-ref', '--quiet', 'refs/remotes/origin/HEAD'])
|
|
80
|
+
.then((r) => r.stdout.trim().replace(/^refs\/remotes\//, ''))
|
|
81
|
+
.catch(() => '')
|
|
82
|
+
if (head) return head
|
|
83
|
+
for (const ref of ['origin/main', 'origin/master']) {
|
|
84
|
+
const ok = await run('git', ['-C', clonePath, 'rev-parse', '--verify', '--quiet', ref])
|
|
85
|
+
.then(() => true).catch(() => false)
|
|
86
|
+
if (ok) return ref
|
|
87
|
+
}
|
|
88
|
+
return 'HEAD'
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Ensure a git worktree for `branch` exists off the (cloned) repo; returns its
|
|
92
|
+
* path. Idempotent: re-calling returns the existing path. If `branch` exists
|
|
93
|
+
* locally or as origin/<branch>, it is checked out; otherwise a new branch is
|
|
94
|
+
* created off the repo's default branch (or baseRef when given). */
|
|
95
|
+
export async function ensureWorktree({ repo, branch, baseRef }) {
|
|
96
|
+
const { owner, name, cloneUrl } = parseRepo(repo)
|
|
97
|
+
const clonePath = await ensureClone({ owner, name, cloneUrl })
|
|
98
|
+
const wtDir = path.join(WORKTREES_ROOT(), sanitize(owner), sanitize(name), sanitize(branch))
|
|
99
|
+
|
|
100
|
+
// Already registered as a worktree?
|
|
101
|
+
const { stdout } = await run('git', ['-C', clonePath, 'worktree', 'list', '--porcelain'])
|
|
102
|
+
if (stdout.includes(`worktree ${wtDir}\n`)) return wtDir
|
|
103
|
+
|
|
104
|
+
const localExists = await run('git', ['-C', clonePath, 'rev-parse', '--verify', '--quiet', branch])
|
|
105
|
+
.then(() => true).catch(() => false)
|
|
106
|
+
const remoteExists = await run('git', ['-C', clonePath, 'rev-parse', '--verify', '--quiet', `origin/${branch}`])
|
|
20
107
|
.then(() => true).catch(() => false)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
108
|
+
|
|
109
|
+
if (localExists || remoteExists) {
|
|
110
|
+
await run('git', ['-C', clonePath, 'worktree', 'add', wtDir, branch])
|
|
111
|
+
} else {
|
|
112
|
+
const base = baseRef ?? (await defaultBaseRef(clonePath))
|
|
113
|
+
await run('git', ['-C', clonePath, 'worktree', 'add', '-b', branch, wtDir, base])
|
|
114
|
+
}
|
|
115
|
+
return wtDir
|
|
26
116
|
}
|
|
27
117
|
|
|
28
|
-
/** Remove a worktree (and prune the admin entry). */
|
|
29
|
-
export async function removeWorktree({
|
|
30
|
-
|
|
31
|
-
|
|
118
|
+
/** Remove a worktree (and prune the admin entry). Best-effort. */
|
|
119
|
+
export async function removeWorktree({ repo, worktreePath }) {
|
|
120
|
+
const { owner, name, cloneUrl } = parseRepo(repo)
|
|
121
|
+
const clonePath = path.join(REPOS_ROOT(), sanitize(owner), sanitize(name))
|
|
122
|
+
// clonePath derivation doesn't need the network; cloneUrl is unused here but
|
|
123
|
+
// parseRepo validates `repo` and yields the owner/name we key the cache on.
|
|
124
|
+
void cloneUrl
|
|
125
|
+
await run('git', ['-C', clonePath, 'worktree', 'remove', '--force', worktreePath]).catch(() => {})
|
|
126
|
+
await run('git', ['-C', clonePath, 'worktree', 'prune']).catch(() => {})
|
|
32
127
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.mjs","sourceRoot":"","sources":["../../../src/bridge/fleet/worktree.mjs"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,MAAM,GAAG,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAA;AAE/B,MAAM,
|
|
1
|
+
{"version":3,"file":"worktree.mjs","sourceRoot":"","sources":["../../../src/bridge/fleet/worktree.mjs"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACjC,MAAM,GAAG,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAA;AAE/B,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,eAAe,CAAC,CAAA;AAC3D,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnD,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,IAA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