@flue/cli 0.0.9 → 0.0.10

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 (2) hide show
  1. package/dist/flue.js +6 -2
  2. package/package.json +1 -1
package/dist/flue.js CHANGED
@@ -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: "PUT",
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) console.error(`[flue] warning: failed to set permissions (HTTP ${res.status})`);
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.9",
3
+ "version": "0.0.10",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "flue": "dist/flue.js"