@canonry/canonry 7.130.1 → 7.131.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 +5 -3
- package/dist/{activity-VIJVNTMK.js → activity-URKAZ4QI.js} +4 -4
- package/dist/{ads-PLZRG4BQ.js → ads-OEKDHREI.js} +4 -4
- package/dist/{agent-RFRMOTLE.js → agent-TBU46LO6.js} +6 -6
- package/dist/{agent-ask-CB756SUB.js → agent-ask-EDJZGROO.js} +25 -21
- package/dist/agent-conversations-BQKCD4CA.js +44 -0
- package/dist/{agent-journeys-PLYAVLGB.js → agent-journeys-ASY5XCAJ.js} +3 -3
- package/dist/agent-memory-HAGNNLCP.js +74 -0
- package/dist/agent-providers-WUDOCAHF.js +49 -0
- package/dist/agent-transcript-4MAQ7NCM.js +62 -0
- package/dist/{analytics-W6B2FQSA.js → analytics-RYRF5TFC.js} +3 -3
- package/dist/{answerability-BDOOPOJF.js → answerability-7VPMCZHE.js} +3 -3
- package/dist/{apply-LCANKKT5.js → apply-BNTPH5FW.js} +8 -5
- package/dist/{backfill-AM2VXWLI.js → backfill-2DYJLCOU.js} +3 -3
- package/dist/{backlinks-ZXSN3XNV.js → backlinks-5HZTCZFW.js} +11 -6
- package/dist/{bing-FMDKRCXN.js → bing-S6BOIOTS.js} +31 -17
- package/dist/{bootstrap-IHKKYDBO.js → bootstrap-EITWL66P.js} +6 -6
- package/dist/{cdp-ASPLW35M.js → cdp-TY2TZB7J.js} +13 -7
- package/dist/{chunk-6UU2I6AG.js → chunk-3CDHCDCE.js} +22 -21
- package/dist/{chunk-JUZ4ZCOX.js → chunk-3GAJD5NP.js} +3 -3
- package/dist/{chunk-MARIMDMX.js → chunk-3LXRY57V.js} +60 -48
- package/dist/{chunk-56TGVPRB.js → chunk-3STPYNCP.js} +3 -3
- package/dist/{chunk-Z77D43M5.js → chunk-623X526L.js} +1 -1
- package/dist/{chunk-M3BKRPB7.js → chunk-63FHJJUO.js} +435 -444
- package/dist/chunk-APKBR2BP.js +40 -0
- package/dist/{chunk-VEDGR4LZ.js → chunk-BJWPYUKT.js} +1 -1
- package/dist/{chunk-NUYKLS2R.js → chunk-CUXA47XW.js} +2 -2
- package/dist/{chunk-HH6FQW5W.js → chunk-DYDATNE5.js} +6 -3
- package/dist/{chunk-S6X3HHSN.js → chunk-IPUZGRSN.js} +2 -2
- package/dist/{chunk-WZPKPA6I.js → chunk-KJX5CMPC.js} +1 -1
- package/dist/{chunk-4ISL4JNK.js → chunk-LXFLUFQT.js} +2 -2
- package/dist/{chunk-ZZSKYOHV.js → chunk-NK4G4JPQ.js} +2 -2
- package/dist/{chunk-JMJSAK2H.js → chunk-NYZH7SM2.js} +2 -2
- package/dist/{chunk-MQFH765X.js → chunk-P4ETUNQR.js} +3 -3
- package/dist/{chunk-VON4PHNS.js → chunk-RGT2S3VS.js} +35 -15
- package/dist/{chunk-KQQERQJ2.js → chunk-RSB3X7UR.js} +2 -2
- package/dist/{chunk-52J7GFCK.js → chunk-T6CABZ3N.js} +1 -1
- package/dist/{chunk-GVCL4XBU.js → chunk-UFVVOJU3.js} +2 -2
- package/dist/{chunk-N5GK27RW.js → chunk-WIQBXZMU.js} +3 -3
- package/dist/{chunk-ZHWJJVCT.js → chunk-X3ES2XOJ.js} +1 -1
- package/dist/{chunk-QRIKJT6Y.js → chunk-Y7JEJNNS.js} +32 -3
- package/dist/{chunk-VEBSXHB2.js → chunk-ZSVQTHX3.js} +4 -3
- package/dist/{citations-YWXR3WBL.js → citations-ERRYYKNY.js} +7 -5
- package/dist/{cli-catalog-RT3QPDLR.js → cli-catalog-ETUQDYOX.js} +3 -3
- package/dist/{cli-commands-PSZFKTZM.js → cli-commands-ORLKC2XM.js} +7 -6
- package/dist/cli.js +30 -19
- package/dist/{competitor-6ZTA2SZH.js → competitor-IC6KRZAD.js} +7 -4
- package/dist/{content-DJYGQ5CP.js → content-3Y6ZKQHG.js} +6 -5
- package/dist/{dashboard-QNOTLZUI.js → dashboard-XBS4EVSA.js} +3 -3
- package/dist/{demo-FVTIXDAO.js → demo-7D4W32J6.js} +2 -2
- package/dist/{demo-server-R7LG5BRB.js → demo-server-CGOD7EPX.js} +3 -3
- package/dist/{discover-3E7QM2TL.js → discover-34E5JIM5.js} +3 -3
- package/dist/{discover-eval-NAZPA6PV.js → discover-eval-TLH2MMNK.js} +41 -16
- package/dist/{doctor-OFFSPNBK.js → doctor-SGJQPWRI.js} +3 -3
- package/dist/{evidence-VOSSML2G.js → evidence-TFFVSNEL.js} +6 -5
- package/dist/{export-cmd-IVACTDSV.js → export-cmd-YRG7CEVX.js} +3 -3
- package/dist/{ga-BX4C7TPI.js → ga-VVJWYWQX.js} +6 -5
- package/dist/{gbp-SV3J2VG3.js → gbp-RYA62WDX.js} +23 -10
- package/dist/{google-J23OD7TR.js → google-5HRSXPUF.js} +13 -12
- package/dist/{google-marketing-TTLXMDMD.js → google-marketing-UGMDLFPE.js} +1 -1
- package/dist/{health-cmd-26AHD5XL.js → health-cmd-WUBFEQX6.js} +3 -3
- package/dist/{history-QWBRFDQR.js → history-5GFG76UO.js} +5 -3
- package/dist/index.d.ts +15 -15
- package/dist/index.js +12 -12
- package/dist/{init-IZVPCO36.js → init-CHZSBQOK.js} +10 -9
- package/dist/{insights-PMTHHZ2H.js → insights-LWLKXKNO.js} +3 -3
- package/dist/{journeys-IA7TF753.js → journeys-IQLWLZBY.js} +3 -3
- package/dist/{keys-DOHLZTRI.js → keys-3VVORLK2.js} +3 -3
- package/dist/{keyword-3C2ZU6OB.js → keyword-3MWGUBHL.js} +7 -4
- package/dist/{logs-P7VRVZ5N.js → logs-PSV4DZ6F.js} +3 -3
- package/dist/{mcp-6NA62OAY.js → mcp-NNBM3MLW.js} +5 -4
- package/dist/mcp.js +8 -8
- package/dist/{measurement-plan-RHKCARVE.js → measurement-plan-M4VLA2ZN.js} +5 -4
- package/dist/{notify-ODCY7TD3.js → notify-EDSJINE5.js} +3 -3
- package/dist/{organic-evidence-76P5AYB3.js → organic-evidence-VBT6URMQ.js} +3 -3
- package/dist/{overview-5T776SEB.js → overview-LRNI342W.js} +6 -6
- package/dist/{project-ITMGW45M.js → project-HO4GOEC4.js} +3 -3
- package/dist/{project-setup-A3Q6ZX73.js → project-setup-AXVIZND6.js} +4 -4
- package/dist/{query-3QAQITK3.js → query-E2D2K6MD.js} +8 -5
- package/dist/{research-R74N3VRL.js → research-Z3IZQH2M.js} +3 -3
- package/dist/{results-export-23GY45AY.js → results-export-TVWWLJQA.js} +3 -3
- package/dist/{run-ID66JYBN.js → run-RJDJPROH.js} +4 -4
- package/dist/{schedule-HZ2CRUAL.js → schedule-NVDN72YG.js} +3 -3
- package/dist/{search-DM5WWMTE.js → search-A4PBZ53D.js} +3 -3
- package/dist/{serve-PKDK7ZWB.js → serve-7WPMQUVW.js} +13 -13
- package/dist/{session-EZ6I5VUF.js → session-VPJH4TRC.js} +7 -7
- package/dist/{settings-SIEKVYD7.js → settings-EYEXRKTM.js} +5 -5
- package/dist/{sitemaps-M4IAZLK2.js → sitemaps-4HCWZJOZ.js} +3 -3
- package/dist/{skills-J6LWTNU5.js → skills-GPYMDDRH.js} +2 -2
- package/dist/{snapshot-SM3BVX5M.js → snapshot-SNR7KBK4.js} +3 -3
- package/dist/{status-BHJJOUCK.js → status-VTQJVZFU.js} +12 -6
- package/dist/{support-FPXXXJPZ.js → support-H7ANOX67.js} +1 -1
- package/dist/{technical-aeo-4DJWWPUN.js → technical-aeo-IDMFUDXP.js} +7 -5
- package/dist/{telemetry-LKVQUSO7.js → telemetry-DA43ILAA.js} +4 -4
- package/dist/{tools-NFVIW4YP.js → tools-F3FZEG5K.js} +6 -6
- package/dist/{traffic-QSZYZHFW.js → traffic-EPWP3D2K.js} +21 -29
- package/dist/{trends-WIHWJVJR.js → trends-IVYSKMND.js} +3 -3
- package/dist/{users-HQOPQRTP.js → users-ZJMBGWUF.js} +3 -3
- package/dist/{visibility-stats-MCY5CAUC.js → visibility-stats-M2I3SUES.js} +11 -5
- package/dist/{wordpress-IB5YOJSM.js → wordpress-BGIOJPIF.js} +3 -3
- package/package.json +1 -1
- package/dist/agent-conversations-RRI7T74B.js +0 -51
- package/dist/agent-memory-R5Q7DLRZ.js +0 -91
- package/dist/agent-providers-HNMGZ7GY.js +0 -58
- package/dist/agent-transcript-N6ZBTF72.js +0 -76
|
@@ -286,11 +286,13 @@ Run statuses: `queued` → `running` → `completed` / `failed` / `partial`
|
|
|
286
286
|
`--wait` exit code (`run <project>`, `--all-locations`, and `--all`): the run detail, location table, or JSON prints in full first, then the exit code reports the final status.
|
|
287
287
|
|
|
288
288
|
- `failed` → exit `2`: every provider call failed (for example an invalid API key), so fix the cause and retry. stderr carries `{ "error": { "code": "RUN_FAILED", "message", "details": { "waitedRunCount", "failedRuns": [{ "runId", "project", "location"?, "error" }] } } }`; stdout is unchanged.
|
|
289
|
-
- `--all --wait` and `--all-locations --wait` exit `2` when any waited run failed.
|
|
289
|
+
- `--all --wait` and `--all-locations --wait` exit `2` when any waited run failed.
|
|
290
290
|
- `completed`, `partial`, and `cancelled` → exit `0`. A partial run kept its answers, so finish it with `cnry run fill` instead of re-running the sweep. A cancelled run was stopped by an operator.
|
|
291
291
|
- A batch-pending run (see Batch mode below) still reads `running`, so `--wait` stops there and exits `0`.
|
|
292
292
|
- Without `--wait` the command exits `0` once the run is queued; read the outcome with `cnry run show <id>`.
|
|
293
293
|
|
|
294
|
+
`cnry run --all`, with or without `--wait`, prints every project's row first, then exits as `cnry run <project>` with the same flags would for each project, taking the most severe code. A project whose run could not start keeps its `error` row and counts with its own code: `1` for a refusal such as `NO_QUERIES` or `RUN_IN_PROGRESS`, `2` for `NO_PROVIDER` or a server that is down. When no waited run failed, stderr carries `{ "error": { "code": "RUNS_NOT_STARTED", "message", "details": { "projectCount", "notStarted": [{ "project", "code", "exitCode", "error" }] } } }`; when one did, it is `RUN_FAILED` with `details.notStarted` added. Exit `0` means every project started a run and, under `--wait`, that none of them failed.
|
|
295
|
+
|
|
294
296
|
A provider that failed on its account in each of its last 10 runs that called it, with a rejected key or denied access (`PROVIDER_AUTH`) or no credit left (`PROVIDER_BILLING`), is held back. A narrower run (`--provider`, a probe) neither resets nor extends the other providers' counts.
|
|
295
297
|
|
|
296
298
|
- When only some of a run's providers are held back, the run is queued without them. `skippedProviders` on the run names each with its code, streak and `retryAfter`; the run calls the rest and ends `partial`, and `error.providers.<name>` has `skipped: true`. `cnry run` and `cnry run show` print a `Skipped:` line for each.
|
|
@@ -771,7 +773,7 @@ cnry measurement-plan show <project> --revision 2 # one historical revisio
|
|
|
771
773
|
cnry measurement-plan versions <project>
|
|
772
774
|
cnry measurement-plan visibility <project> --format json # stored AI Visibility for Simple or Advanced
|
|
773
775
|
cnry measurement-plan visibility <project> selection.json --format json # filter the report
|
|
774
|
-
cnry measurement-plan publish <project> plan.yaml # legacy schema v1 only; refuses over an active v2 plan (use: measurement-plan advanced <project> draft-action)
|
|
776
|
+
cnry measurement-plan publish <project> plan.yaml # legacy schema v1 only; refuses over an active v2 plan (use: measurement-plan advanced <project> draft-action <action.json>)
|
|
775
777
|
cnry measurement-plan report <project> --revision 2 # stored evidence only; never starts provider work; a schema v2 revision reads non-brand unless --query-class branded|all; a schema v1 revision reads every answer and refuses --query-class non-brand or branded
|
|
776
778
|
cnry measurement-plan retire <project> <stable-key>
|
|
777
779
|
```
|
|
@@ -1112,7 +1114,7 @@ cnry bing status <project> # connection status
|
|
|
1112
1114
|
cnry bing sites <project> # list verified sites
|
|
1113
1115
|
cnry bing set-site <project> <url> # set active site URL
|
|
1114
1116
|
cnry bing coverage <project> # URL coverage data
|
|
1115
|
-
cnry bing refresh <project>
|
|
1117
|
+
cnry bing refresh <project> # re-inspect every URL Bing inspected before, then print coverage
|
|
1116
1118
|
cnry bing inspect <project> <url> # inspect specific URL
|
|
1117
1119
|
cnry bing inspect-sitemap <project> # discover sitemap URLs and inspect each via Bing
|
|
1118
1120
|
cnry bing inspect-sitemap <project> --sitemap-url <url> --wait # explicit sitemap, wait for run
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
activityLines,
|
|
3
3
|
showActivity
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-UFVVOJU3.js";
|
|
5
|
+
import "./chunk-RSB3X7UR.js";
|
|
6
|
+
import "./chunk-T6CABZ3N.js";
|
|
7
7
|
import "./chunk-AOJU5LKX.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-Y7JEJNNS.js";
|
|
9
9
|
import "./chunk-FGEBFVHB.js";
|
|
10
10
|
export {
|
|
11
11
|
activityLines,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RSB3X7UR.js";
|
|
4
|
+
import "./chunk-T6CABZ3N.js";
|
|
5
5
|
import {
|
|
6
6
|
emitJsonl
|
|
7
7
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -9,7 +9,7 @@ import "./chunk-AOJU5LKX.js";
|
|
|
9
9
|
import {
|
|
10
10
|
CliError,
|
|
11
11
|
isMachineFormat
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Y7JEJNNS.js";
|
|
13
13
|
import {
|
|
14
14
|
AdsDeliverySnapshotStatuses,
|
|
15
15
|
AdsHistoricalCampaignRollupStatuses,
|
|
@@ -363,7 +363,7 @@ async function adsSync(project, opts) {
|
|
|
363
363
|
console.log(JSON.stringify(result, null, 2));
|
|
364
364
|
return;
|
|
365
365
|
}
|
|
366
|
-
console.log(`Ads sync queued (run ${result.runId}). Check progress with: canonry
|
|
366
|
+
console.log(`Ads sync queued (run ${result.runId}). Check progress with: canonry run show ${result.runId}`);
|
|
367
367
|
}
|
|
368
368
|
async function adsCampaigns(project, opts) {
|
|
369
369
|
const client = getClient();
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
trackCliConnection
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-CUXA47XW.js";
|
|
4
|
+
import "./chunk-LXFLUFQT.js";
|
|
5
|
+
import "./chunk-KJX5CMPC.js";
|
|
6
6
|
import {
|
|
7
7
|
createApiClient
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-RSB3X7UR.js";
|
|
9
|
+
import "./chunk-T6CABZ3N.js";
|
|
10
10
|
import {
|
|
11
11
|
AGENT_WEBHOOK_EVENTS
|
|
12
12
|
} from "./chunk-UX3HJV2V.js";
|
|
13
13
|
import "./chunk-AOJU5LKX.js";
|
|
14
14
|
import {
|
|
15
15
|
isMachineFormat
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-Y7JEJNNS.js";
|
|
17
17
|
import "./chunk-C4JM5HJW.js";
|
|
18
18
|
import "./chunk-FGEBFVHB.js";
|
|
19
19
|
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RSB3X7UR.js";
|
|
4
|
+
import "./chunk-T6CABZ3N.js";
|
|
5
5
|
import "./chunk-AOJU5LKX.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError,
|
|
8
8
|
EXIT_SYSTEM_ERROR,
|
|
9
|
-
isMachineFormat
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
isMachineFormat
|
|
10
|
+
} from "./chunk-Y7JEJNNS.js";
|
|
11
|
+
import {
|
|
12
|
+
shellQuote
|
|
13
|
+
} from "./chunk-FGEBFVHB.js";
|
|
13
14
|
|
|
14
15
|
// src/commands/agent-ask.ts
|
|
15
16
|
function toFormat(raw) {
|
|
@@ -23,7 +24,9 @@ async function agentAsk(opts) {
|
|
|
23
24
|
const controller = new AbortController();
|
|
24
25
|
const onSigint = () => controller.abort();
|
|
25
26
|
process.on("SIGINT", onSigint);
|
|
26
|
-
let
|
|
27
|
+
let failure;
|
|
28
|
+
let stopReason;
|
|
29
|
+
let toolCalls;
|
|
27
30
|
let streamClosed = false;
|
|
28
31
|
try {
|
|
29
32
|
const client = createApiClient();
|
|
@@ -53,18 +56,25 @@ async function agentAsk(opts) {
|
|
|
53
56
|
renderEvent(event, isJson);
|
|
54
57
|
if (event.type === "message_end" && event.message.role === "assistant") {
|
|
55
58
|
const msg = event.message;
|
|
56
|
-
if (msg.stopReason === "error" || msg.errorMessage)
|
|
59
|
+
if (msg.stopReason === "error" || msg.errorMessage) failure ??= msg.errorMessage || "the model returned an error";
|
|
57
60
|
} else if (event.type === "aero_turn_status" && event.status?.reason !== "completed") {
|
|
58
|
-
|
|
61
|
+
stopReason = event.status?.reason ?? "unknown";
|
|
62
|
+
toolCalls = event.status?.toolCalls;
|
|
59
63
|
} else if (event.type === "error") {
|
|
60
|
-
|
|
64
|
+
failure ??= event.message;
|
|
61
65
|
}
|
|
62
66
|
}
|
|
63
|
-
|
|
64
|
-
if (
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
const inspect = `Inspect the transcript before retrying: \`canonry agent transcript ${shellQuote(opts.project)}\`.`;
|
|
68
|
+
if (!streamClosed) throw new CliError({ code: "API_ERROR", message: `Connection ended before Aero finished. ${inspect}`, exitCode: EXIT_SYSTEM_ERROR });
|
|
69
|
+
if (failure !== void 0 || stopReason !== void 0) {
|
|
70
|
+
const cause = failure?.trim().replace(/\.+$/, "") || (stopReason !== void 0 ? `Aero stopped (${stopReason})` : "the model returned an error");
|
|
71
|
+
throw new CliError({
|
|
72
|
+
code: "AGENT_TURN_FAILED",
|
|
73
|
+
message: `Aero's turn did not finish: ${cause}. ${inspect}`,
|
|
74
|
+
exitCode: EXIT_SYSTEM_ERROR,
|
|
75
|
+
...stopReason !== void 0 ? { details: { stopReason, ...toolCalls !== void 0 ? { toolCalls } : {} } } : {}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
68
78
|
} finally {
|
|
69
79
|
process.off("SIGINT", onSigint);
|
|
70
80
|
}
|
|
@@ -125,12 +135,6 @@ function renderEvent(event, isJson) {
|
|
|
125
135
|
}
|
|
126
136
|
break;
|
|
127
137
|
}
|
|
128
|
-
case "aero_turn_status":
|
|
129
|
-
if (event.status && event.status.reason !== "completed") console.error(`Aero stopped: ${event.status.reason} (${event.status.toolCalls} tool calls).`);
|
|
130
|
-
break;
|
|
131
|
-
case "error":
|
|
132
|
-
console.error(`Agent stream error: ${event.message}`);
|
|
133
|
-
break;
|
|
134
138
|
}
|
|
135
139
|
}
|
|
136
140
|
export {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createApiClient
|
|
3
|
+
} from "./chunk-RSB3X7UR.js";
|
|
4
|
+
import "./chunk-T6CABZ3N.js";
|
|
5
|
+
import "./chunk-AOJU5LKX.js";
|
|
6
|
+
import {
|
|
7
|
+
isMachineFormat
|
|
8
|
+
} from "./chunk-Y7JEJNNS.js";
|
|
9
|
+
import "./chunk-FGEBFVHB.js";
|
|
10
|
+
|
|
11
|
+
// src/commands/agent-conversations.ts
|
|
12
|
+
import { randomUUID } from "crypto";
|
|
13
|
+
async function agentConversations(opts) {
|
|
14
|
+
const client = createApiClient();
|
|
15
|
+
const result = await (() => {
|
|
16
|
+
switch (opts.action) {
|
|
17
|
+
case "list":
|
|
18
|
+
return client.listAgentConversations(opts.project, { offset: opts.offset, limit: opts.limit });
|
|
19
|
+
case "new":
|
|
20
|
+
return client.createAgentConversation(opts.project, opts.id ?? randomUUID());
|
|
21
|
+
case "show":
|
|
22
|
+
return client.getAgentConversation(opts.project, opts.id);
|
|
23
|
+
case "resume":
|
|
24
|
+
return client.resumeAgentConversation(opts.project, opts.id);
|
|
25
|
+
case "delete":
|
|
26
|
+
return client.deleteAgentConversation(opts.project, opts.id);
|
|
27
|
+
}
|
|
28
|
+
})();
|
|
29
|
+
if (isMachineFormat(opts.format)) {
|
|
30
|
+
console.log(JSON.stringify(result, null, 2));
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if ("conversations" in result) {
|
|
34
|
+
if (!result.conversations.length) console.log("No Aero conversations yet.");
|
|
35
|
+
for (const conversation of result.conversations) console.log(`${conversation.active ? "* " : " "}${conversation.id} ${conversation.title} ${conversation.updatedAt}`);
|
|
36
|
+
if (result.nextOffset !== null) console.log(`More conversations: --offset ${result.nextOffset}`);
|
|
37
|
+
} else if ("messages" in result) {
|
|
38
|
+
console.log(`${result.title} \u2014 ${result.id}${result.active ? " (current)" : ""}`);
|
|
39
|
+
for (const message of result.messages) console.log(`[${message.role}] ${typeof message.content === "string" ? message.content : JSON.stringify(message.content)}`);
|
|
40
|
+
} else console.log(`Conversation deleted: ${result.id}. Shared project notes kept.`);
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
agentConversations
|
|
44
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RSB3X7UR.js";
|
|
4
|
+
import "./chunk-T6CABZ3N.js";
|
|
5
5
|
import {
|
|
6
6
|
emitJsonl
|
|
7
7
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -9,7 +9,7 @@ import "./chunk-AOJU5LKX.js";
|
|
|
9
9
|
import {
|
|
10
10
|
isMachineFormat,
|
|
11
11
|
usageError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Y7JEJNNS.js";
|
|
13
13
|
import {
|
|
14
14
|
AgentJourneyCorrelationBases,
|
|
15
15
|
agentJourneysQuerySchema,
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createApiClient
|
|
3
|
+
} from "./chunk-RSB3X7UR.js";
|
|
4
|
+
import "./chunk-T6CABZ3N.js";
|
|
5
|
+
import {
|
|
6
|
+
emitJsonl
|
|
7
|
+
} from "./chunk-Z7IUAJOF.js";
|
|
8
|
+
import "./chunk-AOJU5LKX.js";
|
|
9
|
+
import {
|
|
10
|
+
isMachineFormat
|
|
11
|
+
} from "./chunk-Y7JEJNNS.js";
|
|
12
|
+
import "./chunk-FGEBFVHB.js";
|
|
13
|
+
|
|
14
|
+
// src/commands/agent-memory.ts
|
|
15
|
+
function toFormat(raw) {
|
|
16
|
+
if (raw === "json") return "json";
|
|
17
|
+
if (raw === "jsonl") return "jsonl";
|
|
18
|
+
return "text";
|
|
19
|
+
}
|
|
20
|
+
async function agentMemoryList(opts) {
|
|
21
|
+
const format = toFormat(opts.format);
|
|
22
|
+
const client = createApiClient();
|
|
23
|
+
const result = await client.listAgentMemory(opts.project);
|
|
24
|
+
if (format === "json") {
|
|
25
|
+
console.log(JSON.stringify(result, null, 2));
|
|
26
|
+
return;
|
|
27
|
+
} else if (format === "jsonl") {
|
|
28
|
+
emitJsonl(result.entries.map((entry) => ({ project: opts.project, ...entry })));
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (result.entries.length === 0) {
|
|
32
|
+
console.log(`No Aero memory notes for "${opts.project}".`);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
console.log(`Aero memory for ${opts.project} \u2014 ${result.entries.length} note(s)
|
|
36
|
+
`);
|
|
37
|
+
for (const entry of result.entries) {
|
|
38
|
+
console.log(`[${entry.source}] ${entry.key} (updated ${entry.updatedAt})`);
|
|
39
|
+
console.log(` ${entry.value.replace(/\n/g, "\n ")}`);
|
|
40
|
+
console.log();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
async function agentMemorySet(opts) {
|
|
44
|
+
const format = toFormat(opts.format);
|
|
45
|
+
const client = createApiClient();
|
|
46
|
+
const result = await client.setAgentMemory(opts.project, {
|
|
47
|
+
key: opts.key,
|
|
48
|
+
value: opts.value
|
|
49
|
+
});
|
|
50
|
+
if (isMachineFormat(format)) {
|
|
51
|
+
console.log(JSON.stringify(result, null, 2));
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
console.log(`Stored note "${result.entry.key}" for "${opts.project}" (source=${result.entry.source}).`);
|
|
55
|
+
}
|
|
56
|
+
async function agentMemoryForget(opts) {
|
|
57
|
+
const format = toFormat(opts.format);
|
|
58
|
+
const client = createApiClient();
|
|
59
|
+
const result = await client.forgetAgentMemory(opts.project, opts.key);
|
|
60
|
+
if (isMachineFormat(format)) {
|
|
61
|
+
console.log(JSON.stringify(result, null, 2));
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (result.status === "forgotten") {
|
|
65
|
+
console.log(`Forgot note "${opts.key}" for "${opts.project}".`);
|
|
66
|
+
} else {
|
|
67
|
+
console.log(`No note with key "${opts.key}" for "${opts.project}".`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
agentMemoryForget,
|
|
72
|
+
agentMemoryList,
|
|
73
|
+
agentMemorySet
|
|
74
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createApiClient
|
|
3
|
+
} from "./chunk-RSB3X7UR.js";
|
|
4
|
+
import "./chunk-T6CABZ3N.js";
|
|
5
|
+
import {
|
|
6
|
+
emitJsonl
|
|
7
|
+
} from "./chunk-Z7IUAJOF.js";
|
|
8
|
+
import "./chunk-AOJU5LKX.js";
|
|
9
|
+
import "./chunk-Y7JEJNNS.js";
|
|
10
|
+
import "./chunk-FGEBFVHB.js";
|
|
11
|
+
|
|
12
|
+
// src/commands/agent-providers.ts
|
|
13
|
+
async function agentProviders(opts) {
|
|
14
|
+
const format = opts.format === "json" ? "json" : opts.format === "jsonl" ? "jsonl" : "text";
|
|
15
|
+
const client = createApiClient();
|
|
16
|
+
const res = await client.listAgentProviders(opts.project);
|
|
17
|
+
if (format === "json") {
|
|
18
|
+
console.log(JSON.stringify(res, null, 2));
|
|
19
|
+
return;
|
|
20
|
+
} else if (format === "jsonl") {
|
|
21
|
+
emitJsonl(
|
|
22
|
+
res.providers.map((provider) => ({
|
|
23
|
+
project: opts.project,
|
|
24
|
+
defaultProvider: res.defaultProvider,
|
|
25
|
+
...provider
|
|
26
|
+
}))
|
|
27
|
+
);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
console.log(
|
|
31
|
+
`Aero providers for ${opts.project} (default: ${res.defaultProvider ?? "none configured"})
|
|
32
|
+
`
|
|
33
|
+
);
|
|
34
|
+
const idWidth = Math.max(...res.providers.map((p) => p.id.length), 8);
|
|
35
|
+
for (const p of res.providers) {
|
|
36
|
+
const status = p.configured ? "\u2713" : "\u2717";
|
|
37
|
+
const source = p.keySource ? `(${p.keySource})` : "";
|
|
38
|
+
console.log(
|
|
39
|
+
` ${status} ${p.id.padEnd(idWidth)} ${p.label} \u2014 model ${p.defaultModel} ${source}`.trimEnd()
|
|
40
|
+
);
|
|
41
|
+
if (p.backgroundPause) {
|
|
42
|
+
console.log(` Automatic work paused: ${p.backgroundPause.reason}; retry after ${p.backgroundPause.retryAt}`);
|
|
43
|
+
console.log(` ${p.backgroundPause.recovery}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
agentProviders
|
|
49
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createApiClient
|
|
3
|
+
} from "./chunk-RSB3X7UR.js";
|
|
4
|
+
import "./chunk-T6CABZ3N.js";
|
|
5
|
+
import "./chunk-AOJU5LKX.js";
|
|
6
|
+
import {
|
|
7
|
+
isMachineFormat
|
|
8
|
+
} from "./chunk-Y7JEJNNS.js";
|
|
9
|
+
import "./chunk-FGEBFVHB.js";
|
|
10
|
+
|
|
11
|
+
// src/commands/agent-transcript.ts
|
|
12
|
+
function toFormat(raw) {
|
|
13
|
+
if (raw === "json") return "json";
|
|
14
|
+
if (raw === "jsonl") return "jsonl";
|
|
15
|
+
return "text";
|
|
16
|
+
}
|
|
17
|
+
async function agentTranscript(opts) {
|
|
18
|
+
const format = toFormat(opts.format);
|
|
19
|
+
const client = createApiClient();
|
|
20
|
+
const transcript = await client.getAgentTranscript(opts.project);
|
|
21
|
+
if (isMachineFormat(format)) {
|
|
22
|
+
console.log(JSON.stringify(transcript, null, 2));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (transcript.messages.length === 0) {
|
|
26
|
+
console.log(`No Aero conversation yet for "${opts.project}".`);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
console.log(
|
|
30
|
+
`Aero session for ${opts.project} \u2014 ${transcript.modelProvider ?? "unknown"}/${transcript.modelId ?? "unknown"} \u2014 updated ${transcript.updatedAt ?? "never"}`
|
|
31
|
+
);
|
|
32
|
+
console.log(`${transcript.messages.length} message${transcript.messages.length === 1 ? "" : "s"}
|
|
33
|
+
`);
|
|
34
|
+
for (const msg of transcript.messages) {
|
|
35
|
+
console.log(`[${msg.role}]`);
|
|
36
|
+
if (typeof msg.content === "string") {
|
|
37
|
+
console.log(msg.content);
|
|
38
|
+
} else if (Array.isArray(msg.content)) {
|
|
39
|
+
for (const block of msg.content) {
|
|
40
|
+
const t = block.type;
|
|
41
|
+
if (t === "text") console.log(block.text);
|
|
42
|
+
else if (t === "toolCall") console.log(`\u27D0 ${block.name} ${JSON.stringify(block.arguments)}`);
|
|
43
|
+
else if (t === "toolResult") console.log(` ${block.isError ? "\u2717" : "\u2713"} tool-result`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
console.log();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async function agentTranscriptReset(opts) {
|
|
50
|
+
const format = toFormat(opts.format);
|
|
51
|
+
const client = createApiClient();
|
|
52
|
+
await client.resetAgentTranscript(opts.project);
|
|
53
|
+
if (isMachineFormat(format)) {
|
|
54
|
+
console.log(JSON.stringify({ status: "reset", project: opts.project }));
|
|
55
|
+
} else {
|
|
56
|
+
console.log(`Aero conversation reset for "${opts.project}".`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
agentTranscript,
|
|
61
|
+
agentTranscriptReset
|
|
62
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RSB3X7UR.js";
|
|
4
|
+
import "./chunk-T6CABZ3N.js";
|
|
5
5
|
import "./chunk-AOJU5LKX.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError,
|
|
8
8
|
isMachineFormat,
|
|
9
9
|
usageError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Y7JEJNNS.js";
|
|
11
11
|
import {
|
|
12
12
|
buildModelChangeNotice,
|
|
13
13
|
formatPercent,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RSB3X7UR.js";
|
|
4
|
+
import "./chunk-T6CABZ3N.js";
|
|
5
5
|
import {
|
|
6
6
|
emitJsonl
|
|
7
7
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -9,7 +9,7 @@ import "./chunk-AOJU5LKX.js";
|
|
|
9
9
|
import {
|
|
10
10
|
isMachineFormat,
|
|
11
11
|
usageError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Y7JEJNNS.js";
|
|
13
13
|
import {
|
|
14
14
|
answerabilityQuerySchema
|
|
15
15
|
} from "./chunk-FGEBFVHB.js";
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readInputText
|
|
3
|
+
} from "./chunk-APKBR2BP.js";
|
|
1
4
|
import {
|
|
2
5
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-RSB3X7UR.js";
|
|
7
|
+
import "./chunk-T6CABZ3N.js";
|
|
5
8
|
import "./chunk-AOJU5LKX.js";
|
|
6
9
|
import {
|
|
7
10
|
CliError,
|
|
8
11
|
isEndpointMissing,
|
|
9
12
|
isMachineFormat
|
|
10
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Y7JEJNNS.js";
|
|
11
14
|
import {
|
|
12
15
|
describeError
|
|
13
16
|
} from "./chunk-FGEBFVHB.js";
|
|
@@ -34,9 +37,9 @@ function describeApplyError(error) {
|
|
|
34
37
|
}
|
|
35
38
|
async function applyConfigFile(filePath, options = {}) {
|
|
36
39
|
if (!fs.existsSync(filePath)) {
|
|
37
|
-
throw new
|
|
40
|
+
throw new CliError({ code: "APPLY_FILE_NOT_FOUND", message: `File not found: ${filePath}`, details: { filePath } });
|
|
38
41
|
}
|
|
39
|
-
const content =
|
|
42
|
+
const content = readInputText(filePath, `The config file ${filePath}`);
|
|
40
43
|
const docs = parseAllDocuments(content);
|
|
41
44
|
const client = createApiClient();
|
|
42
45
|
const errors = [];
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
backfillSnapshotAttributionCommand,
|
|
11
11
|
backfillTrafficClassificationCommand,
|
|
12
12
|
replayQueryAuditLog
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZSVQTHX3.js";
|
|
14
14
|
import "./chunk-CBREBUUV.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-T6CABZ3N.js";
|
|
16
|
+
import "./chunk-Y7JEJNNS.js";
|
|
17
17
|
import "./chunk-LJ65QBRP.js";
|
|
18
18
|
import "./chunk-VRY5M7CR.js";
|
|
19
19
|
import {
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RSB3X7UR.js";
|
|
4
|
+
import "./chunk-T6CABZ3N.js";
|
|
5
5
|
import {
|
|
6
6
|
emitJsonl
|
|
7
7
|
} from "./chunk-Z7IUAJOF.js";
|
|
8
8
|
import "./chunk-AOJU5LKX.js";
|
|
9
9
|
import {
|
|
10
10
|
CliError,
|
|
11
|
-
isMachineFormat
|
|
12
|
-
|
|
11
|
+
isMachineFormat,
|
|
12
|
+
systemError,
|
|
13
|
+
usageError
|
|
14
|
+
} from "./chunk-Y7JEJNNS.js";
|
|
13
15
|
import {
|
|
14
16
|
BacklinkSources,
|
|
15
17
|
CcReleaseSyncStatuses,
|
|
@@ -113,7 +115,7 @@ async function pollSync(id, format) {
|
|
|
113
115
|
while (true) {
|
|
114
116
|
const syncs = await client.backlinksListSyncs();
|
|
115
117
|
const row = syncs.find((s) => s.id === id);
|
|
116
|
-
if (!row) throw
|
|
118
|
+
if (!row) throw systemError(`Release sync ${id} not found`, { details: { syncId: id } });
|
|
117
119
|
if (terminal.has(row.status)) return row;
|
|
118
120
|
if (format !== "json") {
|
|
119
121
|
process.stderr.write(`\r${row.status}${row.phaseDetail ? ": " + row.phaseDetail : ""}`.padEnd(80));
|
|
@@ -277,7 +279,10 @@ async function backlinksExtract(opts) {
|
|
|
277
279
|
}
|
|
278
280
|
async function backlinksCachePrune(opts) {
|
|
279
281
|
if (!opts.release) {
|
|
280
|
-
throw
|
|
282
|
+
throw usageError("Error: --release is required\nUsage: canonry backlinks cache prune --release <id>", {
|
|
283
|
+
message: "--release is required",
|
|
284
|
+
details: { command: "backlinks.cache.prune", usage: "canonry backlinks cache prune --release <id>" }
|
|
285
|
+
});
|
|
281
286
|
}
|
|
282
287
|
const result = await getClient().backlinksPruneCache(opts.release);
|
|
283
288
|
if (isMachineFormat(opts.format)) {
|