openfox 2.0.112 → 2.0.114

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 (97) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +1 -0
  3. package/dist/CHANGELOG.md +49 -0
  4. package/dist/agent-defaults/builder.agent.md +1 -0
  5. package/dist/agent-defaults/planner.agent.md +1 -0
  6. package/dist/{backend-P3GHHLHJ.js → backend-LVYHLGQJ.js} +2 -2
  7. package/dist/{chat-handler-BYXZIIV3.js → chat-handler-KWXRSWXZ.js} +32 -26
  8. package/dist/{chunk-XWNCKIPO.js → chunk-2XD65L7M.js} +2 -2
  9. package/dist/{chunk-C5NQF2K4.js → chunk-3O77NT4T.js} +29 -10
  10. package/dist/{chunk-XCK5IBO4.js → chunk-7GWARYQC.js} +60 -1042
  11. package/dist/{chunk-YHEQTVFV.js → chunk-AZHWLLPP.js} +1 -1
  12. package/dist/{chunk-FFPCVN5M.js → chunk-BZVW77PI.js} +4 -4
  13. package/dist/{chunk-SDGNV45R.js → chunk-FW4NDUBL.js} +15 -15
  14. package/dist/{chunk-Z56SEG4Z.js → chunk-GUHHUDNL.js} +6 -6
  15. package/dist/{chunk-RT2A2RRL.js → chunk-HP5CIB66.js} +2 -2
  16. package/dist/{chunk-UAF2FOI5.js → chunk-HV6IALXF.js} +7 -7
  17. package/dist/{chunk-SYJMUIRC.js → chunk-I7FY2LTR.js} +2 -2
  18. package/dist/{chunk-RISQXU32.js → chunk-JP7NM545.js} +2 -2
  19. package/dist/{chunk-NB2D6I64.js → chunk-JXLRL5JR.js} +5 -5
  20. package/dist/{chunk-RAKPI4OE.js → chunk-K733B5T2.js} +264 -27
  21. package/dist/{chunk-C372UH7N.js → chunk-KSXCOHHW.js} +18 -20
  22. package/dist/{chunk-JDT63SSP.js → chunk-L63Q4JQJ.js} +3 -3
  23. package/dist/{chunk-ERYUSG5C.js → chunk-LXYPMFTH.js} +3 -3
  24. package/dist/{chunk-FSYRANYR.js → chunk-MUSPWEBB.js} +4 -5
  25. package/dist/chunk-NCZRWCJN.js +7 -0
  26. package/dist/{chunk-JR54MDZI.js → chunk-NLO64UE3.js} +2 -2
  27. package/dist/{chunk-3UILDGOO.js → chunk-NWJLWLKF.js} +8 -8
  28. package/dist/chunk-OSXPQSLW.js +128 -0
  29. package/dist/chunk-OTYAEEX3.js +1081 -0
  30. package/dist/{chunk-PCC4DBPF.js → chunk-OXSTNSCF.js} +2 -2
  31. package/dist/{chunk-33Q7LCVD.js → chunk-P5UANBBX.js} +6 -4
  32. package/dist/{chunk-LCQ5AN6Y.js → chunk-PBW3YC3G.js} +89 -1
  33. package/dist/{chunk-IYTDCPEQ.js → chunk-QD7MRMCH.js} +352 -333
  34. package/dist/{chunk-N4RTAGFY.js → chunk-SA34STZ6.js} +2 -2
  35. package/dist/{chunk-FR5LUTLQ.js → chunk-SBSUDHL4.js} +10 -6
  36. package/dist/{chunk-6FPGJR7O.js → chunk-SFZGMB2G.js} +2 -2
  37. package/dist/{chunk-SVJFMZ2Q.js → chunk-TKKP56QK.js} +11 -4
  38. package/dist/{chunk-JNHKKUGJ.js → chunk-UPBWEHIL.js} +30 -148
  39. package/dist/{chunk-QGXLZZBS.js → chunk-UTIQ7OO5.js} +2 -2
  40. package/dist/{chunk-RKMP74BB.js → chunk-VPVLO436.js} +4 -4
  41. package/dist/chunk-W77NBJAZ.js +957 -0
  42. package/dist/{chunk-P45RJGOT.js → chunk-X25Q6RAV.js} +1 -1
  43. package/dist/{chunk-BOSKQI62.js → chunk-YGJIK3CG.js} +4 -4
  44. package/dist/cli/dev.js +1 -1
  45. package/dist/cli/index.js +1 -1
  46. package/dist/{client-QNQTX5EA.js → client-EM7ISGUP.js} +6 -6
  47. package/dist/{compactor-X2KZ3XFU.js → compactor-V3LR7APW.js} +13 -12
  48. package/dist/{config-TW5FHQEM.js → config-EAB3V4QK.js} +2 -2
  49. package/dist/{dynamic-context-ZRQO2FJN.js → dynamic-context-MVGOF5V2.js} +10 -9
  50. package/dist/{events-Y6XXQYFG.js → events-PI7IMPHT.js} +8 -7
  51. package/dist/{folding-Z4GNWRC3.js → folding-FO57K4JM.js} +6 -5
  52. package/dist/http-client-33EZ3BLR.js +11 -0
  53. package/dist/{inspect-proxy-N42Z5TOG.js → inspect-proxy-NHKQQ2CD.js} +4 -4
  54. package/dist/launch-L5ROVNI3.js +52 -0
  55. package/dist/{manager-HCMDFEQH.js → manager-66YAEO7K.js} +5 -5
  56. package/dist/{model-overrides-O3ZYKFP7.js → model-overrides-L53PZNZA.js} +4 -4
  57. package/dist/orchestrator-XK5K3RPL.js +63 -0
  58. package/dist/package.json +7 -6
  59. package/dist/{path-security-525YLND3.js → path-security-RSEI3YKB.js} +12 -11
  60. package/dist/{platform-MEQUWG6U.js → platform-WA4GK5BO.js} +4 -4
  61. package/dist/{processor-UN4H4V7F.js → processor-WDZSFBVO.js} +31 -25
  62. package/dist/{project-creator-BVA55HY6.js → project-creator-676WQXVI.js} +3 -3
  63. package/dist/{projects-PQXME5S4.js → projects-SSBWIYL4.js} +3 -3
  64. package/dist/{protocol-D6MISQyz.d.ts → protocol-BzHs024-.d.ts} +23 -3
  65. package/dist/{protocol-FTHAR2YL.js → protocol-RKSWKNXI.js} +3 -3
  66. package/dist/provider/index.d.ts +4 -4
  67. package/dist/{provider-3R4X62LW.js → provider-PLIWRBCF.js} +9 -9
  68. package/dist/{provider-manager-W5N4XRE5.js → provider-manager-2QSJTPWS.js} +7 -7
  69. package/dist/{registry-74KPZ5NV.js → registry-ZP4TN2IN.js} +5 -4
  70. package/dist/{serve-WHFUNQ6Z.js → serve-MZ3BCCWC.js} +36 -33
  71. package/dist/server/index.d.ts +8 -5
  72. package/dist/server/index.js +35 -32
  73. package/dist/server-EPXODFMB.js +55 -0
  74. package/dist/service-54PGIPDQ.js +25 -0
  75. package/dist/{session-overrides-XH6I3COP.js → session-overrides-LXN6W7SA.js} +7 -6
  76. package/dist/{sessions-D772YTWL.js → sessions-CHPVUG6H.js} +8 -5
  77. package/dist/{settings-KO6DSJLD.js → settings-NEBM3GQX.js} +3 -3
  78. package/dist/shared/index.d.ts +3 -3
  79. package/dist/shared/index.js +1 -1
  80. package/dist/skill-defaults/workflows/SKILL.md +517 -0
  81. package/dist/tasks-TJXG2V3U.js +217 -0
  82. package/dist/{tools-HTUTYMKI.js → tools-CIM26IFB.js} +31 -23
  83. package/dist/{types-BMEOlLT0.d.ts → types-CMtHpDWT.d.ts} +81 -1
  84. package/dist/{types-D0TgGL3t.d.ts → types-CbggXFvR.d.ts} +1 -1
  85. package/dist/{update-BRUFGGTW.js → update-UZBBO42X.js} +2 -2
  86. package/dist/web/assets/{index-nS1p0g8O.css → index-BmILAZrT.css} +1 -1
  87. package/dist/web/assets/index-rZHXkfMq.js +324 -0
  88. package/dist/web/index.html +2 -2
  89. package/dist/web/sw.js +1 -1
  90. package/dist/workflow-defaults/default.workflow.json +45 -5
  91. package/dist/{workspace-YDUQZ3HC.js → workspace-2XODU4YJ.js} +4 -4
  92. package/package.json +7 -6
  93. package/dist/chunk-P5AA7OYJ.js +0 -7
  94. package/dist/http-client-2GDKHZIG.js +0 -11
  95. package/dist/orchestrator-P5EUMC7E.js +0 -57
  96. package/dist/server-7MOOJR2N.js +0 -48
  97. package/dist/web/assets/index-Dukvfqm-.js +0 -323
@@ -0,0 +1,128 @@
1
+ import {
2
+ logger
3
+ } from "./chunk-K44MW7JJ.js";
4
+
5
+ // src/server/shared/item-loader.ts
6
+ import { readdir, readFile, access, writeFile, mkdir, unlink } from "fs/promises";
7
+ import { join } from "path";
8
+ import { constants } from "fs";
9
+ import matter from "gray-matter";
10
+ async function pathExists(path) {
11
+ try {
12
+ await access(path, constants.R_OK);
13
+ return true;
14
+ } catch {
15
+ return false;
16
+ }
17
+ }
18
+ async function getDefaultIds(dir, extension) {
19
+ try {
20
+ const files = (await readdir(dir)).filter((f) => f.endsWith(extension));
21
+ return files.map((f) => f.replace(extension, ""));
22
+ } catch {
23
+ return [];
24
+ }
25
+ }
26
+ async function loadItemsFromDir(dir, options) {
27
+ if (!await pathExists(dir)) {
28
+ return [];
29
+ }
30
+ let files;
31
+ try {
32
+ files = (await readdir(dir)).filter((f) => f.endsWith(options.extension));
33
+ } catch {
34
+ return [];
35
+ }
36
+ const items = [];
37
+ for (const file of files) {
38
+ try {
39
+ const raw = await readFile(join(dir, file), "utf-8");
40
+ const { data, content } = matter(raw);
41
+ if (data.id && content.trim()) {
42
+ items.push({
43
+ metadata: data,
44
+ prompt: content.trim()
45
+ });
46
+ } else {
47
+ logger.warn(`Skipping invalid ${options.logName} file`, { file });
48
+ }
49
+ } catch (err) {
50
+ logger.warn(`Failed to parse ${options.logName} file`, {
51
+ file,
52
+ error: err instanceof Error ? err.message : String(err)
53
+ });
54
+ }
55
+ }
56
+ return items;
57
+ }
58
+ async function findFileByInternalId(dir, id, ext) {
59
+ if (!await pathExists(dir)) return null;
60
+ let files;
61
+ try {
62
+ files = await readdir(dir);
63
+ } catch {
64
+ return null;
65
+ }
66
+ for (const file of files) {
67
+ if (!file.endsWith(ext)) continue;
68
+ try {
69
+ const raw = await readFile(join(dir, file), "utf-8");
70
+ let parsedId;
71
+ if (ext === ".md" || ext === ".mdx") {
72
+ const { data } = matter(raw);
73
+ parsedId = data.id;
74
+ } else {
75
+ const parsed = JSON.parse(raw);
76
+ parsedId = parsed.metadata?.id ?? parsed.id;
77
+ }
78
+ if (parsedId === id) {
79
+ return join(dir, file);
80
+ }
81
+ } catch {
82
+ }
83
+ }
84
+ return null;
85
+ }
86
+ async function saveItemToDir(dir, item, ext, serialize) {
87
+ if (!await pathExists(dir)) {
88
+ await mkdir(dir, { recursive: true });
89
+ }
90
+ const meta = item.metadata;
91
+ const filePath = join(dir, `${meta.id}${ext}`);
92
+ const existing = await findFileByInternalId(dir, meta.id, ext);
93
+ if (existing && existing !== filePath) {
94
+ await unlink(existing).catch(() => {
95
+ });
96
+ }
97
+ await writeFile(filePath, serialize(item), "utf-8");
98
+ }
99
+ var jsonSerializer = (item) => JSON.stringify(item, null, 2) + "\n";
100
+ async function deleteItemFromDir(dir, id, ext) {
101
+ const fastPath = join(dir, `${id}${ext}`);
102
+ try {
103
+ await unlink(fastPath);
104
+ return { success: true };
105
+ } catch {
106
+ const found = await findFileByInternalId(dir, id, ext);
107
+ if (found) {
108
+ try {
109
+ await unlink(found);
110
+ return { success: true };
111
+ } catch {
112
+ return { success: false };
113
+ }
114
+ }
115
+ return { success: false };
116
+ }
117
+ }
118
+
119
+ export {
120
+ pathExists,
121
+ getDefaultIds,
122
+ loadItemsFromDir,
123
+ findFileByInternalId,
124
+ saveItemToDir,
125
+ jsonSerializer,
126
+ deleteItemFromDir
127
+ };
128
+ //# sourceMappingURL=chunk-OSXPQSLW.js.map