adsinagents 0.1.8 → 0.1.9
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/cli/dist/index.js +4 -2
- package/daemon/dist/main.js +15 -4
- package/package.json +1 -1
- package/statusline/dist/index.js +4 -2
package/cli/dist/index.js
CHANGED
|
@@ -4166,8 +4166,10 @@ var ConfigSchema = external_exports.object({
|
|
|
4166
4166
|
deviceId: external_exports.string().default(""),
|
|
4167
4167
|
/** Single-use token to claim this install at /claim (attach a login + payout). */
|
|
4168
4168
|
claimToken: external_exports.string().default(""),
|
|
4169
|
-
/** Ad cache poll interval (seconds).
|
|
4170
|
-
|
|
4169
|
+
/** Ad cache poll interval (seconds) — how often a new ad rotates in. Billing
|
|
4170
|
+
* is gated separately by rateCapSec, so a faster poll rotates creatives
|
|
4171
|
+
* without changing earnings. */
|
|
4172
|
+
pollIntervalSec: external_exports.number().int().positive().default(30),
|
|
4171
4173
|
/** Hard daily fired-impression cap. */
|
|
4172
4174
|
dailyCap: external_exports.number().int().positive().default(300),
|
|
4173
4175
|
/** Min seconds of verified view between two fired impressions. */
|
package/daemon/dist/main.js
CHANGED
|
@@ -4173,8 +4173,10 @@ var ConfigSchema = external_exports.object({
|
|
|
4173
4173
|
deviceId: external_exports.string().default(""),
|
|
4174
4174
|
/** Single-use token to claim this install at /claim (attach a login + payout). */
|
|
4175
4175
|
claimToken: external_exports.string().default(""),
|
|
4176
|
-
/** Ad cache poll interval (seconds).
|
|
4177
|
-
|
|
4176
|
+
/** Ad cache poll interval (seconds) — how often a new ad rotates in. Billing
|
|
4177
|
+
* is gated separately by rateCapSec, so a faster poll rotates creatives
|
|
4178
|
+
* without changing earnings. */
|
|
4179
|
+
pollIntervalSec: external_exports.number().int().positive().default(30),
|
|
4178
4180
|
/** Hard daily fired-impression cap. */
|
|
4179
4181
|
dailyCap: external_exports.number().int().positive().default(300),
|
|
4180
4182
|
/** Min seconds of verified view between two fired impressions. */
|
|
@@ -5453,7 +5455,8 @@ async function main() {
|
|
|
5453
5455
|
if (tickCount % SYNC_EVERY_TICKS === 0) {
|
|
5454
5456
|
void syncLedger(ledger, cfg).then((e) => {
|
|
5455
5457
|
if (e) earnings = e;
|
|
5456
|
-
}).catch(() => {
|
|
5458
|
+
}).catch((err) => {
|
|
5459
|
+
void fileLog(`sync error: ${String(err)}`);
|
|
5457
5460
|
});
|
|
5458
5461
|
}
|
|
5459
5462
|
}, TICK_MS);
|
|
@@ -5482,9 +5485,17 @@ async function syncLedger(ledger, cfg) {
|
|
|
5482
5485
|
}),
|
|
5483
5486
|
signal: AbortSignal.timeout(8e3)
|
|
5484
5487
|
});
|
|
5485
|
-
if (!res.ok)
|
|
5488
|
+
if (!res.ok) {
|
|
5489
|
+
const detail = await res.text().catch(() => "");
|
|
5490
|
+
await fileLog(`sync HTTP ${res.status}: ${detail.slice(0, 200)}`);
|
|
5491
|
+
return null;
|
|
5492
|
+
}
|
|
5486
5493
|
if (rows.length) ledger.markSynced(rows.map((r) => r.id));
|
|
5487
5494
|
const body = await res.json().catch(() => ({}));
|
|
5495
|
+
if (body.rejected && body.rejected > 0) {
|
|
5496
|
+
const why = Object.entries(body.rejectReasons ?? {}).map(([r, n]) => `${r}=${n}`).join(" ");
|
|
5497
|
+
await fileLog(`sync rejected ${body.rejected}${why ? ` (${why})` : ""}`);
|
|
5498
|
+
}
|
|
5488
5499
|
return {
|
|
5489
5500
|
balanceCents: Math.max(0, body.balanceCents ?? 0),
|
|
5490
5501
|
todayCents: Math.max(0, body.todayCents ?? 0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adsinagents",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Get paid while you build. AdsInAgents is the terminal-native ad layer for AI coding agents. Verified impressions pay you.",
|
|
5
5
|
"homepage": "https://adsinagents.com",
|
|
6
6
|
"license": "UNLICENSED",
|
package/statusline/dist/index.js
CHANGED
|
@@ -4150,8 +4150,10 @@ var ConfigSchema = external_exports.object({
|
|
|
4150
4150
|
deviceId: external_exports.string().default(""),
|
|
4151
4151
|
/** Single-use token to claim this install at /claim (attach a login + payout). */
|
|
4152
4152
|
claimToken: external_exports.string().default(""),
|
|
4153
|
-
/** Ad cache poll interval (seconds).
|
|
4154
|
-
|
|
4153
|
+
/** Ad cache poll interval (seconds) — how often a new ad rotates in. Billing
|
|
4154
|
+
* is gated separately by rateCapSec, so a faster poll rotates creatives
|
|
4155
|
+
* without changing earnings. */
|
|
4156
|
+
pollIntervalSec: external_exports.number().int().positive().default(30),
|
|
4155
4157
|
/** Hard daily fired-impression cap. */
|
|
4156
4158
|
dailyCap: external_exports.number().int().positive().default(300),
|
|
4157
4159
|
/** Min seconds of verified view between two fired impressions. */
|