@flue/cli 0.0.12 → 0.0.13

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 +14 -7
  2. package/package.json +1 -1
package/dist/flue.js CHANGED
@@ -279,22 +279,29 @@ async function preflight(workdir, modelOverride) {
279
279
  * against new permission types being added.
280
280
  */
281
281
  async function setPermissions(workdir) {
282
+ const permission = {
283
+ "*": "allow",
284
+ edit: "allow",
285
+ bash: "allow",
286
+ webfetch: "allow",
287
+ doom_loop: "allow",
288
+ external_directory: "allow"
289
+ };
282
290
  const res = await fetch(`${OPENCODE_URL}/config?directory=${encodeURIComponent(workdir)}`, {
283
291
  method: "PATCH",
284
292
  headers: { "Content-Type": "application/json" },
285
- body: JSON.stringify({ permission: {
286
- edit: "allow",
287
- bash: "allow",
288
- webfetch: "allow",
289
- doom_loop: "allow",
290
- external_directory: "allow"
291
- } })
293
+ body: JSON.stringify({ permission })
292
294
  });
293
295
  if (!res.ok) {
294
296
  const body = await res.text().catch(() => "");
295
297
  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
298
  process.exit(1);
297
299
  }
300
+ const verify = await fetch(`${OPENCODE_URL}/config?directory=${encodeURIComponent(workdir)}`);
301
+ if (verify.ok) {
302
+ const config = await verify.json();
303
+ console.log(`[flue] permissions set:`, JSON.stringify(config.permission));
304
+ }
298
305
  }
299
306
  async function isOpenCodeRunning() {
300
307
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flue/cli",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "flue": "dist/flue.js"