@cortexkit/opencode-antigravity-auth 3.0.31 → 3.0.32

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.js CHANGED
@@ -54399,32 +54399,61 @@ function reportRouting(input2) {
54399
54399
  const report = handle.report;
54400
54400
  if (typeof report !== "function")
54401
54401
  return;
54402
- const identity3 = {
54403
- account_id: input2.accountId,
54404
- ...input2.credentialId !== void 0 ? { credential_id: input2.credentialId } : {}
54405
- };
54406
54402
  let payload;
54407
- switch (input2.outcome) {
54408
- case "served":
54409
- payload = { ...identity3, outcome: "served", headers: input2.headers };
54410
- break;
54411
- case "exhausted": {
54412
- const { window, pool } = input2;
54413
- if (window !== "5h" && window !== "7d")
54403
+ if ("kind" in input2) {
54404
+ switch (input2.kind) {
54405
+ case "turn_notes_supported": {
54406
+ const { model, supported } = input2;
54407
+ if (typeof model !== "string" || model.length === 0 || typeof supported !== "boolean")
54408
+ return;
54409
+ payload = {
54410
+ kind: "turn_notes_supported",
54411
+ model,
54412
+ supported
54413
+ };
54414
+ break;
54415
+ }
54416
+ case "turn_note_skipped": {
54417
+ const { after_tool_use_id, reason } = input2;
54418
+ if (typeof after_tool_use_id !== "string" || after_tool_use_id.length === 0 || reason !== "anchor_missing" && reason !== "before_user_message" && reason !== "unsupported_model" && reason !== "not_oauth")
54419
+ return;
54420
+ payload = {
54421
+ kind: "turn_note_skipped",
54422
+ after_tool_use_id,
54423
+ reason
54424
+ };
54425
+ break;
54426
+ }
54427
+ default:
54414
54428
  return;
54415
- if (pool !== void 0 && (typeof pool !== "string" || !/^[a-z0-9._-]{1,64}$/.test(pool)))
54429
+ }
54430
+ } else {
54431
+ const identity3 = {
54432
+ account_id: input2.accountId,
54433
+ ...input2.credentialId !== void 0 ? { credential_id: input2.credentialId } : {}
54434
+ };
54435
+ switch (input2.outcome) {
54436
+ case "served":
54437
+ payload = { ...identity3, outcome: "served", headers: input2.headers };
54438
+ break;
54439
+ case "exhausted": {
54440
+ const { window, pool } = input2;
54441
+ if (window !== "5h" && window !== "7d")
54442
+ return;
54443
+ if (pool !== void 0 && (typeof pool !== "string" || !/^[a-z0-9._-]{1,64}$/.test(pool)))
54444
+ return;
54445
+ payload = {
54446
+ ...identity3,
54447
+ outcome: "exhausted",
54448
+ window,
54449
+ ...pool ? { pool } : {},
54450
+ ...input2.resetsAt !== void 0 ? { resets_at: input2.resetsAt } : {}
54451
+ };
54452
+ break;
54453
+ }
54454
+ default:
54416
54455
  return;
54417
- payload = {
54418
- ...identity3,
54419
- outcome: "exhausted",
54420
- window,
54421
- ...pool ? { pool } : {},
54422
- ...input2.resetsAt !== void 0 ? { resets_at: input2.resetsAt } : {}
54423
- };
54424
- break;
54425
54456
  }
54426
- default:
54427
- return;
54428
54457
  }
54429
54458
  const pending = report.call(handle, payload);
54430
54459
  if (isObject2(pending) && typeof pending.then === "function") {