@ainyc/canonry 5.5.0 → 5.8.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/aero/SKILL.md +18 -0
- package/assets/agent-workspace/skills/aero/references/portfolio-analysis.md +1 -1
- package/assets/agent-workspace/skills/aero/soul.md +2 -0
- package/assets/agent-workspace/skills/canonry/references/aeo-analysis.md +10 -0
- package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +5 -4
- package/assets/assets/{AuditHistoryPanel-BMGGxHpw.js → AuditHistoryPanel-DumM4n44.js} +1 -1
- package/assets/assets/{BacklinksPage-CS3wJSWe.js → BacklinksPage-DHW-aDYf.js} +1 -1
- package/assets/assets/ChartPrimitives-BQC2VH0O.js +1 -0
- package/assets/assets/{HistoryPage-Ba9ezeuP.js → HistoryPage-DJgCpcmY.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-Y9eseEv0.js → MeasurementPropertyPage-CblC7DUV.js} +1 -1
- package/assets/assets/ProjectPage-BKZyG1S3.js +8 -0
- package/assets/assets/{RunRow-DbUtgNUI.js → RunRow-plH2LI7o.js} +1 -1
- package/assets/assets/{RunsPage-BBuFIYuS.js → RunsPage-JCSy7P9I.js} +1 -1
- package/assets/assets/{SettingsPage-DNnR33D-.js → SettingsPage-B8KXT4YK.js} +1 -1
- package/assets/assets/{SiteHealthSection-Cf4KHWp0.js → SiteHealthSection-06pNjngi.js} +3 -3
- package/assets/assets/{TrafficPage-DSQjaZM9.js → TrafficPage-BYLDNQ1A.js} +5 -5
- package/assets/assets/{TrafficSourceDetailPage-C-Pg69TW.js → TrafficSourceDetailPage-CxseBpYr.js} +1 -1
- package/assets/assets/{extract-error-message-DNLmL0ID.js → extract-error-message-Dv5fwiqy.js} +1 -1
- package/assets/assets/index-2Ldc0Hq4.js +86 -0
- package/assets/assets/index-neNKCg78.css +1 -0
- package/assets/assets/{react-sigma_core.esm.min-DkItaBPY.js → react-sigma_core.esm.min-C8381RhL.js} +1 -1
- package/assets/assets/v2-overview-adapter-BQD1Ap8K.js +1 -0
- package/assets/assets/vendor-markdown-B4giJcws.js +29 -0
- package/assets/assets/{vendor-recharts-D-cUuLZo.js → vendor-recharts-llkUFBGR.js} +1 -1
- package/assets/index.html +4 -4
- package/dist/{chunk-BL3FMPSM.js → chunk-5E4ASNU4.js} +857 -784
- package/dist/{chunk-75ECQ77U.js → chunk-BO53QARL.js} +49 -16
- package/dist/{chunk-REQEWYNF.js → chunk-D3DKDTXP.js} +1027 -70
- package/dist/{chunk-DX4CZNNU.js → chunk-LR7BVM53.js} +2 -2
- package/dist/{chunk-LQAOGFFK.js → chunk-R4COV5KR.js} +2 -2
- package/dist/{chunk-KKDXJWDK.js → chunk-S4DBS5DP.js} +4 -4
- package/dist/cli.js +10 -9
- package/dist/{demo-server-BSH6SSWD.js → demo-server-WRVVNKLS.js} +7 -3
- package/dist/index.d.ts +20 -8
- package/dist/index.js +5 -5
- package/dist/{intelligence-service-CU7W5AVC.js → intelligence-service-4XMMO3JK.js} +2 -2
- package/dist/mcp.js +3 -3
- package/package.json +11 -11
- package/assets/assets/ChartPrimitives-Bxa_vFmq.js +0 -1
- package/assets/assets/ProjectPage-Cl1N9Dcw.js +0 -8
- package/assets/assets/index-BCCrbno5.js +0 -86
- package/assets/assets/index-gQj7x9RX.css +0 -1
- package/assets/assets/v2-overview-adapter-DKBMcYBh.js +0 -1
- package/assets/assets/vendor-markdown-B-Oq2NYq.js +0 -14
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
resolveOperatorApiKeyIds,
|
|
17
17
|
runWithUsageTags,
|
|
18
18
|
saveConfigPatch
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-S4DBS5DP.js";
|
|
20
20
|
import {
|
|
21
21
|
deleteSiteCrawlGraphLayout,
|
|
22
22
|
persistSiteCrawlGraphLayout,
|
|
23
23
|
prepareSiteCrawlGraphLayout
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-R4COV5KR.js";
|
|
25
25
|
import {
|
|
26
26
|
PACKAGE_VERSION
|
|
27
27
|
} from "./chunk-AOJU5LKX.js";
|
|
@@ -152,6 +152,7 @@ import {
|
|
|
152
152
|
refreshAccessToken,
|
|
153
153
|
registerOAuthAdminRoutes,
|
|
154
154
|
registerOAuthRoutes,
|
|
155
|
+
requireInstanceAdministrator,
|
|
155
156
|
researchRunQueries,
|
|
156
157
|
researchRuns,
|
|
157
158
|
resolveDestination,
|
|
@@ -176,7 +177,7 @@ import {
|
|
|
176
177
|
siteLivenessState,
|
|
177
178
|
toAlertView,
|
|
178
179
|
usageCounters
|
|
179
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-5E4ASNU4.js";
|
|
180
181
|
import {
|
|
181
182
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
182
183
|
AGENT_NONE,
|
|
@@ -329,7 +330,7 @@ import {
|
|
|
329
330
|
validationError,
|
|
330
331
|
winnabilityClassLabel,
|
|
331
332
|
withRetry
|
|
332
|
-
} from "./chunk-
|
|
333
|
+
} from "./chunk-D3DKDTXP.js";
|
|
333
334
|
|
|
334
335
|
// src/runtime-context.ts
|
|
335
336
|
function cliRuntimeContext(env = process.env, stdio = process) {
|
|
@@ -6040,6 +6041,13 @@ function resolveAgentEnabled(env, config) {
|
|
|
6040
6041
|
}
|
|
6041
6042
|
return config.agent?.mode !== "disabled";
|
|
6042
6043
|
}
|
|
6044
|
+
function resolveAgentProactiveEnabled(env, config) {
|
|
6045
|
+
const raw = env.CANONRY_AGENT_PROMPT_ONLY?.trim();
|
|
6046
|
+
if (raw) {
|
|
6047
|
+
return !(raw === "1" || raw.toLowerCase() === "true");
|
|
6048
|
+
}
|
|
6049
|
+
return config.agent?.mode !== "prompt-only";
|
|
6050
|
+
}
|
|
6043
6051
|
|
|
6044
6052
|
// src/places-config.ts
|
|
6045
6053
|
var DEFAULT_TIER = "atmosphere";
|
|
@@ -6468,7 +6476,7 @@ function nonBlank(value) {
|
|
|
6468
6476
|
return trimmed ? trimmed : void 0;
|
|
6469
6477
|
}
|
|
6470
6478
|
function resolveBuildCommit(env = process.env) {
|
|
6471
|
-
const embedded = true ? "
|
|
6479
|
+
const embedded = true ? "6009ba08439de17b373d8958bae95b4794f02af0" : void 0;
|
|
6472
6480
|
return nonBlank(embedded) ?? nonBlank(env.CANONRY_COMMIT);
|
|
6473
6481
|
}
|
|
6474
6482
|
function resolveInstanceIdentity(env = process.env) {
|
|
@@ -11762,7 +11770,7 @@ function readStoredGroundingSources(rawResponse) {
|
|
|
11762
11770
|
return result;
|
|
11763
11771
|
}
|
|
11764
11772
|
async function backfillInsightsCommand(project, opts) {
|
|
11765
|
-
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-
|
|
11773
|
+
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-4XMMO3JK.js");
|
|
11766
11774
|
const config = loadConfig();
|
|
11767
11775
|
const db = createClient(config.database);
|
|
11768
11776
|
migrate(db);
|
|
@@ -13656,11 +13664,18 @@ var PROVIDER_MODELS = {
|
|
|
13656
13664
|
[LlmCapabilities.classify]: "glm-5-turbo"
|
|
13657
13665
|
},
|
|
13658
13666
|
[AgentProviderIds.deepinfra]: {
|
|
13659
|
-
// DeepInfra `org/Model` slugs
|
|
13660
|
-
//
|
|
13661
|
-
//
|
|
13662
|
-
//
|
|
13663
|
-
|
|
13667
|
+
// DeepInfra `org/Model` slugs, resolved into a custom openai-completions
|
|
13668
|
+
// model rather than pi-ai's catalog.
|
|
13669
|
+
//
|
|
13670
|
+
// The agent tier is pinned explicitly: the dashboard picker sends a
|
|
13671
|
+
// provider and no model, so whatever sits here is what selecting DeepInfra
|
|
13672
|
+
// pins a session to.
|
|
13673
|
+
//
|
|
13674
|
+
// analyze + classify stay on GLM on purpose. Those tiers suppress the
|
|
13675
|
+
// reasoning trace through GLM's chat-template switch, and that branch
|
|
13676
|
+
// applies only to a model declared `reasoning: true`; moving them to
|
|
13677
|
+
// DeepSeek-V4-Flash (which is not) would quietly stop suppressing anything.
|
|
13678
|
+
[LlmCapabilities.agent]: "deepseek-ai/DeepSeek-V4-Flash",
|
|
13664
13679
|
[LlmCapabilities.analyze]: "zai-org/GLM-5.2",
|
|
13665
13680
|
[LlmCapabilities.classify]: "zai-org/GLM-5.2"
|
|
13666
13681
|
}
|
|
@@ -13718,7 +13733,7 @@ var AGENT_PROVIDERS = {
|
|
|
13718
13733
|
},
|
|
13719
13734
|
// Best-effort metadata. Costs are USD/1M tokens (DeepInfra published
|
|
13720
13735
|
// rates: GLM-5.2 ~$0.95 in / $0.18 cached / $3.00 out; DeepSeek-V4-Flash
|
|
13721
|
-
//
|
|
13736
|
+
// $0.09 in / $0.18 out). contextWindow is DeepInfra's 1M (fp4) serving
|
|
13722
13737
|
// window for both models; it's descriptive (see OpenAiCompatibleModelMeta),
|
|
13723
13738
|
// so it documents the real window rather than gating compaction.
|
|
13724
13739
|
knownModels: {
|
|
@@ -13732,7 +13747,7 @@ var AGENT_PROVIDERS = {
|
|
|
13732
13747
|
contextWindow: 1048576,
|
|
13733
13748
|
maxTokens: 32768,
|
|
13734
13749
|
reasoning: false,
|
|
13735
|
-
cost: { input: 0.
|
|
13750
|
+
cost: { input: 0.09, output: 0.18, cacheRead: 0, cacheWrite: 0 }
|
|
13736
13751
|
}
|
|
13737
13752
|
},
|
|
13738
13753
|
// Fallback for arbitrary `--model` slugs we don't ship as tiers. cost is
|
|
@@ -15065,6 +15080,10 @@ var SessionRegistry = class {
|
|
|
15065
15080
|
constructor(opts) {
|
|
15066
15081
|
this.opts = opts;
|
|
15067
15082
|
}
|
|
15083
|
+
/** False only in prompt-only mode; absent means proactive, as it always was. */
|
|
15084
|
+
get proactive() {
|
|
15085
|
+
return this.opts.proactive !== false;
|
|
15086
|
+
}
|
|
15068
15087
|
/**
|
|
15069
15088
|
* Lazily load + cache the injected remote MCP tools. The seam OSS-A exposes:
|
|
15070
15089
|
* `loadExternalMcpTools` connects to each configured server over the frozen
|
|
@@ -15149,7 +15168,7 @@ var SessionRegistry = class {
|
|
|
15149
15168
|
this.scopes.set(projectName, preferences?.toolScope ?? AeroToolScopes.all);
|
|
15150
15169
|
this.profiles.set(projectName, preferences?.toolProfile ?? AeroToolProfiles.default);
|
|
15151
15170
|
this.projectIds.set(projectName, projectId);
|
|
15152
|
-
if (queued.length > 0) {
|
|
15171
|
+
if (queued.length > 0 && this.proactive) {
|
|
15153
15172
|
this.appendPending(projectName, queued);
|
|
15154
15173
|
this.updateRow(projectId, { followUpQueue: "[]" });
|
|
15155
15174
|
}
|
|
@@ -15395,6 +15414,7 @@ ${lines.join("\n")}
|
|
|
15395
15414
|
* both the in-memory pending and the DB-queue migration produced copies).
|
|
15396
15415
|
*/
|
|
15397
15416
|
queueFollowUp(projectName, message) {
|
|
15417
|
+
if (!this.proactive) return;
|
|
15398
15418
|
if (this.live.has(projectName)) {
|
|
15399
15419
|
this.appendPending(projectName, [message]);
|
|
15400
15420
|
} else {
|
|
@@ -15403,6 +15423,7 @@ ${lines.join("\n")}
|
|
|
15403
15423
|
}
|
|
15404
15424
|
/** Consume (and clear) the pending queue for a project. Caller prompts with the result. */
|
|
15405
15425
|
consumePending(projectName) {
|
|
15426
|
+
if (!this.proactive) return [];
|
|
15406
15427
|
const msgs = this.pending.get(projectName) ?? [];
|
|
15407
15428
|
if (msgs.length === 0) return [];
|
|
15408
15429
|
this.pending.delete(projectName);
|
|
@@ -15422,6 +15443,7 @@ ${lines.join("\n")}
|
|
|
15422
15443
|
* RunCoordinator calls after a run completes to wake Aero unprompted.
|
|
15423
15444
|
*/
|
|
15424
15445
|
async drainNow(projectName) {
|
|
15446
|
+
if (!this.proactive) return;
|
|
15425
15447
|
if (!this.hasPendingWork(projectName)) return;
|
|
15426
15448
|
try {
|
|
15427
15449
|
let agent;
|
|
@@ -15786,13 +15808,15 @@ function registerAgentRoutes(app, opts) {
|
|
|
15786
15808
|
app.get(
|
|
15787
15809
|
"/projects/:name/agent/transcript",
|
|
15788
15810
|
async (request) => {
|
|
15811
|
+
requireInstanceAdministrator(request);
|
|
15789
15812
|
const project = resolveProject(opts.db, request.params.name);
|
|
15790
15813
|
const row = opts.db.select().from(agentSessions).where(eq22(agentSessions.projectId, project.id)).get();
|
|
15791
15814
|
if (!row) {
|
|
15792
15815
|
return { messages: [], modelProvider: null, modelId: null, updatedAt: null };
|
|
15793
15816
|
}
|
|
15817
|
+
const messages = parseJsonColumn(row.messages, []);
|
|
15794
15818
|
return {
|
|
15795
|
-
messages
|
|
15819
|
+
messages,
|
|
15796
15820
|
modelProvider: row.modelProvider,
|
|
15797
15821
|
modelId: row.modelId,
|
|
15798
15822
|
updatedAt: row.updatedAt
|
|
@@ -15802,6 +15826,7 @@ function registerAgentRoutes(app, opts) {
|
|
|
15802
15826
|
app.get(
|
|
15803
15827
|
"/projects/:name/agent/providers",
|
|
15804
15828
|
async (request) => {
|
|
15829
|
+
requireInstanceAdministrator(request);
|
|
15805
15830
|
resolveProject(opts.db, request.params.name);
|
|
15806
15831
|
return buildAgentProvidersResponse(opts.sessionRegistry.getConfig());
|
|
15807
15832
|
}
|
|
@@ -15809,6 +15834,7 @@ function registerAgentRoutes(app, opts) {
|
|
|
15809
15834
|
app.delete(
|
|
15810
15835
|
"/projects/:name/agent/transcript",
|
|
15811
15836
|
async (request) => {
|
|
15837
|
+
requireInstanceAdministrator(request);
|
|
15812
15838
|
const project = resolveProject(opts.db, request.params.name);
|
|
15813
15839
|
opts.sessionRegistry.reset(project.name);
|
|
15814
15840
|
opts.db.update(agentSessions).set({ messages: "[]", followUpQueue: "[]", updatedAt: (/* @__PURE__ */ new Date()).toISOString() }).where(eq22(agentSessions.projectId, project.id)).run();
|
|
@@ -15816,6 +15842,7 @@ function registerAgentRoutes(app, opts) {
|
|
|
15816
15842
|
}
|
|
15817
15843
|
);
|
|
15818
15844
|
app.post("/projects/:name/agent/prompt", async (request, reply) => {
|
|
15845
|
+
requireInstanceAdministrator(request);
|
|
15819
15846
|
const project = resolveProject(opts.db, request.params.name);
|
|
15820
15847
|
const body = request.body;
|
|
15821
15848
|
const promptText = (body?.prompt ?? "").trim();
|
|
@@ -15877,6 +15904,7 @@ function registerAgentRoutes(app, opts) {
|
|
|
15877
15904
|
app.get(
|
|
15878
15905
|
"/projects/:name/agent/memory",
|
|
15879
15906
|
async (request) => {
|
|
15907
|
+
requireInstanceAdministrator(request);
|
|
15880
15908
|
const project = resolveProject(opts.db, request.params.name);
|
|
15881
15909
|
return { entries: listMemoryEntries(opts.db, project.id) };
|
|
15882
15910
|
}
|
|
@@ -15884,6 +15912,7 @@ function registerAgentRoutes(app, opts) {
|
|
|
15884
15912
|
app.put(
|
|
15885
15913
|
"/projects/:name/agent/memory",
|
|
15886
15914
|
async (request) => {
|
|
15915
|
+
requireInstanceAdministrator(request);
|
|
15887
15916
|
const project = resolveProject(opts.db, request.params.name);
|
|
15888
15917
|
const parsed = agentMemoryUpsertRequestSchema.safeParse(request.body);
|
|
15889
15918
|
if (!parsed.success) {
|
|
@@ -15910,6 +15939,7 @@ function registerAgentRoutes(app, opts) {
|
|
|
15910
15939
|
app.delete(
|
|
15911
15940
|
"/projects/:name/agent/memory",
|
|
15912
15941
|
async (request) => {
|
|
15942
|
+
requireInstanceAdministrator(request);
|
|
15913
15943
|
const project = resolveProject(opts.db, request.params.name);
|
|
15914
15944
|
const parsed = agentMemoryDeleteRequestSchema.safeParse(request.body);
|
|
15915
15945
|
if (!parsed.success) {
|
|
@@ -17597,10 +17627,12 @@ async function createServer(opts) {
|
|
|
17597
17627
|
skipProbe: true
|
|
17598
17628
|
});
|
|
17599
17629
|
const agentEnabled = resolveAgentEnabled(process.env, opts.config);
|
|
17630
|
+
const agentProactive = resolveAgentProactiveEnabled(process.env, opts.config);
|
|
17600
17631
|
const sessionRegistry = agentEnabled ? new SessionRegistry({
|
|
17601
17632
|
db: opts.db,
|
|
17602
17633
|
client: aeroClient,
|
|
17603
|
-
config: opts.config
|
|
17634
|
+
config: opts.config,
|
|
17635
|
+
proactive: agentProactive
|
|
17604
17636
|
}) : void 0;
|
|
17605
17637
|
const runCoordinator = new RunCoordinator(
|
|
17606
17638
|
opts.db,
|
|
@@ -17609,6 +17641,7 @@ async function createServer(opts) {
|
|
|
17609
17641
|
(runId, projectId, result) => notifier.dispatchInsightWebhooks(runId, projectId, result),
|
|
17610
17642
|
async (ctx) => {
|
|
17611
17643
|
if (!sessionRegistry) return;
|
|
17644
|
+
if (!agentProactive) return;
|
|
17612
17645
|
const project = opts.db.select({ name: projects.name }).from(projects).where(eq25(projects.id, ctx.projectId)).get();
|
|
17613
17646
|
if (!project) return;
|
|
17614
17647
|
let content;
|