openfox 2.0.71 → 2.0.73

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.
Files changed (58) hide show
  1. package/dist/agent-defaults/builder.agent.md +1 -1
  2. package/dist/agent-defaults/planner.agent.md +1 -1
  3. package/dist/{chat-handler-IKLQ3ZUN.js → chat-handler-LK5RUAGO.js} +15 -15
  4. package/dist/{chunk-NEL2REUM.js → chunk-2DCJERYX.js} +4 -4
  5. package/dist/{chunk-TFDK6VSG.js → chunk-6XKM25OT.js} +13 -13
  6. package/dist/{chunk-TQGGMWS6.js → chunk-CHPRGEY5.js} +3 -3
  7. package/dist/{chunk-C3VLGVSQ.js → chunk-DJASQ2ZB.js} +11 -2
  8. package/dist/{chunk-4QBDV6LX.js → chunk-E5LLEO3C.js} +2 -2
  9. package/dist/{chunk-OLXHRPAD.js → chunk-EYXDM2FY.js} +243 -285
  10. package/dist/{chunk-Y4YESMVA.js → chunk-GMF36EZ3.js} +81 -92
  11. package/dist/{chunk-GMXKJGJ2.js → chunk-I4RWK2L2.js} +8 -4
  12. package/dist/{chunk-6V7DU7ID.js → chunk-KKRLQH6F.js} +3 -3
  13. package/dist/chunk-NE7OWIIO.js +7 -0
  14. package/dist/{chunk-F4PMNP7S.js → chunk-NOU2QIL5.js} +3 -2
  15. package/dist/{chunk-X7OCC37J.js → chunk-O2BE7KVQ.js} +8 -8
  16. package/dist/{chunk-PVUBCGAT.js → chunk-PYB2UEC3.js} +10 -4
  17. package/dist/{chunk-XUPKS5FL.js → chunk-QNKXZH3Z.js} +2 -2
  18. package/dist/{chunk-X5DOUA3Z.js → chunk-S7O77CVO.js} +2 -2
  19. package/dist/{chunk-Z42YTK3O.js → chunk-TK4BZIXA.js} +34 -23
  20. package/dist/{chunk-KXVFHMSM.js → chunk-UV3EMWL4.js} +2 -2
  21. package/dist/chunk-X2Y3AJPP.js +216 -0
  22. package/dist/{chunk-RKD2FML3.js → chunk-XWBNYU2L.js} +2 -2
  23. package/dist/cli/dev.js +1 -1
  24. package/dist/cli/index.js +1 -1
  25. package/dist/{compactor-MXXF5WQR.js → compactor-4UKYWC5F.js} +8 -8
  26. package/dist/{events-CDQ4HASP.js → events-AEQ6GQXI.js} +4 -4
  27. package/dist/{folding-V2K34EGN.js → folding-ONH3D4OK.js} +2 -2
  28. package/dist/{inspect-proxy-OVEFBJ26.js → inspect-proxy-PHVZBZUO.js} +4 -4
  29. package/dist/{manager-EHIQCIUP.js → manager-24C2AXVF.js} +5 -5
  30. package/dist/{orchestrator-YGCZZNNV.js → orchestrator-RTZVMWQV.js} +14 -14
  31. package/dist/package.json +1 -1
  32. package/dist/{platform-AB3GIEGO.js → platform-XQ7BS3KQ.js} +4 -4
  33. package/dist/{processor-K6UPVMIP.js → processor-3O26I7DO.js} +15 -15
  34. package/dist/{project-creator-EMGRSPYS.js → project-creator-FQRBN3RG.js} +3 -3
  35. package/dist/{projects-7HSBZY2D.js → projects-LHRNCUGW.js} +3 -3
  36. package/dist/{protocol-CTNE3ANP.js → protocol-4QFU7WAI.js} +2 -2
  37. package/dist/{protocol-DIhV-tAc.d.ts → protocol-DGQWVFcP.d.ts} +1 -1
  38. package/dist/provider/index.d.ts +4 -4
  39. package/dist/{serve-5IOKFKGL.js → serve-I6K7A7RL.js} +18 -18
  40. package/dist/server/index.d.ts +12 -22
  41. package/dist/server/index.js +17 -17
  42. package/dist/{server-T5QDCUBN.js → server-G2J4RAXL.js} +16 -16
  43. package/dist/{settings-6ZPWOBWL.js → settings-PFXRYXZU.js} +3 -3
  44. package/dist/shared/index.d.ts +3 -3
  45. package/dist/{tools-K3SNGBI2.js → tools-X52DFUS6.js} +13 -13
  46. package/dist/{types-BsfYpEai.d.ts → types-C4cG9CtC.d.ts} +3 -2
  47. package/dist/{types-CBC6lLqc.d.ts → types-DSZhFA8O.d.ts} +1 -1
  48. package/dist/{update-734IDLKT.js → update-RJB4GPHE.js} +2 -2
  49. package/dist/web/assets/index-C7SW16F7.js +305 -0
  50. package/dist/web/assets/{index-BVTG7SRG.css → index-CmechlaK.css} +1 -1
  51. package/dist/web/index.html +2 -2
  52. package/dist/web/sw.js +1 -1
  53. package/dist/workspace-ET3FHZYN.js +32 -0
  54. package/package.json +1 -1
  55. package/dist/chunk-7NMOWPNY.js +0 -7
  56. package/dist/chunk-VLV3XWZS.js +0 -191
  57. package/dist/web/assets/index-HTzupfR0.js +0 -305
  58. package/dist/worktree-6U45P63P.js +0 -30
@@ -1,191 +0,0 @@
1
- import {
2
- gitSpawnEnv
3
- } from "./chunk-WGMJCFCE.js";
4
- import {
5
- logger
6
- } from "./chunk-K44MW7JJ.js";
7
-
8
- // src/server/git/worktree.ts
9
- import { spawn } from "child_process";
10
- import { mkdir, readFile, appendFile, stat, symlink } from "fs/promises";
11
- import { resolve } from "path";
12
- import copy from "@danieldietrich/copy";
13
- function captureStdout(cwd, args) {
14
- return new Promise((resolvePromise) => {
15
- const proc = spawn("git", args, { cwd, env: gitSpawnEnv(), stdio: ["ignore", "pipe", "ignore"] });
16
- let out = "";
17
- proc.stdout.on("data", (d) => {
18
- out += d.toString();
19
- });
20
- proc.on("close", (code) => resolvePromise(code === 0 ? out : null));
21
- proc.on("error", () => resolvePromise(null));
22
- });
23
- }
24
- function runGit(cwd, args) {
25
- return new Promise((resolvePromise, reject) => {
26
- const proc = spawn("git", args, { cwd, env: gitSpawnEnv(), stdio: ["ignore", "pipe", "pipe"] });
27
- let stderr = "";
28
- proc.stderr.on("data", (d) => {
29
- stderr += d.toString();
30
- });
31
- proc.on("close", (code) => {
32
- if (code === 0) resolvePromise();
33
- else reject(new Error(stderr.trim() || `git ${args[0]} failed (code ${code})`));
34
- });
35
- proc.on("error", (err) => reject(err));
36
- });
37
- }
38
- function getGitBranch(cwd) {
39
- return captureStdout(cwd, ["rev-parse", "--abbrev-ref", "HEAD"]).then((r) => r?.trim() ?? null);
40
- }
41
- function listWorktrees(cwd) {
42
- return captureStdout(cwd, ["worktree", "list", "--porcelain"]).then((out) => {
43
- if (!out) return [];
44
- const entries = [];
45
- let current = {};
46
- for (const line of out.split("\n")) {
47
- if (line.startsWith("worktree ")) current.path = line.slice(9);
48
- else if (line.startsWith("branch ")) current.branch = line.slice(7).replace("refs/heads/", "");
49
- else if (line === "" && current.path && current.branch) {
50
- entries.push({ path: current.path, branch: current.branch });
51
- current = {};
52
- }
53
- }
54
- if (current.path && current.branch) entries.push({ path: current.path, branch: current.branch });
55
- return entries;
56
- });
57
- }
58
- function validateRef(cwd, name) {
59
- return runGit(cwd, ["check-ref-format", `refs/heads/${name}`]);
60
- }
61
- function addWorktree(cwd, args) {
62
- return runGit(cwd, ["worktree", "add", ...args]);
63
- }
64
- async function ensureWorktreesIgnored(projectDir) {
65
- const gitignorePath = resolve(projectDir, ".gitignore");
66
- let content = "";
67
- try {
68
- content = await readFile(gitignorePath, "utf-8");
69
- } catch {
70
- }
71
- const lines = content.split("\n");
72
- const hasWorktreesIgnore = lines.some(
73
- (line) => line.trim() === "worktrees/" || line.trim() === "/worktrees/" || line.trim() === "worktrees"
74
- );
75
- if (hasWorktreesIgnore) return;
76
- const entry = content.length > 0 && !content.endsWith("\n") ? "\nworktrees/\n" : "worktrees/\n";
77
- await appendFile(gitignorePath, entry);
78
- }
79
- function listBranches(cwd) {
80
- return captureStdout(cwd, ["branch", "--format", "%(refname:short)%09%(HEAD)"]).then((out) => {
81
- if (!out) return [];
82
- const branches = [];
83
- for (const line of out.trim().split("\n")) {
84
- if (!line) continue;
85
- const [name, head] = line.split(" ");
86
- if (name) branches.push({ name, current: head === "*" });
87
- }
88
- return branches;
89
- });
90
- }
91
- function checkoutBranch(cwd, name) {
92
- return runGit(cwd, ["checkout", name]);
93
- }
94
- function createBranch(cwd, name) {
95
- return runGit(cwd, ["checkout", "-b", name]);
96
- }
97
- function branchExists(cwd, name) {
98
- return captureStdout(cwd, ["rev-parse", "--verify", `refs/heads/${name}`]).then((r) => r !== null);
99
- }
100
- async function ensureWorktree(projectDir, name, startBranch) {
101
- await validateRef(projectDir, name);
102
- const worktreesDir = resolve(projectDir, "worktrees");
103
- const wtPath = resolve(worktreesDir, name.replace(/\//g, "-"));
104
- await mkdir(worktreesDir, { recursive: true });
105
- await ensureWorktreesIgnored(projectDir).catch((err) => {
106
- logger.warn("Failed to update .gitignore", { projectDir, error: String(err) });
107
- });
108
- const startBranchResolved = startBranch ?? await getGitBranch(projectDir) ?? "main";
109
- try {
110
- const st = await stat(wtPath);
111
- if (st.isDirectory()) return { path: wtPath, name };
112
- } catch {
113
- }
114
- try {
115
- await addWorktree(projectDir, ["-b", name, wtPath, startBranchResolved]);
116
- } catch (err) {
117
- const exists = await branchExists(projectDir, name);
118
- if (exists) {
119
- await addWorktree(projectDir, [wtPath, name]);
120
- } else {
121
- throw err;
122
- }
123
- }
124
- return { path: wtPath, name };
125
- }
126
- async function getIgnoredDirectories(projectDir) {
127
- const out = await captureStdout(projectDir, [
128
- "ls-files",
129
- "--others",
130
- "--ignored",
131
- "--exclude-standard",
132
- "--directory"
133
- ]);
134
- if (!out) return [];
135
- return out.trim().split("\n").filter(Boolean);
136
- }
137
- function resolveStrategy(relPath, config) {
138
- const normalized = relPath.replace(/\/$/, "");
139
- const basename = normalized.split("/").pop() ?? normalized;
140
- return config.overrides?.[normalized] ?? config.overrides?.[basename] ?? config.ignoredAssets;
141
- }
142
- async function syncIgnoredAssets(projectDir, worktreePath, config) {
143
- const ignoredPaths = await getIgnoredDirectories(projectDir);
144
- if (ignoredPaths.length === 0) return;
145
- const results = [];
146
- for (const relPath of ignoredPaths) {
147
- const sourcePath = resolve(projectDir, relPath);
148
- const targetPath = resolve(worktreePath, relPath);
149
- try {
150
- await stat(sourcePath);
151
- } catch {
152
- continue;
153
- }
154
- const strategy = resolveStrategy(relPath, config);
155
- if (strategy === "skip") continue;
156
- try {
157
- if (strategy === "symlink") {
158
- try {
159
- await stat(targetPath);
160
- continue;
161
- } catch {
162
- }
163
- await symlink(sourcePath, targetPath);
164
- results.push(`symlink ${relPath}`);
165
- } else if (strategy === "copy") {
166
- await copy(sourcePath, targetPath);
167
- results.push(`copy ${relPath}`);
168
- }
169
- } catch (err) {
170
- logger.warn("Failed to sync ignored asset to worktree", { relPath, strategy, error: String(err) });
171
- }
172
- }
173
- if (results.length > 0) {
174
- logger.info("Synced ignored assets to worktree", { count: results.length, actions: results });
175
- }
176
- }
177
-
178
- export {
179
- getGitBranch,
180
- listWorktrees,
181
- validateRef,
182
- addWorktree,
183
- ensureWorktreesIgnored,
184
- listBranches,
185
- checkoutBranch,
186
- createBranch,
187
- ensureWorktree,
188
- getIgnoredDirectories,
189
- syncIgnoredAssets
190
- };
191
- //# sourceMappingURL=chunk-VLV3XWZS.js.map