pullfrog 0.1.44 → 0.1.45

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/cli.mjs CHANGED
@@ -103022,7 +103022,7 @@ var import_semver = __toESM(require_semver2(), 1);
103022
103022
  // package.json
103023
103023
  var package_default = {
103024
103024
  name: "pullfrog",
103025
- version: "0.1.44",
103025
+ version: "0.1.45",
103026
103026
  type: "module",
103027
103027
  bin: {
103028
103028
  pullfrog: "dist/cli.mjs",
@@ -166572,6 +166572,7 @@ async function mintProxyKey(ctx) {
166572
166572
  }
166573
166573
  }
166574
166574
  async function buildProxyTokenHeaders(ctx) {
166575
+ const fundingSource = ctx.oss ? "oss" : "router";
166575
166576
  if (ctx.oidcCredentials) {
166576
166577
  const creds = ctx.oidcCredentials;
166577
166578
  const oidcToken = await op(() => fetchIdTokenFromStash(creds), {
@@ -166579,11 +166580,17 @@ async function buildProxyTokenHeaders(ctx) {
166579
166580
  retries: [1e3, 2e3],
166580
166581
  bail: (error49) => !isTransientTokenError(error49)
166581
166582
  })();
166582
- return { Authorization: `Bearer ${oidcToken}` };
166583
+ return {
166584
+ Authorization: `Bearer ${oidcToken}`,
166585
+ "X-Pullfrog-Funding-Source": fundingSource
166586
+ };
166583
166587
  }
166584
166588
  if (isLocalApiUrl()) {
166585
166589
  log.info(`\xBB proxy: dev bypass (x-dev-repo) for ${ctx.repo.owner}/${ctx.repo.name}`);
166586
- return { "x-dev-repo": `${ctx.repo.owner}/${ctx.repo.name}` };
166590
+ return {
166591
+ "x-dev-repo": `${ctx.repo.owner}/${ctx.repo.name}`,
166592
+ "X-Pullfrog-Funding-Source": fundingSource
166593
+ };
166587
166594
  }
166588
166595
  return null;
166589
166596
  }
@@ -166594,7 +166601,11 @@ async function resolveProxyModel(ctx) {
166594
166601
  log.warning("\xBB proxy requested but no OIDC credentials available \u2014 skipping");
166595
166602
  return;
166596
166603
  }
166597
- const key = await mintProxyKey({ oidcCredentials: ctx.oidcCredentials, repo: ctx.repo });
166604
+ const key = await mintProxyKey({
166605
+ oidcCredentials: ctx.oidcCredentials,
166606
+ repo: ctx.repo,
166607
+ oss: ctx.oss
166608
+ });
166598
166609
  if (!key) return;
166599
166610
  process.env.OPENROUTER_API_KEY = key;
166600
166611
  core8.setSecret(key);
@@ -169141,7 +169152,7 @@ async function runCli4(input) {
169141
169152
  }
169142
169153
 
169143
169154
  // cli.ts
169144
- var VERSION10 = "0.1.44";
169155
+ var VERSION10 = "0.1.45";
169145
169156
  var bin = basename2(process.argv[1] || "");
169146
169157
  var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
169147
169158
  var rawArgs = process.argv.slice(2);
package/dist/index.js CHANGED
@@ -101093,7 +101093,7 @@ var import_semver = __toESM(require_semver2(), 1);
101093
101093
  // package.json
101094
101094
  var package_default = {
101095
101095
  name: "pullfrog",
101096
- version: "0.1.44",
101096
+ version: "0.1.45",
101097
101097
  type: "module",
101098
101098
  bin: {
101099
101099
  pullfrog: "dist/cli.mjs",
@@ -164685,6 +164685,7 @@ async function mintProxyKey(ctx) {
164685
164685
  }
164686
164686
  }
164687
164687
  async function buildProxyTokenHeaders(ctx) {
164688
+ const fundingSource = ctx.oss ? "oss" : "router";
164688
164689
  if (ctx.oidcCredentials) {
164689
164690
  const creds = ctx.oidcCredentials;
164690
164691
  const oidcToken = await op(() => fetchIdTokenFromStash(creds), {
@@ -164692,11 +164693,17 @@ async function buildProxyTokenHeaders(ctx) {
164692
164693
  retries: [1e3, 2e3],
164693
164694
  bail: (error49) => !isTransientTokenError(error49)
164694
164695
  })();
164695
- return { Authorization: `Bearer ${oidcToken}` };
164696
+ return {
164697
+ Authorization: `Bearer ${oidcToken}`,
164698
+ "X-Pullfrog-Funding-Source": fundingSource
164699
+ };
164696
164700
  }
164697
164701
  if (isLocalApiUrl()) {
164698
164702
  log.info(`\xBB proxy: dev bypass (x-dev-repo) for ${ctx.repo.owner}/${ctx.repo.name}`);
164699
- return { "x-dev-repo": `${ctx.repo.owner}/${ctx.repo.name}` };
164703
+ return {
164704
+ "x-dev-repo": `${ctx.repo.owner}/${ctx.repo.name}`,
164705
+ "X-Pullfrog-Funding-Source": fundingSource
164706
+ };
164700
164707
  }
164701
164708
  return null;
164702
164709
  }
@@ -164707,7 +164714,11 @@ async function resolveProxyModel(ctx) {
164707
164714
  log.warning("\xBB proxy requested but no OIDC credentials available \u2014 skipping");
164708
164715
  return;
164709
164716
  }
164710
- const key = await mintProxyKey({ oidcCredentials: ctx.oidcCredentials, repo: ctx.repo });
164717
+ const key = await mintProxyKey({
164718
+ oidcCredentials: ctx.oidcCredentials,
164719
+ repo: ctx.repo,
164720
+ oss: ctx.oss
164721
+ });
164711
164722
  if (!key) return;
164712
164723
  process.env.OPENROUTER_API_KEY = key;
164713
164724
  core8.setSecret(key);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pullfrog",
3
- "version": "0.1.44",
3
+ "version": "0.1.45",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "pullfrog": "dist/cli.mjs",