@ainyc/canonry 4.50.0 → 4.51.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/assets/BacklinksPage-DIZCcqsP.js +1 -0
- package/assets/assets/ChartPrimitives-9Kx3gzQL.js +1 -0
- package/assets/assets/ProjectPage-R2cxJb5Y.js +6 -0
- package/assets/assets/RunRow-DqezNIUy.js +1 -0
- package/assets/assets/RunsPage-CfvTJ9Ny.js +1 -0
- package/assets/assets/SettingsPage-HfMGIa5v.js +1 -0
- package/assets/assets/TrafficPage-DV_Dvpl3.js +1 -0
- package/assets/assets/TrafficSourceDetailPage-lefreKBO.js +1 -0
- package/assets/assets/arrow-left-DpxpMUNt.js +1 -0
- package/assets/assets/index-DKBPD33e.js +210 -0
- package/assets/assets/{index-DOP3oQmw.css → index-DeGyEwik.css} +1 -1
- package/assets/assets/server-traffic-Bm8iKtXK.js +1 -0
- package/assets/assets/trash-2-CnBiLbiZ.js +1 -0
- package/assets/assets/{vendor-markdown-DN2199pt.js → vendor-markdown-DK7fbRNb.js} +1 -1
- package/assets/assets/{vendor-radix-Bvy4KXTI.js → vendor-radix-B57xfQbP.js} +1 -1
- package/assets/assets/{vendor-recharts-DPeiXMwW.js → vendor-recharts-DWvKDyBF.js} +1 -1
- package/assets/assets/vendor-tanstack-Dq7p98wZ.js +1 -0
- package/assets/index.html +6 -6
- package/dist/{chunk-QIG3TKL4.js → chunk-2ARCCG5E.js} +72 -1
- package/dist/{chunk-M4USKXJ4.js → chunk-DLDLDWH4.js} +128 -40
- package/dist/{chunk-YVP5CTSV.js → chunk-FDR3G6SB.js} +2050 -1577
- package/dist/{chunk-MYDJ25GO.js → chunk-GGXU5VKI.js} +111 -77
- package/dist/cli.js +6 -6
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-TY7IPRST.js → intelligence-service-XMZEWLCW.js} +2 -2
- package/dist/mcp.js +2 -2
- package/package.json +6 -6
- package/assets/assets/index-DVK0M62U.js +0 -214
- package/assets/assets/vendor-tanstack-DPXTJtWt.js +0 -1
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
trafficConnectVercelRequestSchema,
|
|
23
23
|
trafficConnectWordpressRequestSchema,
|
|
24
24
|
trafficEventKindSchema
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-2ARCCG5E.js";
|
|
26
26
|
|
|
27
27
|
// src/config.ts
|
|
28
28
|
import fs from "fs";
|
|
@@ -3117,6 +3117,86 @@ var postApiV1ProjectsByNameDiscoverSessionsByIdPromote = (options) => {
|
|
|
3117
3117
|
}
|
|
3118
3118
|
});
|
|
3119
3119
|
};
|
|
3120
|
+
var deleteApiV1ProjectsByNameAgentTranscript = (options) => {
|
|
3121
|
+
return (options.client ?? client).delete({
|
|
3122
|
+
security: [
|
|
3123
|
+
{
|
|
3124
|
+
scheme: "bearer",
|
|
3125
|
+
type: "http"
|
|
3126
|
+
}
|
|
3127
|
+
],
|
|
3128
|
+
url: "/api/v1/projects/{name}/agent/transcript",
|
|
3129
|
+
...options
|
|
3130
|
+
});
|
|
3131
|
+
};
|
|
3132
|
+
var getApiV1ProjectsByNameAgentTranscript = (options) => {
|
|
3133
|
+
return (options.client ?? client).get({
|
|
3134
|
+
security: [
|
|
3135
|
+
{
|
|
3136
|
+
scheme: "bearer",
|
|
3137
|
+
type: "http"
|
|
3138
|
+
}
|
|
3139
|
+
],
|
|
3140
|
+
url: "/api/v1/projects/{name}/agent/transcript",
|
|
3141
|
+
...options
|
|
3142
|
+
});
|
|
3143
|
+
};
|
|
3144
|
+
var deleteApiV1ProjectsByNameAgentMemory = (options) => {
|
|
3145
|
+
return (options.client ?? client).delete({
|
|
3146
|
+
security: [
|
|
3147
|
+
{
|
|
3148
|
+
scheme: "bearer",
|
|
3149
|
+
type: "http"
|
|
3150
|
+
}
|
|
3151
|
+
],
|
|
3152
|
+
url: "/api/v1/projects/{name}/agent/memory",
|
|
3153
|
+
...options,
|
|
3154
|
+
headers: {
|
|
3155
|
+
"Content-Type": "application/json",
|
|
3156
|
+
...options.headers
|
|
3157
|
+
}
|
|
3158
|
+
});
|
|
3159
|
+
};
|
|
3160
|
+
var getApiV1ProjectsByNameAgentMemory = (options) => {
|
|
3161
|
+
return (options.client ?? client).get({
|
|
3162
|
+
security: [
|
|
3163
|
+
{
|
|
3164
|
+
scheme: "bearer",
|
|
3165
|
+
type: "http"
|
|
3166
|
+
}
|
|
3167
|
+
],
|
|
3168
|
+
url: "/api/v1/projects/{name}/agent/memory",
|
|
3169
|
+
...options
|
|
3170
|
+
});
|
|
3171
|
+
};
|
|
3172
|
+
var putApiV1ProjectsByNameAgentMemory = (options) => {
|
|
3173
|
+
return (options.client ?? client).put({
|
|
3174
|
+
security: [
|
|
3175
|
+
{
|
|
3176
|
+
scheme: "bearer",
|
|
3177
|
+
type: "http"
|
|
3178
|
+
}
|
|
3179
|
+
],
|
|
3180
|
+
url: "/api/v1/projects/{name}/agent/memory",
|
|
3181
|
+
...options,
|
|
3182
|
+
headers: {
|
|
3183
|
+
"Content-Type": "application/json",
|
|
3184
|
+
...options.headers
|
|
3185
|
+
}
|
|
3186
|
+
});
|
|
3187
|
+
};
|
|
3188
|
+
var getApiV1ProjectsByNameAgentProviders = (options) => {
|
|
3189
|
+
return (options.client ?? client).get({
|
|
3190
|
+
security: [
|
|
3191
|
+
{
|
|
3192
|
+
scheme: "bearer",
|
|
3193
|
+
type: "http"
|
|
3194
|
+
}
|
|
3195
|
+
],
|
|
3196
|
+
url: "/api/v1/projects/{name}/agent/providers",
|
|
3197
|
+
...options
|
|
3198
|
+
});
|
|
3199
|
+
};
|
|
3120
3200
|
|
|
3121
3201
|
// ../api-client-generated/src/index.ts
|
|
3122
3202
|
function createClient2(opts) {
|
|
@@ -3239,94 +3319,48 @@ var ApiClient = class {
|
|
|
3239
3319
|
}
|
|
3240
3320
|
return result.data;
|
|
3241
3321
|
}
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
const headers = {
|
|
3253
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
3254
|
-
Accept: "application/json",
|
|
3255
|
-
...serializedBody != null ? { "Content-Type": "application/json" } : {}
|
|
3256
|
-
};
|
|
3257
|
-
const traceEnabled = process.env.CANONRY_TRACE === "1";
|
|
3258
|
-
const traceStart = traceEnabled ? Date.now() : 0;
|
|
3259
|
-
let res;
|
|
3260
|
-
try {
|
|
3261
|
-
res = await fetch(url, { method, headers, body: serializedBody });
|
|
3262
|
-
} catch (err) {
|
|
3263
|
-
if (traceEnabled) {
|
|
3264
|
-
const durMs = Date.now() - traceStart;
|
|
3265
|
-
process.stderr.write(`[trace] ${method} ${url} \u2192 ERROR (${durMs}ms)
|
|
3266
|
-
`);
|
|
3267
|
-
}
|
|
3268
|
-
if (err instanceof CliError) throw err;
|
|
3269
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
3270
|
-
if (msg.includes("fetch failed") || msg.includes("ECONNREFUSED") || msg.includes("connect ECONNREFUSED")) {
|
|
3271
|
-
throw new CliError({
|
|
3272
|
-
code: "CONNECTION_ERROR",
|
|
3273
|
-
message: `Could not connect to canonry server at ${this.originUrl}. Start it with "canonry serve" (or "canonry serve &" to run in background).`,
|
|
3274
|
-
exitCode: EXIT_SYSTEM_ERROR
|
|
3275
|
-
});
|
|
3276
|
-
}
|
|
3277
|
-
throw new CliError({ code: "CONNECTION_ERROR", message: msg, exitCode: EXIT_SYSTEM_ERROR });
|
|
3278
|
-
}
|
|
3279
|
-
if (!res.ok) {
|
|
3280
|
-
let errorBody;
|
|
3281
|
-
try {
|
|
3282
|
-
errorBody = await res.json();
|
|
3283
|
-
} catch {
|
|
3284
|
-
errorBody = { error: { code: "UNKNOWN", message: res.statusText } };
|
|
3285
|
-
}
|
|
3286
|
-
const errorObj = errorBody && typeof errorBody === "object" && "error" in errorBody && errorBody.error && typeof errorBody.error === "object" ? errorBody.error : null;
|
|
3287
|
-
const msg = errorObj?.message ? String(errorObj.message) : `HTTP ${res.status}: ${res.statusText}`;
|
|
3288
|
-
const code = errorObj?.code ? String(errorObj.code) : "API_ERROR";
|
|
3289
|
-
const exitCode = res.status >= 500 ? EXIT_SYSTEM_ERROR : EXIT_USER_ERROR;
|
|
3290
|
-
throw new CliError({
|
|
3291
|
-
code,
|
|
3292
|
-
message: msg,
|
|
3293
|
-
exitCode,
|
|
3294
|
-
details: { ...errorObj?.details ?? {}, httpStatus: res.status }
|
|
3295
|
-
});
|
|
3296
|
-
}
|
|
3297
|
-
if (traceEnabled) {
|
|
3298
|
-
const durMs = Date.now() - traceStart;
|
|
3299
|
-
process.stderr.write(`[trace] ${method} ${url} \u2192 ${res.status} (${durMs}ms)
|
|
3300
|
-
`);
|
|
3301
|
-
}
|
|
3302
|
-
if (res.status === 204) return void 0;
|
|
3303
|
-
return await res.json();
|
|
3304
|
-
}
|
|
3305
|
-
// ── Agent (routes not in OpenAPI spec — raw request<T>) ─────────────────
|
|
3322
|
+
// ── Agent (canonry-local routes — SDK-typed since v4.50.0) ─────────────
|
|
3323
|
+
//
|
|
3324
|
+
// These endpoints live in `packages/canonry/src/agent/agent-routes.ts` and
|
|
3325
|
+
// are registered through `apiRoutes.registerAuthenticatedRoutes`, not the
|
|
3326
|
+
// shared `routeCatalog`. They appear in the OpenAPI spec only when the
|
|
3327
|
+
// caller passes `includeCanonryLocal: true` to `buildOpenApiDocument` —
|
|
3328
|
+
// which canonry's own server and the codegen both do, so they're in the
|
|
3329
|
+
// generated SDK and we route them through `invoke()` like every other
|
|
3330
|
+
// endpoint. The SSE `POST /agent/prompt` is intentionally not here — it
|
|
3331
|
+
// stays on `streamPost()` below since the SDK can't represent SSE cleanly.
|
|
3306
3332
|
async getAgentTranscript(project) {
|
|
3307
|
-
return this.
|
|
3333
|
+
return this.invoke(
|
|
3334
|
+
() => getApiV1ProjectsByNameAgentTranscript({ client: this.heyClient, path: { name: project } })
|
|
3335
|
+
);
|
|
3308
3336
|
}
|
|
3309
3337
|
async resetAgentTranscript(project) {
|
|
3310
|
-
await this.
|
|
3338
|
+
await this.invoke(
|
|
3339
|
+
() => deleteApiV1ProjectsByNameAgentTranscript({ client: this.heyClient, path: { name: project } })
|
|
3340
|
+
);
|
|
3311
3341
|
}
|
|
3312
3342
|
async listAgentProviders(project) {
|
|
3313
|
-
return this.
|
|
3343
|
+
return this.invoke(
|
|
3344
|
+
() => getApiV1ProjectsByNameAgentProviders({ client: this.heyClient, path: { name: project } })
|
|
3345
|
+
);
|
|
3314
3346
|
}
|
|
3315
3347
|
async listAgentMemory(project) {
|
|
3316
|
-
return this.
|
|
3348
|
+
return this.invoke(
|
|
3349
|
+
() => getApiV1ProjectsByNameAgentMemory({ client: this.heyClient, path: { name: project } })
|
|
3350
|
+
);
|
|
3317
3351
|
}
|
|
3318
3352
|
async setAgentMemory(project, body) {
|
|
3319
|
-
return this.
|
|
3320
|
-
|
|
3321
|
-
`/projects/${encodeURIComponent(project)}/agent/memory`,
|
|
3322
|
-
body
|
|
3353
|
+
return this.invoke(
|
|
3354
|
+
() => putApiV1ProjectsByNameAgentMemory({ client: this.heyClient, path: { name: project }, body })
|
|
3323
3355
|
);
|
|
3324
3356
|
}
|
|
3325
3357
|
async forgetAgentMemory(project, key) {
|
|
3326
|
-
return this.
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3358
|
+
return this.invoke(
|
|
3359
|
+
() => deleteApiV1ProjectsByNameAgentMemory({
|
|
3360
|
+
client: this.heyClient,
|
|
3361
|
+
path: { name: project },
|
|
3362
|
+
body: { key }
|
|
3363
|
+
})
|
|
3330
3364
|
);
|
|
3331
3365
|
}
|
|
3332
3366
|
/**
|
package/dist/cli.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
setTelemetrySource,
|
|
22
22
|
showFirstRunNotice,
|
|
23
23
|
trackEvent
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-FDR3G6SB.js";
|
|
25
25
|
import {
|
|
26
26
|
CliError,
|
|
27
27
|
EXIT_SYSTEM_ERROR,
|
|
@@ -37,14 +37,14 @@ import {
|
|
|
37
37
|
saveConfig,
|
|
38
38
|
saveConfigPatch,
|
|
39
39
|
usageError
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-GGXU5VKI.js";
|
|
41
41
|
import {
|
|
42
42
|
apiKeys,
|
|
43
43
|
createClient,
|
|
44
44
|
migrate,
|
|
45
45
|
projects,
|
|
46
46
|
queries
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-DLDLDWH4.js";
|
|
48
48
|
import {
|
|
49
49
|
CcReleaseSyncStatuses,
|
|
50
50
|
CheckScopes,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
providerQuotaPolicySchema,
|
|
64
64
|
resolveProviderInput,
|
|
65
65
|
skillsClientSchema
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-2ARCCG5E.js";
|
|
67
67
|
|
|
68
68
|
// src/cli.ts
|
|
69
69
|
import { pathToFileURL } from "url";
|
|
@@ -8968,7 +8968,7 @@ async function bootstrapCommand(_opts) {
|
|
|
8968
8968
|
name: "default",
|
|
8969
8969
|
keyHash,
|
|
8970
8970
|
keyPrefix,
|
|
8971
|
-
scopes:
|
|
8971
|
+
scopes: ["*"],
|
|
8972
8972
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
8973
8973
|
}).run();
|
|
8974
8974
|
});
|
|
@@ -9350,7 +9350,7 @@ async function initCommand(opts) {
|
|
|
9350
9350
|
name: "default",
|
|
9351
9351
|
keyHash,
|
|
9352
9352
|
keyPrefix,
|
|
9353
|
-
scopes:
|
|
9353
|
+
scopes: ["*"],
|
|
9354
9354
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
9355
9355
|
}).run();
|
|
9356
9356
|
saveConfig({
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FDR3G6SB.js";
|
|
4
4
|
import {
|
|
5
5
|
loadConfig
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-GGXU5VKI.js";
|
|
7
|
+
import "./chunk-DLDLDWH4.js";
|
|
8
|
+
import "./chunk-2ARCCG5E.js";
|
|
9
9
|
export {
|
|
10
10
|
createServer,
|
|
11
11
|
loadConfig
|
package/dist/mcp.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
CliError,
|
|
3
3
|
canonryMcpTools,
|
|
4
4
|
createApiClient
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-GGXU5VKI.js";
|
|
6
|
+
import "./chunk-2ARCCG5E.js";
|
|
7
7
|
|
|
8
8
|
// src/mcp/cli.ts
|
|
9
9
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ainyc/canonry",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.51.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Agent-first open-source AEO operating platform - track how answer engines cite your domain",
|
|
6
6
|
"license": "FSL-1.1-ALv2",
|
|
@@ -62,21 +62,21 @@
|
|
|
62
62
|
"tsup": "^8.5.1",
|
|
63
63
|
"tsx": "^4.19.0",
|
|
64
64
|
"@ainyc/canonry-api-routes": "0.0.0",
|
|
65
|
-
"@ainyc/canonry-contracts": "0.0.0",
|
|
66
65
|
"@ainyc/canonry-config": "0.0.0",
|
|
67
|
-
"@ainyc/canonry-db": "0.0.0",
|
|
68
66
|
"@ainyc/canonry-intelligence": "0.0.0",
|
|
67
|
+
"@ainyc/canonry-contracts": "0.0.0",
|
|
68
|
+
"@ainyc/canonry-db": "0.0.0",
|
|
69
69
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
70
70
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
71
|
-
"@ainyc/canonry-integration-google": "0.0.0",
|
|
72
71
|
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
72
|
+
"@ainyc/canonry-integration-google": "0.0.0",
|
|
73
73
|
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
74
|
+
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
74
75
|
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
75
76
|
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
76
77
|
"@ainyc/canonry-provider-local": "0.0.0",
|
|
77
|
-
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
78
|
-
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
79
78
|
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
79
|
+
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
80
80
|
"@ainyc/canonry-provider-perplexity": "0.0.0"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|