@atbash/sdk 0.13.3-dev.0 → 0.14.1-dev.0

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.
package/dist/index.mjs CHANGED
@@ -3954,13 +3954,24 @@ var Atbash = class _Atbash {
3954
3954
  return { allow: !this.failClosed, verdict: "ERROR", reason, toolCallId };
3955
3955
  }
3956
3956
  /* ── judgment status ───────────────────────────────────────────────────── */
3957
- async getJudgmentStatus(judgmentId, agentPubkey) {
3957
+ /**
3958
+ * Return the current status of a previously submitted judgment.
3959
+ *
3960
+ * `chainOpts` names which chain the judgment was signed against. The
3961
+ * server's GET /api/v1/judge routes to that chain when the SDK sends
3962
+ * a `brid` query param; without it, the server falls back to public.
3963
+ * Callers on the private chain must pass a `chainOpts` (or configure
3964
+ * the client on the private chain) — otherwise polling a POSTed
3965
+ * judgment on the private chain 404s at the server.
3966
+ */
3967
+ async getJudgmentStatus(judgmentId, agentPubkey, chainOpts) {
3958
3968
  const pk = agentPubkey ?? this.auth.pubkey;
3969
+ const brid = this.bridFromChainOpts(chainOpts);
3959
3970
  return this.track("getJudgmentStatus", pk, async () => {
3960
3971
  const resp = await this.http.get(
3961
3972
  "/api/v1/judge",
3962
- { tool_call_id: judgmentId, agent_pubkey: pk },
3963
- this.authHeaders(await this.defaultOrgBrid())
3973
+ { tool_call_id: judgmentId, agent_pubkey: pk, brid },
3974
+ this.authHeaders(brid)
3964
3975
  );
3965
3976
  await this.raiseIfError(resp);
3966
3977
  const data = await this.json(resp) ?? {};