@oxygen-agent/cli 1.1034.14 → 1.1035.38
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/README.md +1 -1
- package/dist/commands/admin.js +10 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-spool.d.ts +10 -2
- package/node_modules/@oxygen/shared/dist/diagnostic-spool.js +16 -4
- package/node_modules/@oxygen/shared/dist/diagnostic-storage-failure.d.ts +5 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-storage-failure.js +10 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-storage.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-storage.js +40 -2
- package/node_modules/@oxygen/shared/dist/hosted-ai.d.ts +11 -0
- package/node_modules/@oxygen/shared/dist/hosted-ai.js +22 -0
- package/node_modules/@oxygen/shared/dist/llm-payload.js +12 -0
- package/node_modules/@oxygen/shared/dist/otlp-log-sink.d.ts +3 -1
- package/node_modules/@oxygen/shared/dist/otlp-log-sink.js +3 -0
- package/node_modules/@oxygen/shared/dist/provider-http-error.d.ts +9 -0
- package/node_modules/@oxygen/shared/dist/provider-http-error.js +12 -0
- package/node_modules/@oxygen/shared/dist/version.generated.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/version.generated.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/commands/admin.js
CHANGED
|
@@ -377,6 +377,16 @@ export function registerAdminFamily(program, handleAsyncAction, binaryName) {
|
|
|
377
377
|
.option("--json", "Print a JSON envelope.")
|
|
378
378
|
.action(async (options) => {
|
|
379
379
|
await handleAsyncAction("admin ses tenants list", options, () => requestOxygen("/api/cli/admin/ses/tenants"));
|
|
380
|
+
}))
|
|
381
|
+
.addCommand(new Command("resend-preview")
|
|
382
|
+
.description("Preview, read-only, a resend of one newsletter's failed emails: how many failed recipients never reached the provider, and who is excluded (sent or possibly sent, still queued, unsubscribed, suppressed). Sends nothing.")
|
|
383
|
+
.requiredOption("--organization <uuid>", "Control organization UUID.")
|
|
384
|
+
.requiredOption("--sequence <uuid>", "The newsletter's Sequence UUID.")
|
|
385
|
+
.option("--json", "Print a JSON envelope.")
|
|
386
|
+
.action(async (options) => {
|
|
387
|
+
const organization = readOption(options.organization) ?? "";
|
|
388
|
+
const sequence = readOption(options.sequence) ?? "";
|
|
389
|
+
await handleAsyncAction("admin ses tenants resend-preview", options, () => requestOxygen(`/api/cli/admin/ses/tenants/${encodeURIComponent(organization)}/resend-preview?sequence_id=${encodeURIComponent(sequence)}`));
|
|
380
390
|
}))
|
|
381
391
|
.addCommand(sesTenantStatusCommand("pause", "Pause a workspace's newsletter sending until someone resumes it.", true, handleAsyncAction))
|
|
382
392
|
.addCommand(sesTenantStatusCommand("resume", "Resume a paused workspace's newsletter sending.", false, handleAsyncAction))
|
|
@@ -19,5 +19,13 @@ export declare function saveDiagnosticUploadProgress(directory: string, record:
|
|
|
19
19
|
/** A fixed set of stripes bounds SQLite lock files while coordinating direct and retry owners. */
|
|
20
20
|
export declare function lockDiagnosticUpload(directory: string, id: string, waitMs?: number): Promise<() => Promise<void>>;
|
|
21
21
|
export declare function readUploadProgress(directory: string, id: string, storeFingerprint: string): Promise<UploadProgress | null>;
|
|
22
|
-
/**
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Replay retained bytes under their stripe; publication owns the upload acknowledgment.
|
|
24
|
+
* `upload` resolving `{ retainReceipt: false }` (a minted ID nothing stores again)
|
|
25
|
+
* also removes the receipt once the content is gone, as a direct capture's
|
|
26
|
+
* acknowledgement does: otherwise every retried capture kept one for 72 hours,
|
|
27
|
+
* and 50k of them made each full inspection stat 50k files (dev provider, 2026-11-07).
|
|
28
|
+
*/
|
|
29
|
+
export declare function retryDiagnosticSpool(directory: string, upload: (compressed: Buffer, reservation?: UploadReservation) => Promise<void | {
|
|
30
|
+
retainReceipt: boolean;
|
|
31
|
+
}>): Promise<void>;
|
|
@@ -3,7 +3,7 @@ import { mkdir, open, opendir, readFile, readdir, rename, stat, unlink, utimes,
|
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { DIAGNOSTIC_MAX_BYTES, diagnosticId } from "./diagnostics.js";
|
|
5
5
|
import { acquireDiagnosticStorageLock } from "./diagnostic-storage-lock.js";
|
|
6
|
-
import { diagnosticRole, StorageFailure, storageFailureFields, storageStage } from "./diagnostic-storage-failure.js";
|
|
6
|
+
import { diagnosticRole, objectStoreThrottled, StorageFailure, storageFailureFields, storageStage } from "./diagnostic-storage-failure.js";
|
|
7
7
|
import { log } from "./log.js";
|
|
8
8
|
import { recordTelemetryCounter } from "./telemetry.js";
|
|
9
9
|
const admissions = new Map();
|
|
@@ -391,7 +391,13 @@ async function reserveRetryBatch(directory, files, used, local) {
|
|
|
391
391
|
}
|
|
392
392
|
return { files: files.slice(0, count), reservation };
|
|
393
393
|
}
|
|
394
|
-
/**
|
|
394
|
+
/**
|
|
395
|
+
* Replay retained bytes under their stripe; publication owns the upload acknowledgment.
|
|
396
|
+
* `upload` resolving `{ retainReceipt: false }` (a minted ID nothing stores again)
|
|
397
|
+
* also removes the receipt once the content is gone, as a direct capture's
|
|
398
|
+
* acknowledgement does: otherwise every retried capture kept one for 72 hours,
|
|
399
|
+
* and 50k of them made each full inspection stat 50k files (dev provider, 2026-11-07).
|
|
400
|
+
*/
|
|
395
401
|
export async function retryDiagnosticSpool(directory, upload) {
|
|
396
402
|
const release = await storageStage("lock", () => acquireDiagnosticStorageLock(join(directory, ".upload.lock")));
|
|
397
403
|
if (!release)
|
|
@@ -446,8 +452,11 @@ export async function retryDiagnosticSpool(directory, upload) {
|
|
|
446
452
|
continue;
|
|
447
453
|
try {
|
|
448
454
|
const compressed = await storageStage("read", () => readFile(path));
|
|
449
|
-
await upload(compressed, reservation);
|
|
450
|
-
await unlink(path).
|
|
455
|
+
const published = await upload(compressed, reservation);
|
|
456
|
+
const removed = await unlink(path).then(() => true, error => error?.code === "ENOENT");
|
|
457
|
+
// A record left behind keeps its receipt so a retry cannot upload it again.
|
|
458
|
+
if (removed && published?.retainReceipt === false)
|
|
459
|
+
await unlink(join(directory, `${name.slice(0, -8)}.receipt.json`)).catch(() => undefined);
|
|
451
460
|
}
|
|
452
461
|
finally {
|
|
453
462
|
await release();
|
|
@@ -460,6 +469,9 @@ export async function retryDiagnosticSpool(directory, upload) {
|
|
|
460
469
|
if (error instanceof StorageFailure && error.stage === "read" && error.failure?.code === "ENOENT")
|
|
461
470
|
continue;
|
|
462
471
|
log("warn", "diagnostics.spool_upload_deferred", { diagnostic_id: name.slice(0, -8), ...storageFailureFields(error) });
|
|
472
|
+
// An overloaded store refuses the rest of this batch too; the next sweep retries.
|
|
473
|
+
if (objectStoreThrottled(error))
|
|
474
|
+
break;
|
|
463
475
|
}
|
|
464
476
|
}
|
|
465
477
|
}
|
|
@@ -7,4 +7,9 @@ export declare class StorageFailure extends Error {
|
|
|
7
7
|
export declare function storageStage<T>(stage: StorageStage, action: () => Promise<T>): Promise<T>;
|
|
8
8
|
/** Safe storage metadata shared by capture and the chunk transport; never upstream prose. */
|
|
9
9
|
export declare function storageFailureFields(error: unknown, fallbackStage?: StorageStage): Record<string, string | number | null>;
|
|
10
|
+
/**
|
|
11
|
+
* The object store refused an upload as overloaded: 429, or 503 (MinIO's
|
|
12
|
+
* SlowDown once MINIO_API_REQUESTS_MAX is reached). Retrying at once only adds load.
|
|
13
|
+
*/
|
|
14
|
+
export declare function objectStoreThrottled(error: unknown): boolean;
|
|
10
15
|
export declare function diagnosticRole(): string;
|
|
@@ -35,6 +35,16 @@ export function storageFailureFields(error, fallbackStage = "encode") {
|
|
|
35
35
|
return { cause, stage, error_code: code, sqlite_code: sqlite, errno: typeof value.errno === "number" ? value.errno : null,
|
|
36
36
|
http_status: httpStatus, queue_role: diagnosticRole() };
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* The object store refused an upload as overloaded: 429, or 503 (MinIO's
|
|
40
|
+
* SlowDown once MINIO_API_REQUESTS_MAX is reached). Retrying at once only adds load.
|
|
41
|
+
*/
|
|
42
|
+
export function objectStoreThrottled(error) {
|
|
43
|
+
if (!(error instanceof StorageFailure) || error.stage !== "upload")
|
|
44
|
+
return false;
|
|
45
|
+
const status = storageFailureFields(error).http_status;
|
|
46
|
+
return status === 429 || status === 503;
|
|
47
|
+
}
|
|
38
48
|
export function diagnosticRole() {
|
|
39
49
|
const role = process.env.OXYGEN_WORKER_QUEUE_ROLE;
|
|
40
50
|
return role && ["relay", "bulk", "maintenance", "interactive", "provider", "outbound"].includes(role) ? role
|
|
@@ -12,6 +12,8 @@ type Store = {
|
|
|
12
12
|
client: S3Client;
|
|
13
13
|
bucket: string;
|
|
14
14
|
};
|
|
15
|
+
/** True while uploads back off from a throttling object store; callers may shed routine captures. */
|
|
16
|
+
export declare function diagnosticUploadsThrottled(now?: number): boolean;
|
|
15
17
|
export declare function observeDiagnosticStorage(observer: (receipt: DiagnosticStoredReceipt) => Promise<void>): void;
|
|
16
18
|
export declare function startDiagnosticRetry(): void;
|
|
17
19
|
export declare function diagnosticsConfigured(): boolean;
|
|
@@ -3,7 +3,7 @@ import { gzipSync, gunzipSync } from "node:zlib";
|
|
|
3
3
|
import { GetObjectCommand, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
|
|
4
4
|
import { createDiagnosticRecord, credentialSafeDiagnostic, DIAGNOSTIC_RECORD_MAX_BYTES, DIAGNOSTIC_RETENTION_MS, diagnosticId, diagnosticSummary, parseDiagnosticRecord, sanitizeDiagnosticContent } from "./diagnostics.js";
|
|
5
5
|
import { admitDiagnosticSpool, lockDiagnosticUpload, readUploadProgress, retryDiagnosticSpool, saveDiagnosticUploadProgress } from "./diagnostic-spool.js";
|
|
6
|
-
import { diagnosticRole, StorageFailure, storageFailureFields as diagnosticStorageFailureFields, storageStage } from "./diagnostic-storage-failure.js";
|
|
6
|
+
import { diagnosticRole, objectStoreThrottled, StorageFailure, storageFailureFields as diagnosticStorageFailureFields, storageStage } from "./diagnostic-storage-failure.js";
|
|
7
7
|
import { log } from "./log.js";
|
|
8
8
|
import { recordTelemetryCounter } from "./telemetry.js";
|
|
9
9
|
export { storageFailureFields as diagnosticStorageFailureFields } from "./diagnostic-storage-failure.js";
|
|
@@ -12,6 +12,24 @@ let warned = false;
|
|
|
12
12
|
let flushing = null;
|
|
13
13
|
let timer;
|
|
14
14
|
let onStored;
|
|
15
|
+
/**
|
|
16
|
+
* Upload backoff after the object store refused a PUT as overloaded (429/503).
|
|
17
|
+
* dev's diagnostics bucket shares one MinIO with Langfuse under
|
|
18
|
+
* MINIO_API_REQUESTS_MAX=32 and answered thousands of 429s a day; every new
|
|
19
|
+
* capture still uploaded at once. Only worker attempt captures (layer "worker")
|
|
20
|
+
* arm or obey it: web captures and CLI upload finalization upload at once as before.
|
|
21
|
+
* While backing off, worker captures stay spooled for the retry sweep, which probes
|
|
22
|
+
* the store; one accepted upload or the end of the window ends the backoff. A
|
|
23
|
+
* throttle inside an open window (concurrent uploads) does not double it again.
|
|
24
|
+
*/
|
|
25
|
+
const UPLOAD_BACKOFF_MIN_MS = 5_000;
|
|
26
|
+
const UPLOAD_BACKOFF_MAX_MS = 5 * 60_000;
|
|
27
|
+
let uploadBackoffMs = 0;
|
|
28
|
+
let uploadBackoffUntil = 0;
|
|
29
|
+
/** True while uploads back off from a throttling object store; callers may shed routine captures. */
|
|
30
|
+
export function diagnosticUploadsThrottled(now = Date.now()) {
|
|
31
|
+
return now < uploadBackoffUntil;
|
|
32
|
+
}
|
|
15
33
|
export function observeDiagnosticStorage(observer) {
|
|
16
34
|
onStored = observer;
|
|
17
35
|
startDiagnosticRetry();
|
|
@@ -109,6 +127,12 @@ export async function storeDiagnostic(record, options = {}) {
|
|
|
109
127
|
record = parseDiagnosticRecord(JSON.parse(encoded.bytes.toString("utf8")));
|
|
110
128
|
acknowledge = await admitDiagnosticSpool(directory, record, encoded.compressed, options.retainReceipt !== false);
|
|
111
129
|
startDiagnosticRetry();
|
|
130
|
+
if (record.layer === "worker" && diagnosticUploadsThrottled()) {
|
|
131
|
+
log("warn", "diagnostics.capture_deferred", { diagnostic_id: record.id, reason: "upload_backoff", cause: "rate_limit",
|
|
132
|
+
stage: "upload", backoff_ms: uploadBackoffMs, queue_role: diagnosticRole() });
|
|
133
|
+
recordTelemetryCounter("oxygen.diagnostics.deferred", 1, { source: record.surface, cause: "rate_limit", queue_role: diagnosticRole() });
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
112
136
|
const receipt = await uploadEncodedDiagnostic(directory, record, encoded, acknowledge);
|
|
113
137
|
return receipt;
|
|
114
138
|
}
|
|
@@ -149,7 +173,18 @@ async function publishEncodedDiagnostic(directory, record, encoded, reservation)
|
|
|
149
173
|
return value;
|
|
150
174
|
});
|
|
151
175
|
if (!progress) {
|
|
152
|
-
|
|
176
|
+
try {
|
|
177
|
+
await storageStage("upload", () => uploadDiagnosticObject(record, encoded));
|
|
178
|
+
uploadBackoffMs = 0;
|
|
179
|
+
uploadBackoffUntil = 0;
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
if (record.layer === "worker" && objectStoreThrottled(error) && !diagnosticUploadsThrottled()) {
|
|
183
|
+
uploadBackoffMs = Math.min(UPLOAD_BACKOFF_MAX_MS, uploadBackoffMs ? uploadBackoffMs * 2 : UPLOAD_BACKOFF_MIN_MS);
|
|
184
|
+
uploadBackoffUntil = Date.now() + uploadBackoffMs;
|
|
185
|
+
}
|
|
186
|
+
throw error;
|
|
187
|
+
}
|
|
153
188
|
progress = { sha256: encoded.sha256, store: diagnosticStoreFingerprint(), published: false };
|
|
154
189
|
await storageStage("receipt", () => saveDiagnosticUploadProgress(directory, record, progress, reservation));
|
|
155
190
|
}
|
|
@@ -189,6 +224,9 @@ export function flushDiagnosticSpool() {
|
|
|
189
224
|
await retryDiagnosticSpool(directory, async (compressed, reservation) => {
|
|
190
225
|
const record = await storageStage("decode", async () => decodeDiagnostic(compressed));
|
|
191
226
|
await publishEncodedDiagnostic(directory, record, encodeDiagnostic(record), reservation);
|
|
227
|
+
// Worker attempt records mint their ID (execution-diagnostics passes
|
|
228
|
+
// retainReceipt: false); nothing stores that ID again.
|
|
229
|
+
return { retainReceipt: record.layer !== "worker" };
|
|
192
230
|
});
|
|
193
231
|
})().catch(error => { log("warn", "diagnostics.spool_retry_failed", diagnosticStorageFailureFields(error)); }).finally(() => { flushing = null; });
|
|
194
232
|
return flushing;
|
|
@@ -32,6 +32,11 @@ export type HostedAiUseCase = "ai_column" | "copilot" | "agent";
|
|
|
32
32
|
* has an `auto` entry, so widening it would force two fictional rows.
|
|
33
33
|
*/
|
|
34
34
|
export type CopilotAiLevel = HostedAiLevel | "auto";
|
|
35
|
+
export type HostedAiLongContextEstimate = {
|
|
36
|
+
minPromptTokens: number;
|
|
37
|
+
estPromptUsdPerM: number;
|
|
38
|
+
estCompletionUsdPerM: number;
|
|
39
|
+
};
|
|
35
40
|
export type HostedAiModelSpec = {
|
|
36
41
|
/** OpenRouter model id, e.g. "deepseek/deepseek-v4-flash". */
|
|
37
42
|
model: string;
|
|
@@ -54,6 +59,12 @@ export type HostedAiModelSpec = {
|
|
|
54
59
|
*/
|
|
55
60
|
estPromptUsdPerM: number;
|
|
56
61
|
estCompletionUsdPerM: number;
|
|
62
|
+
/**
|
|
63
|
+
* The provider's long-context tier: once a prompt reaches `minPromptTokens`,
|
|
64
|
+
* OpenRouter prices the WHOLE call (prompt and completion) at these rates.
|
|
65
|
+
* Like the base estimate prices, it only sizes credit reservations.
|
|
66
|
+
*/
|
|
67
|
+
estLongContext?: HostedAiLongContextEstimate;
|
|
57
68
|
/** Upper bound on completion tokens requested for this tier. */
|
|
58
69
|
maxOutputTokens: number;
|
|
59
70
|
/**
|
|
@@ -22,6 +22,25 @@
|
|
|
22
22
|
* can re-source the catalog without dragging the barrel in.
|
|
23
23
|
*/
|
|
24
24
|
import { copilotAudience, isCopilotFlagOn } from "./copilot/access.js";
|
|
25
|
+
/**
|
|
26
|
+
* Long-context tiers from OpenRouter's endpoint pricing (captured in
|
|
27
|
+
* control-db dev-eval-fixtures/public-endpoint-contracts-v2.json). Haiku 5.5
|
|
28
|
+
* costs 5x on prompt and completion from 100k prompt tokens. Without this tier,
|
|
29
|
+
* the Haiku reservation priced those calls at the base rate. In production from
|
|
30
|
+
* 2026-10-31 to 2026-11-07, 331 of 600 such calls cost more than their hold.
|
|
31
|
+
* The uncharged excess was 6,147 credits, 99% of all `capture_clipped` loss.
|
|
32
|
+
* Sol uses the costlier Azure endpoint, like its base estimate.
|
|
33
|
+
*/
|
|
34
|
+
const HAIKU_5_5_LONG_CONTEXT = {
|
|
35
|
+
minPromptTokens: 100_000,
|
|
36
|
+
estPromptUsdPerM: 0.5,
|
|
37
|
+
estCompletionUsdPerM: 2.5,
|
|
38
|
+
};
|
|
39
|
+
const SOL_6_1_LONG_CONTEXT = {
|
|
40
|
+
minPromptTokens: 272_000,
|
|
41
|
+
estPromptUsdPerM: 4,
|
|
42
|
+
estCompletionUsdPerM: 15,
|
|
43
|
+
};
|
|
25
44
|
/**
|
|
26
45
|
* The Copilot's tiers, which an Oxygent's own chat runs at. Hoisted out of the
|
|
27
46
|
* registry so the Agent use case can share the same spec objects.
|
|
@@ -59,6 +78,7 @@ const COPILOT_MODEL_SPECS = {
|
|
|
59
78
|
reasoningEffort: "medium",
|
|
60
79
|
estPromptUsdPerM: 2,
|
|
61
80
|
estCompletionUsdPerM: 10,
|
|
81
|
+
estLongContext: SOL_6_1_LONG_CONTEXT,
|
|
62
82
|
// Reasoning tokens count against this cap, so 8,192 left a long tool call
|
|
63
83
|
// (a full sequence draft, a wide table write) to be cut off mid-argument,
|
|
64
84
|
// which fails the turn on the second time. Credit holds are sized from the
|
|
@@ -103,6 +123,7 @@ const COPILOT_MODEL_SPECS = {
|
|
|
103
123
|
reasoningEffort: "medium",
|
|
104
124
|
estPromptUsdPerM: 0.1,
|
|
105
125
|
estCompletionUsdPerM: 0.5,
|
|
126
|
+
estLongContext: HAIKU_5_5_LONG_CONTEXT,
|
|
106
127
|
// A conversation tier (the default since #5225), so Auto's cap (see Auto).
|
|
107
128
|
maxOutputTokens: 16_384,
|
|
108
129
|
},
|
|
@@ -113,6 +134,7 @@ const COPILOT_MODEL_SPECS = {
|
|
|
113
134
|
reasoningEffort: "medium",
|
|
114
135
|
estPromptUsdPerM: 2,
|
|
115
136
|
estCompletionUsdPerM: 10,
|
|
137
|
+
estLongContext: SOL_6_1_LONG_CONTEXT,
|
|
116
138
|
// A conversation tier, so Auto's cap (see Auto).
|
|
117
139
|
maxOutputTokens: 16_384,
|
|
118
140
|
},
|
|
@@ -12,6 +12,18 @@ export function prepareLlmPayload(value, fieldKey = "") {
|
|
|
12
12
|
value = "[REDACTED]";
|
|
13
13
|
if (value === undefined || value === null)
|
|
14
14
|
return { value, chunks: [] };
|
|
15
|
+
// Scalar fast path, identical to the serialized round trip below: each
|
|
16
|
+
// Langfuse metadata field is prepared separately, twice per AI-column row.
|
|
17
|
+
if (typeof value === "boolean")
|
|
18
|
+
return { value, chunks: [] };
|
|
19
|
+
// `|| 0` turns -0 into 0, as JSON does.
|
|
20
|
+
if (typeof value === "number")
|
|
21
|
+
return { value: Number.isFinite(value) ? value || 0 : null, chunks: [] };
|
|
22
|
+
if (typeof value === "string" && value.length <= INLINE_BYTES / 3) {
|
|
23
|
+
const text = redactSecretsInString(value).replace(SECRET_QUERY, "$1[REDACTED]");
|
|
24
|
+
if (!/^\s*[\[{]/.test(text) && text.length <= INLINE_BYTES / 6)
|
|
25
|
+
return { value: text, chunks: [] };
|
|
26
|
+
}
|
|
15
27
|
let serialized;
|
|
16
28
|
try {
|
|
17
29
|
// Tool arguments and SSE frames are often JSON encoded inside a string.
|
|
@@ -76,8 +76,10 @@ export declare const OTLP_MONITOR_INFO_EVENTS: readonly ["diagnostics.capture_st
|
|
|
76
76
|
* one dev tenant's hot loop. No monitor reads them: the worker.cycle and
|
|
77
77
|
* worker.tenant_cycle spans and oxygen.worker.* metrics carry the same counts.
|
|
78
78
|
* Priority wakes log two of them at INFO, which still ships.
|
|
79
|
+
* `managed_spend.signature_recorded` is one DEBUG line per paid provider call
|
|
80
|
+
* (19k in a 20k-row dev Nemo run); its durable signature row is the evidence.
|
|
79
81
|
*/
|
|
80
|
-
export declare const OTLP_STDOUT_ONLY_DEBUG_EVENTS: readonly ["worker_cycle_completed", "worker_hot_tenant_yielded", "worker_wake_quantum_completed", "worker_wake_drain_completed"];
|
|
82
|
+
export declare const OTLP_STDOUT_ONLY_DEBUG_EVENTS: readonly ["worker_cycle_completed", "worker_hot_tenant_yielded", "worker_wake_quantum_completed", "worker_wake_drain_completed", "managed_spend.signature_recorded"];
|
|
81
83
|
export type OtlpLogSinkHandle = {
|
|
82
84
|
sink: LogSink;
|
|
83
85
|
flush: () => Promise<void>;
|
|
@@ -43,12 +43,15 @@ export const OTLP_MONITOR_INFO_EVENTS = [
|
|
|
43
43
|
* one dev tenant's hot loop. No monitor reads them: the worker.cycle and
|
|
44
44
|
* worker.tenant_cycle spans and oxygen.worker.* metrics carry the same counts.
|
|
45
45
|
* Priority wakes log two of them at INFO, which still ships.
|
|
46
|
+
* `managed_spend.signature_recorded` is one DEBUG line per paid provider call
|
|
47
|
+
* (19k in a 20k-row dev Nemo run); its durable signature row is the evidence.
|
|
46
48
|
*/
|
|
47
49
|
export const OTLP_STDOUT_ONLY_DEBUG_EVENTS = [
|
|
48
50
|
"worker_cycle_completed",
|
|
49
51
|
"worker_hot_tenant_yielded",
|
|
50
52
|
"worker_wake_quantum_completed",
|
|
51
53
|
"worker_wake_drain_completed",
|
|
54
|
+
"managed_spend.signature_recorded",
|
|
52
55
|
];
|
|
53
56
|
const DEFAULT_BATCH_SIZE = 500;
|
|
54
57
|
const DEFAULT_FLUSH_INTERVAL_MS = 2_000;
|
|
@@ -16,3 +16,12 @@ export declare function isProviderHttpError(error: unknown): error is ProviderHt
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const PROVIDER_TARGET_UNSUPPORTED = "provider_target_unsupported";
|
|
18
18
|
export declare function isProviderTargetUnsupported(error: unknown): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The request's TARGET could not be reached because its domain did not resolve:
|
|
21
|
+
* the code (and `dns_unresolved` reason) `web.page_fetch` already answers, stamped
|
|
22
|
+
* by a provider client that reports the same thing (Firecrawl's
|
|
23
|
+
* SCRAPE_DNS_RESOLUTION_ERROR). The row's URL, never a provider fault, an account
|
|
24
|
+
* or a credential; classifiers key on the code.
|
|
25
|
+
*/
|
|
26
|
+
export declare const PROVIDER_TARGET_UNREACHABLE = "page_unreachable";
|
|
27
|
+
export declare function isProviderTargetUnreachable(error: unknown): boolean;
|
|
@@ -36,3 +36,15 @@ export function isProviderTargetUnsupported(error) {
|
|
|
36
36
|
return typeof error === "object" && error !== null
|
|
37
37
|
&& error.code === PROVIDER_TARGET_UNSUPPORTED;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* The request's TARGET could not be reached because its domain did not resolve:
|
|
41
|
+
* the code (and `dns_unresolved` reason) `web.page_fetch` already answers, stamped
|
|
42
|
+
* by a provider client that reports the same thing (Firecrawl's
|
|
43
|
+
* SCRAPE_DNS_RESOLUTION_ERROR). The row's URL, never a provider fault, an account
|
|
44
|
+
* or a credential; classifiers key on the code.
|
|
45
|
+
*/
|
|
46
|
+
export const PROVIDER_TARGET_UNREACHABLE = "page_unreachable";
|
|
47
|
+
export function isProviderTargetUnreachable(error) {
|
|
48
|
+
return typeof error === "object" && error !== null
|
|
49
|
+
&& error.code === PROVIDER_TARGET_UNREACHABLE;
|
|
50
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const OXYGEN_BUILD_VERSION = "1.
|
|
1
|
+
export declare const OXYGEN_BUILD_VERSION = "1.1035.38";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// GENERATED by scripts/ci/version-stamp.mjs from VERSION + git history. Do not edit; do not commit.
|
|
2
|
-
export const OXYGEN_BUILD_VERSION = "1.
|
|
2
|
+
export const OXYGEN_BUILD_VERSION = "1.1035.38";
|