@canonry/canonry 7.128.0 → 7.128.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/assets/assets/{AgentSetupPage-BFO6Jx36.js → AgentSetupPage-BFXD__2X.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-Cwyl4MS5.js → MeasurementPropertyPage-BuVvdugZ.js} +1 -1
- package/assets/assets/{ProjectPage-JCH068IS.js → ProjectPage-er2nBpgg.js} +3 -3
- package/assets/assets/{RunsPage-B56n3Xwl.js → RunsPage-wtzz8XIJ.js} +1 -1
- package/assets/assets/{ServerTrafficSection-JZ7tID1A.js → ServerTrafficSection-oViiKz3j.js} +3 -3
- package/assets/assets/{SettingsPage-C1XRb6UB.js → SettingsPage-CVL6mVTM.js} +1 -1
- package/assets/assets/{TrafficPage-BIbFPquR.js → TrafficPage-drK_F4xY.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-DpJyjmCY.js → TrafficSourceDetailPage-BdvprrAg.js} +1 -1
- package/assets/assets/{index-CmdxqiD3.js → index-Bh4Hdh7M.js} +3 -3
- package/assets/assets/query-client-DTIKbVqE.js +1 -0
- package/assets/assets/{react-sigma_core.esm.min-BTRnvmn2.js → react-sigma_core.esm.min-DLmrzL1s.js} +1 -1
- package/assets/assets/{server-traffic-D598cM_v.js → server-traffic-BApvbZVl.js} +1 -1
- package/assets/index.html +2 -2
- package/dist/activity-IDVGFHBZ.js +13 -0
- package/dist/{ads-PB3VFUPV.js → ads-MMIVXXYK.js} +4 -4
- package/dist/{agent-VOL7SOEQ.js → agent-3N6J7AP5.js} +8 -8
- package/dist/{agent-ask-F46ERE3W.js → agent-ask-V5NBRKWB.js} +4 -4
- package/dist/{agent-conversations-T5Q43627.js → agent-conversations-6ZKNOOGK.js} +4 -4
- package/dist/{agent-journeys-GVEVJ5J2.js → agent-journeys-R3TB7RS6.js} +4 -4
- package/dist/{agent-memory-XXN7QXNM.js → agent-memory-VKNEXDCF.js} +4 -4
- package/dist/{agent-providers-U6XIM5JI.js → agent-providers-HV3LM656.js} +4 -4
- package/dist/{agent-transcript-ONEA6JBO.js → agent-transcript-5B7ZSNQO.js} +4 -4
- package/dist/{analytics-XWVTM57N.js → analytics-NRYYKO3D.js} +4 -4
- package/dist/{answerability-GNYSELX5.js → answerability-BMPIAEV4.js} +4 -4
- package/dist/{apply-WXW4KWUK.js → apply-52VDVYIV.js} +4 -4
- package/dist/{backfill-SWDR5M4O.js → backfill-QIXONSLO.js} +11 -11
- package/dist/{backlinks-5LIBLUEG.js → backlinks-B4IMH5VN.js} +4 -4
- package/dist/{bing-4U4ODKGV.js → bing-G56ZWW4V.js} +4 -4
- package/dist/{bootstrap-FY72AHVW.js → bootstrap-74GDJENX.js} +11 -11
- package/dist/{cdp-H5WMBYIF.js → cdp-LVPKD5WH.js} +8 -8
- package/dist/{chunk-XONND7NT.js → chunk-2GA43I45.js} +3 -3
- package/dist/{chunk-GTX7C5Y5.js → chunk-2JW5OBUF.js} +53 -25
- package/dist/{chunk-M4IAXLBT.js → chunk-34CPCOQI.js} +3 -3
- package/dist/{chunk-RDCEFEXP.js → chunk-3TCXYRME.js} +3 -3
- package/dist/{chunk-2VDYFOKB.js → chunk-4MEWPJ7A.js} +8 -8
- package/dist/{chunk-6TXHNNKW.js → chunk-4PFBSPFE.js} +4 -4
- package/dist/{chunk-BAO3PHQP.js → chunk-5JQHOPNE.js} +2 -2
- package/dist/{chunk-HS2HYFPX.js → chunk-5LBYOWQZ.js} +4 -4
- package/dist/{chunk-NEJEHRPT.js → chunk-6RE7O724.js} +2 -2
- package/dist/{chunk-5WDU7ZML.js → chunk-7G6PCF4H.js} +6 -6
- package/dist/{chunk-2PLJ4QG5.js → chunk-A4NXXWFC.js} +4 -4
- package/dist/{chunk-K3YHPTKL.js → chunk-AT2LRVEB.js} +2 -2
- package/dist/{chunk-IIL4NKRU.js → chunk-AVLWYL4G.js} +4 -4
- package/dist/{chunk-PWXLKW2F.js → chunk-BHWR4PBF.js} +3 -3
- package/dist/{chunk-X6DD3OIR.js → chunk-DOXBK2KF.js} +23 -3
- package/dist/{chunk-GRX2DION.js → chunk-EOZLVWOC.js} +4 -4
- package/dist/{chunk-GKQ4CYUM.js → chunk-ETTKN2R4.js} +52 -36
- package/dist/{chunk-FMS7CIEK.js → chunk-F56XOHE2.js} +4 -4
- package/dist/{chunk-G2NIO2J3.js → chunk-FQFL223H.js} +2 -2
- package/dist/{chunk-DY2Q3VIM.js → chunk-G7HRY36G.js} +2 -2
- package/dist/{chunk-DWFCDUE2.js → chunk-HOR6MC5A.js} +372 -372
- package/dist/{chunk-HQEH4YRO.js → chunk-I4ITDPK7.js} +1 -1
- package/dist/{chunk-GCBFSIKI.js → chunk-KIJCFPN4.js} +1 -1
- package/dist/{chunk-3GE4Z4J3.js → chunk-KZKPWHJA.js} +5 -5
- package/dist/{chunk-2T4OGJWP.js → chunk-O6RKXY2P.js} +1 -1
- package/dist/{chunk-QWD3ABAW.js → chunk-PGKT42YN.js} +1 -1
- package/dist/{chunk-LWRPSAVC.js → chunk-PM23BRHO.js} +1 -1
- package/dist/{chunk-RMLGMB5B.js → chunk-RG5E54VU.js} +1 -1
- package/dist/{chunk-GW4CL5ZO.js → chunk-STNPEES2.js} +315 -126
- package/dist/{chunk-A36PZKKS.js → chunk-SXLHTMXA.js} +2 -2
- package/dist/{chunk-ZKIEOEUZ.js → chunk-UXCNYSAB.js} +2 -2
- package/dist/{chunk-GPPTW3HU.js → chunk-V42NDP4R.js} +4 -4
- package/dist/{chunk-QXRI6DRE.js → chunk-WCWWHK7P.js} +2331 -1983
- package/dist/{chunk-OKIAF573.js → chunk-XMPXMQ5X.js} +1 -1
- package/dist/{chunk-FIF4N7DP.js → chunk-XTIOFTFS.js} +1 -1
- package/dist/{chunk-3ZNDJ4OM.js → chunk-YDVXZWWF.js} +5 -5
- package/dist/{chunk-425BZPKK.js → chunk-YW4K74WM.js} +4 -4
- package/dist/{chunk-RPAWPX7B.js → chunk-ZXX7DMBJ.js} +1 -1
- package/dist/{citations-622BWQTR.js → citations-CF7AU3KY.js} +5 -5
- package/dist/{cli-catalog-ACK3FVAX.js → cli-catalog-U6WE3BU7.js} +4 -4
- package/dist/cli-commands-DFFJYIZF.js +18 -0
- package/dist/cli.js +14 -14
- package/dist/{competitor-QYZIWXGC.js → competitor-Q7L6HJ5O.js} +4 -4
- package/dist/{content-PJASAMIV.js → content-5KLBWKCB.js} +4 -4
- package/dist/{dashboard-FQOS3J4B.js → dashboard-KQ3INTH3.js} +7 -7
- package/dist/{demo-ZGGVSKN4.js → demo-5YEH32AM.js} +3 -3
- package/dist/{demo-server-TLXLEPOI.js → demo-server-25MUI3QS.js} +13 -13
- package/dist/{discover-ZLDSXDRI.js → discover-ENDRNDS6.js} +5 -5
- package/dist/{discover-eval-7F5Q3RXS.js → discover-eval-7LJXSHUM.js} +4 -4
- package/dist/{doctor-3KSQZDZ3.js → doctor-3N7TEK5G.js} +4 -4
- package/dist/{evidence-BJZIRJ4U.js → evidence-MAIUNVWP.js} +4 -4
- package/dist/{export-cmd-BYPGV4IU.js → export-cmd-6FJNHZVJ.js} +4 -4
- package/dist/{ga-A3BAZCYH.js → ga-HWFGPMTN.js} +4 -4
- package/dist/{gbp-U6VCRAFN.js → gbp-KIPU2NE6.js} +4 -4
- package/dist/{google-UNQZBUGS.js → google-PKYUSFRS.js} +5 -5
- package/dist/{google-marketing-QSIRQAVH.js → google-marketing-NHQ6VSOK.js} +2 -2
- package/dist/{health-cmd-Z5KTTJQU.js → health-cmd-OGYIMIFA.js} +5 -5
- package/dist/{history-IIGUZMOM.js → history-5NJOUK2A.js} +4 -4
- package/dist/index.d.ts +70 -70
- package/dist/index.js +26 -26
- package/dist/{init-GGKLWNRS.js → init-3JXUT7VJ.js} +13 -13
- package/dist/{insights-UQ234W6T.js → insights-CWTPGOPF.js} +4 -4
- package/dist/intelligence-service-7DFVBFXY.js +15 -0
- package/dist/{journeys-2EZIRL7K.js → journeys-VP7LL2DS.js} +4 -4
- package/dist/{keys-NIAANGXE.js → keys-VBZG6BWU.js} +4 -4
- package/dist/{keyword-LHHNG3GL.js → keyword-M7Y4V5MJ.js} +4 -4
- package/dist/{logs-UFOOIKTC.js → logs-NTFQR3S6.js} +4 -4
- package/dist/{mcp-AZYUFL5V.js → mcp-DUN57Q6H.js} +5 -5
- package/dist/mcp.js +10 -10
- package/dist/{measurement-plan-H2HIHJ3D.js → measurement-plan-SGJ7EDVC.js} +6 -6
- package/dist/{notify-TIE2ZJ26.js → notify-4NOHQ6G4.js} +4 -4
- package/dist/{organic-evidence-BX5MGZTK.js → organic-evidence-5NWLGCGE.js} +4 -4
- package/dist/{overview-MGQE43GU.js → overview-EQ3BTXHC.js} +7 -7
- package/dist/{project-2JL4ZW52.js → project-J43SI3ZT.js} +4 -4
- package/dist/{project-setup-CXOVBRLZ.js → project-setup-5WA4RAN3.js} +4 -4
- package/dist/{query-Q5BF63QF.js → query-NMWKGTJ3.js} +4 -4
- package/dist/{research-RQBZ57W5.js → research-UU2JB4JH.js} +4 -4
- package/dist/{results-export-TVCBJNJN.js → results-export-RQMNBKXT.js} +4 -4
- package/dist/{run-L6WG5WP2.js → run-JTIH3ET5.js} +6 -6
- package/dist/{schedule-3HQMG3AM.js → schedule-YVKS4ILU.js} +4 -4
- package/dist/{search-ZLQE4J66.js → search-XCX3SAOT.js} +4 -4
- package/dist/{serve-VV4SVEJW.js → serve-GOZOQL67.js} +36 -27
- package/dist/{session-IJLUYO4T.js → session-H6N6B6RR.js} +14 -14
- package/dist/{settings-T3U7TQOF.js → settings-2GDLWIBA.js} +4 -4
- package/dist/{sitemaps-UZPLGN4W.js → sitemaps-22O75HMK.js} +4 -4
- package/dist/{skills-P4WSSFPF.js → skills-NSUS2XV2.js} +3 -3
- package/dist/{snapshot-ROJPISJE.js → snapshot-UCITZQFF.js} +4 -4
- package/dist/{src-ZYWTGILQ.js → src-OAVTTKVK.js} +2 -2
- package/dist/{status-43XNR3NS.js → status-KJZSA6KP.js} +6 -6
- package/dist/{support-I7E4I3GG.js → support-PWLEDLQT.js} +2 -2
- package/dist/{technical-aeo-D4F2R6M3.js → technical-aeo-P3R7RR52.js} +4 -4
- package/dist/{telemetry-5DMVDDZI.js → telemetry-LA72RJFS.js} +5 -5
- package/dist/{tools-M534GJMS.js → tools-Q6ITEQ4V.js} +12 -12
- package/dist/{traffic-R2UA27AZ.js → traffic-CRLJJFKS.js} +6 -6
- package/dist/{trends-BXOZIWIE.js → trends-A7ST3WIY.js} +4 -4
- package/dist/{users-X6WJV7VJ.js → users-4H7IS7WC.js} +4 -4
- package/dist/{visibility-stats-MCNUXUCL.js → visibility-stats-F2RUTMYR.js} +5 -5
- package/dist/{wordpress-AMGUJUZX.js → wordpress-EVNS3SAF.js} +4 -4
- package/package.json +1 -1
- package/assets/assets/query-client-BcqjBQN8.js +0 -1
- package/dist/activity-2KFFWLYN.js +0 -13
- package/dist/cli-commands-IM2ISRXZ.js +0 -18
- package/dist/intelligence-service-S3GTOTGQ.js +0 -15
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLogger
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FQFL223H.js";
|
|
4
4
|
import {
|
|
5
5
|
addLikelyFakeAgentHits,
|
|
6
6
|
correctBackgroundCallJourneys,
|
|
7
7
|
mergeSplitJourneyVisitors,
|
|
8
8
|
repairAiReferralArrivalsOnStartup,
|
|
9
9
|
writeUnrecognizedAgentBuckets
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WCWWHK7P.js";
|
|
11
11
|
import {
|
|
12
12
|
AGENT_TRUST_RULES_VERSION,
|
|
13
13
|
BROWSER_AGENT_BOT_IDS,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
normalizeTrafficPathPattern,
|
|
32
32
|
rulesShareVerificationList,
|
|
33
33
|
unrecognizedAgentName
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-RG5E54VU.js";
|
|
35
35
|
import {
|
|
36
36
|
RawEventSampleEventTypes,
|
|
37
37
|
agentJourneyCaptureDays,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
trafficReclassificationState,
|
|
49
49
|
trafficSources,
|
|
50
50
|
unrecognizedAgentEventsHourly
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-DOXBK2KF.js";
|
|
52
52
|
import {
|
|
53
53
|
AI_ENGINE_DOMAINS,
|
|
54
54
|
AI_ENGINE_SELF_DOMAINS,
|
|
@@ -84,12 +84,18 @@ import {
|
|
|
84
84
|
sortedUnique,
|
|
85
85
|
usageCount,
|
|
86
86
|
withRetry
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-ETTKN2R4.js";
|
|
88
88
|
|
|
89
89
|
// ../provider-openai/src/normalize.ts
|
|
90
90
|
import OpenAI from "openai";
|
|
91
91
|
|
|
92
92
|
// ../provider-openai/src/utils.ts
|
|
93
|
+
var MAX_RETRY_AFTER_WAIT_MS = 65e3;
|
|
94
|
+
function isRetryableProviderError(err) {
|
|
95
|
+
if (!isRetryableHttpError(err)) return false;
|
|
96
|
+
const asked = retryAfterDelayMs(err);
|
|
97
|
+
return asked === null || asked <= MAX_RETRY_AFTER_WAIT_MS;
|
|
98
|
+
}
|
|
93
99
|
async function withRetry2(fn, options = {}) {
|
|
94
100
|
return withRetry(fn, {
|
|
95
101
|
maxRetries: options.maxRetries ?? 3,
|
|
@@ -99,7 +105,9 @@ async function withRetry2(fn, options = {}) {
|
|
|
99
105
|
// provider has shipped to date (1000, 2000, 4000ms). Enable per-caller
|
|
100
106
|
// if you need it.
|
|
101
107
|
jitter: false,
|
|
102
|
-
isRetryable:
|
|
108
|
+
isRetryable: isRetryableProviderError,
|
|
109
|
+
computeDelayMs: (_attempt, err, defaultMs) => retryAfterDelayMs(err) ?? defaultMs,
|
|
110
|
+
...options.sleep ? { sleep: options.sleep } : {},
|
|
103
111
|
onRetry: ({ attempt, err, delayMs }) => {
|
|
104
112
|
console.warn(
|
|
105
113
|
`[provider] Attempt ${attempt + 1} failed, retrying in ${delayMs}ms...`,
|
|
@@ -115,7 +123,9 @@ var OPENAI_RETRIEVAL_CONTRACT = RetrievalContracts["search-required-v1"];
|
|
|
115
123
|
function createClient(config) {
|
|
116
124
|
return new OpenAI({
|
|
117
125
|
apiKey: config.apiKey,
|
|
118
|
-
...config.baseUrl ? { baseURL: config.baseUrl } : {}
|
|
126
|
+
...config.baseUrl ? { baseURL: config.baseUrl } : {},
|
|
127
|
+
// Retries are canonry's (`withRetry`), not the SDK's.
|
|
128
|
+
maxRetries: 0
|
|
119
129
|
});
|
|
120
130
|
}
|
|
121
131
|
function validateConfig(config) {
|
|
@@ -568,6 +578,12 @@ function extractAnchoredSpans(rawResponse) {
|
|
|
568
578
|
import Anthropic from "@anthropic-ai/sdk";
|
|
569
579
|
|
|
570
580
|
// ../provider-claude/src/utils.ts
|
|
581
|
+
var MAX_RETRY_AFTER_WAIT_MS2 = 65e3;
|
|
582
|
+
function isRetryableProviderError2(err) {
|
|
583
|
+
if (!isRetryableHttpError(err)) return false;
|
|
584
|
+
const asked = retryAfterDelayMs(err);
|
|
585
|
+
return asked === null || asked <= MAX_RETRY_AFTER_WAIT_MS2;
|
|
586
|
+
}
|
|
571
587
|
async function withRetry3(fn, options = {}) {
|
|
572
588
|
return withRetry(fn, {
|
|
573
589
|
maxRetries: options.maxRetries ?? 3,
|
|
@@ -577,8 +593,9 @@ async function withRetry3(fn, options = {}) {
|
|
|
577
593
|
// provider has shipped to date (1000, 2000, 4000ms). Enable per-caller
|
|
578
594
|
// if you need it.
|
|
579
595
|
jitter: false,
|
|
580
|
-
isRetryable: options.isRetryable ??
|
|
581
|
-
computeDelayMs: options.computeDelayMs,
|
|
596
|
+
isRetryable: options.isRetryable ?? isRetryableProviderError2,
|
|
597
|
+
computeDelayMs: options.computeDelayMs ?? ((_attempt, err, defaultMs) => retryAfterDelayMs(err) ?? defaultMs),
|
|
598
|
+
...options.sleep ? { sleep: options.sleep } : {},
|
|
582
599
|
onRetry: ({ attempt, err, delayMs }) => {
|
|
583
600
|
console.warn(
|
|
584
601
|
`[provider] Attempt ${attempt + 1} failed, retrying in ${delayMs}ms...`,
|
|
@@ -637,12 +654,15 @@ function validateConfig2(config) {
|
|
|
637
654
|
model
|
|
638
655
|
};
|
|
639
656
|
}
|
|
657
|
+
function createClient2(apiKey) {
|
|
658
|
+
return new Anthropic({ apiKey, maxRetries: 0 });
|
|
659
|
+
}
|
|
640
660
|
async function healthcheck2(config, signal) {
|
|
641
661
|
const validation = validateConfig2(config);
|
|
642
662
|
if (!validation.ok) return validation;
|
|
643
663
|
try {
|
|
644
664
|
const model = resolveModel(config);
|
|
645
|
-
const client =
|
|
665
|
+
const client = createClient2(config.apiKey);
|
|
646
666
|
const response = await withRetry3(
|
|
647
667
|
() => client.messages.create(
|
|
648
668
|
{
|
|
@@ -703,7 +723,7 @@ function buildTrackedQueryRequest2(input) {
|
|
|
703
723
|
}
|
|
704
724
|
async function executeTrackedQuery2(input) {
|
|
705
725
|
const params = buildTrackedQueryRequest2(input).body;
|
|
706
|
-
const client =
|
|
726
|
+
const client = createClient2(input.config.apiKey);
|
|
707
727
|
let response;
|
|
708
728
|
try {
|
|
709
729
|
response = await withRetry3(() => client.messages.create(params));
|
|
@@ -904,7 +924,7 @@ function extractDomainFromUri2(uri) {
|
|
|
904
924
|
}
|
|
905
925
|
async function generateText2(prompt, config) {
|
|
906
926
|
const model = resolveModel(config);
|
|
907
|
-
const client =
|
|
927
|
+
const client = createClient2(config.apiKey);
|
|
908
928
|
const response = await withRetry3(
|
|
909
929
|
() => client.messages.create({
|
|
910
930
|
model,
|
|
@@ -1297,7 +1317,7 @@ function isVertexConfig(config) {
|
|
|
1297
1317
|
function resolveModel2(config) {
|
|
1298
1318
|
return config.model || DEFAULT_MODEL3;
|
|
1299
1319
|
}
|
|
1300
|
-
function
|
|
1320
|
+
function createClient3(config) {
|
|
1301
1321
|
const httpOptions = config.baseUrl ? { httpOptions: { baseUrl: config.baseUrl } } : {};
|
|
1302
1322
|
if (isVertexConfig(config)) {
|
|
1303
1323
|
return new GoogleGenAI({
|
|
@@ -1339,7 +1359,7 @@ async function healthcheck3(config, signal) {
|
|
|
1339
1359
|
if (!validation.ok) return validation;
|
|
1340
1360
|
try {
|
|
1341
1361
|
const model = resolveModel2(config);
|
|
1342
|
-
const client =
|
|
1362
|
+
const client = createClient3(config);
|
|
1343
1363
|
const result = await withRetry4(
|
|
1344
1364
|
() => client.models.generateContent({
|
|
1345
1365
|
model,
|
|
@@ -1378,7 +1398,7 @@ function buildTrackedQueryRequest3(input) {
|
|
|
1378
1398
|
async function executeTrackedQuery3(input) {
|
|
1379
1399
|
const model = resolveModel2(input.config);
|
|
1380
1400
|
const request2 = buildTrackedQueryRequest3(input).body;
|
|
1381
|
-
const client =
|
|
1401
|
+
const client = createClient3(input.config);
|
|
1382
1402
|
let result;
|
|
1383
1403
|
try {
|
|
1384
1404
|
result = await withRetry4(
|
|
@@ -1566,7 +1586,7 @@ function extractDomainFromUri3(uri) {
|
|
|
1566
1586
|
}
|
|
1567
1587
|
async function generateText3(prompt, config) {
|
|
1568
1588
|
const model = resolveModel2(config);
|
|
1569
|
-
const client =
|
|
1589
|
+
const client = createClient3(config);
|
|
1570
1590
|
const result = await withRetry4(
|
|
1571
1591
|
() => client.models.generateContent({
|
|
1572
1592
|
model,
|
|
@@ -1650,7 +1670,7 @@ var answerModels = new Map(GEMINI_ANSWER_MODELS.map((model) => [model.id, model]
|
|
|
1650
1670
|
function listModels3(config, signal) {
|
|
1651
1671
|
return withRetry(async () => {
|
|
1652
1672
|
signal.throwIfAborted();
|
|
1653
|
-
const client =
|
|
1673
|
+
const client = createClient3(config);
|
|
1654
1674
|
const page = await client.models.list({ config: { pageSize: 100, queryBase: true, abortSignal: signal, httpOptions: { timeout: 2500 } } });
|
|
1655
1675
|
const models = [];
|
|
1656
1676
|
let seen = 0;
|
|
@@ -1835,6 +1855,12 @@ function extractAnchoredSpans3(rawResponse) {
|
|
|
1835
1855
|
import OpenAI3 from "openai";
|
|
1836
1856
|
|
|
1837
1857
|
// ../provider-perplexity/src/utils.ts
|
|
1858
|
+
var MAX_RETRY_AFTER_WAIT_MS3 = 65e3;
|
|
1859
|
+
function isRetryableProviderError3(err) {
|
|
1860
|
+
if (!isRetryableHttpError(err)) return false;
|
|
1861
|
+
const asked = retryAfterDelayMs(err);
|
|
1862
|
+
return asked === null || asked <= MAX_RETRY_AFTER_WAIT_MS3;
|
|
1863
|
+
}
|
|
1838
1864
|
async function withRetry5(fn, options = {}) {
|
|
1839
1865
|
return withRetry(fn, {
|
|
1840
1866
|
maxRetries: options.maxRetries ?? 3,
|
|
@@ -1844,7 +1870,9 @@ async function withRetry5(fn, options = {}) {
|
|
|
1844
1870
|
// provider has shipped to date (1000, 2000, 4000ms). Enable per-caller
|
|
1845
1871
|
// if you need it.
|
|
1846
1872
|
jitter: false,
|
|
1847
|
-
isRetryable:
|
|
1873
|
+
isRetryable: isRetryableProviderError3,
|
|
1874
|
+
computeDelayMs: (_attempt, err, defaultMs) => retryAfterDelayMs(err) ?? defaultMs,
|
|
1875
|
+
...options.sleep ? { sleep: options.sleep } : {},
|
|
1848
1876
|
onRetry: ({ attempt, err, delayMs }) => {
|
|
1849
1877
|
console.warn(
|
|
1850
1878
|
`[provider] Attempt ${attempt + 1} failed, retrying in ${delayMs}ms...`,
|
|
@@ -1902,7 +1930,7 @@ async function healthcheck4(config, signal) {
|
|
|
1902
1930
|
if (!validation.ok) return validation;
|
|
1903
1931
|
const model = resolveModel3(config.model);
|
|
1904
1932
|
try {
|
|
1905
|
-
const client =
|
|
1933
|
+
const client = createClient4(config.apiKey);
|
|
1906
1934
|
const response = await withRetry5(
|
|
1907
1935
|
() => postAgent(client, { ...agentSelection(model), input: 'Say "ok"' }, signal),
|
|
1908
1936
|
{ signal }
|
|
@@ -1932,7 +1960,7 @@ function buildTrackedQueryRequest4(input) {
|
|
|
1932
1960
|
}
|
|
1933
1961
|
async function executeTrackedQuery4(input) {
|
|
1934
1962
|
const model = resolveModel3(input.config.model);
|
|
1935
|
-
const client =
|
|
1963
|
+
const client = createClient4(input.config.apiKey);
|
|
1936
1964
|
const { body } = buildTrackedQueryRequest4(input);
|
|
1937
1965
|
try {
|
|
1938
1966
|
const rawResponse = await withRetry5(() => postAgent(client, body));
|
|
@@ -2035,8 +2063,8 @@ function extractAnchoredSpans4(rawResponse) {
|
|
|
2035
2063
|
flush();
|
|
2036
2064
|
return spans;
|
|
2037
2065
|
}
|
|
2038
|
-
function
|
|
2039
|
-
return new OpenAI3({ apiKey, baseURL: BASE_URL });
|
|
2066
|
+
function createClient4(apiKey) {
|
|
2067
|
+
return new OpenAI3({ apiKey, baseURL: BASE_URL, maxRetries: 0 });
|
|
2040
2068
|
}
|
|
2041
2069
|
function postAgent(client, body, signal) {
|
|
2042
2070
|
return client.post(AGENT_PATH, { body, signal });
|
|
@@ -2249,7 +2277,7 @@ function extractDomainFromUri4(uri) {
|
|
|
2249
2277
|
}
|
|
2250
2278
|
async function generateText4(prompt, config) {
|
|
2251
2279
|
const model = resolveModel3(config.model);
|
|
2252
|
-
const client =
|
|
2280
|
+
const client = createClient4(config.apiKey);
|
|
2253
2281
|
const response = await withRetry5(() => postAgent(client, { ...agentSelection(model), input: prompt }));
|
|
2254
2282
|
assertUsableResponse(response);
|
|
2255
2283
|
return extractAgentAnswerText(response);
|
|
@@ -2369,7 +2397,7 @@ var MUSE_SPARK_MODEL = /^muse-spark-[a-z0-9]+(?:[.-][a-z0-9]+)*$/;
|
|
|
2369
2397
|
var MUSE_SELF_DOMAINS = [AI_ENGINE_DOMAINS.metaAi];
|
|
2370
2398
|
var MAX_RETRY_AFTER_MS = 6e4;
|
|
2371
2399
|
var RETRYABLE_RESPONSE_ERROR_CODES = /* @__PURE__ */ new Set(["rate_limit_exceeded", "server_error"]);
|
|
2372
|
-
function
|
|
2400
|
+
function createClient5(config) {
|
|
2373
2401
|
return new OpenAI4({
|
|
2374
2402
|
apiKey: config.apiKey,
|
|
2375
2403
|
baseURL: config.baseUrl || MUSE_BASE_URL,
|
|
@@ -2418,7 +2446,7 @@ function statusMessage(rawResponse) {
|
|
|
2418
2446
|
return `Meta Model API response status: ${status}${detail ? ` (${detail})` : ""}`;
|
|
2419
2447
|
}
|
|
2420
2448
|
function createResponse(config, body, signal) {
|
|
2421
|
-
const client =
|
|
2449
|
+
const client = createClient5(config);
|
|
2422
2450
|
return retryRequest(async () => {
|
|
2423
2451
|
const rawResponse = responseToRecord4(await client.responses.create(body, { signal }));
|
|
2424
2452
|
if (rawResponse.status !== "completed" && rawResponse.status !== "incomplete") {
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-VJWDBFSL.js";
|
|
5
5
|
import {
|
|
6
6
|
createApiClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2GA43I45.js";
|
|
8
8
|
import {
|
|
9
9
|
CliError,
|
|
10
10
|
isMachineFormat
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-O6RKXY2P.js";
|
|
12
12
|
import {
|
|
13
13
|
describeError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ETTKN2R4.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/mcp.ts
|
|
17
17
|
import fs from "fs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2GA43I45.js";
|
|
4
4
|
import {
|
|
5
5
|
isMachineFormat
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-O6RKXY2P.js";
|
|
7
7
|
import {
|
|
8
8
|
formatRunErrorOneLine
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ETTKN2R4.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/activity.ts
|
|
12
12
|
function activityLines(activity) {
|
|
@@ -8,24 +8,24 @@ import {
|
|
|
8
8
|
reparseStoredResult4,
|
|
9
9
|
reparseStoredResult5,
|
|
10
10
|
resolveStoredApiResponse
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2JW5OBUF.js";
|
|
12
12
|
import {
|
|
13
13
|
loadConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-F56XOHE2.js";
|
|
15
15
|
import {
|
|
16
16
|
CliError,
|
|
17
17
|
isMachineFormat
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-O6RKXY2P.js";
|
|
19
19
|
import {
|
|
20
20
|
determineCitationState
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZXX7DMBJ.js";
|
|
22
22
|
import {
|
|
23
23
|
backfillProjectAnswerMentions,
|
|
24
24
|
competitorIdentityColumns,
|
|
25
25
|
createRunCompetitorResolver,
|
|
26
26
|
readMarketCompetitorNames,
|
|
27
27
|
refreshSnapshotMentionIdentity
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-WCWWHK7P.js";
|
|
29
29
|
import {
|
|
30
30
|
RawEventSampleEventTypes,
|
|
31
31
|
auditLog,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
querySnapshots,
|
|
40
40
|
rawEventSamples,
|
|
41
41
|
runs
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-DOXBK2KF.js";
|
|
43
43
|
import {
|
|
44
44
|
ProviderNames,
|
|
45
45
|
RetrievalContracts,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
extractRecommendedCompetitors,
|
|
53
53
|
normalizeUrlPath,
|
|
54
54
|
openRouterRouteModel
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-ETTKN2R4.js";
|
|
56
56
|
|
|
57
57
|
// src/commands/backfill.ts
|
|
58
58
|
import { setImmediate as yieldToEventLoop } from "timers/promises";
|
|
@@ -430,7 +430,7 @@ No DB writes performed. Re-run without --dry-run to apply.`);
|
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
async function backfillInsightsCommand(project, opts) {
|
|
433
|
-
const { IntelligenceService } = await import("./intelligence-service-
|
|
433
|
+
const { IntelligenceService } = await import("./intelligence-service-7DFVBFXY.js");
|
|
434
434
|
const config = loadConfig();
|
|
435
435
|
const db = createClient(config.database);
|
|
436
436
|
migrate(db);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registeredProviderNames
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KIJCFPN4.js";
|
|
4
4
|
import {
|
|
5
5
|
configExists,
|
|
6
6
|
loadConfigRaw
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-F56XOHE2.js";
|
|
8
8
|
|
|
9
9
|
// src/setup-state.ts
|
|
10
10
|
import fs from "fs";
|
|
@@ -28,7 +28,7 @@ async function buildSetupState() {
|
|
|
28
28
|
}
|
|
29
29
|
if (dbPath && fs.existsSync(dbPath)) {
|
|
30
30
|
try {
|
|
31
|
-
const { createClient, projects, queries: queriesTable } = await import("./src-
|
|
31
|
+
const { createClient, projects, queries: queriesTable } = await import("./src-OAVTTKVK.js");
|
|
32
32
|
const db = createClient(dbPath);
|
|
33
33
|
project_count = db.select({ id: projects.id }).from(projects).all().length;
|
|
34
34
|
const firstQuery = db.select({ id: queriesTable.id }).from(queriesTable).limit(1).all();
|
|
@@ -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-GOZOQL67.js");
|
|
51
51
|
await serveCommand(format);
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usageError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-O6RKXY2P.js";
|
|
4
4
|
import {
|
|
5
5
|
AppError,
|
|
6
6
|
parseWindowIn,
|
|
7
7
|
resolveDateRange
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ETTKN2R4.js";
|
|
9
9
|
|
|
10
10
|
// src/cli-access.ts
|
|
11
11
|
var CLI_ACCESS_BY_ID = Object.freeze({
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
dedupeGscSitemapUrls,
|
|
6
6
|
resolveDiscoveredGscSitemapUrls,
|
|
7
7
|
submitGscSitemapBatches
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UXCNYSAB.js";
|
|
9
9
|
import {
|
|
10
10
|
measurementDraftOperationSchema,
|
|
11
11
|
runMeasurementDraftAction
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XMPXMQ5X.js";
|
|
13
13
|
import {
|
|
14
14
|
CliError
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-O6RKXY2P.js";
|
|
16
16
|
import {
|
|
17
17
|
AGENT_MEMORY_KEY_MAX_LENGTH,
|
|
18
18
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
@@ -219,7 +219,7 @@ import {
|
|
|
219
219
|
trendSurfaceSchema,
|
|
220
220
|
visibilityCompareSelectionSchema,
|
|
221
221
|
visibilityReportRequestSchema
|
|
222
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-ETTKN2R4.js";
|
|
223
223
|
|
|
224
224
|
// src/mcp/tool-registry.ts
|
|
225
225
|
import { z as z2 } from "zod";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
CliError,
|
|
6
6
|
isMachineFormat
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-O6RKXY2P.js";
|
|
8
8
|
import {
|
|
9
9
|
CodingAgents,
|
|
10
10
|
SKILL_MANIFEST_FILENAME,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
formatCanonryPluginUpdateHint,
|
|
16
16
|
formatCanonryPluginVersionMismatch,
|
|
17
17
|
skillsClientSchema
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ETTKN2R4.js";
|
|
19
19
|
|
|
20
20
|
// src/commands/skills.ts
|
|
21
21
|
import crypto from "crypto";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
isStoredPageReadTool,
|
|
6
6
|
isStoredReadTool,
|
|
7
7
|
truncateToolResult
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YDVXZWWF.js";
|
|
9
9
|
import {
|
|
10
10
|
CANONRY_MCP_TOOLKITS,
|
|
11
11
|
resolveAeroSkillDir
|
|
@@ -23,18 +23,18 @@ import {
|
|
|
23
23
|
resolveApiKeyFor,
|
|
24
24
|
resolveModelForProvider,
|
|
25
25
|
validateAgentProviderRegistry
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-F56XOHE2.js";
|
|
27
27
|
import {
|
|
28
28
|
CanonryMcpToolNames,
|
|
29
29
|
canonryMcpTools
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-5LBYOWQZ.js";
|
|
31
31
|
import {
|
|
32
32
|
createLogger
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-FQFL223H.js";
|
|
34
34
|
import {
|
|
35
35
|
agentToolEvents,
|
|
36
36
|
llmUsageEvents
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-DOXBK2KF.js";
|
|
38
38
|
import {
|
|
39
39
|
MeasurementPortfolioLists,
|
|
40
40
|
SEO_TREND_METRICS_BY_KIND,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
describeError,
|
|
46
46
|
validationError,
|
|
47
47
|
visibilityReportRequestSchema
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-ETTKN2R4.js";
|
|
49
49
|
|
|
50
50
|
// src/agent/session.ts
|
|
51
51
|
import fs2 from "fs";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
resolveCliAccess,
|
|
4
4
|
resolveCliAccessForInvocation,
|
|
5
5
|
windowOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5JQHOPNE.js";
|
|
7
7
|
import {
|
|
8
8
|
emitJsonl
|
|
9
9
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
CliError,
|
|
12
12
|
EXIT_USER_ERROR,
|
|
13
13
|
usageError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-O6RKXY2P.js";
|
|
15
15
|
import {
|
|
16
16
|
OperationAccesses
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ETTKN2R4.js";
|
|
18
18
|
|
|
19
19
|
// src/cli-catalog.ts
|
|
20
20
|
import { createRequire } from "module";
|
|
@@ -122,7 +122,7 @@ async function dispatchRegisteredCommand(args, fallbackFormat, specs) {
|
|
|
122
122
|
const accessValue = accessFilterFromArgs(argsWithoutHelp);
|
|
123
123
|
validateAccessFilter(accessValue);
|
|
124
124
|
if (fallbackFormat !== "text") {
|
|
125
|
-
const { printCliCatalog: printCliCatalog2 } = await import("./cli-catalog-
|
|
125
|
+
const { printCliCatalog: printCliCatalog2 } = await import("./cli-catalog-U6WE3BU7.js");
|
|
126
126
|
const group2 = argsWithoutHelp.find((arg) => !arg.startsWith("--"));
|
|
127
127
|
printCliCatalog2(specs, fallbackFormat, group2, accessValue);
|
|
128
128
|
return true;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
siteCrawlGraphNodes,
|
|
6
6
|
siteCrawlPages,
|
|
7
7
|
siteCrawlSnapshots
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DOXBK2KF.js";
|
|
9
9
|
import {
|
|
10
10
|
SITE_CRAWL_GRAPH_MAX_EDGES,
|
|
11
11
|
SITE_CRAWL_GRAPH_MAX_NODES,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
factorStatusFromDistribution,
|
|
16
16
|
factorStatusFromScore,
|
|
17
17
|
roundPreservingTotal
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ETTKN2R4.js";
|
|
19
19
|
|
|
20
20
|
// src/site-audit-factors.ts
|
|
21
21
|
function recordedSharePct(factor) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2GA43I45.js";
|
|
4
4
|
import {
|
|
5
5
|
emitJsonl
|
|
6
6
|
} from "./chunk-Z7IUAJOF.js";
|
|
7
7
|
import {
|
|
8
8
|
measurementDraftOperationSchema,
|
|
9
9
|
runMeasurementDraftAction
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XMPXMQ5X.js";
|
|
11
11
|
import {
|
|
12
12
|
isMachineFormat,
|
|
13
13
|
systemError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-O6RKXY2P.js";
|
|
15
15
|
import {
|
|
16
16
|
CITATION_NOT_MEASURED_REASON,
|
|
17
17
|
MeasurementEvidenceShapes,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
unattributedAnswersLabel,
|
|
40
40
|
uncheckedSourcesLabel,
|
|
41
41
|
visibilityReportRequestSchema
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-ETTKN2R4.js";
|
|
43
43
|
|
|
44
44
|
// src/commands/measurement-plan.ts
|
|
45
45
|
import crypto from "crypto";
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
configExists,
|
|
3
3
|
loadConfigRaw,
|
|
4
4
|
saveConfigPatch
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-F56XOHE2.js";
|
|
6
6
|
import {
|
|
7
7
|
BUNDLED_SKILL_NAMES,
|
|
8
8
|
installSkills
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6RE7O724.js";
|
|
10
10
|
import {
|
|
11
11
|
PACKAGE_VERSION
|
|
12
12
|
} from "./chunk-AOJU5LKX.js";
|
|
13
13
|
import {
|
|
14
14
|
SKILL_MANIFEST_FILENAME,
|
|
15
15
|
SkillsClients
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ETTKN2R4.js";
|
|
17
17
|
|
|
18
18
|
// src/skills-autosync.ts
|
|
19
19
|
import fs from "fs";
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
templateLinkRatio,
|
|
22
22
|
templateLinkUbiquityAvailable,
|
|
23
23
|
validationError
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ETTKN2R4.js";
|
|
25
25
|
|
|
26
26
|
// ../db/src/client.ts
|
|
27
|
-
import { mkdirSync } from "fs";
|
|
27
|
+
import { chmodSync, mkdirSync } from "fs";
|
|
28
28
|
import { dirname } from "path";
|
|
29
29
|
import Database from "better-sqlite3";
|
|
30
30
|
import { drizzle } from "drizzle-orm/better-sqlite3";
|
|
@@ -4015,11 +4015,31 @@ var socialConnections = sqliteTable2("social_connections", {
|
|
|
4015
4015
|
|
|
4016
4016
|
// ../db/src/client.ts
|
|
4017
4017
|
function createClient(databasePath) {
|
|
4018
|
-
|
|
4018
|
+
if (/^postgres(?:ql)?:\/\//i.test(databasePath.trim())) {
|
|
4019
|
+
throw new Error(
|
|
4020
|
+
'PostgreSQL connection URIs are not supported yet: @canonry/canonry-db uses better-sqlite3 and expects a local SQLite file path or ":memory:".'
|
|
4021
|
+
);
|
|
4022
|
+
}
|
|
4023
|
+
const isMemory = databasePath === ":memory:";
|
|
4024
|
+
if (!isMemory) {
|
|
4025
|
+
mkdirSync(dirname(databasePath), { recursive: true });
|
|
4026
|
+
}
|
|
4019
4027
|
const sqlite = new Database(databasePath);
|
|
4028
|
+
if (!isMemory) {
|
|
4029
|
+
try {
|
|
4030
|
+
chmodSync(databasePath, 384);
|
|
4031
|
+
} catch {
|
|
4032
|
+
}
|
|
4033
|
+
}
|
|
4020
4034
|
sqlite.pragma("journal_mode = WAL");
|
|
4035
|
+
sqlite.pragma("synchronous = NORMAL");
|
|
4021
4036
|
sqlite.pragma("foreign_keys = ON");
|
|
4022
4037
|
sqlite.pragma("busy_timeout = 5000");
|
|
4038
|
+
sqlite.pragma("cache_size = -64000");
|
|
4039
|
+
sqlite.pragma("temp_store = MEMORY");
|
|
4040
|
+
if (!isMemory) {
|
|
4041
|
+
sqlite.pragma("mmap_size = 268435456");
|
|
4042
|
+
}
|
|
4023
4043
|
return drizzle(sqlite, { schema: schema_exports });
|
|
4024
4044
|
}
|
|
4025
4045
|
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
SNAPSHOT_CELL_LEGEND,
|
|
3
3
|
citationGlyph,
|
|
4
4
|
mentionGlyph
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XTIOFTFS.js";
|
|
6
6
|
import {
|
|
7
7
|
createApiClient
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2GA43I45.js";
|
|
9
9
|
import {
|
|
10
10
|
emitJsonl
|
|
11
11
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
CliError,
|
|
14
14
|
EXIT_SYSTEM_ERROR,
|
|
15
15
|
isMachineFormat
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-O6RKXY2P.js";
|
|
17
17
|
import {
|
|
18
18
|
MentionIdentities,
|
|
19
19
|
OUTSTANDING_PROVIDER_BATCH_STATUSES,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
formatMicros,
|
|
24
24
|
formatRunErrorOneLine,
|
|
25
25
|
resolveProviderInput
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ETTKN2R4.js";
|
|
27
27
|
|
|
28
28
|
// src/commands/run.ts
|
|
29
29
|
function getClient() {
|