@flue/cli 0.0.9 → 0.0.11
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/dist-C2CPKdvn.mjs +2406 -0
- package/dist/flue.js +8 -4
- package/package.json +2 -4
package/dist/flue.js
CHANGED
|
@@ -91,7 +91,7 @@ function startEventStream(workdir) {
|
|
|
91
91
|
} };
|
|
92
92
|
}
|
|
93
93
|
async function _consumeEventStream(signal, workdir, sessionNames, textBuffers) {
|
|
94
|
-
const { transformEvent } = await import("
|
|
94
|
+
const { transformEvent } = await import("./dist-C2CPKdvn.mjs");
|
|
95
95
|
const url = `${OPENCODE_URL}/event?directory=${encodeURIComponent(workdir)}`;
|
|
96
96
|
const res = await fetch(url, { signal });
|
|
97
97
|
if (!res.ok || !res.body) {
|
|
@@ -204,7 +204,7 @@ async function run() {
|
|
|
204
204
|
process.exit(1);
|
|
205
205
|
}
|
|
206
206
|
const workflowUrl = pathToFileURL(path.isAbsolute(workflowPath) ? workflowPath : path.resolve(workdir, workflowPath)).href;
|
|
207
|
-
const { Flue } = await import("
|
|
207
|
+
const { Flue } = await import("./dist-C2CPKdvn.mjs");
|
|
208
208
|
if (!await isOpenCodeRunning()) {
|
|
209
209
|
startedOpenCode = startOpenCodeServer();
|
|
210
210
|
openCodeProcess = startedOpenCode;
|
|
@@ -280,7 +280,7 @@ async function preflight(workdir, modelOverride) {
|
|
|
280
280
|
*/
|
|
281
281
|
async function setPermissions(workdir) {
|
|
282
282
|
const res = await fetch(`${OPENCODE_URL}/config?directory=${encodeURIComponent(workdir)}`, {
|
|
283
|
-
method: "
|
|
283
|
+
method: "PATCH",
|
|
284
284
|
headers: { "Content-Type": "application/json" },
|
|
285
285
|
body: JSON.stringify({ permission: {
|
|
286
286
|
edit: "allow",
|
|
@@ -290,7 +290,11 @@ async function setPermissions(workdir) {
|
|
|
290
290
|
external_directory: "allow"
|
|
291
291
|
} })
|
|
292
292
|
});
|
|
293
|
-
if (!res.ok)
|
|
293
|
+
if (!res.ok) {
|
|
294
|
+
const body = await res.text().catch(() => "");
|
|
295
|
+
console.error(`[flue] Error: failed to set permissions (HTTP ${res.status}).\n Response: ${body}\n Headless mode requires all permissions to be pre-approved.\n The agent will hang on any permission prompt without this.`);
|
|
296
|
+
process.exit(1);
|
|
297
|
+
}
|
|
294
298
|
}
|
|
295
299
|
async function isOpenCodeRunning() {
|
|
296
300
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flue/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"flue": "dist/flue.js"
|
|
@@ -12,10 +12,8 @@
|
|
|
12
12
|
"build": "tsdown && mv dist/flue.mjs dist/flue.js",
|
|
13
13
|
"check:types": "tsc --noEmit"
|
|
14
14
|
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"@flue/client": "^0.0.6"
|
|
17
|
-
},
|
|
18
15
|
"devDependencies": {
|
|
16
|
+
"@flue/client": "workspace:*",
|
|
19
17
|
"tsdown": "^0.20.3"
|
|
20
18
|
}
|
|
21
19
|
}
|