@canonry/canonry 7.92.0 → 7.92.1
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/{backfill-BUTFX4KY.js → backfill-2BFEE6XJ.js} +3 -3
- package/dist/{chunk-73PWU5XA.js → chunk-2D3JYWFX.js} +1 -1
- package/dist/{chunk-BZGAMJG2.js → chunk-BRNZ3G3B.js} +1 -1
- package/dist/{chunk-YX33HYHZ.js → chunk-BYDJIBAB.js} +14 -14
- package/dist/{chunk-7PKMRO33.js → chunk-ERSHLW5J.js} +1 -1
- package/dist/{chunk-QER7MSUH.js → chunk-IDISBRPO.js} +3 -3
- package/dist/{chunk-D2RMGUAK.js → chunk-KKSE52CI.js} +1 -1
- package/dist/{chunk-GIF3HZKN.js → chunk-MDYFHX5Y.js} +55 -7
- package/dist/{chunk-QWEAORJG.js → chunk-ZEZPTUUB.js} +14 -7
- package/dist/{chunk-WTZZOUOJ.js → chunk-ZTRGUTUP.js} +1 -1
- package/dist/{cli-commands-OPH4K73Q.js → cli-commands-G5LDZRUU.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{dashboard-QX4IBLGW.js → dashboard-UOIHD75S.js} +1 -1
- package/dist/{demo-SZ5CPFPS.js → demo-UTXZOVOZ.js} +1 -1
- package/dist/{demo-server-JIEIMLLU.js → demo-server-4TRTOGKP.js} +2 -2
- package/dist/index.d.ts +41 -41
- package/dist/index.js +6 -6
- package/dist/{init-EMXK7MX6.js → init-TNCLNDMS.js} +1 -1
- package/dist/{intelligence-service-CJNCXI4C.js → intelligence-service-YPKAM4JJ.js} +2 -2
- package/dist/{serve-3CD4TSE7.js → serve-ON5OOCRY.js} +7 -7
- package/dist/{session-N77UGPQB.js → session-4RJTRXIO.js} +3 -3
- package/dist/{tools-BNRDF6UZ.js → tools-HRHCCGJ5.js} +2 -2
- package/package.json +1 -1
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
backfillSnapshotAttributionCommand,
|
|
11
11
|
backfillTrafficClassificationCommand,
|
|
12
12
|
replayQueryAuditLog
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-IDISBRPO.js";
|
|
14
|
+
import "./chunk-BRNZ3G3B.js";
|
|
15
15
|
import "./chunk-4QYGB5IC.js";
|
|
16
16
|
import "./chunk-HGMYEDAQ.js";
|
|
17
17
|
import "./chunk-AUC47DFW.js";
|
|
@@ -19,7 +19,7 @@ import "./chunk-BTYOU24P.js";
|
|
|
19
19
|
import {
|
|
20
20
|
backfillProjectAnswerMentions,
|
|
21
21
|
backfillProjectAnswerMentionsInChunks
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ZEZPTUUB.js";
|
|
23
23
|
import "./chunk-7534NXSP.js";
|
|
24
24
|
import "./chunk-K7ZG6K7J.js";
|
|
25
25
|
import "./chunk-H3PWMM4K.js";
|
|
@@ -47,7 +47,7 @@ function queueServeHandoff() {
|
|
|
47
47
|
async function runPendingServeHandoff(format) {
|
|
48
48
|
if (!pendingServeHandoff) return;
|
|
49
49
|
pendingServeHandoff = false;
|
|
50
|
-
const { serveCommand } = await import("./serve-
|
|
50
|
+
const { serveCommand } = await import("./serve-ON5OOCRY.js");
|
|
51
51
|
await serveCommand(format);
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -728,7 +728,7 @@ var DEMO_CLI_COMMANDS = [{
|
|
|
728
728
|
options: { host: stringOption(), port: stringOption(), "trust-proxy": multiStringOption() },
|
|
729
729
|
allowPositionals: false,
|
|
730
730
|
run: async (input) => {
|
|
731
|
-
const { demoCommand } = await import("./demo-
|
|
731
|
+
const { demoCommand } = await import("./demo-UTXZOVOZ.js");
|
|
732
732
|
await demoCommand({
|
|
733
733
|
host: getString(input.values, "host"),
|
|
734
734
|
port: getString(input.values, "port"),
|
|
@@ -749,7 +749,7 @@ var BACKFILL_CLI_COMMANDS = [
|
|
|
749
749
|
allowPositionals: false,
|
|
750
750
|
supportsDryRun: true,
|
|
751
751
|
run: async (input) => {
|
|
752
|
-
const { backfillAnswerVisibilityCommand } = await import("./backfill-
|
|
752
|
+
const { backfillAnswerVisibilityCommand } = await import("./backfill-2BFEE6XJ.js");
|
|
753
753
|
await backfillAnswerVisibilityCommand({
|
|
754
754
|
project: getString(input.values, "project"),
|
|
755
755
|
dryRun: input.dryRun,
|
|
@@ -766,7 +766,7 @@ var BACKFILL_CLI_COMMANDS = [
|
|
|
766
766
|
allowPositionals: false,
|
|
767
767
|
supportsDryRun: true,
|
|
768
768
|
run: async (input) => {
|
|
769
|
-
const { backfillAnswerMentionsCommand } = await import("./backfill-
|
|
769
|
+
const { backfillAnswerMentionsCommand } = await import("./backfill-2BFEE6XJ.js");
|
|
770
770
|
await backfillAnswerMentionsCommand({
|
|
771
771
|
project: getString(input.values, "project"),
|
|
772
772
|
dryRun: input.dryRun,
|
|
@@ -784,7 +784,7 @@ var BACKFILL_CLI_COMMANDS = [
|
|
|
784
784
|
},
|
|
785
785
|
supportsDryRun: true,
|
|
786
786
|
run: async (input) => {
|
|
787
|
-
const { backfillInsightsCommand } = await import("./backfill-
|
|
787
|
+
const { backfillInsightsCommand } = await import("./backfill-2BFEE6XJ.js");
|
|
788
788
|
const usage = "canonry backfill insights <project> [--from-run <id>] [--to-run <id>] [--since <date>] [--dry-run] [--format json]";
|
|
789
789
|
const project3 = requireProject(input, "backfill insights", usage);
|
|
790
790
|
await backfillInsightsCommand(project3, {
|
|
@@ -804,7 +804,7 @@ var BACKFILL_CLI_COMMANDS = [
|
|
|
804
804
|
},
|
|
805
805
|
allowPositionals: false,
|
|
806
806
|
run: async (input) => {
|
|
807
|
-
const { backfillNormalizedPathsCommand } = await import("./backfill-
|
|
807
|
+
const { backfillNormalizedPathsCommand } = await import("./backfill-2BFEE6XJ.js");
|
|
808
808
|
await backfillNormalizedPathsCommand({
|
|
809
809
|
project: getString(input.values, "project"),
|
|
810
810
|
format: input.format
|
|
@@ -819,7 +819,7 @@ var BACKFILL_CLI_COMMANDS = [
|
|
|
819
819
|
},
|
|
820
820
|
allowPositionals: false,
|
|
821
821
|
run: async (input) => {
|
|
822
|
-
const { backfillAiReferralPathsCommand } = await import("./backfill-
|
|
822
|
+
const { backfillAiReferralPathsCommand } = await import("./backfill-2BFEE6XJ.js");
|
|
823
823
|
await backfillAiReferralPathsCommand({
|
|
824
824
|
project: getString(input.values, "project"),
|
|
825
825
|
format: input.format
|
|
@@ -831,7 +831,7 @@ var BACKFILL_CLI_COMMANDS = [
|
|
|
831
831
|
usage: "canonry backfill snapshot-attribution <project> [--dry-run] [--format json]",
|
|
832
832
|
supportsDryRun: true,
|
|
833
833
|
run: async (input) => {
|
|
834
|
-
const { backfillSnapshotAttributionCommand } = await import("./backfill-
|
|
834
|
+
const { backfillSnapshotAttributionCommand } = await import("./backfill-2BFEE6XJ.js");
|
|
835
835
|
const usage = "canonry backfill snapshot-attribution <project> [--dry-run] [--format json]";
|
|
836
836
|
const project3 = requireProject(input, "backfill snapshot-attribution", usage);
|
|
837
837
|
await backfillSnapshotAttributionCommand({
|
|
@@ -850,7 +850,7 @@ var BACKFILL_CLI_COMMANDS = [
|
|
|
850
850
|
allowPositionals: false,
|
|
851
851
|
supportsDryRun: true,
|
|
852
852
|
run: async (input) => {
|
|
853
|
-
const { backfillTrafficClassificationCommand } = await import("./backfill-
|
|
853
|
+
const { backfillTrafficClassificationCommand } = await import("./backfill-2BFEE6XJ.js");
|
|
854
854
|
await backfillTrafficClassificationCommand({
|
|
855
855
|
project: getString(input.values, "project"),
|
|
856
856
|
dryRun: input.dryRun,
|
|
@@ -1494,7 +1494,7 @@ var DASHBOARD_CLI_COMMANDS = [
|
|
|
1494
1494
|
usage: "canonry dashboard reset-password [--format json]",
|
|
1495
1495
|
help: "Clears the dashboard password from config.yaml, so the dashboard asks for a new one after a restart.\nLocal only: it edits the config file under CANONRY_CONFIG_DIR and does not call the server.",
|
|
1496
1496
|
run: async (input) => {
|
|
1497
|
-
const { resetDashboardPassword } = await import("./dashboard-
|
|
1497
|
+
const { resetDashboardPassword } = await import("./dashboard-UOIHD75S.js");
|
|
1498
1498
|
await resetDashboardPassword({ format: input.format });
|
|
1499
1499
|
}
|
|
1500
1500
|
},
|
|
@@ -7161,7 +7161,7 @@ var SYSTEM_CLI_COMMANDS = [
|
|
|
7161
7161
|
options: { access: stringOption() },
|
|
7162
7162
|
run: async (input) => {
|
|
7163
7163
|
if (input.positionals.length > 1) throw usageError("Expected at most one command group");
|
|
7164
|
-
const [{ printCliCatalog }, { REGISTERED_CLI_COMMANDS: REGISTERED_CLI_COMMANDS2 }] = await Promise.all([import("./cli-catalog-CFCLMVSK.js"), import("./cli-commands-
|
|
7164
|
+
const [{ printCliCatalog }, { REGISTERED_CLI_COMMANDS: REGISTERED_CLI_COMMANDS2 }] = await Promise.all([import("./cli-catalog-CFCLMVSK.js"), import("./cli-commands-G5LDZRUU.js")]);
|
|
7165
7165
|
printCliCatalog(REGISTERED_CLI_COMMANDS2, input.format, input.positionals[0], getString(input.values, "access"));
|
|
7166
7166
|
}
|
|
7167
7167
|
},
|
|
@@ -7210,7 +7210,7 @@ var SYSTEM_CLI_COMMANDS = [
|
|
|
7210
7210
|
},
|
|
7211
7211
|
allowPositionals: false,
|
|
7212
7212
|
run: async (input) => {
|
|
7213
|
-
const { initCommand } = await import("./init-
|
|
7213
|
+
const { initCommand } = await import("./init-TNCLNDMS.js");
|
|
7214
7214
|
await initCommand({
|
|
7215
7215
|
force: getBoolean(input.values, "force"),
|
|
7216
7216
|
ref: getString(input.values, "ref"),
|
|
@@ -7265,7 +7265,7 @@ var SYSTEM_CLI_COMMANDS = [
|
|
|
7265
7265
|
allowPositionals: false,
|
|
7266
7266
|
run: async (input) => {
|
|
7267
7267
|
applyServerEnv(input.values);
|
|
7268
|
-
const { serveCommand } = await import("./serve-
|
|
7268
|
+
const { serveCommand } = await import("./serve-ON5OOCRY.js");
|
|
7269
7269
|
await serveCommand(input.format);
|
|
7270
7270
|
}
|
|
7271
7271
|
},
|
|
@@ -8657,8 +8657,8 @@ var AGENT_CLI_COMMANDS = [
|
|
|
8657
8657
|
"timeout-ms": stringOption()
|
|
8658
8658
|
},
|
|
8659
8659
|
run: async (input) => {
|
|
8660
|
-
const { coerceAgentProvider } = await import("./session-
|
|
8661
|
-
const { AERO_TOOL_PROFILES, isAeroToolProfile } = await import("./tools-
|
|
8660
|
+
const { coerceAgentProvider } = await import("./session-4RJTRXIO.js");
|
|
8661
|
+
const { AERO_TOOL_PROFILES, isAeroToolProfile } = await import("./tools-HRHCCGJ5.js");
|
|
8662
8662
|
const { agentAsk } = await import("./agent-ask-S374MIJS.js");
|
|
8663
8663
|
const usage = `canonry agent ask <project> "<prompt>" [--provider ${AGENT_PROVIDER_IDS.join("|")}] [--model <id>] [--scope all|read-only] [--profile default|ads-operator] [--context <json>] [--conversation <id>] [--max-tool-calls <n>] [--timeout-ms <ms>] [--format json]`;
|
|
8664
8664
|
const project3 = requireProject(input, "agent.ask", usage);
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
reparseStoredResult4,
|
|
9
9
|
reparseStoredResult5,
|
|
10
10
|
resolveStoredApiResponse
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BRNZ3G3B.js";
|
|
12
12
|
import {
|
|
13
13
|
loadConfig
|
|
14
14
|
} from "./chunk-4QYGB5IC.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
createRunCompetitorResolver,
|
|
25
25
|
readMarketCompetitorNames,
|
|
26
26
|
refreshSnapshotMentionIdentity
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-ZEZPTUUB.js";
|
|
28
28
|
import {
|
|
29
29
|
RawEventSampleEventTypes,
|
|
30
30
|
auditLog,
|
|
@@ -429,7 +429,7 @@ No DB writes performed. Re-run without --dry-run to apply.`);
|
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
async function backfillInsightsCommand(project, opts) {
|
|
432
|
-
const { IntelligenceService } = await import("./intelligence-service-
|
|
432
|
+
const { IntelligenceService } = await import("./intelligence-service-YPKAM4JJ.js");
|
|
433
433
|
const config = loadConfig();
|
|
434
434
|
const db = createClient(config.database);
|
|
435
435
|
migrate(db);
|
|
@@ -27,14 +27,14 @@ import {
|
|
|
27
27
|
resolveConfiguredAgentProvider,
|
|
28
28
|
resolveSessionProviderAndModel,
|
|
29
29
|
setAeroSystemPrompt
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-KKSE52CI.js";
|
|
31
31
|
import {
|
|
32
32
|
AeroToolProfiles,
|
|
33
33
|
AeroToolScopes,
|
|
34
34
|
buildAeroStateTools,
|
|
35
35
|
isAeroToolProfile,
|
|
36
36
|
truncateToolResult
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-ERSHLW5J.js";
|
|
38
38
|
import {
|
|
39
39
|
getGoogleAuthConfig,
|
|
40
40
|
getGoogleConnection,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
openrouterAdapter,
|
|
66
66
|
perplexityAdapter,
|
|
67
67
|
startTrafficReclassification
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-BRNZ3G3B.js";
|
|
69
69
|
import {
|
|
70
70
|
classifyUsageSurface,
|
|
71
71
|
createApiUsageTelemetry,
|
|
@@ -162,7 +162,7 @@ import {
|
|
|
162
162
|
} from "./chunk-HGMYEDAQ.js";
|
|
163
163
|
import {
|
|
164
164
|
IntelligenceService
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-ZTRGUTUP.js";
|
|
166
166
|
import {
|
|
167
167
|
computeCitedCompetitorDomains,
|
|
168
168
|
determineCitationState
|
|
@@ -316,7 +316,7 @@ import {
|
|
|
316
316
|
webhookResponseReason,
|
|
317
317
|
webhookTargetRefusalReason,
|
|
318
318
|
writeAuditLog
|
|
319
|
-
} from "./chunk-
|
|
319
|
+
} from "./chunk-ZEZPTUUB.js";
|
|
320
320
|
import {
|
|
321
321
|
OperationalLogStore,
|
|
322
322
|
SentimentIdempotencyConflict,
|
|
@@ -597,6 +597,7 @@ import {
|
|
|
597
597
|
isEligibleFor,
|
|
598
598
|
isNegativeReviewRating,
|
|
599
599
|
isOpenRouterRoute,
|
|
600
|
+
isProviderAccountFailure,
|
|
600
601
|
isReadOnlyKey,
|
|
601
602
|
isRetryableHttpError,
|
|
602
603
|
isSearchLocationIgnored,
|
|
@@ -5975,7 +5976,7 @@ function nonBlank(value) {
|
|
|
5975
5976
|
return trimmed ? trimmed : void 0;
|
|
5976
5977
|
}
|
|
5977
5978
|
function resolveBuildCommit(env = process.env) {
|
|
5978
|
-
const embedded = true ? "
|
|
5979
|
+
const embedded = true ? "20ec7e4563f5d7afaa5657f6bedc2f8ec4b18727" : void 0;
|
|
5979
5980
|
return nonBlank(embedded) ?? nonBlank(env.CANONRY_COMMIT);
|
|
5980
5981
|
}
|
|
5981
5982
|
function resolveInstanceIdentity(env = process.env) {
|
|
@@ -10695,7 +10696,7 @@ function bingRunFailure(err) {
|
|
|
10695
10696
|
}
|
|
10696
10697
|
var BING_INSPECT_SPACING_MS = 2e3;
|
|
10697
10698
|
async function executeBingInspectSitemap(db, runId, projectId, opts) {
|
|
10698
|
-
const reportOutcome = startRunOutcome(db, runId, FeatureNames.bing, "
|
|
10699
|
+
const reportOutcome = startRunOutcome(db, runId, FeatureNames.bing, "inspect");
|
|
10699
10700
|
let abortCause;
|
|
10700
10701
|
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
10701
10702
|
db.update(runs).set({ status: RunStatuses.running, startedAt }).where(eq12(runs.id, runId)).run();
|
|
@@ -16875,6 +16876,7 @@ async function compactMessages(args) {
|
|
|
16875
16876
|
// src/agent/session-registry.ts
|
|
16876
16877
|
var log27 = createLogger("SessionRegistry");
|
|
16877
16878
|
var MAX_HYDRATE_NOTES = 20;
|
|
16879
|
+
var PROVIDER_ACCOUNT_COOLDOWN_MS = 24 * 60 * 60 * 1e3;
|
|
16878
16880
|
var MAX_HYDRATE_BYTES = 32 * 1024;
|
|
16879
16881
|
function escapeMemoryFragment(value) {
|
|
16880
16882
|
return value.replace(/<(\/?)memory>/gi, "<$1\u200Cmemory>");
|
|
@@ -16891,6 +16893,8 @@ function withoutPersistedToolDetails(messages) {
|
|
|
16891
16893
|
var SessionRegistry = class {
|
|
16892
16894
|
live = /* @__PURE__ */ new Map();
|
|
16893
16895
|
pending = /* @__PURE__ */ new Map();
|
|
16896
|
+
/** Shared across projects, scoped to the provider and a digest of its credential. */
|
|
16897
|
+
providerCooldowns = /* @__PURE__ */ new Map();
|
|
16894
16898
|
/** Last tool scope used on the live Agent for a project. Read in getOrCreate to know when to swap. */
|
|
16895
16899
|
scopes = /* @__PURE__ */ new Map();
|
|
16896
16900
|
/** Last profile used on the live Agent for a project. Paired with scopes when rebuilding tools. */
|
|
@@ -17341,6 +17345,7 @@ ${lines.join("\n")}
|
|
|
17341
17345
|
*/
|
|
17342
17346
|
queueFollowUp(projectName, message) {
|
|
17343
17347
|
if (!this.proactive) return;
|
|
17348
|
+
if (this.providerCoolingDown(projectName)) return;
|
|
17344
17349
|
if (this.live.has(projectName)) {
|
|
17345
17350
|
this.appendPending(projectName, [message]);
|
|
17346
17351
|
} else {
|
|
@@ -17371,6 +17376,7 @@ ${lines.join("\n")}
|
|
|
17371
17376
|
async drainNow(projectName) {
|
|
17372
17377
|
if (!this.proactive) return;
|
|
17373
17378
|
if (!this.hasPendingWork(projectName)) return;
|
|
17379
|
+
if (this.providerCoolingDown(projectName)) return;
|
|
17374
17380
|
try {
|
|
17375
17381
|
let agent;
|
|
17376
17382
|
try {
|
|
@@ -17381,6 +17387,7 @@ ${lines.join("\n")}
|
|
|
17381
17387
|
if (err.code === "AGENT_BUSY") return;
|
|
17382
17388
|
throw err;
|
|
17383
17389
|
}
|
|
17390
|
+
if (this.providerCoolingDown(projectName)) return;
|
|
17384
17391
|
const msgs = this.consumePending(projectName);
|
|
17385
17392
|
if (msgs.length === 0) return;
|
|
17386
17393
|
await agent.prompt(msgs);
|
|
@@ -17477,12 +17484,53 @@ ${lines.join("\n")}
|
|
|
17477
17484
|
* arrives mid-CLI-turn would sit in pending until someone called drainNow.
|
|
17478
17485
|
*/
|
|
17479
17486
|
registerDrainHook(agent, projectName) {
|
|
17487
|
+
let lastRequest;
|
|
17488
|
+
const resolveApiKey = agent.getApiKey;
|
|
17489
|
+
agent.getApiKey = async (provider) => {
|
|
17490
|
+
lastRequest = void 0;
|
|
17491
|
+
const apiKey = await resolveApiKey?.(provider);
|
|
17492
|
+
const accountKey = this.providerAccountKey(provider, apiKey);
|
|
17493
|
+
lastRequest = { accountKey, cooldown: this.providerCooldowns.get(accountKey) };
|
|
17494
|
+
return apiKey;
|
|
17495
|
+
};
|
|
17480
17496
|
agent.subscribe((event) => {
|
|
17497
|
+
if (event.type === "agent_start") lastRequest = void 0;
|
|
17481
17498
|
if (event.type !== "agent_end") return;
|
|
17499
|
+
if (lastRequest) {
|
|
17500
|
+
const { accountKey, cooldown } = lastRequest;
|
|
17501
|
+
const reason = classifyProviderErrorMessage(agent.state.errorMessage ?? "");
|
|
17502
|
+
if (isProviderAccountFailure(reason)) {
|
|
17503
|
+
const retryAt = Date.now() + PROVIDER_ACCOUNT_COOLDOWN_MS;
|
|
17504
|
+
this.providerCooldowns.set(accountKey, { retryAt });
|
|
17505
|
+
log27.warn("provider.background-paused", {
|
|
17506
|
+
projectName,
|
|
17507
|
+
provider: agent.state.model.provider,
|
|
17508
|
+
reason,
|
|
17509
|
+
retryAt: new Date(retryAt).toISOString(),
|
|
17510
|
+
recovery: "Fix the provider credentials or billing, then send Aero a prompt to retry now."
|
|
17511
|
+
});
|
|
17512
|
+
} else if (aeroTurnStatus(agent)?.reason === "completed" && this.providerCooldowns.get(accountKey) === cooldown) {
|
|
17513
|
+
this.providerCooldowns.delete(accountKey);
|
|
17514
|
+
}
|
|
17515
|
+
}
|
|
17482
17516
|
if ((this.pending.get(projectName) ?? []).length === 0) return;
|
|
17483
17517
|
void this.drainNow(projectName);
|
|
17484
17518
|
});
|
|
17485
17519
|
}
|
|
17520
|
+
providerAccountKey(provider, apiKey) {
|
|
17521
|
+
const canonical = coerceAgentProvider(provider);
|
|
17522
|
+
const vendor = canonical ? getAgentProvider(canonical).piAiProvider : provider;
|
|
17523
|
+
return crypto24.createHash("sha256").update(JSON.stringify([vendor, apiKey ?? ""])).digest("hex");
|
|
17524
|
+
}
|
|
17525
|
+
providerCoolingDown(projectName) {
|
|
17526
|
+
for (const [key, cooldown] of this.providerCooldowns) {
|
|
17527
|
+
if (cooldown.retryAt <= Date.now()) this.providerCooldowns.delete(key);
|
|
17528
|
+
}
|
|
17529
|
+
const provider = this.turnProvider(projectName);
|
|
17530
|
+
if (provider === void 0) return false;
|
|
17531
|
+
const vendor = getAgentProvider(provider).piAiProvider;
|
|
17532
|
+
return this.providerCooldowns.has(this.providerAccountKey(vendor, resolveApiKeyFor(vendor, this.opts.config)));
|
|
17533
|
+
}
|
|
17486
17534
|
resolveProjectId(projectName) {
|
|
17487
17535
|
const id = this.tryResolveProjectId(projectName);
|
|
17488
17536
|
if (!id) throw new Error(`Project "${projectName}" not found`);
|
|
@@ -57650,11 +57650,14 @@ var BingApiError = class extends Error {
|
|
|
57650
57650
|
* callers do not have to parse prose.
|
|
57651
57651
|
*/
|
|
57652
57652
|
isThrottle;
|
|
57653
|
-
|
|
57653
|
+
/** Only the retry header is retained; never retain response credentials. */
|
|
57654
|
+
headers;
|
|
57655
|
+
constructor(message, status, bingErrorCode = null, retryAfter) {
|
|
57654
57656
|
super(message);
|
|
57655
57657
|
this.name = "BingApiError";
|
|
57656
57658
|
this.status = status;
|
|
57657
57659
|
this.bingErrorCode = bingErrorCode;
|
|
57660
|
+
this.headers = retryAfter == null ? void 0 : { "retry-after": retryAfter };
|
|
57658
57661
|
this.isThrottle = status === 429 || bingErrorCode != null && BING_THROTTLE_ERROR_CODES.has(bingErrorCode);
|
|
57659
57662
|
}
|
|
57660
57663
|
};
|
|
@@ -57748,14 +57751,14 @@ async function bingFetchOnce(apiKey, endpoint, opts) {
|
|
|
57748
57751
|
}
|
|
57749
57752
|
if (res.status === 429) {
|
|
57750
57753
|
bingClientLog("error", "http.rate-limited", { endpoint, method, httpStatus: 429 });
|
|
57751
|
-
throw new BingApiError("Bing API rate limit exceeded", 429);
|
|
57754
|
+
throw new BingApiError("Bing API rate limit exceeded", 429, null, res.headers.get("retry-after"));
|
|
57752
57755
|
}
|
|
57753
57756
|
if (!res.ok) {
|
|
57754
57757
|
const body = await res.text();
|
|
57755
57758
|
let detail = body.length <= 500 ? body : `${body.slice(0, 500)}... [truncated]`;
|
|
57756
57759
|
detail = detail.replace(new RegExp(escapeRegExp(apiKey), "g"), "***");
|
|
57757
57760
|
const bingErrorCode = parseBingErrorCode(body);
|
|
57758
|
-
const err = new BingApiError(`Bing API error (${res.status}): ${detail}`, res.status, bingErrorCode);
|
|
57761
|
+
const err = new BingApiError(`Bing API error (${res.status}): ${detail}`, res.status, bingErrorCode, res.headers.get("retry-after"));
|
|
57759
57762
|
bingClientLog("error", err.isThrottle ? "http.throttled" : "http.error", {
|
|
57760
57763
|
endpoint,
|
|
57761
57764
|
method,
|
|
@@ -57793,9 +57796,13 @@ function throttleCooldownRemainingMs(apiKey) {
|
|
|
57793
57796
|
}
|
|
57794
57797
|
return remaining;
|
|
57795
57798
|
}
|
|
57796
|
-
function openThrottleCooldown(apiKey) {
|
|
57797
|
-
|
|
57798
|
-
|
|
57799
|
+
function openThrottleCooldown(apiKey, err) {
|
|
57800
|
+
const cooldownMs = Math.max(BING_THROTTLE_COOLDOWN_MS, retryAfterDelayMs(err) ?? 0);
|
|
57801
|
+
const key = cooldownKey(apiKey);
|
|
57802
|
+
const now = cooldownNow();
|
|
57803
|
+
const retryAt = Math.max(throttleCooldownUntil.get(key) ?? 0, now + cooldownMs);
|
|
57804
|
+
throttleCooldownUntil.set(key, retryAt);
|
|
57805
|
+
bingClientLog("error", "http.cooldown-open", { cooldownMs: retryAt - now });
|
|
57799
57806
|
}
|
|
57800
57807
|
async function bingFetch(apiKey, endpoint, opts) {
|
|
57801
57808
|
const isIdempotent = opts?.idempotent ?? (opts?.method ?? "GET") === "GET";
|
|
@@ -57827,7 +57834,7 @@ async function bingFetch(apiKey, endpoint, opts) {
|
|
|
57827
57834
|
}
|
|
57828
57835
|
});
|
|
57829
57836
|
} catch (err) {
|
|
57830
|
-
if (err instanceof BingApiError && err.isThrottle) openThrottleCooldown(apiKey);
|
|
57837
|
+
if (err instanceof BingApiError && err.isThrottle) openThrottleCooldown(apiKey, err);
|
|
57831
57838
|
throw err;
|
|
57832
57839
|
}
|
|
57833
57840
|
}
|
package/dist/cli.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node --import tsx
|
|
2
2
|
import {
|
|
3
3
|
REGISTERED_CLI_COMMANDS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BYDJIBAB.js";
|
|
5
5
|
import "./chunk-6GO5VVAC.js";
|
|
6
6
|
import {
|
|
7
7
|
buildSetupState,
|
|
8
8
|
runPendingServeHandoff
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2D3JYWFX.js";
|
|
10
10
|
import "./chunk-VJWDBFSL.js";
|
|
11
11
|
import "./chunk-U3T37P7H.js";
|
|
12
12
|
import "./chunk-TSENU4GG.js";
|
|
@@ -40,7 +40,7 @@ function parseDemoTrustedProxies(values) {
|
|
|
40
40
|
async function demoCommand(options) {
|
|
41
41
|
const { host, port } = parseDemoListenOptions(options);
|
|
42
42
|
const trustProxy = parseDemoTrustedProxies(options.trustProxy);
|
|
43
|
-
const { createDemoServer } = await import("./demo-server-
|
|
43
|
+
const { createDemoServer } = await import("./demo-server-4TRTOGKP.js");
|
|
44
44
|
const app = await createDemoServer({ trustProxy });
|
|
45
45
|
let stopping = false;
|
|
46
46
|
const stop = () => {
|
|
@@ -18,7 +18,7 @@ import "./chunk-HGMYEDAQ.js";
|
|
|
18
18
|
import {
|
|
19
19
|
HISTORY_WINDOW_RUNS,
|
|
20
20
|
IntelligenceService
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZTRGUTUP.js";
|
|
22
22
|
import {
|
|
23
23
|
determineCitationState
|
|
24
24
|
} from "./chunk-AUC47DFW.js";
|
|
@@ -26,7 +26,7 @@ import "./chunk-BTYOU24P.js";
|
|
|
26
26
|
import {
|
|
27
27
|
apiRoutes,
|
|
28
28
|
assessConversionTrackingIntegrity
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ZEZPTUUB.js";
|
|
30
30
|
import "./chunk-7534NXSP.js";
|
|
31
31
|
import "./chunk-K7ZG6K7J.js";
|
|
32
32
|
import {
|
package/dist/index.d.ts
CHANGED
|
@@ -1303,8 +1303,8 @@ declare const seoCapabilitySchema: z.ZodEnum<{
|
|
|
1303
1303
|
type SeoCapability = z.infer<typeof seoCapabilitySchema>;
|
|
1304
1304
|
declare const seoTargetSchema: z.ZodObject<{
|
|
1305
1305
|
kind: z.ZodEnum<{
|
|
1306
|
-
host: "host";
|
|
1307
1306
|
domain: "domain";
|
|
1307
|
+
host: "host";
|
|
1308
1308
|
}>;
|
|
1309
1309
|
value: z.ZodString;
|
|
1310
1310
|
includeSubdomains: z.ZodBoolean;
|
|
@@ -1320,8 +1320,8 @@ type SeoDevice = z.infer<typeof seoDeviceSchema>;
|
|
|
1320
1320
|
declare const seoCompetitorSchema: z.ZodObject<{
|
|
1321
1321
|
target: z.ZodObject<{
|
|
1322
1322
|
kind: z.ZodEnum<{
|
|
1323
|
-
host: "host";
|
|
1324
1323
|
domain: "domain";
|
|
1324
|
+
host: "host";
|
|
1325
1325
|
}>;
|
|
1326
1326
|
value: z.ZodString;
|
|
1327
1327
|
includeSubdomains: z.ZodBoolean;
|
|
@@ -1349,24 +1349,24 @@ declare const seoCompetitorSchema: z.ZodObject<{
|
|
|
1349
1349
|
}, z.core.$strict>;
|
|
1350
1350
|
type SeoCompetitor = z.infer<typeof seoCompetitorSchema>;
|
|
1351
1351
|
declare const seoKeywordGapModeSchema: z.ZodEnum<{
|
|
1352
|
-
missing: "missing";
|
|
1353
1352
|
shared: "shared";
|
|
1353
|
+
missing: "missing";
|
|
1354
1354
|
}>;
|
|
1355
1355
|
type SeoKeywordGapMode = z.infer<typeof seoKeywordGapModeSchema>;
|
|
1356
1356
|
/** Missing means absent from the provider's database result for this pair, never a fresh Google rank check. */
|
|
1357
1357
|
declare const seoKeywordGapSchema: z.ZodObject<{
|
|
1358
1358
|
target: z.ZodObject<{
|
|
1359
1359
|
kind: z.ZodEnum<{
|
|
1360
|
-
host: "host";
|
|
1361
1360
|
domain: "domain";
|
|
1361
|
+
host: "host";
|
|
1362
1362
|
}>;
|
|
1363
1363
|
value: z.ZodString;
|
|
1364
1364
|
includeSubdomains: z.ZodBoolean;
|
|
1365
1365
|
}, z.core.$strict>;
|
|
1366
1366
|
competitor: z.ZodObject<{
|
|
1367
1367
|
kind: z.ZodEnum<{
|
|
1368
|
-
host: "host";
|
|
1369
1368
|
domain: "domain";
|
|
1369
|
+
host: "host";
|
|
1370
1370
|
}>;
|
|
1371
1371
|
value: z.ZodString;
|
|
1372
1372
|
includeSubdomains: z.ZodBoolean;
|
|
@@ -1380,8 +1380,8 @@ declare const seoKeywordGapSchema: z.ZodObject<{
|
|
|
1380
1380
|
keywordDifficulty: z.ZodNullable<z.ZodNumber>;
|
|
1381
1381
|
cpcUsd: z.ZodNullable<z.ZodNumber>;
|
|
1382
1382
|
kind: z.ZodEnum<{
|
|
1383
|
-
missing: "missing";
|
|
1384
1383
|
shared: "shared";
|
|
1384
|
+
missing: "missing";
|
|
1385
1385
|
outranked: "outranked";
|
|
1386
1386
|
}>;
|
|
1387
1387
|
rankGap: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1437,8 +1437,8 @@ declare const seoMarketRankingSchema: z.ZodObject<{
|
|
|
1437
1437
|
locationLabel: z.ZodString;
|
|
1438
1438
|
target: z.ZodObject<{
|
|
1439
1439
|
kind: z.ZodEnum<{
|
|
1440
|
-
host: "host";
|
|
1441
1440
|
domain: "domain";
|
|
1441
|
+
host: "host";
|
|
1442
1442
|
}>;
|
|
1443
1443
|
value: z.ZodString;
|
|
1444
1444
|
includeSubdomains: z.ZodBoolean;
|
|
@@ -1507,8 +1507,8 @@ declare const seoResultsSchema: z.ZodObject<{
|
|
|
1507
1507
|
domainIntelligence: z.ZodArray<z.ZodObject<{
|
|
1508
1508
|
target: z.ZodObject<{
|
|
1509
1509
|
kind: z.ZodEnum<{
|
|
1510
|
-
host: "host";
|
|
1511
1510
|
domain: "domain";
|
|
1511
|
+
host: "host";
|
|
1512
1512
|
}>;
|
|
1513
1513
|
value: z.ZodString;
|
|
1514
1514
|
includeSubdomains: z.ZodBoolean;
|
|
@@ -1539,8 +1539,8 @@ declare const seoResultsSchema: z.ZodObject<{
|
|
|
1539
1539
|
rankedKeywords: z.ZodArray<z.ZodObject<{
|
|
1540
1540
|
target: z.ZodObject<{
|
|
1541
1541
|
kind: z.ZodEnum<{
|
|
1542
|
-
host: "host";
|
|
1543
1542
|
domain: "domain";
|
|
1543
|
+
host: "host";
|
|
1544
1544
|
}>;
|
|
1545
1545
|
value: z.ZodString;
|
|
1546
1546
|
includeSubdomains: z.ZodBoolean;
|
|
@@ -1585,8 +1585,8 @@ declare const seoResultsSchema: z.ZodObject<{
|
|
|
1585
1585
|
locationLabel: z.ZodString;
|
|
1586
1586
|
target: z.ZodObject<{
|
|
1587
1587
|
kind: z.ZodEnum<{
|
|
1588
|
-
host: "host";
|
|
1589
1588
|
domain: "domain";
|
|
1589
|
+
host: "host";
|
|
1590
1590
|
}>;
|
|
1591
1591
|
value: z.ZodString;
|
|
1592
1592
|
includeSubdomains: z.ZodBoolean;
|
|
@@ -1624,8 +1624,8 @@ declare const seoResultsSchema: z.ZodObject<{
|
|
|
1624
1624
|
competitors: z.ZodArray<z.ZodObject<{
|
|
1625
1625
|
target: z.ZodObject<{
|
|
1626
1626
|
kind: z.ZodEnum<{
|
|
1627
|
-
host: "host";
|
|
1628
1627
|
domain: "domain";
|
|
1628
|
+
host: "host";
|
|
1629
1629
|
}>;
|
|
1630
1630
|
value: z.ZodString;
|
|
1631
1631
|
includeSubdomains: z.ZodBoolean;
|
|
@@ -1654,16 +1654,16 @@ declare const seoResultsSchema: z.ZodObject<{
|
|
|
1654
1654
|
keywordGaps: z.ZodArray<z.ZodObject<{
|
|
1655
1655
|
target: z.ZodObject<{
|
|
1656
1656
|
kind: z.ZodEnum<{
|
|
1657
|
-
host: "host";
|
|
1658
1657
|
domain: "domain";
|
|
1658
|
+
host: "host";
|
|
1659
1659
|
}>;
|
|
1660
1660
|
value: z.ZodString;
|
|
1661
1661
|
includeSubdomains: z.ZodBoolean;
|
|
1662
1662
|
}, z.core.$strict>;
|
|
1663
1663
|
competitor: z.ZodObject<{
|
|
1664
1664
|
kind: z.ZodEnum<{
|
|
1665
|
-
host: "host";
|
|
1666
1665
|
domain: "domain";
|
|
1666
|
+
host: "host";
|
|
1667
1667
|
}>;
|
|
1668
1668
|
value: z.ZodString;
|
|
1669
1669
|
includeSubdomains: z.ZodBoolean;
|
|
@@ -1677,8 +1677,8 @@ declare const seoResultsSchema: z.ZodObject<{
|
|
|
1677
1677
|
keywordDifficulty: z.ZodNullable<z.ZodNumber>;
|
|
1678
1678
|
cpcUsd: z.ZodNullable<z.ZodNumber>;
|
|
1679
1679
|
kind: z.ZodEnum<{
|
|
1680
|
-
missing: "missing";
|
|
1681
1680
|
shared: "shared";
|
|
1681
|
+
missing: "missing";
|
|
1682
1682
|
outranked: "outranked";
|
|
1683
1683
|
}>;
|
|
1684
1684
|
rankGap: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1822,7 +1822,7 @@ declare const seoProfiles: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
1822
1822
|
connectionId: string;
|
|
1823
1823
|
capabilities: ("keyword-metrics" | "domain-intelligence" | "ranked-keywords" | "market-rankings" | "competitor-discovery" | "keyword-gaps")[];
|
|
1824
1824
|
targets: {
|
|
1825
|
-
kind: "
|
|
1825
|
+
kind: "domain" | "host";
|
|
1826
1826
|
value: string;
|
|
1827
1827
|
includeSubdomains: boolean;
|
|
1828
1828
|
}[];
|
|
@@ -1831,12 +1831,12 @@ declare const seoProfiles: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
1831
1831
|
languageCode: string;
|
|
1832
1832
|
limit: number;
|
|
1833
1833
|
scope: {
|
|
1834
|
-
kind: "
|
|
1834
|
+
kind: "project" | "property" | "market" | "group";
|
|
1835
1835
|
key?: string | undefined;
|
|
1836
1836
|
expectedPlanRevision?: number | undefined;
|
|
1837
1837
|
};
|
|
1838
1838
|
competitors?: {
|
|
1839
|
-
kind: "
|
|
1839
|
+
kind: "domain" | "host";
|
|
1840
1840
|
value: string;
|
|
1841
1841
|
includeSubdomains: boolean;
|
|
1842
1842
|
}[] | undefined;
|
|
@@ -1867,7 +1867,7 @@ declare const seoProfiles: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
1867
1867
|
connectionId: string;
|
|
1868
1868
|
capabilities: ("keyword-metrics" | "domain-intelligence" | "ranked-keywords" | "market-rankings" | "competitor-discovery" | "keyword-gaps")[];
|
|
1869
1869
|
targets: {
|
|
1870
|
-
kind: "
|
|
1870
|
+
kind: "domain" | "host";
|
|
1871
1871
|
value: string;
|
|
1872
1872
|
includeSubdomains: boolean;
|
|
1873
1873
|
}[];
|
|
@@ -1876,12 +1876,12 @@ declare const seoProfiles: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
1876
1876
|
languageCode: string;
|
|
1877
1877
|
limit: number;
|
|
1878
1878
|
scope: {
|
|
1879
|
-
kind: "
|
|
1879
|
+
kind: "project" | "property" | "market" | "group";
|
|
1880
1880
|
key?: string | undefined;
|
|
1881
1881
|
expectedPlanRevision?: number | undefined;
|
|
1882
1882
|
};
|
|
1883
1883
|
competitors?: {
|
|
1884
|
-
kind: "
|
|
1884
|
+
kind: "domain" | "host";
|
|
1885
1885
|
value: string;
|
|
1886
1886
|
includeSubdomains: boolean;
|
|
1887
1887
|
}[] | undefined;
|
|
@@ -2064,7 +2064,7 @@ declare const seoJobs: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2064
2064
|
connectionId: string;
|
|
2065
2065
|
capabilities: ("keyword-metrics" | "domain-intelligence" | "ranked-keywords" | "market-rankings" | "competitor-discovery" | "keyword-gaps")[];
|
|
2066
2066
|
targets: {
|
|
2067
|
-
kind: "
|
|
2067
|
+
kind: "domain" | "host";
|
|
2068
2068
|
value: string;
|
|
2069
2069
|
includeSubdomains: boolean;
|
|
2070
2070
|
}[];
|
|
@@ -2073,12 +2073,12 @@ declare const seoJobs: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2073
2073
|
languageCode: string;
|
|
2074
2074
|
limit: number;
|
|
2075
2075
|
scope: {
|
|
2076
|
-
kind: "
|
|
2076
|
+
kind: "project" | "property" | "market" | "group";
|
|
2077
2077
|
key?: string | undefined;
|
|
2078
2078
|
expectedPlanRevision?: number | undefined;
|
|
2079
2079
|
};
|
|
2080
2080
|
competitors?: {
|
|
2081
|
-
kind: "
|
|
2081
|
+
kind: "domain" | "host";
|
|
2082
2082
|
value: string;
|
|
2083
2083
|
includeSubdomains: boolean;
|
|
2084
2084
|
}[] | undefined;
|
|
@@ -2109,7 +2109,7 @@ declare const seoJobs: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2109
2109
|
connectionId: string;
|
|
2110
2110
|
capabilities: ("keyword-metrics" | "domain-intelligence" | "ranked-keywords" | "market-rankings" | "competitor-discovery" | "keyword-gaps")[];
|
|
2111
2111
|
targets: {
|
|
2112
|
-
kind: "
|
|
2112
|
+
kind: "domain" | "host";
|
|
2113
2113
|
value: string;
|
|
2114
2114
|
includeSubdomains: boolean;
|
|
2115
2115
|
}[];
|
|
@@ -2118,12 +2118,12 @@ declare const seoJobs: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2118
2118
|
languageCode: string;
|
|
2119
2119
|
limit: number;
|
|
2120
2120
|
scope: {
|
|
2121
|
-
kind: "
|
|
2121
|
+
kind: "project" | "property" | "market" | "group";
|
|
2122
2122
|
key?: string | undefined;
|
|
2123
2123
|
expectedPlanRevision?: number | undefined;
|
|
2124
2124
|
};
|
|
2125
2125
|
competitors?: {
|
|
2126
|
-
kind: "
|
|
2126
|
+
kind: "domain" | "host";
|
|
2127
2127
|
value: string;
|
|
2128
2128
|
includeSubdomains: boolean;
|
|
2129
2129
|
}[] | undefined;
|
|
@@ -2277,7 +2277,7 @@ declare const seoJobs: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2277
2277
|
tableName: "seo_jobs";
|
|
2278
2278
|
dataType: "string";
|
|
2279
2279
|
columnType: "SQLiteText";
|
|
2280
|
-
data: "
|
|
2280
|
+
data: "partial" | "queued" | "running" | "failed" | "completed" | "cancelled" | "reconciliation-required";
|
|
2281
2281
|
driverParam: string;
|
|
2282
2282
|
notNull: true;
|
|
2283
2283
|
hasDefault: false;
|
|
@@ -2290,7 +2290,7 @@ declare const seoJobs: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2290
2290
|
generated: undefined;
|
|
2291
2291
|
}, {}, {
|
|
2292
2292
|
length: number | undefined;
|
|
2293
|
-
$type: "
|
|
2293
|
+
$type: "partial" | "queued" | "running" | "failed" | "completed" | "cancelled" | "reconciliation-required";
|
|
2294
2294
|
}>;
|
|
2295
2295
|
cancelRequested: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2296
2296
|
name: "cancel_requested";
|
|
@@ -2454,7 +2454,7 @@ declare const seoTasks: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2454
2454
|
tableName: "seo_tasks";
|
|
2455
2455
|
dataType: "string";
|
|
2456
2456
|
columnType: "SQLiteText";
|
|
2457
|
-
data: "
|
|
2457
|
+
data: "partial" | "queued" | "running" | "failed" | "completed" | "cancelled" | "reconciliation-required";
|
|
2458
2458
|
driverParam: string;
|
|
2459
2459
|
notNull: true;
|
|
2460
2460
|
hasDefault: false;
|
|
@@ -2467,7 +2467,7 @@ declare const seoTasks: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2467
2467
|
generated: undefined;
|
|
2468
2468
|
}, {}, {
|
|
2469
2469
|
length: number | undefined;
|
|
2470
|
-
$type: "
|
|
2470
|
+
$type: "partial" | "queued" | "running" | "failed" | "completed" | "cancelled" | "reconciliation-required";
|
|
2471
2471
|
}>;
|
|
2472
2472
|
leaseOwner: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2473
2473
|
name: "lease_owner";
|
|
@@ -6185,7 +6185,7 @@ declare const querySnapshots: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
6185
6185
|
tableName: "query_snapshots";
|
|
6186
6186
|
dataType: "string";
|
|
6187
6187
|
columnType: "SQLiteText";
|
|
6188
|
-
data: "
|
|
6188
|
+
data: "partial" | "unsupported" | "complete" | "failed";
|
|
6189
6189
|
driverParam: string;
|
|
6190
6190
|
notNull: false;
|
|
6191
6191
|
hasDefault: false;
|
|
@@ -6198,7 +6198,7 @@ declare const querySnapshots: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
6198
6198
|
generated: undefined;
|
|
6199
6199
|
}, {}, {
|
|
6200
6200
|
length: number | undefined;
|
|
6201
|
-
$type: "
|
|
6201
|
+
$type: "partial" | "unsupported" | "complete" | "failed";
|
|
6202
6202
|
}>;
|
|
6203
6203
|
sourceCount: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
6204
6204
|
name: "source_count";
|
|
@@ -6565,7 +6565,7 @@ declare const querySnapshots: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
6565
6565
|
parserVersion: string;
|
|
6566
6566
|
};
|
|
6567
6567
|
completion: {
|
|
6568
|
-
status: "
|
|
6568
|
+
status: "partial" | "complete" | "failed" | "pending";
|
|
6569
6569
|
finishReason: string | null;
|
|
6570
6570
|
upstreamStatus: string | null;
|
|
6571
6571
|
upstreamRequestId: string | null;
|
|
@@ -6670,7 +6670,7 @@ declare const querySnapshots: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
6670
6670
|
parserVersion: string;
|
|
6671
6671
|
};
|
|
6672
6672
|
completion: {
|
|
6673
|
-
status: "
|
|
6673
|
+
status: "partial" | "complete" | "failed" | "pending";
|
|
6674
6674
|
finishReason: string | null;
|
|
6675
6675
|
upstreamStatus: string | null;
|
|
6676
6676
|
upstreamRequestId: string | null;
|
|
@@ -12454,7 +12454,7 @@ declare const siteAuditSnapshots: drizzle_orm_sqlite_core.SQLiteTableWithColumns
|
|
|
12454
12454
|
weight: number;
|
|
12455
12455
|
sharePct: number | null;
|
|
12456
12456
|
avgScore: number;
|
|
12457
|
-
status: "
|
|
12457
|
+
status: "fail" | "partial" | "pass";
|
|
12458
12458
|
pagesPassing: number;
|
|
12459
12459
|
pagesPartial: number;
|
|
12460
12460
|
pagesFailing: number;
|
|
@@ -12476,7 +12476,7 @@ declare const siteAuditSnapshots: drizzle_orm_sqlite_core.SQLiteTableWithColumns
|
|
|
12476
12476
|
weight: number;
|
|
12477
12477
|
sharePct: number | null;
|
|
12478
12478
|
avgScore: number;
|
|
12479
|
-
status: "
|
|
12479
|
+
status: "fail" | "partial" | "pass";
|
|
12480
12480
|
pagesPassing: number;
|
|
12481
12481
|
pagesPartial: number;
|
|
12482
12482
|
pagesFailing: number;
|
|
@@ -29874,7 +29874,7 @@ declare const researchRunQueries: drizzle_orm_sqlite_core.SQLiteTableWithColumns
|
|
|
29874
29874
|
parserVersion: string;
|
|
29875
29875
|
};
|
|
29876
29876
|
completion: {
|
|
29877
|
-
status: "
|
|
29877
|
+
status: "partial" | "complete" | "failed" | "pending";
|
|
29878
29878
|
finishReason: string | null;
|
|
29879
29879
|
upstreamStatus: string | null;
|
|
29880
29880
|
upstreamRequestId: string | null;
|
|
@@ -29979,7 +29979,7 @@ declare const researchRunQueries: drizzle_orm_sqlite_core.SQLiteTableWithColumns
|
|
|
29979
29979
|
parserVersion: string;
|
|
29980
29980
|
};
|
|
29981
29981
|
completion: {
|
|
29982
|
-
status: "
|
|
29982
|
+
status: "partial" | "complete" | "failed" | "pending";
|
|
29983
29983
|
finishReason: string | null;
|
|
29984
29984
|
upstreamStatus: string | null;
|
|
29985
29985
|
upstreamRequestId: string | null;
|
|
@@ -34584,7 +34584,7 @@ declare const adsOperationSteps: drizzle_orm_sqlite_core.SQLiteTableWithColumns<
|
|
|
34584
34584
|
tableName: "ads_operation_steps";
|
|
34585
34585
|
dataType: "string";
|
|
34586
34586
|
columnType: "SQLiteText";
|
|
34587
|
-
data: "unknown" | "
|
|
34587
|
+
data: "unknown" | "active" | "failed" | "pending" | "executing" | "rollback_executing" | "rolled_back" | "rollback_failed";
|
|
34588
34588
|
driverParam: string;
|
|
34589
34589
|
notNull: true;
|
|
34590
34590
|
hasDefault: false;
|
|
@@ -34597,7 +34597,7 @@ declare const adsOperationSteps: drizzle_orm_sqlite_core.SQLiteTableWithColumns<
|
|
|
34597
34597
|
generated: undefined;
|
|
34598
34598
|
}, {}, {
|
|
34599
34599
|
length: number | undefined;
|
|
34600
|
-
$type: "unknown" | "
|
|
34600
|
+
$type: "unknown" | "active" | "failed" | "pending" | "executing" | "rollback_executing" | "rolled_back" | "rollback_failed";
|
|
34601
34601
|
}>;
|
|
34602
34602
|
providerUpdatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
34603
34603
|
name: "provider_updated_at";
|
|
@@ -40736,8 +40736,8 @@ type ClassificationConfig = z.infer<typeof classificationConfigSchema>;
|
|
|
40736
40736
|
declare const seoInstallConfigSchema: z.ZodObject<{
|
|
40737
40737
|
enabled: z.ZodBoolean;
|
|
40738
40738
|
fundingMode: z.ZodEnum<{
|
|
40739
|
-
"self-hosted": "self-hosted";
|
|
40740
40739
|
hosted: "hosted";
|
|
40740
|
+
"self-hosted": "self-hosted";
|
|
40741
40741
|
}>;
|
|
40742
40742
|
policy: z.ZodObject<{
|
|
40743
40743
|
maxRunCostMicros: z.ZodNumber;
|
package/dist/index.js
CHANGED
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
createGoogleMarketingCredentialStore,
|
|
4
4
|
createGoogleMarketingRuntime,
|
|
5
5
|
createServer
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MDYFHX5Y.js";
|
|
7
7
|
import "./chunk-DEFHTBJV.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-KKSE52CI.js";
|
|
9
|
+
import "./chunk-ERSHLW5J.js";
|
|
10
10
|
import "./chunk-ELCLGWUT.js";
|
|
11
11
|
import "./chunk-XEBKF4N5.js";
|
|
12
12
|
import "./chunk-4HLR3DRQ.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-BRNZ3G3B.js";
|
|
14
14
|
import "./chunk-WONUYAKB.js";
|
|
15
15
|
import "./chunk-TSENU4GG.js";
|
|
16
16
|
import "./chunk-N2EWSWZD.js";
|
|
@@ -28,10 +28,10 @@ import "./chunk-76KBMLPR.js";
|
|
|
28
28
|
import "./chunk-XYQMPYWE.js";
|
|
29
29
|
import "./chunk-AOJU5LKX.js";
|
|
30
30
|
import "./chunk-HGMYEDAQ.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-ZTRGUTUP.js";
|
|
32
32
|
import "./chunk-AUC47DFW.js";
|
|
33
33
|
import "./chunk-BTYOU24P.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-ZEZPTUUB.js";
|
|
35
35
|
import "./chunk-7534NXSP.js";
|
|
36
36
|
import "./chunk-K7ZG6K7J.js";
|
|
37
37
|
import "./chunk-H3PWMM4K.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HISTORY_WINDOW_RUNS,
|
|
3
3
|
IntelligenceService
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZTRGUTUP.js";
|
|
5
5
|
import "./chunk-AUC47DFW.js";
|
|
6
6
|
import "./chunk-BTYOU24P.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-ZEZPTUUB.js";
|
|
8
8
|
import "./chunk-7534NXSP.js";
|
|
9
9
|
import "./chunk-K7ZG6K7J.js";
|
|
10
10
|
import "./chunk-H3PWMM4K.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
backfillAiReferralPaths,
|
|
3
3
|
backfillNormalizedPaths
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IDISBRPO.js";
|
|
5
5
|
import {
|
|
6
6
|
operatorHttpUrl
|
|
7
7
|
} from "./chunk-6GO5VVAC.js";
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
allowsKeylessFirstRunSetup,
|
|
10
10
|
createServer,
|
|
11
11
|
waitForServerRuntimeStartup
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MDYFHX5Y.js";
|
|
13
13
|
import "./chunk-DEFHTBJV.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-KKSE52CI.js";
|
|
15
|
+
import "./chunk-ERSHLW5J.js";
|
|
16
16
|
import "./chunk-ELCLGWUT.js";
|
|
17
17
|
import "./chunk-XEBKF4N5.js";
|
|
18
18
|
import "./chunk-4HLR3DRQ.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-BRNZ3G3B.js";
|
|
20
20
|
import {
|
|
21
21
|
trackFeatureCompleted
|
|
22
22
|
} from "./chunk-WONUYAKB.js";
|
|
@@ -57,13 +57,13 @@ import {
|
|
|
57
57
|
CliError,
|
|
58
58
|
isMachineFormat
|
|
59
59
|
} from "./chunk-HGMYEDAQ.js";
|
|
60
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-ZTRGUTUP.js";
|
|
61
61
|
import "./chunk-AUC47DFW.js";
|
|
62
62
|
import "./chunk-BTYOU24P.js";
|
|
63
63
|
import {
|
|
64
64
|
refreshSnapshotMentionIdentity,
|
|
65
65
|
snapshotsWithSentimentResults
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-ZEZPTUUB.js";
|
|
67
67
|
import "./chunk-7534NXSP.js";
|
|
68
68
|
import "./chunk-K7ZG6K7J.js";
|
|
69
69
|
import {
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
resolveAeroModel,
|
|
10
10
|
resolveConfiguredAgentProvider,
|
|
11
11
|
resolveSessionProviderAndModel
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-KKSE52CI.js";
|
|
13
|
+
import "./chunk-ERSHLW5J.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveAeroSkillDir
|
|
16
16
|
} from "./chunk-MTW37GXF.js";
|
|
@@ -26,7 +26,7 @@ import "./chunk-XYQMPYWE.js";
|
|
|
26
26
|
import "./chunk-AOJU5LKX.js";
|
|
27
27
|
import "./chunk-HGMYEDAQ.js";
|
|
28
28
|
import "./chunk-BTYOU24P.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-ZEZPTUUB.js";
|
|
30
30
|
import "./chunk-7534NXSP.js";
|
|
31
31
|
import "./chunk-K7ZG6K7J.js";
|
|
32
32
|
import "./chunk-H3PWMM4K.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
buildAllTools,
|
|
12
12
|
buildReadTools,
|
|
13
13
|
isAeroToolProfile
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ERSHLW5J.js";
|
|
15
15
|
import "./chunk-ZPVJ5PVB.js";
|
|
16
16
|
import "./chunk-4QYGB5IC.js";
|
|
17
17
|
import "./chunk-UMTYAPCQ.js";
|
|
@@ -19,7 +19,7 @@ import "./chunk-76KBMLPR.js";
|
|
|
19
19
|
import "./chunk-XYQMPYWE.js";
|
|
20
20
|
import "./chunk-AOJU5LKX.js";
|
|
21
21
|
import "./chunk-HGMYEDAQ.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-ZEZPTUUB.js";
|
|
23
23
|
import "./chunk-7534NXSP.js";
|
|
24
24
|
import "./chunk-K7ZG6K7J.js";
|
|
25
25
|
import "./chunk-H3PWMM4K.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonry/canonry",
|
|
3
|
-
"version": "7.92.
|
|
3
|
+
"version": "7.92.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Self-hosted AI visibility (AEO) platform: track how ChatGPT, Claude, Gemini, and Perplexity cite your domain, join it with Search Console, GA4, server-side traffic, and paid media, and fix what you find through agent tools (CLI, REST, MCP). Local SQLite.",
|
|
6
6
|
"keywords": [
|