opencara 0.18.2 → 0.18.3

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/index.js +13 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -821,20 +821,25 @@ To authenticate, visit: ${initData.verification_uri}`);
821
821
  headers: { "Content-Type": "application/json" },
822
822
  body: JSON.stringify({ device_code: initData.device_code })
823
823
  });
824
- } catch {
824
+ } catch (err) {
825
+ const code = err?.cause?.code ?? "UNKNOWN";
826
+ log(` [poll] network error: ${code}`);
825
827
  continue;
826
828
  }
827
829
  if (!tokenRes.ok) {
830
+ let errText = "";
828
831
  try {
829
- await tokenRes.text();
832
+ errText = await tokenRes.text();
830
833
  } catch {
831
834
  }
835
+ log(` [poll] server returned ${tokenRes.status}: ${errText.slice(0, 120)}`);
832
836
  continue;
833
837
  }
834
838
  let body;
835
839
  try {
836
840
  body = await tokenRes.json();
837
841
  } catch {
842
+ log(" [poll] malformed JSON response");
838
843
  continue;
839
844
  }
840
845
  if (body.error) {
@@ -847,6 +852,10 @@ To authenticate, visit: ${initData.verification_uri}`);
847
852
  }
848
853
  if (errorStr === "slow_down") {
849
854
  interval += 5e3;
855
+ log(" [poll] slow_down \u2014 increasing interval");
856
+ }
857
+ if (errorStr !== "authorization_pending") {
858
+ log(` [poll] GitHub error: ${errorStr}`);
850
859
  }
851
860
  continue;
852
861
  }
@@ -3583,7 +3592,7 @@ function sleep2(ms, signal) {
3583
3592
  async function startAgent(agentId, platformUrl, agentInfo, reviewDeps, consumptionDeps, options) {
3584
3593
  const client = new ApiClient(platformUrl, {
3585
3594
  authToken: options?.authToken,
3586
- cliVersion: "0.18.2",
3595
+ cliVersion: "0.18.3",
3587
3596
  versionOverride: options?.versionOverride,
3588
3597
  onTokenRefresh: options?.onTokenRefresh
3589
3598
  });
@@ -4563,7 +4572,7 @@ var statusCommand = new Command4("status").description("Show agent config, conne
4563
4572
  });
4564
4573
 
4565
4574
  // src/index.ts
4566
- var program = new Command5().name("opencara").description("OpenCara \u2014 distributed AI code review agent").version("0.18.2");
4575
+ var program = new Command5().name("opencara").description("OpenCara \u2014 distributed AI code review agent").version("0.18.3");
4567
4576
  program.addCommand(agentCommand);
4568
4577
  program.addCommand(authCommand());
4569
4578
  program.addCommand(dedupCommand());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencara",
3
- "version": "0.18.2",
3
+ "version": "0.18.3",
4
4
  "description": "Distributed AI code review agent — poll, review, and submit PR reviews using your own AI tools",
5
5
  "type": "module",
6
6
  "license": "MIT",