garrytan/gstack · error

Daemon refused publish: ${errText}

Error message

Daemon refused publish: ${errText}

What it means

Error "Daemon refused publish: ${errText}" thrown in garrytan/gstack.

Source

Thrown at design/src/daemon-client.ts:211

  if (opts.title) body.title = opts.title;
  const resp = await fetch(`http://127.0.0.1:${opts.port}/api/boards`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(body),
  });
  if (!resp.ok) {
    let errText: string;
    try {
      const j = (await resp.json()) as { error?: string; existing?: { id: string; url: string } };
      if (j.existing) {
        // 409: surface the existing-board URL so the caller can reuse it
        return { id: j.existing.id, url: j.existing.url, sourceDir: "" };
      }
      errText = j.error || `HTTP ${resp.status}`;
    } catch {
      errText = `HTTP ${resp.status}`;
    }
    throw new Error(`Daemon refused publish: ${errText}`);
  }
  return (await resp.json()) as PublishBoardResult;
}

// ─── Internals ───────────────────────────────────────────────────

function readPackageVersion(): string {
  return readVersionString();
}

function defaultDaemonScript(): string {
  // design/src/daemon-client.ts → daemon.ts is a sibling. Only used in dev
  // when this process is `bun run cli.ts`; the compiled-binary path
  // self-execs instead (see resolveSpawnCommand).
  return path.join(import.meta.dir, "daemon.ts");
}

/**

View on GitHub (pinned to 94993f7401)

When it happens

Trigger: Thrown at design/src/daemon-client.ts:211 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of garrytan/gstack@94993f7401 (2026-08-12). Data as JSON: /api/errors/a5fb73eca397f881. Report an issue: GitHub.