tesseract-agent 0.1.2 → 0.1.4

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.
@@ -7619,7 +7619,9 @@ function ask(question) {
7619
7619
  });
7620
7620
  }
7621
7621
  async function fetchJson(url, init) {
7622
- const r = await fetch(url, { ...init, headers: { "Content-Type": "application/json", ...init?.headers ?? {} } });
7622
+ const hasBody = init?.body != null;
7623
+ const headers = { ...hasBody ? { "Content-Type": "application/json" } : {}, ...init?.headers ?? {} };
7624
+ const r = await fetch(url, { ...init, headers });
7623
7625
  const data = await r.json().catch(() => ({}));
7624
7626
  if (!r.ok) throw new Error(data.message || `Request failed (${r.status})`);
7625
7627
  return data;
@@ -7659,7 +7661,7 @@ async function login(opts) {
7659
7661
  return;
7660
7662
  }
7661
7663
  const start2 = await fetchJson(`${api}/auth/cli/start`, { method: "POST" });
7662
- const url = `${api}/?cli=${start2.requestId}`;
7664
+ const url = `${api}/?authorize=${start2.requestId}`;
7663
7665
  console.log();
7664
7666
  console.log("To connect this machine, open this URL and sign in (Google or email):");
7665
7667
  console.log();
@@ -7822,7 +7824,7 @@ function logs(system, follow) {
7822
7824
  }
7823
7825
 
7824
7826
  // src/cli.ts
7825
- var CLI_VERSION = process.env.CCB_DAEMON_VERSION ?? "0.1.2";
7827
+ var CLI_VERSION = process.env.CCB_DAEMON_VERSION ?? "0.1.4";
7826
7828
  function parseFlags(argv) {
7827
7829
  const out = {};
7828
7830
  for (let i = 0; i < argv.length; i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tesseract-agent",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "license": "UNLICENSED",
5
5
  "publishConfig": {
6
6
  "access": "public"