@runfusion/fusion 0.74.0-beta.4 → 0.74.0-beta.5
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/bin.js +114 -75
- package/dist/child-process-worker.js +11 -1
- package/dist/client/.vite/manifest.json +244 -244
- package/dist/client/assets/{AgentDetailView-BGXTnuBR.js → AgentDetailView-GYleZQ4I.js} +1 -1
- package/dist/client/assets/{AgentPermissionPolicyEditor-DswM202p.js → AgentPermissionPolicyEditor-pJIXpqOG.js} +1 -1
- package/dist/client/assets/{AgentsView-CEpZDrmC.js → AgentsView-C9uiOLPs.js} +3 -3
- package/dist/client/assets/{ChatView-BXXX0q6G.js → ChatView-B7_4jt9R.js} +1 -1
- package/dist/client/assets/{CommandCenter-CqjN1-9X.js → CommandCenter-gGvdPmZx.js} +1 -1
- package/dist/client/assets/{DevServerView-BUO7JRi6.js → DevServerView-CL7axVX8.js} +1 -1
- package/dist/client/assets/{DirectoryPicker-CiP4h5C7.js → DirectoryPicker-mm9__9xY.js} +1 -1
- package/dist/client/assets/{DocumentsView-DwLD0h2S.js → DocumentsView-DKSB8mQI.js} +1 -1
- package/dist/client/assets/{EvalsView-C9juKffD.js → EvalsView-CtwfGg6y.js} +1 -1
- package/dist/client/assets/{ExperimentalAgentOnboardingModal-DYvw9TEh.js → ExperimentalAgentOnboardingModal-DGjpLPWm.js} +1 -1
- package/dist/client/assets/{GoalsView-BD1AkfVN.js → GoalsView-CUtFV16M.js} +1 -1
- package/dist/client/assets/{InsightsView-Q0mu759R.js → InsightsView-Bt4n-gFZ.js} +1 -1
- package/dist/client/assets/{MemoryView-DCTqPpCG.js → MemoryView-0p84QjWE.js} +1 -1
- package/dist/client/assets/{PiExtensionsManager-CSe_uGfa.js → PiExtensionsManager-CwnPvrvv.js} +1 -1
- package/dist/client/assets/{PluginManager-DPm8YQC0.js → PluginManager-D7scUBUh.js} +1 -1
- package/dist/client/assets/{PullRequestView-BpJgNDLH.js → PullRequestView-op1QyrvF.js} +1 -1
- package/dist/client/assets/{ReportModal-iGmTZqiF.js → ReportModal-Cixa37L8.js} +1 -1
- package/dist/client/assets/{ResearchView-BfgKB-6z.js → ResearchView-48hx_Nnj.js} +1 -1
- package/dist/client/assets/{SecretsView-CqvQLK7z.js → SecretsView-CpIDlLXB.js} +1 -1
- package/dist/client/assets/{SessionTerminal-A9di8GAo.js → SessionTerminal-BlrHptKP.js} +1 -1
- package/dist/client/assets/{SettingsModal-D-iyPGZE.js → SettingsModal-BN4z8V64.js} +1 -1
- package/dist/client/assets/{SettingsModal-BsCUsAXe.js → SettingsModal-CYhXaN9Q.js} +4 -4
- package/dist/client/assets/{SettingsTextareaRow-DwgHxMMY.js → SettingsTextareaRow-DbbwaFZB.js} +1 -1
- package/dist/client/assets/{SetupWizardModal-CrSnLN44.js → SetupWizardModal-sX6F_tuR.js} +2 -2
- package/dist/client/assets/{SkillsView-C_STy7KI.js → SkillsView-BNQIeoyG.js} +1 -1
- package/dist/client/assets/{TodoView-BJJNGNLq.js → TodoView-Bu4UuFO2.js} +1 -1
- package/dist/client/assets/{WorkflowNodeEditor-Jp5i_Vxu.js → WorkflowNodeEditor-BVTqe9-2.js} +3 -3
- package/dist/client/assets/{agent-import-generation-DbVrl8ou.js → agent-import-generation-ChGufJzG.js} +1 -1
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-Ctz8GX1N.js → architectureDiagram-3BPJPVTR-Cl5gNo7p.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-WI_YPphw.js → blockDiagram-GPEHLZMM-B3E7DFJJ.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-BLwS5Zfh.js → c4Diagram-AAUBKEIU-Bj_ZPoFn.js} +1 -1
- package/dist/client/assets/channel-Cm54mhSQ.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-DeXlX12-.js → chunk-2J33WTMH-B0P5K-xu.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-zvCEraJR.js → chunk-4BX2VUAB-CEu45ByZ.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-BgZq96DR.js → chunk-55IACEB6-Cr6VuM7S.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-CayoVGXL.js → chunk-727SXJPM-D3Hy6AmL.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-BmaktpVP.js → chunk-AQP2D5EJ-CuVcS6BO.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-qYWgZPF8.js → chunk-FMBD7UC4-Q_8Erd5R.js} +1 -1
- package/dist/client/assets/{chunk-ND2GUHAM-DIovauCc.js → chunk-ND2GUHAM-fUBj411G.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-DXWnr9LE.js → chunk-QZHKN3VN-CzAtr8Ei.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-BiGEx_wa.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-BiGEx_wa.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-Dee9mTjK.js → cose-bilkent-S5V4N54A-KF3Fhd8n.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-CU-v2zoi.js → dagre-BM42HDAG-DG7Zy0Tp.js} +1 -1
- package/dist/client/assets/{dashboard-view-COary9sK.js → dashboard-view-7fNoNaKi.js} +1 -1
- package/dist/client/assets/{dashboard-view-BM790i02.js → dashboard-view-BWLS6upM.js} +1 -1
- package/dist/client/assets/{dashboard-view-CG4rzThC.js → dashboard-view-Br-VgdfF.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-DIqdnJ5B.js → diagram-2AECGRRQ-5JY32FOH.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-ChpdUlpb.js → diagram-5GNKFQAL-DCAL8s3z.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-BxmzOp-c.js → diagram-KO2AKTUF-C-Gl3KqY.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-DLEx-0rl.js → diagram-LMA3HP47-56_y6YB_.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-DEpkJ3cG.js → diagram-OG6HWLK6-7XM6PUCA.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-C3Rjr78a.js → erDiagram-TEJ5UH35-fkpo67d9.js} +1 -1
- package/dist/client/assets/{flowDiagram-I6XJVG4X-aPbBbeiH.js → flowDiagram-I6XJVG4X-CjkKXpvy.js} +1 -1
- package/dist/client/assets/{folder-open-BnNbfyzc.js → folder-open-B0zT7pjM.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-BEzAwvJ4.js → ganttDiagram-6RSMTGT7-DCxj33Ce.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-Y4hB2swQ.js → gitGraphDiagram-PVQCEYII-D0XYFbBv.js} +1 -1
- package/dist/client/assets/{index-8wtfjIkg.js → index-Ck-7DP8n.js} +293 -293
- package/dist/client/assets/{infoDiagram-5YYISTIA-pd3J7fRT.js → infoDiagram-5YYISTIA-ICfcKKPN.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-B968vfOH.js → ishikawaDiagram-YF4QCWOH-B5fIfqcH.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-V4crhYKX.js → journeyDiagram-JHISSGLW-DurQl3Lk.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-Cl8LxR6k.js → kanban-definition-UN3LZRKU-Dc-aAsvK.js} +1 -1
- package/dist/client/assets/{mermaid.core-rb_bKdHH.js → mermaid.core-ZpeafUdD.js} +4 -4
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-Cnu-LPHz.js → mindmap-definition-RKZ34NQL-qc5mxYep.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-C6hPYepr.js → pieDiagram-4H26LBE5-BeBCrwxa.js} +1 -1
- package/dist/client/assets/{puzzle-C8AvcmuM.js → puzzle-DoN20Wf8.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-CUImgAi-.js → quadrantDiagram-W4KKPZXB-BAOR__9f.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-DzDLxIYz.js → requirementDiagram-4Y6WPE33-xztcPYl8.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-DSr_oIy8.js → sankeyDiagram-5OEKKPKP-BYnQyDFr.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-DO2E98Hv.js → sequenceDiagram-3UESZ5HK-2xXQOg29.js} +1 -1
- package/dist/client/assets/{shield-alert-Byjz1VmT.js → shield-alert-B5s2Ap6u.js} +1 -1
- package/dist/client/assets/{standing-instructions-template-Cf9fZ8bv.js → standing-instructions-template-CWOJ5vao.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-BYPlDS4u.js → stateDiagram-AJRCARHV-BnpAA816.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-Ce_6vh1Q.js → stateDiagram-v2-BHNVJYJU-CRCjYzah.js} +1 -1
- package/dist/client/assets/{timeline-definition-PNZ67QCA-CG1FeaKV.js → timeline-definition-PNZ67QCA-rjWi6Lwp.js} +1 -1
- package/dist/client/assets/{upload-yPsE_DRN.js → upload-BZmWcUph.js} +1 -1
- package/dist/client/assets/{users-C_YmWx9d.js → users-cNoQdJGl.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-JLUXqFyb.js → vennDiagram-CIIHVFJN-Dz0AdEKB.js} +1 -1
- package/dist/client/assets/{wardley-L42UT6IY-D_UBzrZ2.js → wardley-L42UT6IY-Boky1mhD.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-BzwMrdpL.js → wardleyDiagram-YWT4CUSO-C5edajak.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-C5TjbAcZ.js → xychartDiagram-2RQKCTM6-cVjJqGUH.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/version.json +1 -1
- package/dist/extension.js +11 -1
- package/package.json +1 -1
- package/dist/client/assets/channel-CMMrQrQu.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-CqxyehbN.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CqxyehbN.js +0 -1
package/dist/bin.js
CHANGED
|
@@ -18537,9 +18537,16 @@ function isUnplannedSeedPrompt(content, taskId, title2, description) {
|
|
|
18537
18537
|
if (normalized === normalizeSeedText(buildBootstrapPrompt(taskId, title2, description))) return true;
|
|
18538
18538
|
return title2 !== void 0 && normalized === normalizeSeedText(buildRefinementSeedPrompt(title2, description));
|
|
18539
18539
|
}
|
|
18540
|
+
function isTaskAwaitingPlanning(task, promptContent) {
|
|
18541
|
+
if (task.status != null && AWAITING_PLANNING_STATUSES.has(task.status)) return true;
|
|
18542
|
+
if (promptContent === null) return true;
|
|
18543
|
+
return isUnplannedSeedPrompt(promptContent, task.id, task.title, task.description);
|
|
18544
|
+
}
|
|
18545
|
+
var AWAITING_PLANNING_STATUSES;
|
|
18540
18546
|
var init_mesh_task_replication = __esm({
|
|
18541
18547
|
"../core/src/mesh-task-replication.ts"() {
|
|
18542
18548
|
"use strict";
|
|
18549
|
+
AWAITING_PLANNING_STATUSES = /* @__PURE__ */ new Set(["needs-replan"]);
|
|
18543
18550
|
}
|
|
18544
18551
|
});
|
|
18545
18552
|
|
|
@@ -24312,9 +24319,9 @@ async function detectWorkspaceRepos(dir2, runner = runGitCommand, timeout2 = DEF
|
|
|
24312
24319
|
}
|
|
24313
24320
|
async function isWorkspaceModeExplicitlyDisabled(projectPath) {
|
|
24314
24321
|
try {
|
|
24315
|
-
const { readFile:
|
|
24322
|
+
const { readFile: readFile66 } = await import("node:fs/promises");
|
|
24316
24323
|
const { join: join156 } = await import("node:path");
|
|
24317
|
-
const raw = await
|
|
24324
|
+
const raw = await readFile66(join156(projectPath, ".fusion", "config.json"), "utf-8");
|
|
24318
24325
|
const config3 = JSON.parse(raw);
|
|
24319
24326
|
return config3.settings?.workspaceMode === false;
|
|
24320
24327
|
} catch {
|
|
@@ -24322,12 +24329,12 @@ async function isWorkspaceModeExplicitlyDisabled(projectPath) {
|
|
|
24322
24329
|
}
|
|
24323
24330
|
}
|
|
24324
24331
|
async function setWorkspaceModeInConfig(projectPath, value) {
|
|
24325
|
-
const { readFile:
|
|
24332
|
+
const { readFile: readFile66, writeFile: writeFile44, mkdir: mkdir42 } = await import("node:fs/promises");
|
|
24326
24333
|
const { join: join156 } = await import("node:path");
|
|
24327
24334
|
const configPath = join156(projectPath, ".fusion", "config.json");
|
|
24328
24335
|
let config3 = {};
|
|
24329
24336
|
try {
|
|
24330
|
-
config3 = JSON.parse(await
|
|
24337
|
+
config3 = JSON.parse(await readFile66(configPath, "utf-8"));
|
|
24331
24338
|
} catch (err) {
|
|
24332
24339
|
if (err?.code !== "ENOENT") throw err;
|
|
24333
24340
|
}
|
|
@@ -24349,12 +24356,12 @@ function isInRootRelativePath(entry, pathMod) {
|
|
|
24349
24356
|
return true;
|
|
24350
24357
|
}
|
|
24351
24358
|
async function loadWorkspaceConfig(rootDir) {
|
|
24352
|
-
const { readFile:
|
|
24359
|
+
const { readFile: readFile66 } = await import("node:fs/promises");
|
|
24353
24360
|
const pathMod = await import("node:path");
|
|
24354
24361
|
const { join: join156 } = pathMod;
|
|
24355
24362
|
const configPath = join156(rootDir, ".fusion", WORKSPACE_CONFIG_FILENAME);
|
|
24356
24363
|
try {
|
|
24357
|
-
const raw = await
|
|
24364
|
+
const raw = await readFile66(configPath, "utf-8");
|
|
24358
24365
|
const parsed = JSON.parse(raw);
|
|
24359
24366
|
if (parsed !== null && typeof parsed === "object" && "repos" in parsed && Array.isArray(parsed.repos) && parsed.repos.every((r) => typeof r === "string")) {
|
|
24360
24367
|
const rawRepos = parsed.repos;
|
|
@@ -50051,8 +50058,8 @@ var require_CronFileParser = __commonJS({
|
|
|
50051
50058
|
* @throws If file cannot be read
|
|
50052
50059
|
*/
|
|
50053
50060
|
static async parseFile(filePath) {
|
|
50054
|
-
const { readFile:
|
|
50055
|
-
const data = await
|
|
50061
|
+
const { readFile: readFile66 } = await Promise.resolve().then(() => __importStar(__require("fs/promises")));
|
|
50062
|
+
const data = await readFile66(filePath, "utf8");
|
|
50056
50063
|
return _CronFileParser.#parseContent(data);
|
|
50057
50064
|
}
|
|
50058
50065
|
/**
|
|
@@ -131129,6 +131136,7 @@ __export(src_exports, {
|
|
|
131129
131136
|
isSqliteLockError: () => isSqliteLockError,
|
|
131130
131137
|
isSqliteMigrationComplete: () => isSqliteMigrationComplete,
|
|
131131
131138
|
isStaleBlockedByBlocker: () => isStaleBlockedByBlocker,
|
|
131139
|
+
isTaskAwaitingPlanning: () => isTaskAwaitingPlanning,
|
|
131132
131140
|
isTaskBlockedOnApproval: () => isTaskBlockedOnApproval,
|
|
131133
131141
|
isTaskNotFoundError: () => isTaskNotFoundError,
|
|
131134
131142
|
isTaskPriority: () => isTaskPriority,
|
|
@@ -134142,8 +134150,8 @@ var require_graceful_fs = __commonJS({
|
|
|
134142
134150
|
fs11.createReadStream = createReadStream6;
|
|
134143
134151
|
fs11.createWriteStream = createWriteStream2;
|
|
134144
134152
|
var fs$readFile = fs11.readFile;
|
|
134145
|
-
fs11.readFile =
|
|
134146
|
-
function
|
|
134153
|
+
fs11.readFile = readFile66;
|
|
134154
|
+
function readFile66(path14, options, cb) {
|
|
134147
134155
|
if (typeof options === "function")
|
|
134148
134156
|
cb = options, options = null;
|
|
134149
134157
|
return go$readFile(path14, options, cb);
|
|
@@ -214816,7 +214824,7 @@ async function readAttachmentContents(rootDir, taskId, attachments) {
|
|
|
214816
214824
|
if (!attachments || attachments.length === 0) {
|
|
214817
214825
|
return { attachmentContents, imageContents };
|
|
214818
214826
|
}
|
|
214819
|
-
const { readFile:
|
|
214827
|
+
const { readFile: readFile66 } = await import("node:fs/promises");
|
|
214820
214828
|
const { join: join156 } = await import("node:path");
|
|
214821
214829
|
for (const att of attachments) {
|
|
214822
214830
|
const filePath = join156(
|
|
@@ -214829,7 +214837,7 @@ async function readAttachmentContents(rootDir, taskId, attachments) {
|
|
|
214829
214837
|
);
|
|
214830
214838
|
try {
|
|
214831
214839
|
if (IMAGE_MIME_TYPES.has(att.mimeType)) {
|
|
214832
|
-
const data = await
|
|
214840
|
+
const data = await readFile66(filePath);
|
|
214833
214841
|
const detectedMimeType = detectImageMimeFromBytes(data);
|
|
214834
214842
|
const imageMimeType2 = detectedMimeType ?? att.mimeType;
|
|
214835
214843
|
if (detectedMimeType && detectedMimeType !== att.mimeType) {
|
|
@@ -214846,7 +214854,7 @@ async function readAttachmentContents(rootDir, taskId, attachments) {
|
|
|
214846
214854
|
text: null
|
|
214847
214855
|
});
|
|
214848
214856
|
} else {
|
|
214849
|
-
const data = await
|
|
214857
|
+
const data = await readFile66(filePath, "utf-8");
|
|
214850
214858
|
const text3 = data.length > TEXT_INLINE_LIMIT ? data.slice(0, TEXT_INLINE_LIMIT) + "\n... (truncated at 50KB)" : data;
|
|
214851
214859
|
attachmentContents.push({
|
|
214852
214860
|
originalName: att.originalName,
|
|
@@ -215667,6 +215675,8 @@ var init_triage = __esm({
|
|
|
215667
215675
|
this.activeSessions.delete(taskId);
|
|
215668
215676
|
this.stuckAborted.delete(taskId);
|
|
215669
215677
|
this.finalizing.delete(taskId);
|
|
215678
|
+
this.coordinatorAdmittedTaskIds.delete(taskId);
|
|
215679
|
+
dropPreHeldExecutorSlot(taskId, this.options.semaphore);
|
|
215670
215680
|
evicted.add(taskId);
|
|
215671
215681
|
}
|
|
215672
215682
|
return evicted;
|
|
@@ -215904,7 +215914,7 @@ var init_triage = __esm({
|
|
|
215904
215914
|
try {
|
|
215905
215915
|
const promptPath = join75(this.rootDir, ".fusion", "tasks", todoTask.id, "PROMPT.md");
|
|
215906
215916
|
const content = await readFile38(promptPath, "utf-8");
|
|
215907
|
-
if (
|
|
215917
|
+
if (isTaskAwaitingPlanning(todoTask, content)) {
|
|
215908
215918
|
eligibleTodoTasks.push(todoTask);
|
|
215909
215919
|
}
|
|
215910
215920
|
} catch (err) {
|
|
@@ -246206,7 +246216,7 @@ async function readOptionalTextFile(filePath) {
|
|
|
246206
246216
|
}
|
|
246207
246217
|
async function discoverMcpServers(opts) {
|
|
246208
246218
|
const homeDir = opts.homeDir ?? process.env.HOME ?? process.env.USERPROFILE ?? osHomedir();
|
|
246209
|
-
const
|
|
246219
|
+
const readFile66 = opts.readFile ?? readOptionalTextFile;
|
|
246210
246220
|
const sources = getMcpDiscoverySources({
|
|
246211
246221
|
homeDir,
|
|
246212
246222
|
platform: osPlatform(),
|
|
@@ -246217,7 +246227,7 @@ async function discoverMcpServers(opts) {
|
|
|
246217
246227
|
for (const source of sources) {
|
|
246218
246228
|
let contents;
|
|
246219
246229
|
try {
|
|
246220
|
-
contents = await
|
|
246230
|
+
contents = await readFile66(source.path);
|
|
246221
246231
|
} catch (error3) {
|
|
246222
246232
|
errors.push(`${source.label}: ${error3 instanceof Error ? error3.message : String(error3)}`);
|
|
246223
246233
|
continue;
|
|
@@ -290106,7 +290116,7 @@ var init_auth_middleware = __esm({
|
|
|
290106
290116
|
|
|
290107
290117
|
// ../dashboard/src/routes/register-task-workflow-routes.ts
|
|
290108
290118
|
import { createReadStream } from "node:fs";
|
|
290109
|
-
import { stat as stat11 } from "node:fs/promises";
|
|
290119
|
+
import { readFile as readFile46, stat as stat11 } from "node:fs/promises";
|
|
290110
290120
|
import { join as join92 } from "node:path";
|
|
290111
290121
|
async function clearRebuiltSpecWorkflowPins(store, taskId) {
|
|
290112
290122
|
const maybeStore = store;
|
|
@@ -290706,6 +290716,34 @@ function registerTaskWorkflowRoutes(ctx, deps) {
|
|
|
290706
290716
|
}
|
|
290707
290717
|
} catch {
|
|
290708
290718
|
}
|
|
290719
|
+
try {
|
|
290720
|
+
const todoRows = tasks2.filter((task) => task.column === "todo");
|
|
290721
|
+
const enrichable = todoRows.slice(0, AWAITING_PLANNING_ENRICH_LIMIT);
|
|
290722
|
+
if (todoRows.length > enrichable.length) {
|
|
290723
|
+
severityAuditLog33.warn(
|
|
290724
|
+
`awaitingPlanning enrichment truncated: ${enrichable.length}/${todoRows.length} todo tasks annotated (remaining cards fall back to the client step-count heuristic)`
|
|
290725
|
+
);
|
|
290726
|
+
}
|
|
290727
|
+
if (enrichable.length > 0) {
|
|
290728
|
+
const flagByTask = /* @__PURE__ */ new Map();
|
|
290729
|
+
await Promise.all(enrichable.map(async (task) => {
|
|
290730
|
+
let promptContent = null;
|
|
290731
|
+
try {
|
|
290732
|
+
promptContent = await readFile46(join92(scopedStore.getTaskDir(task.id), "PROMPT.md"), "utf-8");
|
|
290733
|
+
} catch (err) {
|
|
290734
|
+
if (err?.code !== "ENOENT") return;
|
|
290735
|
+
}
|
|
290736
|
+
flagByTask.set(task.id, isTaskAwaitingPlanning(task, promptContent));
|
|
290737
|
+
}));
|
|
290738
|
+
if (flagByTask.size > 0) {
|
|
290739
|
+
tasks2 = tasks2.map((task) => {
|
|
290740
|
+
const awaitingPlanning = flagByTask.get(task.id);
|
|
290741
|
+
return awaitingPlanning === void 0 ? task : { ...task, awaitingPlanning };
|
|
290742
|
+
});
|
|
290743
|
+
}
|
|
290744
|
+
}
|
|
290745
|
+
} catch {
|
|
290746
|
+
}
|
|
290709
290747
|
res.json(tasks2);
|
|
290710
290748
|
} catch (err) {
|
|
290711
290749
|
if (err instanceof ApiError) {
|
|
@@ -292521,10 +292559,10 @@ See \`GET /api/tasks/${task.id}/diff\` for the landed diff being reverted.
|
|
|
292521
292559
|
await scopedStore.logEntry(task.id, "Plan approved by user");
|
|
292522
292560
|
let approvedPlanFingerprint;
|
|
292523
292561
|
try {
|
|
292524
|
-
const { readFile:
|
|
292562
|
+
const { readFile: readFile66 } = await import("node:fs/promises");
|
|
292525
292563
|
const { join: join156 } = await import("node:path");
|
|
292526
292564
|
const promptPath = join156(scopedStore.getRootDir(), ".fusion", "tasks", task.id, "PROMPT.md");
|
|
292527
|
-
const promptText2 = await
|
|
292565
|
+
const promptText2 = await readFile66(promptPath, "utf8");
|
|
292528
292566
|
approvedPlanFingerprint = computePlanApprovalFingerprint(promptText2);
|
|
292529
292567
|
} catch {
|
|
292530
292568
|
}
|
|
@@ -294240,7 +294278,7 @@ See \`GET /api/tasks/${task.id}/diff\` for the landed diff being reverted.
|
|
|
294240
294278
|
}
|
|
294241
294279
|
});
|
|
294242
294280
|
}
|
|
294243
|
-
var severityAuditLog33, REVIEW_BLOCK_RE, REVIEW_VERDICT_RE, REVIEW_STEP_RE, DUPLICATE_STOPWORDS, ARTIFACT_TYPES, ADDRESS_PR_FEEDBACK_PROMPT, __fingerprintCreateLocksForTests, RESET_TASK_FIELDS, RESET_DRIFT_CORRECTION_FIELDS;
|
|
294281
|
+
var severityAuditLog33, AWAITING_PLANNING_ENRICH_LIMIT, REVIEW_BLOCK_RE, REVIEW_VERDICT_RE, REVIEW_STEP_RE, DUPLICATE_STOPWORDS, ARTIFACT_TYPES, ADDRESS_PR_FEEDBACK_PROMPT, __fingerprintCreateLocksForTests, RESET_TASK_FIELDS, RESET_DRIFT_CORRECTION_FIELDS;
|
|
294244
294282
|
var init_register_task_workflow_routes = __esm({
|
|
294245
294283
|
"../dashboard/src/routes/register-task-workflow-routes.ts"() {
|
|
294246
294284
|
"use strict";
|
|
@@ -294262,6 +294300,7 @@ var init_register_task_workflow_routes = __esm({
|
|
|
294262
294300
|
init_branch_selection();
|
|
294263
294301
|
init_auth_middleware();
|
|
294264
294302
|
severityAuditLog33 = createLogger("dashboard-register-task-workflow-routes");
|
|
294303
|
+
AWAITING_PLANNING_ENRICH_LIMIT = 200;
|
|
294265
294304
|
REVIEW_BLOCK_RE = /##\s+(Code|Plan)\s+Review:[\s\S]*?(?=\n##\s+(?:Code|Plan)\s+Review:|$)/gi;
|
|
294266
294305
|
REVIEW_VERDICT_RE = /###\s+Verdict:\s*(APPROVE|REVISE|RETHINK|UNAVAILABLE)\b/i;
|
|
294267
294306
|
REVIEW_STEP_RE = /^(plan|code) review Step (\d+): (APPROVE|REVISE|RETHINK|UNAVAILABLE)\b/i;
|
|
@@ -296543,7 +296582,7 @@ var init_chat_attachment_config = __esm({
|
|
|
296543
296582
|
});
|
|
296544
296583
|
|
|
296545
296584
|
// ../dashboard/src/chat-attachment-content.ts
|
|
296546
|
-
import { readFile as
|
|
296585
|
+
import { readFile as readFile47 } from "node:fs/promises";
|
|
296547
296586
|
import { basename as basename22, resolve as resolve46 } from "node:path";
|
|
296548
296587
|
function getAttachmentDirectory(rootDir, scope) {
|
|
296549
296588
|
if (scope.kind === "session") {
|
|
@@ -296589,7 +296628,7 @@ async function readChatAttachmentContents(rootDir, scope, attachments, diagnosti
|
|
|
296589
296628
|
const filePath = resolve46(attachmentDir, safeName);
|
|
296590
296629
|
try {
|
|
296591
296630
|
if (IMAGE_MIME_TYPES2.has(attachment.mimeType)) {
|
|
296592
|
-
const data2 = await
|
|
296631
|
+
const data2 = await readFile47(filePath);
|
|
296593
296632
|
const detectedMimeType = detectImageMimeFromBytes(data2);
|
|
296594
296633
|
const imageMimeType2 = detectedMimeType ?? attachment.mimeType;
|
|
296595
296634
|
if (detectedMimeType && detectedMimeType !== attachment.mimeType) {
|
|
@@ -296613,7 +296652,7 @@ async function readChatAttachmentContents(rootDir, scope, attachments, diagnosti
|
|
|
296613
296652
|
diagnostics9?.warn(`Skipping non-inlineable chat attachment '${attachment.filename}' (${attachment.mimeType}) for ${getScopeLabel(scope)}`);
|
|
296614
296653
|
continue;
|
|
296615
296654
|
}
|
|
296616
|
-
const data = await
|
|
296655
|
+
const data = await readFile47(filePath, "utf-8");
|
|
296617
296656
|
const text3 = data.length > CHAT_TEXT_INLINE_LIMIT ? `${data.slice(0, CHAT_TEXT_INLINE_LIMIT)}${TRUNCATION_SUFFIX}` : data;
|
|
296618
296657
|
attachmentContents.push({
|
|
296619
296658
|
originalName: attachment.originalName,
|
|
@@ -309562,7 +309601,7 @@ async function listFiles2(store, taskId, subPath) {
|
|
|
309562
309601
|
const taskBase = await getTaskBasePath(store, taskId);
|
|
309563
309602
|
return listFilesForBasePath(taskBase, subPath);
|
|
309564
309603
|
}
|
|
309565
|
-
async function
|
|
309604
|
+
async function readFile48(store, taskId, filePath) {
|
|
309566
309605
|
const taskBase = await getTaskBasePath(store, taskId);
|
|
309567
309606
|
return readFileForBasePath(taskBase, filePath);
|
|
309568
309607
|
}
|
|
@@ -334953,7 +334992,7 @@ function registerFileWorkspaceRoutes(ctx) {
|
|
|
334953
334992
|
try {
|
|
334954
334993
|
const { store: scopedStore } = await getProjectContext2(req);
|
|
334955
334994
|
const filePath = Array.isArray(req.params.filepath) ? req.params.filepath[0] : req.params.filepath ?? "";
|
|
334956
|
-
const result2 = await
|
|
334995
|
+
const result2 = await readFile48(scopedStore, req.params.id, filePath);
|
|
334957
334996
|
res.json(result2);
|
|
334958
334997
|
} catch (err) {
|
|
334959
334998
|
if (err instanceof ApiError) {
|
|
@@ -336690,7 +336729,7 @@ var init_exec_file = __esm({
|
|
|
336690
336729
|
|
|
336691
336730
|
// ../dashboard/src/lib/codebase-metrics.ts
|
|
336692
336731
|
import { spawn as spawn12 } from "node:child_process";
|
|
336693
|
-
import { lstat as lstat2, readdir as readdir11, readFile as
|
|
336732
|
+
import { lstat as lstat2, readdir as readdir11, readFile as readFile49, realpath as realpath2 } from "node:fs/promises";
|
|
336694
336733
|
import { basename as basename27, resolve as resolve53, sep as sep14 } from "node:path";
|
|
336695
336734
|
function countPreTokenPieces(text3) {
|
|
336696
336735
|
let pieces = 0;
|
|
@@ -336840,7 +336879,7 @@ async function computeCodebaseMetrics(rootDir, options = {}) {
|
|
|
336840
336879
|
truncated = true;
|
|
336841
336880
|
break;
|
|
336842
336881
|
}
|
|
336843
|
-
const contents = await
|
|
336882
|
+
const contents = await readFile49(candidate);
|
|
336844
336883
|
if (isBinary(contents)) continue;
|
|
336845
336884
|
sourceByteCount += contents.length;
|
|
336846
336885
|
sourceFileCount++;
|
|
@@ -344667,7 +344706,7 @@ var init_register_secrets_sync_inbound_routes = __esm({
|
|
|
344667
344706
|
});
|
|
344668
344707
|
|
|
344669
344708
|
// ../dashboard/src/routes/register-agent-core-routes.ts
|
|
344670
|
-
import { mkdir as mkdir35, readdir as readdir13, readFile as
|
|
344709
|
+
import { mkdir as mkdir35, readdir as readdir13, readFile as readFile50, rm as rm19, writeFile as writeFile36 } from "node:fs/promises";
|
|
344671
344710
|
import path8 from "node:path";
|
|
344672
344711
|
function parsePermissionsInput(input) {
|
|
344673
344712
|
if (typeof input !== "object" || input === null || Array.isArray(input)) {
|
|
@@ -345102,7 +345141,7 @@ function registerAgentCoreRoutes(ctx, deps) {
|
|
|
345102
345141
|
if (!mimeType) {
|
|
345103
345142
|
throw notFound("Avatar not found");
|
|
345104
345143
|
}
|
|
345105
|
-
const fileBuffer = await
|
|
345144
|
+
const fileBuffer = await readFile50(path8.join(agentDir, avatarFile));
|
|
345106
345145
|
res.setHeader("Content-Type", mimeType);
|
|
345107
345146
|
res.setHeader("Cache-Control", "public, max-age=3600");
|
|
345108
345147
|
res.send(fileBuffer);
|
|
@@ -350184,7 +350223,7 @@ var init_src8 = __esm({
|
|
|
350184
350223
|
// ../../plugins/fusion-plugin-openclaw-runtime/src/pi-module.ts
|
|
350185
350224
|
import { spawn as spawn15 } from "node:child_process";
|
|
350186
350225
|
import { randomUUID as randomUUID60 } from "node:crypto";
|
|
350187
|
-
import { readFile as
|
|
350226
|
+
import { readFile as readFile51 } from "node:fs/promises";
|
|
350188
350227
|
function asString2(v2) {
|
|
350189
350228
|
return typeof v2 === "string" && v2.trim() !== "" ? v2.trim() : void 0;
|
|
350190
350229
|
}
|
|
@@ -350255,7 +350294,7 @@ function createCliSession(opts) {
|
|
|
350255
350294
|
};
|
|
350256
350295
|
}
|
|
350257
350296
|
async function configureOpenClawMcpServer(opts) {
|
|
350258
|
-
const serverValue = await
|
|
350297
|
+
const serverValue = await readFile51(opts.serverConfigPath, "utf-8");
|
|
350259
350298
|
await new Promise((resolve103, reject2) => {
|
|
350260
350299
|
const child = spawn15(opts.binaryPath, ["--no-color", "--profile", opts.profile, "mcp", "set", opts.serverName, serverValue], {
|
|
350261
350300
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -352769,7 +352808,7 @@ var init_cli_spawn3 = __esm({
|
|
|
352769
352808
|
});
|
|
352770
352809
|
|
|
352771
352810
|
// ../../plugins/fusion-plugin-grok-runtime/src/probe.ts
|
|
352772
|
-
import { readFile as
|
|
352811
|
+
import { readFile as readFile52 } from "node:fs/promises";
|
|
352773
352812
|
import { homedir as homedir15 } from "node:os";
|
|
352774
352813
|
import { join as join103 } from "node:path";
|
|
352775
352814
|
function buildCandidates2(binaryPath) {
|
|
@@ -352791,7 +352830,7 @@ async function probeGrokApiKeyPresence() {
|
|
|
352791
352830
|
const settingsPath = join103(homedir15(), ".grok", "user-settings.json");
|
|
352792
352831
|
let raw;
|
|
352793
352832
|
try {
|
|
352794
|
-
raw = await
|
|
352833
|
+
raw = await readFile52(settingsPath, "utf-8");
|
|
352795
352834
|
} catch {
|
|
352796
352835
|
return { detected: false, reason: "No Grok API key detected by Fusion (GROK_API_KEY unset, ~/.grok/user-settings.json not found); the CLI will use its own credentials." };
|
|
352797
352836
|
}
|
|
@@ -360839,7 +360878,7 @@ var init_hermes_model_cache = __esm({
|
|
|
360839
360878
|
});
|
|
360840
360879
|
|
|
360841
360880
|
// ../dashboard/src/routes/register-model-routes.ts
|
|
360842
|
-
import { access as access19, readFile as
|
|
360881
|
+
import { access as access19, readFile as readFile53 } from "node:fs/promises";
|
|
360843
360882
|
import { homedir as homedir16 } from "node:os";
|
|
360844
360883
|
import { join as join116 } from "node:path";
|
|
360845
360884
|
function isRawAnthropicApiKeyCredential(credential) {
|
|
@@ -360889,7 +360928,7 @@ async function getConfiguredProviderNames(authStorage) {
|
|
|
360889
360928
|
for (const authPath of authPaths) {
|
|
360890
360929
|
try {
|
|
360891
360930
|
await access19(authPath);
|
|
360892
|
-
const parsed = JSON.parse(await
|
|
360931
|
+
const parsed = JSON.parse(await readFile53(authPath, "utf-8"));
|
|
360893
360932
|
for (const [key, credential] of Object.entries(parsed)) {
|
|
360894
360933
|
if (key === ANTHROPIC_SUBSCRIPTION_PROVIDER_ID4) {
|
|
360895
360934
|
providers.add(ANTHROPIC_PROVIDER_ID3);
|
|
@@ -360918,7 +360957,7 @@ async function getConfiguredProviderNames(authStorage) {
|
|
|
360918
360957
|
for (const modelsPath of modelsPaths) {
|
|
360919
360958
|
try {
|
|
360920
360959
|
await access19(modelsPath);
|
|
360921
|
-
const parsed = JSON.parse(await
|
|
360960
|
+
const parsed = JSON.parse(await readFile53(modelsPath, "utf-8"));
|
|
360922
360961
|
const provs = parsed?.providers;
|
|
360923
360962
|
if (provs) {
|
|
360924
360963
|
for (const [providerId, config3] of Object.entries(provs)) {
|
|
@@ -361668,7 +361707,7 @@ var init_register_custom_provider_routes = __esm({
|
|
|
361668
361707
|
// ../dashboard/src/usage.ts
|
|
361669
361708
|
import * as os11 from "node:os";
|
|
361670
361709
|
import * as path13 from "node:path";
|
|
361671
|
-
import { readFile as
|
|
361710
|
+
import { readFile as readFile54 } from "node:fs/promises";
|
|
361672
361711
|
import * as https from "node:https";
|
|
361673
361712
|
import * as child_process from "node:child_process";
|
|
361674
361713
|
function getHomeDir6() {
|
|
@@ -361789,7 +361828,7 @@ function decodeJwtPayload(token) {
|
|
|
361789
361828
|
}
|
|
361790
361829
|
async function readAuthKeyFromFile(authPath, provider) {
|
|
361791
361830
|
try {
|
|
361792
|
-
const auth2 = JSON.parse(await
|
|
361831
|
+
const auth2 = JSON.parse(await readFile54(authPath, "utf-8"));
|
|
361793
361832
|
const entry = auth2?.[provider];
|
|
361794
361833
|
if (entry && (entry.type === "api_key" || entry.type === "key") && entry.key) {
|
|
361795
361834
|
return entry.key;
|
|
@@ -362207,7 +362246,7 @@ async function fetchClaudeUsage(authStorage) {
|
|
|
362207
362246
|
];
|
|
362208
362247
|
for (const p2 of credPaths) {
|
|
362209
362248
|
try {
|
|
362210
|
-
creds = JSON.parse(await
|
|
362249
|
+
creds = JSON.parse(await readFile54(p2, "utf-8"));
|
|
362211
362250
|
break;
|
|
362212
362251
|
} catch {
|
|
362213
362252
|
}
|
|
@@ -362400,7 +362439,7 @@ async function loadCodexCredential() {
|
|
|
362400
362439
|
const authPath = path13.join(codexHome, "auth.json");
|
|
362401
362440
|
let auth2 = null;
|
|
362402
362441
|
try {
|
|
362403
|
-
auth2 = JSON.parse(await
|
|
362442
|
+
auth2 = JSON.parse(await readFile54(authPath, "utf-8"));
|
|
362404
362443
|
} catch {
|
|
362405
362444
|
auth2 = null;
|
|
362406
362445
|
}
|
|
@@ -362520,7 +362559,7 @@ async function fetchGeminiUsage() {
|
|
|
362520
362559
|
const oauthPath = path13.join(getHomeDir6(), ".gemini", "oauth_creds.json");
|
|
362521
362560
|
let oauthCreds = null;
|
|
362522
362561
|
try {
|
|
362523
|
-
oauthCreds = JSON.parse(await
|
|
362562
|
+
oauthCreds = JSON.parse(await readFile54(oauthPath, "utf-8"));
|
|
362524
362563
|
} catch {
|
|
362525
362564
|
usage.error = "No Gemini credentials \u2014 run 'gemini' to login";
|
|
362526
362565
|
return usage;
|
|
@@ -362535,7 +362574,7 @@ async function fetchGeminiUsage() {
|
|
|
362535
362574
|
}
|
|
362536
362575
|
const settingsPath = path13.join(getHomeDir6(), ".gemini", "settings.json");
|
|
362537
362576
|
try {
|
|
362538
|
-
const settings = JSON.parse(await
|
|
362577
|
+
const settings = JSON.parse(await readFile54(settingsPath, "utf-8"));
|
|
362539
362578
|
const authType = settings?.security?.auth?.selectedType;
|
|
362540
362579
|
if (authType === "api-key" || authType === "vertex-ai") {
|
|
362541
362580
|
usage.status = "no-auth";
|
|
@@ -362723,7 +362762,7 @@ async function fetchMinimaxUsage(authStorage) {
|
|
|
362723
362762
|
async function readGrokUserSettingsApiKey2() {
|
|
362724
362763
|
try {
|
|
362725
362764
|
const settingsPath = path13.join(getHomeDir6(), ".grok", "user-settings.json");
|
|
362726
|
-
const raw = await
|
|
362765
|
+
const raw = await readFile54(settingsPath, "utf-8");
|
|
362727
362766
|
const parsed = JSON.parse(raw);
|
|
362728
362767
|
return typeof parsed?.apiKey === "string" && parsed.apiKey.trim().length > 0 ? parsed.apiKey.trim() : null;
|
|
362729
362768
|
} catch {
|
|
@@ -362732,7 +362771,7 @@ async function readGrokUserSettingsApiKey2() {
|
|
|
362732
362771
|
}
|
|
362733
362772
|
async function readGrokCliOidcToken() {
|
|
362734
362773
|
try {
|
|
362735
|
-
const raw = await
|
|
362774
|
+
const raw = await readFile54(path13.join(getHomeDir6(), ".grok", "auth.json"), "utf-8");
|
|
362736
362775
|
const parsed = JSON.parse(raw);
|
|
362737
362776
|
for (const entry of Object.values(parsed)) {
|
|
362738
362777
|
if (entry && typeof entry.key === "string" && entry.key.trim().length > 0) {
|
|
@@ -365859,11 +365898,11 @@ var init_droid_cli_probe = __esm({
|
|
|
365859
365898
|
});
|
|
365860
365899
|
|
|
365861
365900
|
// ../dashboard/src/llama-cpp-probe.ts
|
|
365862
|
-
import { readFile as
|
|
365901
|
+
import { readFile as readFile55 } from "node:fs/promises";
|
|
365863
365902
|
import { join as join118 } from "node:path";
|
|
365864
365903
|
async function readJson(path14) {
|
|
365865
365904
|
try {
|
|
365866
|
-
const raw = await
|
|
365905
|
+
const raw = await readFile55(path14, "utf-8");
|
|
365867
365906
|
return JSON.parse(raw);
|
|
365868
365907
|
} catch {
|
|
365869
365908
|
return null;
|
|
@@ -367997,7 +368036,7 @@ var init_types6 = __esm({
|
|
|
367997
368036
|
|
|
367998
368037
|
// ../dashboard/src/stt/model-manager.ts
|
|
367999
368038
|
import { createHash as createHash27, randomUUID as randomUUID67 } from "node:crypto";
|
|
368000
|
-
import { mkdir as mkdir38, open as open4, readFile as
|
|
368039
|
+
import { mkdir as mkdir38, open as open4, readFile as readFile56, readdir as readdir14, rename as rename10, rm as rm22, stat as stat16, writeFile as writeFile38 } from "node:fs/promises";
|
|
368001
368040
|
import { join as join121, relative as relative22, resolve as resolve67, sep as sep18 } from "node:path";
|
|
368002
368041
|
function parseSafeTarListing(listing) {
|
|
368003
368042
|
for (const line2 of listing.split("\n").filter(Boolean)) {
|
|
@@ -368206,7 +368245,7 @@ function createVoiceModelManager(options = {}) {
|
|
|
368206
368245
|
publish(absent);
|
|
368207
368246
|
return absent;
|
|
368208
368247
|
}
|
|
368209
|
-
const manifest = JSON.parse(await
|
|
368248
|
+
const manifest = JSON.parse(await readFile56(join121(finalDir(), "manifest.json"), "utf8"));
|
|
368210
368249
|
if (manifest.sha256 !== asset.sha256) throw new Error("stale manifest digest");
|
|
368211
368250
|
for (const expected of asset.expectedFiles) if (!await existsFile(join121(finalDir(), expected))) throw new Error("missing expected model file");
|
|
368212
368251
|
const installed = { status: "installed", checksumVerified: true, installedPath: finalDir() };
|
|
@@ -374432,11 +374471,11 @@ var init_roadmap_routes3 = __esm({
|
|
|
374432
374471
|
});
|
|
374433
374472
|
|
|
374434
374473
|
// ../dashboard/src/dev-server-detect.ts
|
|
374435
|
-
import { glob, readFile as
|
|
374474
|
+
import { glob, readFile as readFile57 } from "node:fs/promises";
|
|
374436
374475
|
import { dirname as dirname55, join as join124, relative as relative23, resolve as resolve69 } from "node:path";
|
|
374437
374476
|
async function readPackageJson(filePath) {
|
|
374438
374477
|
try {
|
|
374439
|
-
const raw = await
|
|
374478
|
+
const raw = await readFile57(filePath, "utf-8");
|
|
374440
374479
|
return JSON.parse(raw);
|
|
374441
374480
|
} catch {
|
|
374442
374481
|
return null;
|
|
@@ -374476,7 +374515,7 @@ function scoreCandidate(scriptName, pkg) {
|
|
|
374476
374515
|
async function collectWorkspacePackageJsons(projectRoot) {
|
|
374477
374516
|
const discovered = /* @__PURE__ */ new Set();
|
|
374478
374517
|
try {
|
|
374479
|
-
await
|
|
374518
|
+
await readFile57(join124(projectRoot, "pnpm-workspace.yaml"), "utf-8");
|
|
374480
374519
|
} catch {
|
|
374481
374520
|
}
|
|
374482
374521
|
for (const pattern of ["packages/*/package.json", "apps/*/package.json"]) {
|
|
@@ -374576,7 +374615,7 @@ var init_dev_server_detect = __esm({
|
|
|
374576
374615
|
});
|
|
374577
374616
|
|
|
374578
374617
|
// ../dashboard/src/dev-server-store.ts
|
|
374579
|
-
import { mkdir as mkdir39, readFile as
|
|
374618
|
+
import { mkdir as mkdir39, readFile as readFile58, writeFile as writeFile39 } from "node:fs/promises";
|
|
374580
374619
|
import { dirname as dirname56, join as join125, resolve as resolve70 } from "node:path";
|
|
374581
374620
|
function devServerFilePath(projectDir) {
|
|
374582
374621
|
return join125(resolve70(projectDir), ".fusion", "dev-server.json");
|
|
@@ -374654,7 +374693,7 @@ var init_dev_server_store = __esm({
|
|
|
374654
374693
|
}
|
|
374655
374694
|
async load() {
|
|
374656
374695
|
try {
|
|
374657
|
-
const content = await
|
|
374696
|
+
const content = await readFile58(this.filePath, "utf-8");
|
|
374658
374697
|
const parsed = JSON.parse(content);
|
|
374659
374698
|
this.state = normalizeState(parsed?.state);
|
|
374660
374699
|
this.config = normalizeConfig(parsed?.config);
|
|
@@ -382517,7 +382556,7 @@ var init_server2 = __esm({
|
|
|
382517
382556
|
});
|
|
382518
382557
|
|
|
382519
382558
|
// ../dashboard/src/skills-adapter.ts
|
|
382520
|
-
import { access as access20, readFile as
|
|
382559
|
+
import { access as access20, readFile as readFile59, writeFile as writeFile40, mkdir as mkdir40, readdir as readdir15, stat as stat17 } from "node:fs/promises";
|
|
382521
382560
|
import { join as join129, relative as relative24, dirname as dirname58, resolve as resolve73, sep as sep21 } from "node:path";
|
|
382522
382561
|
async function pathExists3(path14) {
|
|
382523
382562
|
try {
|
|
@@ -382568,7 +382607,7 @@ function createSkillsAdapter(options) {
|
|
|
382568
382607
|
let settings = {};
|
|
382569
382608
|
if (await pathExists3(settingsPath)) {
|
|
382570
382609
|
try {
|
|
382571
|
-
settings = JSON.parse(await
|
|
382610
|
+
settings = JSON.parse(await readFile59(settingsPath, "utf-8"));
|
|
382572
382611
|
} catch {
|
|
382573
382612
|
}
|
|
382574
382613
|
}
|
|
@@ -382648,7 +382687,7 @@ function createSkillsAdapter(options) {
|
|
|
382648
382687
|
let settings = {};
|
|
382649
382688
|
if (await pathExists3(settingsPath)) {
|
|
382650
382689
|
try {
|
|
382651
|
-
settings = JSON.parse(await
|
|
382690
|
+
settings = JSON.parse(await readFile59(settingsPath, "utf-8"));
|
|
382652
382691
|
} catch {
|
|
382653
382692
|
}
|
|
382654
382693
|
}
|
|
@@ -382851,7 +382890,7 @@ function createSkillsAdapter(options) {
|
|
|
382851
382890
|
const skillMdPath = join129(skillDir, "SKILL.md");
|
|
382852
382891
|
let skillMd = "";
|
|
382853
382892
|
try {
|
|
382854
|
-
skillMd = await
|
|
382893
|
+
skillMd = await readFile59(skillMdPath, "utf-8");
|
|
382855
382894
|
} catch (error3) {
|
|
382856
382895
|
const err = error3;
|
|
382857
382896
|
if (err.code !== "ENOENT") {
|
|
@@ -382911,7 +382950,7 @@ function createSkillsAdapter(options) {
|
|
|
382911
382950
|
if (fileStat.size > MAX_PREVIEW_BYTES) {
|
|
382912
382951
|
return { name: name2, relativePath: normalizedRelative, content: "", isText: false };
|
|
382913
382952
|
}
|
|
382914
|
-
const buffer2 = await
|
|
382953
|
+
const buffer2 = await readFile59(targetPath);
|
|
382915
382954
|
const sample = buffer2.subarray(0, Math.min(buffer2.length, 8e3));
|
|
382916
382955
|
const isBinary2 = sample.includes(0);
|
|
382917
382956
|
if (isBinary2) {
|
|
@@ -399354,7 +399393,7 @@ async function runTaskCreate(descriptionArg, attachFiles, depends, projectName,
|
|
|
399354
399393
|
}
|
|
399355
399394
|
console.log(` Path: .fusion/tasks/${resolvedTask.id}/`);
|
|
399356
399395
|
if (attachFiles && attachFiles.length > 0) {
|
|
399357
|
-
const { readFile:
|
|
399396
|
+
const { readFile: readFile66 } = await import("node:fs/promises");
|
|
399358
399397
|
const { basename: basename46, extname: extname7, resolve: resolve103 } = await import("node:path");
|
|
399359
399398
|
for (const filePath of attachFiles) {
|
|
399360
399399
|
const resolvedPath = resolve103(filePath);
|
|
@@ -399367,7 +399406,7 @@ async function runTaskCreate(descriptionArg, attachFiles, depends, projectName,
|
|
|
399367
399406
|
}
|
|
399368
399407
|
let content;
|
|
399369
399408
|
try {
|
|
399370
|
-
content = await
|
|
399409
|
+
content = await readFile66(resolvedPath);
|
|
399371
399410
|
} catch {
|
|
399372
399411
|
console.error(` \u2717 Cannot read file: ${filePath}`);
|
|
399373
399412
|
continue;
|
|
@@ -399743,7 +399782,7 @@ async function runTaskMerge(id, projectName) {
|
|
|
399743
399782
|
}
|
|
399744
399783
|
}
|
|
399745
399784
|
async function runTaskAttach(id, filePath, projectName) {
|
|
399746
|
-
const { readFile:
|
|
399785
|
+
const { readFile: readFile66 } = await import("node:fs/promises");
|
|
399747
399786
|
const { basename: basename46, extname: extname7 } = await import("node:path");
|
|
399748
399787
|
const { resolve: resolve103 } = await import("node:path");
|
|
399749
399788
|
const resolvedPath = resolve103(filePath);
|
|
@@ -399757,7 +399796,7 @@ async function runTaskAttach(id, filePath, projectName) {
|
|
|
399757
399796
|
}
|
|
399758
399797
|
let content;
|
|
399759
399798
|
try {
|
|
399760
|
-
content = await
|
|
399799
|
+
content = await readFile66(resolvedPath);
|
|
399761
399800
|
} catch {
|
|
399762
399801
|
console.error(`Cannot read file: ${filePath}`);
|
|
399763
399802
|
process.exit(1);
|
|
@@ -401336,7 +401375,7 @@ __export(mcp_exports, {
|
|
|
401336
401375
|
runMcpValidate: () => runMcpValidate
|
|
401337
401376
|
});
|
|
401338
401377
|
import { existsSync as existsSync102 } from "node:fs";
|
|
401339
|
-
import { readFile as
|
|
401378
|
+
import { readFile as readFile60, writeFile as writeFile42 } from "node:fs/promises";
|
|
401340
401379
|
import { resolve as resolve85 } from "node:path";
|
|
401341
401380
|
async function createGlobalSettingsStore() {
|
|
401342
401381
|
const store = new GlobalSettingsStore();
|
|
@@ -401674,7 +401713,7 @@ async function runMcpImport(filePath, opts = {}) {
|
|
|
401674
401713
|
context = await loadContext(opts.projectName, scope === "project");
|
|
401675
401714
|
const resolvedPath = resolve85(filePath);
|
|
401676
401715
|
if (!existsSync102(resolvedPath)) throw new Error(`File not found: ${filePath}`);
|
|
401677
|
-
const imported = importMcpServersJson(await
|
|
401716
|
+
const imported = importMcpServersJson(await readFile60(resolvedPath, "utf-8"), { scope });
|
|
401678
401717
|
if (imported.errors.length > 0) throw new Error(`Invalid MCP import file:
|
|
401679
401718
|
${imported.errors.map((error3) => ` - ${error3}`).join("\n")}`);
|
|
401680
401719
|
console.log();
|
|
@@ -402150,7 +402189,7 @@ var workflow_exports = {};
|
|
|
402150
402189
|
__export(workflow_exports, {
|
|
402151
402190
|
runWorkflowValidate: () => runWorkflowValidate
|
|
402152
402191
|
});
|
|
402153
|
-
import { readFile as
|
|
402192
|
+
import { readFile as readFile61 } from "node:fs/promises";
|
|
402154
402193
|
import { resolve as resolve87 } from "node:path";
|
|
402155
402194
|
async function resolveStore(projectName) {
|
|
402156
402195
|
try {
|
|
@@ -402189,7 +402228,7 @@ async function runWorkflowValidate(opts) {
|
|
|
402189
402228
|
if (opts.file) {
|
|
402190
402229
|
const filePath = resolve87(opts.file);
|
|
402191
402230
|
try {
|
|
402192
|
-
ir2 = JSON.parse(await
|
|
402231
|
+
ir2 = JSON.parse(await readFile61(filePath, "utf8"));
|
|
402193
402232
|
} catch (error3) {
|
|
402194
402233
|
const message = `Failed to read or parse workflow IR file '${opts.file}': ${error3 instanceof Error ? error3.message : String(error3)}`;
|
|
402195
402234
|
if (opts.json) return await exitWithStore({ valid: false, error: message }, 2);
|
|
@@ -405789,11 +405828,11 @@ var org_import_exports = {};
|
|
|
405789
405828
|
__export(org_import_exports, {
|
|
405790
405829
|
runOrgImport: () => runOrgImport
|
|
405791
405830
|
});
|
|
405792
|
-
import { readFile as
|
|
405831
|
+
import { readFile as readFile62 } from "node:fs/promises";
|
|
405793
405832
|
import { resolve as resolve94 } from "node:path";
|
|
405794
405833
|
async function runOrgImport(file, options = {}) {
|
|
405795
405834
|
const rootDir = options.project ? await resolveProjectPathOnly(options.project) : process.cwd();
|
|
405796
|
-
const bundle = JSON.parse(await
|
|
405835
|
+
const bundle = JSON.parse(await readFile62(resolve94(file), "utf8"));
|
|
405797
405836
|
const boot = await createTaskStoreForBackend({ rootDir });
|
|
405798
405837
|
const agents2 = new AgentStore({ rootDir: `${rootDir}/.fusion`, asyncLayer: boot.taskStore.asyncLayer });
|
|
405799
405838
|
try {
|
|
@@ -406408,7 +406447,7 @@ __export(plugin_exports2, {
|
|
|
406408
406447
|
});
|
|
406409
406448
|
import { existsSync as existsSync110 } from "node:fs";
|
|
406410
406449
|
import { dirname as dirname71, extname as extname6, join as join148, resolve as resolve95 } from "node:path";
|
|
406411
|
-
import { readFile as
|
|
406450
|
+
import { readFile as readFile63, stat as stat19 } from "node:fs/promises";
|
|
406412
406451
|
import * as readline from "node:readline";
|
|
406413
406452
|
async function getProjectPath(projectName) {
|
|
406414
406453
|
if (projectName) {
|
|
@@ -406502,7 +406541,7 @@ async function resolvePluginEntryFile(pluginDir) {
|
|
|
406502
406541
|
const packageJsonPath = join148(absoluteInputPath, "package.json");
|
|
406503
406542
|
let selectedCandidate;
|
|
406504
406543
|
if (existsSync110(packageJsonPath)) {
|
|
406505
|
-
const packageJson = JSON.parse(await
|
|
406544
|
+
const packageJson = JSON.parse(await readFile63(packageJsonPath, "utf-8"));
|
|
406506
406545
|
const exportsRecord = asRecord6(packageJson.exports);
|
|
406507
406546
|
const dotExport = exportsRecord?.["."];
|
|
406508
406547
|
const dotExportRecord = asRecord6(dotExport);
|
|
@@ -406553,7 +406592,7 @@ async function loadManifestFromPath(pluginPath) {
|
|
|
406553
406592
|
if (!existsSync110(manifestPath)) {
|
|
406554
406593
|
throw new Error(`Plugin manifest not found at: ${manifestPath}`);
|
|
406555
406594
|
}
|
|
406556
|
-
const content = await
|
|
406595
|
+
const content = await readFile63(manifestPath, "utf-8");
|
|
406557
406596
|
const manifest = JSON.parse(content);
|
|
406558
406597
|
const validation = validatePluginManifest(manifest);
|
|
406559
406598
|
if (!validation.valid) {
|
|
@@ -407512,7 +407551,7 @@ __export(plugin_publish_exports, {
|
|
|
407512
407551
|
runPluginPublish: () => runPluginPublish
|
|
407513
407552
|
});
|
|
407514
407553
|
import { existsSync as existsSync113 } from "node:fs";
|
|
407515
|
-
import { readFile as
|
|
407554
|
+
import { readFile as readFile64 } from "node:fs/promises";
|
|
407516
407555
|
import { join as join151, resolve as resolve98 } from "node:path";
|
|
407517
407556
|
import { pathToFileURL as pathToFileURL2 } from "node:url";
|
|
407518
407557
|
function classifyVersionBump(previous, next) {
|
|
@@ -407539,7 +407578,7 @@ function asRecord7(value) {
|
|
|
407539
407578
|
}
|
|
407540
407579
|
async function readPackageJsonVersion(pluginDir) {
|
|
407541
407580
|
const packageJsonPath = join151(pluginDir, "package.json");
|
|
407542
|
-
const packageJson = JSON.parse(await
|
|
407581
|
+
const packageJson = JSON.parse(await readFile64(packageJsonPath, "utf-8"));
|
|
407543
407582
|
return typeof packageJson.version === "string" ? packageJson.version : void 0;
|
|
407544
407583
|
}
|
|
407545
407584
|
function collectDeclaredFunctionHooks(value, prefix, checks) {
|
|
@@ -408120,7 +408159,7 @@ var experiment_finalize_exports = {};
|
|
|
408120
408159
|
__export(experiment_finalize_exports, {
|
|
408121
408160
|
runExperimentFinalize: () => runExperimentFinalize
|
|
408122
408161
|
});
|
|
408123
|
-
import { readFile as
|
|
408162
|
+
import { readFile as readFile65 } from "node:fs/promises";
|
|
408124
408163
|
import { resolve as resolve100 } from "node:path";
|
|
408125
408164
|
function printJson(payload) {
|
|
408126
408165
|
result(JSON.stringify(payload, null, 2) + "\n");
|
|
@@ -408133,7 +408172,7 @@ function printPlan(plan) {
|
|
|
408133
408172
|
}
|
|
408134
408173
|
}
|
|
408135
408174
|
async function parsePlanOverride(path14) {
|
|
408136
|
-
const content = await
|
|
408175
|
+
const content = await readFile65(resolve100(path14), "utf8");
|
|
408137
408176
|
return JSON.parse(content);
|
|
408138
408177
|
}
|
|
408139
408178
|
async function exitWithError(error3, shutdown) {
|