@canonry/canonry 7.52.0 → 7.53.0
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/agent-workspace/skills/canonry/references/canonry-cli.md +11 -1
- package/assets/assets/{AccessControls-CteIuEGI.js → AccessControls-B-5YUuLE.js} +1 -1
- package/assets/assets/{AuditHistoryPanel-DqJGiLsf.js → AuditHistoryPanel-BkCUPvPv.js} +1 -1
- package/assets/assets/{BacklinksPage-DotWEPQt.js → BacklinksPage-BMgHZKuw.js} +1 -1
- package/assets/assets/{HistoryPage-aOd198dT.js → HistoryPage-D2DOk7ms.js} +1 -1
- package/assets/assets/MeasurementPropertyPage-Bwv8nKS7.js +4 -0
- package/assets/assets/ProjectPage-CsJfGPx3.js +7 -0
- package/assets/assets/RunsPage-DSHDuj9b.js +1 -0
- package/assets/assets/SettingsPage-BDRdWk5X.js +1 -0
- package/assets/assets/SiteHealthSection-DV06NTxC.js +2 -0
- package/assets/assets/TrafficPage-CBMMwRfw.js +40 -0
- package/assets/assets/{TrafficSourceDetailPage-BPtjnF9s.js → TrafficSourceDetailPage-Czpt0S7j.js} +1 -1
- package/assets/assets/card-CVejjbhs.js +60 -0
- package/assets/assets/{extract-error-message-DKQJJlZ-.js → extract-error-message-Co6zPipR.js} +1 -1
- package/assets/assets/{format-helpers-BWnMmkiO.js → format-helpers-B_2jkVGI.js} +1 -1
- package/assets/assets/index-BnS2Vuv0.js +40 -0
- package/assets/assets/index-DgS5TTSb.css +1 -0
- package/assets/assets/{query-client-vB35tVTz.js → query-client-BKJLgjJd.js} +1 -1
- package/assets/assets/react-query-ltP1RErY.js +1 -0
- package/assets/assets/{react-sigma_core.esm.min-hGyOC4V_.js → react-sigma_core.esm.min-Bjux3j_1.js} +1 -1
- package/assets/assets/service-CDsqgNrS.js +1 -0
- package/assets/index.html +8 -7
- package/dist/{ads-MREK2AGL.js → ads-S4S74OXM.js} +3 -3
- package/dist/{agent-4RUZ3MC4.js → agent-JZWKCI5V.js} +7 -7
- package/dist/{agent-ask-YLTYBEYH.js → agent-ask-N2DG5ZLZ.js} +3 -3
- package/dist/{agent-conversations-QA6IKDGR.js → agent-conversations-7UDNE7YI.js} +3 -3
- package/dist/{agent-memory-MEQAJOB3.js → agent-memory-I74OWTU7.js} +3 -3
- package/dist/{agent-providers-AXYPDJHL.js → agent-providers-MEMCZPGE.js} +3 -3
- package/dist/{agent-transcript-SMNQNYCD.js → agent-transcript-Z7VTL7PY.js} +3 -3
- package/dist/{analytics-4OR64IGV.js → analytics-4NUSNTKT.js} +3 -3
- package/dist/{apply-CQXCFXAH.js → apply-OZKQK3YF.js} +3 -3
- package/dist/{backfill-TMXCNVOB.js → backfill-PLY2NOOY.js} +9 -9
- package/dist/{backlinks-6KFAQGYV.js → backlinks-2CMRJFWO.js} +3 -3
- package/dist/{bing-HFCACTAC.js → bing-RD3DDESD.js} +3 -3
- package/dist/{bootstrap-SQVQXOJC.js → bootstrap-JOYV4SWM.js} +9 -9
- package/dist/{cdp-IACL7EXU.js → cdp-LUGL3CT6.js} +7 -7
- package/dist/{chunk-EGIZNSDA.js → chunk-23UZNTF4.js} +1 -1
- package/dist/{chunk-BYOK6Z4F.js → chunk-2EYBZYDG.js} +2 -2
- package/dist/{chunk-O4RMPA6H.js → chunk-2GAXZAQJ.js} +107 -11
- package/dist/{chunk-BU3VAG5J.js → chunk-2HWY4NRQ.js} +3 -3
- package/dist/{chunk-RVUCY4ZV.js → chunk-2XDGFHPM.js} +6 -4
- package/dist/{chunk-GNKOBKPW.js → chunk-3DO3CS7Y.js} +4 -4
- package/dist/{chunk-SNFBJKAW.js → chunk-6VSKBVB3.js} +3 -3
- package/dist/{chunk-7244X3K6.js → chunk-6ZCZRZ66.js} +2 -2
- package/dist/{chunk-FC4XND45.js → chunk-BGZL5RCP.js} +1 -1
- package/dist/{chunk-MKAC7HKH.js → chunk-BH274VEO.js} +3 -3
- package/dist/{chunk-LK2BG6EX.js → chunk-BQT7VLGM.js} +11 -1
- package/dist/{chunk-6BPZHNDC.js → chunk-C5GCRQ66.js} +2 -2
- package/dist/{chunk-QLPLENDT.js → chunk-DFQHGWPB.js} +1 -1
- package/dist/{chunk-IIOEAJTV.js → chunk-F55ER5RQ.js} +3 -3
- package/dist/{chunk-DSNSD5J3.js → chunk-IWQGZQHE.js} +19 -9
- package/dist/{chunk-YSEC6TIB.js → chunk-JZARXJV6.js} +821 -227
- package/dist/{chunk-MJNUSPO4.js → chunk-LGU3O5YP.js} +2 -2
- package/dist/{chunk-BBOHY2DQ.js → chunk-LYCYSM6O.js} +1 -1
- package/dist/chunk-N3WQHLDI.js +1199 -0
- package/dist/{chunk-AWCWIQAU.js → chunk-N6MS4VG2.js} +226 -5
- package/dist/{chunk-TALC5DX5.js → chunk-NKSASP4U.js} +1 -1
- package/dist/{chunk-V5D4XNWV.js → chunk-O3OTW7F4.js} +39 -2
- package/dist/{chunk-K5I45PZI.js → chunk-P4SXRRB4.js} +307 -194
- package/dist/{chunk-ILDT4LPB.js → chunk-QARV5HVI.js} +26 -240
- package/dist/{chunk-O77IBNVO.js → chunk-QNU7IIO7.js} +326 -324
- package/dist/{chunk-I6KNMZ77.js → chunk-QXJ356KK.js} +4 -4
- package/dist/{chunk-JY3RLZGB.js → chunk-RVBGFWJ3.js} +1 -1
- package/dist/{chunk-7XE2IRBG.js → chunk-SZG7S7TE.js} +1 -1
- package/dist/{chunk-KXAOMTXN.js → chunk-U7JJKXLA.js} +5 -5
- package/dist/{chunk-Y4GK7GCV.js → chunk-VEH4YLWR.js} +1 -1
- package/dist/{chunk-R2J4SNKF.js → chunk-WNXKW3NS.js} +1 -1
- package/dist/{chunk-HEGXGCGL.js → chunk-XTIP5WSA.js} +3 -3
- package/dist/{chunk-5N6245R7.js → chunk-ZXH5IFIA.js} +4 -4
- package/dist/{citations-NSBBWRZ4.js → citations-GMLBTNLW.js} +3 -3
- package/dist/{cli-catalog-OFWJMNMD.js → cli-catalog-WKUCQEWA.js} +3 -3
- package/dist/{cli-commands-WVBL337U.js → cli-commands-YCHQWUNK.js} +7 -7
- package/dist/cli.js +13 -13
- package/dist/{competitor-V4OHORBC.js → competitor-QNPVJFEI.js} +3 -3
- package/dist/{content-RUXRI5IC.js → content-NFTC74HD.js} +3 -3
- package/dist/{dashboard-JXB2YAQJ.js → dashboard-TMUQT5H5.js} +6 -6
- package/dist/{demo-55ZNUOXU.js → demo-O5SPVLZZ.js} +1 -1
- package/dist/{demo-server-XO7PHM4I.js → demo-server-WKZ53RGK.js} +11 -11
- package/dist/{discover-JJQ564HS.js → discover-LTTO7KHN.js} +3 -3
- package/dist/{discover-eval-KLEKZ6U4.js → discover-eval-QRDNMDUE.js} +3 -3
- package/dist/{doctor-JAMQZCMZ.js → doctor-SFL5FOW4.js} +3 -3
- package/dist/{evidence-YRSB7GFE.js → evidence-J6WZ767P.js} +3 -3
- package/dist/{export-cmd-MHML4OYU.js → export-cmd-D3JDTBDV.js} +3 -3
- package/dist/{ga-LSXPE2MN.js → ga-N56LXQUN.js} +3 -3
- package/dist/{gbp-RMKMLOC7.js → gbp-7WVJYWDR.js} +3 -3
- package/dist/{google-JQ4T6JTQ.js → google-YLRVXYVJ.js} +4 -4
- package/dist/{google-marketing-J6SEODYC.js → google-marketing-4DGX3RBB.js} +1 -1
- package/dist/{health-cmd-MV2JM2C3.js → health-cmd-PK3BASF6.js} +3 -3
- package/dist/{history-SRRH7A2E.js → history-UWTEZ626.js} +3 -3
- package/dist/index.d.ts +40 -7
- package/dist/index.js +23 -23
- package/dist/{init-ZJZFUERV.js → init-RBI2IOBY.js} +11 -11
- package/dist/{insights-PMMGNWZH.js → insights-ZUC5XHFD.js} +3 -3
- package/dist/intelligence-service-JXXB43RB.js +15 -0
- package/dist/{keys-TS7NZANS.js → keys-NOG3M76V.js} +3 -3
- package/dist/{keyword-VNCKDUGC.js → keyword-HD57L76I.js} +3 -3
- package/dist/{logs-VH3WOTZJ.js → logs-VAB7ITBS.js} +3 -3
- package/dist/{mcp-DG2RROB3.js → mcp-HYHIL5FB.js} +2 -2
- package/dist/mcp.js +9 -9
- package/dist/{measurement-plan-4T35TUGG.js → measurement-plan-GEHOHCH3.js} +5 -5
- package/dist/{notify-BWHUSKL7.js → notify-VQ2ZDGN4.js} +3 -3
- package/dist/{organic-evidence-QX4SXXJP.js → organic-evidence-6TX627YW.js} +3 -3
- package/dist/{overview-7IHUTKUV.js → overview-XBO7WYAV.js} +4 -4
- package/dist/{project-JXLSWDE2.js → project-DR6744WZ.js} +3 -3
- package/dist/{query-S75EL25H.js → query-OGVTCPG5.js} +3 -3
- package/dist/{research-KFTV3IP4.js → research-B2TGKSMC.js} +3 -3
- package/dist/{results-export-GTKVBU34.js → results-export-K7PAYPWQ.js} +3 -3
- package/dist/{run-26HDIRHF.js → run-Y6LUMCVL.js} +4 -4
- package/dist/{schedule-N6G4SVHQ.js → schedule-PNAUJ5FX.js} +3 -3
- package/dist/{search-MI32EPYM.js → search-PMVOGL4U.js} +3 -3
- package/dist/{serve-XLGE42AG.js → serve-PQHXSS5T.js} +24 -24
- package/dist/{session-W5DXWIYM.js → session-S5NDMMKF.js} +16 -15
- package/dist/{settings-T7WI2UVE.js → settings-AL7E7QUK.js} +3 -3
- package/dist/{skills-F3WPKPTK.js → skills-GQOOTDR7.js} +2 -2
- package/dist/{snapshot-PD3EAVEX.js → snapshot-W3FXRTZM.js} +3 -3
- package/dist/{src-XDUXMJC3.js → src-WZLTQFCH.js} +2 -2
- package/dist/{status-PUH7JFZ4.js → status-MBJVN4W5.js} +4 -4
- package/dist/{technical-aeo-AUFWWJIP.js → technical-aeo-Y4RFST72.js} +3 -3
- package/dist/{telemetry-XBYT7G2K.js → telemetry-VK6F5QSZ.js} +4 -4
- package/dist/{tools-GVHIRWSN.js → tools-W3AQY5TY.js} +11 -11
- package/dist/{traffic-B3HW2ZWG.js → traffic-ER4I6V3B.js} +5 -5
- package/dist/{users-M5HNQZYI.js → users-KZK2OF4L.js} +3 -3
- package/dist/{visibility-stats-Y7GJKMHN.js → visibility-stats-CR7BUG5G.js} +3 -3
- package/dist/{wordpress-GCIURYPN.js → wordpress-DG5JUCAC.js} +3 -3
- package/package.json +2 -1
- package/assets/assets/MeasurementPropertyPage-CuaKVK8x.js +0 -4
- package/assets/assets/ProjectPage-O9oufMgi.js +0 -8
- package/assets/assets/RunsPage-DIXMrc-N.js +0 -1
- package/assets/assets/SettingsPage-BuGb6AGa.js +0 -1
- package/assets/assets/SiteHealthSection-CweaKjCo.js +0 -2
- package/assets/assets/TrafficPage-B7MaQalp.js +0 -40
- package/assets/assets/card-DoV-8Txo.js +0 -60
- package/assets/assets/index-CsPsaUr7.css +0 -1
- package/assets/assets/index-Z63c4PeO.js +0 -39
- package/assets/assets/react-query-BI0567qs.js +0 -1
- package/assets/assets/service-c4YvpVKX.js +0 -1
- package/dist/chunk-OFL4PTYU.js +0 -644
- package/dist/intelligence-service-KCSU6ZUJ.js +0 -15
|
@@ -20,7 +20,7 @@ var providerQuotaPolicySchema = z2.object({
|
|
|
20
20
|
maxRequestsPerMinute: z2.number().int().positive(),
|
|
21
21
|
maxRequestsPerDay: z2.number().int().positive()
|
|
22
22
|
});
|
|
23
|
-
var PROVIDER_NAMES = ["gemini", "openai", "claude", "perplexity", "muse", "local", "cdp:chatgpt"];
|
|
23
|
+
var PROVIDER_NAMES = ["gemini", "openai", "claude", "perplexity", "muse", "local", "openrouter", "cdp:chatgpt"];
|
|
24
24
|
var ProviderNames = {
|
|
25
25
|
gemini: "gemini",
|
|
26
26
|
openai: "openai",
|
|
@@ -28,12 +28,36 @@ var ProviderNames = {
|
|
|
28
28
|
perplexity: "perplexity",
|
|
29
29
|
muse: "muse",
|
|
30
30
|
local: "local",
|
|
31
|
+
openrouter: "openrouter",
|
|
31
32
|
cdpChatgpt: "cdp:chatgpt"
|
|
32
33
|
};
|
|
33
34
|
var providerNameSchema = z2.string().min(1);
|
|
34
35
|
var providerModelsSchema = z2.record(z2.string(), z2.string().trim().min(1));
|
|
35
|
-
var API_PROVIDER_NAMES = ["gemini", "openai", "claude", "perplexity", "muse", "local"];
|
|
36
|
+
var API_PROVIDER_NAMES = ["gemini", "openai", "claude", "perplexity", "muse", "local", "openrouter"];
|
|
36
37
|
var apiProviderNameSchema = z2.string().min(1);
|
|
38
|
+
var OPENROUTER_MODEL_PATTERN = /^[a-z0-9][a-z0-9._-]*\/[a-z0-9][a-z0-9._:-]*$/;
|
|
39
|
+
function openRouterRouteModel(name) {
|
|
40
|
+
if (!name.startsWith("openrouter:")) return void 0;
|
|
41
|
+
const model = name.slice("openrouter:".length);
|
|
42
|
+
return OPENROUTER_MODEL_PATTERN.test(model) && !model.startsWith("openrouter/") && !model.startsWith("typesafe/") ? model : void 0;
|
|
43
|
+
}
|
|
44
|
+
function isOpenRouterRoute(name) {
|
|
45
|
+
return openRouterRouteModel(name) !== void 0;
|
|
46
|
+
}
|
|
47
|
+
function openRouterRouteName(model) {
|
|
48
|
+
const route = `openrouter:${model.trim()}`;
|
|
49
|
+
if (!isOpenRouterRoute(route)) throw new Error("OpenRouter requires a fixed vendor/model slug.");
|
|
50
|
+
return route;
|
|
51
|
+
}
|
|
52
|
+
function providerConnectionName(name) {
|
|
53
|
+
return isOpenRouterRoute(name) ? ProviderNames.openrouter : name;
|
|
54
|
+
}
|
|
55
|
+
function isProviderAvailable(name, available) {
|
|
56
|
+
return available.includes(name) || isOpenRouterRoute(name) && available.includes(ProviderNames.openrouter);
|
|
57
|
+
}
|
|
58
|
+
function isSweepProvider(name) {
|
|
59
|
+
return name !== ProviderNames.openrouter && (!name.startsWith("openrouter:") || isOpenRouterRoute(name));
|
|
60
|
+
}
|
|
37
61
|
function isBrowserProvider(name) {
|
|
38
62
|
return name.startsWith("cdp:");
|
|
39
63
|
}
|
|
@@ -9550,7 +9574,14 @@ var discoveryCompetitorMapEntrySchema = z21.object({
|
|
|
9550
9574
|
* classification existed (or by a session whose classification call failed)
|
|
9551
9575
|
* still parse — those entries are excluded from the default promote filter.
|
|
9552
9576
|
*/
|
|
9553
|
-
competitorType: discoveryCompetitorTypeSchema.default("unknown")
|
|
9577
|
+
competitorType: discoveryCompetitorTypeSchema.default("unknown"),
|
|
9578
|
+
/** Frozen classifier identity; absent for older sessions and failed classifications. */
|
|
9579
|
+
evaluator: z21.object({
|
|
9580
|
+
provider: z21.string().min(1),
|
|
9581
|
+
requestedModel: z21.string().min(1),
|
|
9582
|
+
servedModel: z21.string().nullable(),
|
|
9583
|
+
promptVersion: z21.string().min(1)
|
|
9584
|
+
}).strict().optional()
|
|
9554
9585
|
});
|
|
9555
9586
|
var discoveryProbeDtoSchema = z21.object({
|
|
9556
9587
|
id: z21.string(),
|
|
@@ -12709,6 +12740,7 @@ var READ_SEMANTIC_OPERATIONS = /* @__PURE__ */ new Set([
|
|
|
12709
12740
|
"POST /api/v1/projects/{name}/measurement-plan/diff-preview",
|
|
12710
12741
|
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/preview-assignments",
|
|
12711
12742
|
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/preview-group-membership",
|
|
12743
|
+
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/preview-route-markets",
|
|
12712
12744
|
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/compile-preview",
|
|
12713
12745
|
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/diff-preview"
|
|
12714
12746
|
]);
|
|
@@ -15117,6 +15149,32 @@ var measurementDraftApplyPairedAssignmentsRequestSchema = z35.object({
|
|
|
15117
15149
|
}).strict()).min(1),
|
|
15118
15150
|
contextOverride: measurementDraftContextOverrideSchema.optional()
|
|
15119
15151
|
}).strict();
|
|
15152
|
+
var measurementDraftRouteMarketsRequestSchema = z35.object({
|
|
15153
|
+
marketKeys: z35.array(measurementV2StableKeySchema).min(1),
|
|
15154
|
+
targetKeys: z35.array(measurementV2StableKeySchema).min(1).optional(),
|
|
15155
|
+
queryIds: z35.array(measurementDraftQueryIdSchema).min(1).optional(),
|
|
15156
|
+
contextOverride: z35.object({
|
|
15157
|
+
providers: z35.array(providerNameSchema).min(1),
|
|
15158
|
+
models: z35.record(providerNameSchema, z35.string().trim().min(1)).optional()
|
|
15159
|
+
}).strict()
|
|
15160
|
+
}).strict();
|
|
15161
|
+
var measurementDraftPreviewMarketRoutingResponseSchema = z35.object({
|
|
15162
|
+
draftEtag: z35.string().trim().min(1),
|
|
15163
|
+
markets: z35.array(z35.object({
|
|
15164
|
+
marketKey: measurementV2StableKeySchema,
|
|
15165
|
+
label: z35.string().trim().min(1),
|
|
15166
|
+
matchedEdges: z35.number().int().nonnegative(),
|
|
15167
|
+
changedEdges: z35.number().int().nonnegative()
|
|
15168
|
+
}).strict()),
|
|
15169
|
+
matchedEdges: z35.number().int().nonnegative(),
|
|
15170
|
+
changedEdges: z35.number().int().nonnegative(),
|
|
15171
|
+
execution: z35.object({
|
|
15172
|
+
addedNodes: z35.number().int().nonnegative(),
|
|
15173
|
+
addedProviderCalls: z35.number().int().nonnegative(),
|
|
15174
|
+
fullRunNodes: z35.number().int().nonnegative(),
|
|
15175
|
+
fullRunProviderCalls: z35.number().int().nonnegative()
|
|
15176
|
+
}).strict()
|
|
15177
|
+
}).strict();
|
|
15120
15178
|
var measurementDraftRemoveAssignmentRequestSchema = z35.union([
|
|
15121
15179
|
z35.object({
|
|
15122
15180
|
targetKey: measurementV2StableKeySchema,
|
|
@@ -21620,7 +21678,8 @@ var ProviderIds = {
|
|
|
21620
21678
|
muse: "muse",
|
|
21621
21679
|
local: "local",
|
|
21622
21680
|
cdpChatgpt: "cdp:chatgpt",
|
|
21623
|
-
zai: "zai"
|
|
21681
|
+
zai: "zai",
|
|
21682
|
+
openrouter: "openrouter"
|
|
21624
21683
|
};
|
|
21625
21684
|
var PROVIDER_IDS = Object.values(ProviderIds);
|
|
21626
21685
|
var SweepProviderIds = {
|
|
@@ -21637,7 +21696,8 @@ var AgentProviderIds = {
|
|
|
21637
21696
|
claude: ProviderIds.claude,
|
|
21638
21697
|
openai: ProviderIds.openai,
|
|
21639
21698
|
gemini: ProviderIds.gemini,
|
|
21640
|
-
zai: ProviderIds.zai
|
|
21699
|
+
zai: ProviderIds.zai,
|
|
21700
|
+
openrouter: ProviderIds.openrouter
|
|
21641
21701
|
};
|
|
21642
21702
|
var AGENT_PROVIDER_IDS = Object.values(AgentProviderIds);
|
|
21643
21703
|
function isAgentProviderId(value) {
|
|
@@ -22108,7 +22168,7 @@ function agentVisibilityEvidence(report, project, retrievedAt) {
|
|
|
22108
22168
|
))
|
|
22109
22169
|
};
|
|
22110
22170
|
}
|
|
22111
|
-
var agentProviderIdSchema = z73.enum(["claude", "openai", "gemini", "zai"]);
|
|
22171
|
+
var agentProviderIdSchema = z73.enum(["claude", "openai", "gemini", "zai", "openrouter"]);
|
|
22112
22172
|
var agentProviderOptionDtoSchema = z73.object({
|
|
22113
22173
|
/** Stable identifier — what clients pass back as `provider` on the prompt endpoint. */
|
|
22114
22174
|
id: agentProviderIdSchema,
|
|
@@ -22122,7 +22182,13 @@ var agentProviderOptionDtoSchema = z73.object({
|
|
|
22122
22182
|
* Where the key resolved from, if any. `null` when `configured === false`.
|
|
22123
22183
|
* Surfaced so the UI can nudge users toward their preferred source of truth.
|
|
22124
22184
|
*/
|
|
22125
|
-
keySource: z73.enum(["config", "env"]).nullable()
|
|
22185
|
+
keySource: z73.enum(["config", "env"]).nullable(),
|
|
22186
|
+
/**
|
|
22187
|
+
* A short list of models to offer for this provider: the default first,
|
|
22188
|
+
* then a few stronger current models. A pinned model outside the list is
|
|
22189
|
+
* listed first. Any other model ID can still be requested.
|
|
22190
|
+
*/
|
|
22191
|
+
models: z73.array(z73.object({ id: z73.string(), displayName: z73.string() })).optional()
|
|
22126
22192
|
});
|
|
22127
22193
|
var agentProvidersResponseDtoSchema = z73.object({
|
|
22128
22194
|
/**
|
|
@@ -22228,6 +22294,9 @@ var agentConversationListQuerySchema = z73.object({
|
|
|
22228
22294
|
// ../contracts/src/sentiment.ts
|
|
22229
22295
|
import { z as z74 } from "zod";
|
|
22230
22296
|
var SENTIMENT_MODEL = "jev-1.13.0";
|
|
22297
|
+
var SENTIMENT_OPENROUTER_MODEL = "typesafe/jev-1.13";
|
|
22298
|
+
var SENTIMENT_OPENROUTER_SERVED_MODEL = "typesafe/jev-1.13-20260917";
|
|
22299
|
+
var sentimentEvaluatorProviderSchema = z74.enum(["typesafe", "openrouter"]);
|
|
22231
22300
|
var SENTIMENT_INTERVAL_LIMITATION = "Wilson 95% intervals assume independent observations. They exclude classifier error and dependence among related queries, Properties, and sweeps.";
|
|
22232
22301
|
var id = z74.string().trim().min(1).max(256);
|
|
22233
22302
|
var count = z74.number().int().nonnegative();
|
|
@@ -22257,7 +22326,10 @@ var SentimentOutcomes = sentimentOutcomeSchema.enum;
|
|
|
22257
22326
|
var sentimentStateSchema = z74.enum(["disabled", "not-measured", "processing", "partial", "complete", "failed", "canceled", "unsupported"]);
|
|
22258
22327
|
var sentimentEvaluationDefinitionSchema = z74.object({
|
|
22259
22328
|
schemaVersion: z74.union([z74.literal(1), z74.literal(2)]),
|
|
22260
|
-
requestedModel: z74.
|
|
22329
|
+
requestedModel: z74.enum([SENTIMENT_MODEL, SENTIMENT_OPENROUTER_MODEL]),
|
|
22330
|
+
/** Omitted on historical direct TypeSafe definitions to preserve their immutable identity. */
|
|
22331
|
+
provider: sentimentEvaluatorProviderSchema.optional(),
|
|
22332
|
+
expectedReturnedModel: z74.literal(SENTIMENT_OPENROUTER_SERVED_MODEL).optional(),
|
|
22261
22333
|
verdictVersion: id,
|
|
22262
22334
|
identityVersion: id,
|
|
22263
22335
|
evidenceVersion: id,
|
|
@@ -22267,11 +22339,17 @@ var sentimentEvaluationDefinitionSchema = z74.object({
|
|
|
22267
22339
|
comparisonMethodVersion: z74.literal("wilson-independent-v1"),
|
|
22268
22340
|
confidenceThreshold: z74.number().min(0).max(1).nullable(),
|
|
22269
22341
|
questions: z74.object({ identity: z74.string(), judgment: z74.string(), stance: z74.string(), conclusion: z74.string(), complaint: z74.string() }).strict()
|
|
22270
|
-
}).strict()
|
|
22271
|
-
|
|
22342
|
+
}).strict().superRefine((definition, ctx) => {
|
|
22343
|
+
const routed = definition.provider === "openrouter";
|
|
22344
|
+
if (definition.requestedModel !== (routed ? SENTIMENT_OPENROUTER_MODEL : SENTIMENT_MODEL) || (routed ? definition.expectedReturnedModel !== SENTIMENT_OPENROUTER_SERVED_MODEL : definition.expectedReturnedModel !== void 0)) {
|
|
22345
|
+
ctx.addIssue({ code: "custom", path: ["requestedModel"], message: "The frozen evaluator route must use its pinned requested and returned models." });
|
|
22346
|
+
}
|
|
22347
|
+
});
|
|
22348
|
+
function createSentimentEvaluationDefinition(provider = "typesafe") {
|
|
22272
22349
|
return sentimentEvaluationDefinitionSchema.parse({
|
|
22273
22350
|
schemaVersion: 2,
|
|
22274
|
-
requestedModel: SENTIMENT_MODEL,
|
|
22351
|
+
requestedModel: provider === "openrouter" ? SENTIMENT_OPENROUTER_MODEL : SENTIMENT_MODEL,
|
|
22352
|
+
...provider === "openrouter" ? { provider, expectedReturnedModel: SENTIMENT_OPENROUTER_SERVED_MODEL } : {},
|
|
22275
22353
|
verdictVersion: "stance-v2",
|
|
22276
22354
|
identityVersion: "qualified-subject-v3",
|
|
22277
22355
|
evidenceVersion: "sentence-evidence-v1",
|
|
@@ -22289,6 +22367,9 @@ function createSentimentEvaluationDefinition() {
|
|
|
22289
22367
|
}
|
|
22290
22368
|
});
|
|
22291
22369
|
}
|
|
22370
|
+
function sentimentEvaluatorProvider(definition) {
|
|
22371
|
+
return definition.provider ?? "typesafe";
|
|
22372
|
+
}
|
|
22292
22373
|
var SENTIMENT_TEMPLATE_FIELDS = ["schemaVersion", "verdictVersion", "identityVersion", "evidenceVersion", "segmentationVersion", "preprocessingVersion"];
|
|
22293
22374
|
function hasCurrentSentimentTemplate(definition) {
|
|
22294
22375
|
const current = createSentimentEvaluationDefinition();
|
|
@@ -22465,6 +22546,7 @@ function rankCriticizedProperties(rows) {
|
|
|
22465
22546
|
}
|
|
22466
22547
|
var sentimentSettingsUpdateSchema = z74.object({ enabled: z74.boolean().optional() }).strict();
|
|
22467
22548
|
var sentimentSettingsSchema = z74.object({
|
|
22549
|
+
provider: sentimentEvaluatorProviderSchema.optional(),
|
|
22468
22550
|
installEnabled: z74.boolean(),
|
|
22469
22551
|
enabled: z74.boolean(),
|
|
22470
22552
|
ready: z74.boolean(),
|
|
@@ -24369,6 +24451,13 @@ export {
|
|
|
24369
24451
|
PROVIDER_NAMES,
|
|
24370
24452
|
ProviderNames,
|
|
24371
24453
|
API_PROVIDER_NAMES,
|
|
24454
|
+
OPENROUTER_MODEL_PATTERN,
|
|
24455
|
+
openRouterRouteModel,
|
|
24456
|
+
isOpenRouterRoute,
|
|
24457
|
+
openRouterRouteName,
|
|
24458
|
+
providerConnectionName,
|
|
24459
|
+
isProviderAvailable,
|
|
24460
|
+
isSweepProvider,
|
|
24372
24461
|
isBrowserProvider,
|
|
24373
24462
|
resolveProviderInput,
|
|
24374
24463
|
locationContextSchema,
|
|
@@ -24928,6 +25017,8 @@ export {
|
|
|
24928
25017
|
measurementDraftPreviewAssignmentsRequestSchema,
|
|
24929
25018
|
measurementDraftPreviewAssignmentsResponseSchema,
|
|
24930
25019
|
measurementDraftApplyPairedAssignmentsRequestSchema,
|
|
25020
|
+
measurementDraftRouteMarketsRequestSchema,
|
|
25021
|
+
measurementDraftPreviewMarketRoutingResponseSchema,
|
|
24931
25022
|
measurementDraftRemoveAssignmentRequestSchema,
|
|
24932
25023
|
measurementDraftClearAssignmentsRequestSchema,
|
|
24933
25024
|
measurementDraftClassifyAssignmentsRequestSchema,
|
|
@@ -25056,6 +25147,7 @@ export {
|
|
|
25056
25147
|
wordpressDiffDtoSchema,
|
|
25057
25148
|
buildSnapshotUsage,
|
|
25058
25149
|
usageCount,
|
|
25150
|
+
ProviderIds,
|
|
25059
25151
|
AgentProviderIds,
|
|
25060
25152
|
AGENT_PROVIDER_IDS,
|
|
25061
25153
|
isAgentProviderId,
|
|
@@ -25155,10 +25247,14 @@ export {
|
|
|
25155
25247
|
ccAvailableReleaseSchema,
|
|
25156
25248
|
ccCachedReleaseSchema,
|
|
25157
25249
|
SENTIMENT_MODEL,
|
|
25250
|
+
SENTIMENT_OPENROUTER_MODEL,
|
|
25251
|
+
SENTIMENT_OPENROUTER_SERVED_MODEL,
|
|
25252
|
+
sentimentEvaluatorProviderSchema,
|
|
25158
25253
|
SENTIMENT_INTERVAL_LIMITATION,
|
|
25159
25254
|
sentimentOutcomeSchema,
|
|
25160
25255
|
SentimentOutcomes,
|
|
25161
25256
|
createSentimentEvaluationDefinition,
|
|
25257
|
+
sentimentEvaluatorProvider,
|
|
25162
25258
|
hasCurrentSentimentTemplate,
|
|
25163
25259
|
storedSentimentEvaluationDefinitionSchema,
|
|
25164
25260
|
canonicalSentimentJson,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
resolveCliAccess,
|
|
4
4
|
resolveCliAccessForInvocation,
|
|
5
5
|
windowOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LYCYSM6O.js";
|
|
7
7
|
import {
|
|
8
8
|
emitJsonl
|
|
9
9
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-HGMYEDAQ.js";
|
|
15
15
|
import {
|
|
16
16
|
OperationAccesses
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2GAXZAQJ.js";
|
|
18
18
|
|
|
19
19
|
// src/cli-catalog.ts
|
|
20
20
|
import { createRequire } from "module";
|
|
@@ -111,7 +111,7 @@ async function dispatchRegisteredCommand(args, fallbackFormat, specs) {
|
|
|
111
111
|
const accessValue = accessFilterFromArgs(argsWithoutHelp);
|
|
112
112
|
validateAccessFilter(accessValue);
|
|
113
113
|
if (fallbackFormat !== "text") {
|
|
114
|
-
const { printCliCatalog: printCliCatalog2 } = await import("./cli-catalog-
|
|
114
|
+
const { printCliCatalog: printCliCatalog2 } = await import("./cli-catalog-WKUCQEWA.js");
|
|
115
115
|
const group2 = argsWithoutHelp.find((arg) => !arg.startsWith("--"));
|
|
116
116
|
printCliCatalog2(specs, fallbackFormat, group2, accessValue);
|
|
117
117
|
return true;
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
dedupeGscSitemapUrls,
|
|
3
3
|
resolveDiscoveredGscSitemapUrls,
|
|
4
4
|
submitGscSitemapBatches
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-23UZNTF4.js";
|
|
6
6
|
import {
|
|
7
7
|
measurementDraftOperationSchema,
|
|
8
8
|
runMeasurementDraftAction
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BQT7VLGM.js";
|
|
10
10
|
import {
|
|
11
11
|
CliError
|
|
12
12
|
} from "./chunk-HGMYEDAQ.js";
|
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
trafficSeriesGranularitySchema,
|
|
148
148
|
visibilityCompareSelectionSchema,
|
|
149
149
|
visibilityReportRequestSchema
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-2GAXZAQJ.js";
|
|
151
151
|
|
|
152
152
|
// src/mcp/tool-registry.ts
|
|
153
153
|
import { z as z2 } from "zod";
|
|
@@ -348,6 +348,8 @@ var measurementDraftActionOpenApiOperations = [
|
|
|
348
348
|
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/preview-assignments",
|
|
349
349
|
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/replace-assignments",
|
|
350
350
|
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/apply-paired-assignments",
|
|
351
|
+
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/preview-route-markets",
|
|
352
|
+
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/route-markets",
|
|
351
353
|
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/remove-assignment",
|
|
352
354
|
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/clear-assignments",
|
|
353
355
|
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/classify-assignments",
|
|
@@ -3118,7 +3120,7 @@ var rawCanonryMcpTools = [
|
|
|
3118
3120
|
defineTool({
|
|
3119
3121
|
name: "canonry_run_trigger",
|
|
3120
3122
|
title: "Trigger run",
|
|
3121
|
-
description: `Trigger an answer-visibility run for a Canonry project. Omit both scoping fields for a full sweep. Pass request.queries[] to measure only some of the project's tracked questions. On a project with a published measurement plan, pass request.measurementScope with at least one group or target to measure one slice of that plan \u2014 a group stands for its member Targets, and only the questions those Targets selected are measured. A scope naming nothing is rejected rather than treated as a full sweep, so omit the field entirely when you want everything. Either kind of slice is recorded as a spot check: it never replaces a full sweep in the dashboard, analytics or report. For verification scenarios (testing whether a provider migration worked, reproducing a regression, sanity-checking after a code change), set request.trigger='probe' \u2014 probe runs write a snapshot you can inspect via canonry_runs_get but are EXCLUDED from dashboard, analytics, intelligence, report, and notifications. Use 'probe' whenever you are testing on your own initiative rather than producing data the user/dashboard will consume. request.dispatchMode='batch' sends every provider that can (a full sweep of a published plan, a batch-capable provider enabled in config.yaml, every answer's model frozen) to its asynchronous batch API at the batch price; the rest run sync and the run stays running until the batch ends (up to its deadline, 24h by default). A batch request no provider can honour is refused with each provider's reason. Omit it for the ordinary sync sweep. A run is refused with PROVIDERS_FAILING when every provider it would call failed on its account (rejected key, denied access, no credit) in each of its last ${PROVIDER_ACCOUNT_FAILURE_STREAK} runs; details.providers names each provider's code and details.retryAfter when one run is let through again (${PROVIDER_ACCOUNT_RETRY_HOURS}h after the newest failure). Tell the user to fix the key, access or billing; saving a new key, model or endpoint in the provider's settings lets the next run through at once. A probe (request.trigger='probe') is never refused, and one that succeeds clears the refusal, so use a probe to check a fix. When only some providers keep failing that way, the run is queued without them: skippedProviders on the returned run names each with its code and retryAfter, and the run ends partial. Set request.force=true (call every provider) only when the user asks to run anyway.`,
|
|
3123
|
+
description: `Trigger an answer-visibility run for a Canonry project. request.providers accepts direct provider names and pinned OpenRouter model routes such as openrouter:google/gemini-2.5-flash. Multiple routes share the OpenRouter connection credentials and account limits, while preserving independent observations. The bare openrouter connection is not a sweep model. Omit both scoping fields for a full sweep. Pass request.queries[] to measure only some of the project's tracked questions. On a project with a published measurement plan, pass request.measurementScope with at least one group or target to measure one slice of that plan \u2014 a group stands for its member Targets, and only the questions those Targets selected are measured. A scope naming nothing is rejected rather than treated as a full sweep, so omit the field entirely when you want everything. Either kind of slice is recorded as a spot check: it never replaces a full sweep in the dashboard, analytics or report. For verification scenarios (testing whether a provider migration worked, reproducing a regression, sanity-checking after a code change), set request.trigger='probe' \u2014 probe runs write a snapshot you can inspect via canonry_runs_get but are EXCLUDED from dashboard, analytics, intelligence, report, and notifications. Use 'probe' whenever you are testing on your own initiative rather than producing data the user/dashboard will consume. request.dispatchMode='batch' sends every provider that can (a full sweep of a published plan, a batch-capable provider enabled in config.yaml, every answer's model frozen) to its asynchronous batch API at the batch price; the rest run sync and the run stays running until the batch ends (up to its deadline, 24h by default). A batch request no provider can honour is refused with each provider's reason. Omit it for the ordinary sync sweep. A run is refused with PROVIDERS_FAILING when every provider it would call failed on its account (rejected key, denied access, no credit) in each of its last ${PROVIDER_ACCOUNT_FAILURE_STREAK} runs; details.providers names each provider's code and details.retryAfter when one run is let through again (${PROVIDER_ACCOUNT_RETRY_HOURS}h after the newest failure). Tell the user to fix the key, access or billing; saving a new key, model or endpoint in the provider's settings lets the next run through at once. A probe (request.trigger='probe') is never refused, and one that succeeds clears the refusal, so use a probe to check a fix. When only some providers keep failing that way, the run is queued without them: skippedProviders on the returned run names each with its code and retryAfter, and the run ends partial. Set request.force=true (call every provider) only when the user asks to run anyway.`,
|
|
3122
3124
|
access: "write",
|
|
3123
3125
|
tier: "core",
|
|
3124
3126
|
inputSchema: runTriggerInputSchema,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registeredProviderNames
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RVBGFWJ3.js";
|
|
4
4
|
import {
|
|
5
5
|
configExists,
|
|
6
6
|
loadConfigRaw
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-N3WQHLDI.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-WZLTQFCH.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-PQHXSS5T.js");
|
|
51
51
|
await serveCommand(format);
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
createApiClient,
|
|
8
8
|
runWithUsageTags
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-O3OTW7F4.js";
|
|
10
10
|
import {
|
|
11
11
|
canonryMcpTools,
|
|
12
12
|
toolOperationAccess
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2XDGFHPM.js";
|
|
14
14
|
import {
|
|
15
15
|
PACKAGE_VERSION
|
|
16
16
|
} from "./chunk-AOJU5LKX.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
isReadOnlyKey,
|
|
24
24
|
restrictedWriteScopes,
|
|
25
25
|
upgradeCaveatFor
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2GAXZAQJ.js";
|
|
27
27
|
|
|
28
28
|
// src/mcp/server.ts
|
|
29
29
|
import { randomUUID } from "crypto";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
loadConfig,
|
|
6
6
|
loadConfigRaw,
|
|
7
7
|
saveConfigPatch
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-N3WQHLDI.js";
|
|
9
9
|
import {
|
|
10
10
|
CANONRY_NPM_PACKAGE_URL,
|
|
11
11
|
compareSemver,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
updateCheckEnvOptOut,
|
|
19
19
|
upgradeCaveatFor,
|
|
20
20
|
upgradeCommandFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-2GAXZAQJ.js";
|
|
22
22
|
|
|
23
23
|
// src/runtime-context.ts
|
|
24
24
|
function cliRuntimeContext(env = process.env, stdio = process) {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
templateLinkRatio,
|
|
18
18
|
templateLinkUbiquityAvailable,
|
|
19
19
|
validationError
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2GAXZAQJ.js";
|
|
21
21
|
import {
|
|
22
22
|
__export
|
|
23
23
|
} from "./chunk-MLKGABMK.js";
|
|
@@ -8872,13 +8872,13 @@ var SentimentRepository = class {
|
|
|
8872
8872
|
projectId: attempt.projectId,
|
|
8873
8873
|
runId: work.runId,
|
|
8874
8874
|
feature: "sentiment",
|
|
8875
|
-
provider: "typesafe",
|
|
8875
|
+
provider: input.provider ?? "typesafe",
|
|
8876
8876
|
model: input.returnedModel ?? attempt.requestedModel,
|
|
8877
8877
|
inputTokens: input.usage.inputTokens,
|
|
8878
8878
|
outputTokens: input.usage.outputTokens,
|
|
8879
8879
|
totalTokens: input.usage.inputTokens + input.usage.outputTokens,
|
|
8880
8880
|
costMillicents: input.usage.costMillicents ?? 0,
|
|
8881
|
-
metadata: { sentimentAttemptId: attempt.id, usageStatus: "reported" },
|
|
8881
|
+
metadata: { sentimentAttemptId: attempt.id, usageStatus: "reported", ...input.usage.costMillicents === void 0 ? { costStatus: "unknown" } : {} },
|
|
8882
8882
|
createdAt: input.now
|
|
8883
8883
|
}).onConflictDoNothing().run();
|
|
8884
8884
|
}
|
|
@@ -18,11 +18,12 @@ import {
|
|
|
18
18
|
measurementDraftRemoveGroupRequestSchema,
|
|
19
19
|
measurementDraftRenameTargetRequestSchema,
|
|
20
20
|
measurementDraftReplaceAssignmentsRequestSchema,
|
|
21
|
+
measurementDraftRouteMarketsRequestSchema,
|
|
21
22
|
measurementDraftUpsertCompetitorRequestSchema,
|
|
22
23
|
measurementDraftUpsertGroupRequestSchema,
|
|
23
24
|
measurementDraftUpsertMarketRequestSchema,
|
|
24
25
|
measurementDraftUpsertTargetRequestSchema
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2GAXZAQJ.js";
|
|
26
27
|
|
|
27
28
|
// src/measurement-draft-actions.ts
|
|
28
29
|
import { z } from "zod";
|
|
@@ -60,6 +61,11 @@ var measurementDraftOperationSchema = z.discriminatedUnion("action", [
|
|
|
60
61
|
}).strict().describe("Read-semantic assignment impact preview."),
|
|
61
62
|
mutationOperationSchema("replace-assignments", measurementDraftReplaceAssignmentsRequestSchema),
|
|
62
63
|
mutationOperationSchema("apply-paired-assignments", measurementDraftApplyPairedAssignmentsRequestSchema),
|
|
64
|
+
z.object({
|
|
65
|
+
action: z.literal("preview-route-markets"),
|
|
66
|
+
request: measurementDraftRouteMarketsRequestSchema
|
|
67
|
+
}).strict().describe("Read-semantic market-routing impact preview."),
|
|
68
|
+
mutationOperationSchema("route-markets", measurementDraftRouteMarketsRequestSchema),
|
|
63
69
|
mutationOperationSchema("remove-assignment", measurementDraftRemoveAssignmentRequestSchema),
|
|
64
70
|
mutationOperationSchema("clear-assignments", measurementDraftClearAssignmentsRequestSchema),
|
|
65
71
|
mutationOperationSchema("classify-assignments", measurementDraftClassifyAssignmentsRequestSchema),
|
|
@@ -108,6 +114,10 @@ function runMeasurementDraftAction(client, project, actionInput) {
|
|
|
108
114
|
return client.replaceMeasurementDraftAssignments(project, actionInput.request, actionInput.idempotencyKey, actionInput.etag);
|
|
109
115
|
case "apply-paired-assignments":
|
|
110
116
|
return client.applyPairedMeasurementDraftAssignments(project, actionInput.request, actionInput.idempotencyKey, actionInput.etag);
|
|
117
|
+
case "preview-route-markets":
|
|
118
|
+
return client.previewMeasurementDraftMarketRouting(project, actionInput.request);
|
|
119
|
+
case "route-markets":
|
|
120
|
+
return client.routeMeasurementDraftMarkets(project, actionInput.request, actionInput.idempotencyKey, actionInput.etag);
|
|
111
121
|
case "remove-assignment":
|
|
112
122
|
return client.removeMeasurementDraftAssignment(project, actionInput.request, actionInput.idempotencyKey, actionInput.etag);
|
|
113
123
|
case "clear-assignments":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-O3OTW7F4.js";
|
|
4
4
|
import {
|
|
5
5
|
emitJsonl
|
|
6
6
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
formatMicros,
|
|
20
20
|
formatRunErrorOneLine,
|
|
21
21
|
resolveProviderInput
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2GAXZAQJ.js";
|
|
23
23
|
|
|
24
24
|
// src/commands/run.ts
|
|
25
25
|
function getClient() {
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
configExists,
|
|
3
3
|
loadConfigRaw,
|
|
4
4
|
saveConfigPatch
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-N3WQHLDI.js";
|
|
6
6
|
import {
|
|
7
7
|
BUNDLED_SKILL_NAMES,
|
|
8
8
|
installSkills
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NKSASP4U.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-2GAXZAQJ.js";
|
|
17
17
|
|
|
18
18
|
// src/skills-autosync.ts
|
|
19
19
|
import fs from "fs";
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OPENAI_RETRIEVAL_CONTRACT,
|
|
3
|
+
openrouterAdapter,
|
|
3
4
|
reparseStoredResult,
|
|
4
5
|
reparseStoredResult2,
|
|
5
6
|
reparseStoredResult3,
|
|
6
7
|
reparseStoredResult4,
|
|
7
8
|
reparseStoredResult5,
|
|
8
9
|
resolveStoredApiResponse
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-N6MS4VG2.js";
|
|
10
11
|
import {
|
|
11
12
|
loadConfig
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-N3WQHLDI.js";
|
|
13
14
|
import {
|
|
14
15
|
isMachineFormat
|
|
15
16
|
} from "./chunk-HGMYEDAQ.js";
|
|
16
17
|
import {
|
|
17
18
|
determineCitationState
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BGZL5RCP.js";
|
|
19
20
|
import {
|
|
20
21
|
backfillProjectAnswerMentions,
|
|
21
22
|
competitorIdentityColumns,
|
|
22
23
|
createRunCompetitorResolver,
|
|
23
24
|
readMarketCompetitorNames,
|
|
24
25
|
refreshSnapshotMentionIdentity
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-JZARXJV6.js";
|
|
26
27
|
import {
|
|
27
28
|
classifyAiUserFetch,
|
|
28
29
|
classifyCrawler
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-VEH4YLWR.js";
|
|
30
31
|
import {
|
|
31
32
|
aiUserFetchEventsHourly,
|
|
32
33
|
auditLog,
|
|
@@ -41,7 +42,7 @@ import {
|
|
|
41
42
|
querySnapshots,
|
|
42
43
|
rawEventSamples,
|
|
43
44
|
runs
|
|
44
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-BH274VEO.js";
|
|
45
46
|
import {
|
|
46
47
|
ProviderNames,
|
|
47
48
|
RetrievalContracts,
|
|
@@ -56,8 +57,9 @@ import {
|
|
|
56
57
|
effectiveBrandNames,
|
|
57
58
|
effectiveDomains,
|
|
58
59
|
extractRecommendedCompetitors,
|
|
59
|
-
normalizeUrlPath
|
|
60
|
-
|
|
60
|
+
normalizeUrlPath,
|
|
61
|
+
openRouterRouteModel
|
|
62
|
+
} from "./chunk-2GAXZAQJ.js";
|
|
61
63
|
|
|
62
64
|
// src/commands/backfill.ts
|
|
63
65
|
import { setImmediate as yieldToEventLoop } from "timers/promises";
|
|
@@ -435,7 +437,7 @@ No DB writes performed. Re-run without --dry-run to apply.`);
|
|
|
435
437
|
}
|
|
436
438
|
}
|
|
437
439
|
async function backfillInsightsCommand(project, opts) {
|
|
438
|
-
const { IntelligenceService } = await import("./intelligence-service-
|
|
440
|
+
const { IntelligenceService } = await import("./intelligence-service-JXXB43RB.js");
|
|
439
441
|
const config = loadConfig();
|
|
440
442
|
const db = createClient(config.database);
|
|
441
443
|
migrate(db);
|
|
@@ -736,6 +738,14 @@ function reparseProviderSnapshot(provider, rawResponse) {
|
|
|
736
738
|
const envelope = parseJsonColumn(rawResponse, {});
|
|
737
739
|
const apiResponse = resolveStoredApiResponse(envelope);
|
|
738
740
|
if (!apiResponse) return null;
|
|
741
|
+
const routedModel = openRouterRouteModel(provider);
|
|
742
|
+
if (routedModel) {
|
|
743
|
+
try {
|
|
744
|
+
return openrouterAdapter.normalizeResult(openrouterAdapter.parseTrackedQueryResponse(apiResponse, routedModel));
|
|
745
|
+
} catch {
|
|
746
|
+
return null;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
739
749
|
switch (provider) {
|
|
740
750
|
case ProviderNames.openai:
|
|
741
751
|
return reparseStoredResult(apiResponse);
|