@canonry/canonry 7.32.0 → 7.44.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/references/agent-operations.md +9 -0
- package/assets/agent-workspace/skills/aero/references/site-health.md +12 -0
- package/assets/agent-workspace/skills/canonry/SKILL.md +9 -0
- package/assets/agent-workspace/skills/canonry/references/aeo-analysis.md +24 -0
- package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +207 -4
- package/assets/agent-workspace/skills/canonry/references/server-side-traffic.md +14 -2
- package/assets/assets/{AuditHistoryPanel-cQyVA85P.js → AuditHistoryPanel-CvANw3ds.js} +1 -1
- package/assets/assets/{BacklinksPage-UGZ_9N7F.js → BacklinksPage-C6x9ELjk.js} +1 -1
- package/assets/assets/{HistoryPage-UJVFZ5LK.js → HistoryPage-r36HX1cC.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-ChpOxQfx.js → MeasurementPropertyPage-ComoCzR4.js} +3 -3
- package/assets/assets/ProjectPage-CIeU-buk.js +8 -0
- package/assets/assets/RunsPage-DI6eJATZ.js +1 -0
- package/assets/assets/{SettingsPage-DeKxjuTr.js → SettingsPage-Bw7GdXxs.js} +1 -1
- package/assets/assets/{SiteHealthSection-COeVsgop.js → SiteHealthSection-C-JaNKpS.js} +3 -3
- package/assets/assets/{TrafficPage-DmMmeJKK.js → TrafficPage-Cnsp276v.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-CUehseZe.js → TrafficSourceDetailPage-CBIaJk7e.js} +1 -1
- package/assets/assets/{extract-error-message-BsxdS7Po.js → extract-error-message-C_Owa0n9.js} +1 -1
- package/assets/assets/index-ZS9sSTMS.js +86 -0
- package/assets/assets/{react-sigma_core.esm.min--MbbBWzJ.js → react-sigma_core.esm.min-ugyh-ooq.js} +1 -1
- package/assets/assets/{v2-overview-adapter-D-IScpdp.js → v2-overview-adapter-BLSrVQ7K.js} +1 -1
- package/assets/index.html +1 -1
- package/dist/chunk-3JVF3ULD.js +550 -0
- package/dist/chunk-45Z5RJZW.js +562 -0
- package/dist/{chunk-QFXD7GR5.js → chunk-5LY7EG4U.js} +238 -20
- package/dist/chunk-EJRV7RBZ.js +23066 -0
- package/dist/{chunk-WRHA54BN.js → chunk-G47XJVAS.js} +5885 -3900
- package/dist/{chunk-42XUY243.js → chunk-GZ2KIONF.js} +11507 -10391
- package/dist/chunk-HGMYEDAQ.js +79 -0
- package/dist/{chunk-2C6NWFN4.js → chunk-JVBI6VBT.js} +2 -2
- package/dist/{chunk-ZIETXJYU.js → chunk-MPWBFKGK.js} +201 -104
- package/dist/{chunk-K5EGSSXC.js → chunk-QQYQDTFZ.js} +142 -47
- package/dist/{chunk-FW4GX2LO.js → chunk-SW54HXSZ.js} +3 -3
- package/dist/cli-catalog-PNJEQV5H.js +15 -0
- package/dist/cli-commands-4UT2CRXX.js +15 -0
- package/dist/cli.js +136 -22525
- package/dist/{demo-server-G5OK7SWE.js → demo-server-WRHR25HF.js} +5 -4
- package/dist/index.js +7 -6
- package/dist/{intelligence-service-3ZUVTIO7.js → intelligence-service-QXXRUB2G.js} +2 -2
- package/dist/mcp.js +30 -15
- package/package.json +10 -10
- package/assets/assets/ProjectPage-CvxuPSiC.js +0 -8
- package/assets/assets/RunsPage-C6U_YcDY.js +0 -1
- package/assets/assets/index-ahEr6Oc-.js +0 -86
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
import {
|
|
2
|
+
usageError
|
|
3
|
+
} from "./chunk-HGMYEDAQ.js";
|
|
4
|
+
import {
|
|
5
|
+
AppError,
|
|
6
|
+
parseWindowIn,
|
|
7
|
+
resolveDateRange
|
|
8
|
+
} from "./chunk-GZ2KIONF.js";
|
|
9
|
+
|
|
10
|
+
// src/cli-access.ts
|
|
11
|
+
var CLI_ACCESS_BY_ID = Object.freeze({
|
|
12
|
+
"ads.account": "live",
|
|
13
|
+
"ads.activation-grant.create": "write",
|
|
14
|
+
"ads.activation-grant.revoke": "write",
|
|
15
|
+
"ads.ad-group.create": "write",
|
|
16
|
+
"ads.ad-group.pause": "write",
|
|
17
|
+
"ads.ad-group.update": "write",
|
|
18
|
+
"ads.ad.create": "write",
|
|
19
|
+
"ads.ad.pause": "write",
|
|
20
|
+
"ads.ad.update": "write",
|
|
21
|
+
"ads.campaign.activate-tree": "write",
|
|
22
|
+
"ads.campaign.create": "write",
|
|
23
|
+
"ads.campaign.pause": "write",
|
|
24
|
+
"ads.campaign.update": "write",
|
|
25
|
+
"ads.campaigns": "stored",
|
|
26
|
+
"ads.connect": "write",
|
|
27
|
+
"ads.conversions.event-settings": "live",
|
|
28
|
+
"ads.conversions.pixels": "live",
|
|
29
|
+
"ads.delivery-diagnostics": "stored",
|
|
30
|
+
"ads.disconnect": "write",
|
|
31
|
+
"ads.geo.search": "live",
|
|
32
|
+
"ads.image.upload": "write",
|
|
33
|
+
"ads.insights": "stored",
|
|
34
|
+
"ads.live-delivery": "live",
|
|
35
|
+
"ads.operation": "stored",
|
|
36
|
+
"ads.operation.reconcile": "write",
|
|
37
|
+
"ads.operation.resume-activation": "write",
|
|
38
|
+
"ads.operations.unresolved": "stored",
|
|
39
|
+
"ads.status": "stored",
|
|
40
|
+
"ads.summary": "stored",
|
|
41
|
+
"ads.sync": "write",
|
|
42
|
+
"agent.ask": "write",
|
|
43
|
+
"agent.conversations.list": "stored",
|
|
44
|
+
"agent.conversations.new": "write",
|
|
45
|
+
"agent.conversations.show": "stored",
|
|
46
|
+
"agent.conversations.resume": "write",
|
|
47
|
+
"agent.conversations.delete": "write",
|
|
48
|
+
"query.workspace": "stored",
|
|
49
|
+
"query.preview": "stored",
|
|
50
|
+
"query.commit": "write",
|
|
51
|
+
"agent.attach": "write",
|
|
52
|
+
"agent.clear": "write",
|
|
53
|
+
"agent.detach": "write",
|
|
54
|
+
"agent.memory.forget": "write",
|
|
55
|
+
"agent.memory.list": "stored",
|
|
56
|
+
"agent.memory.set": "write",
|
|
57
|
+
"agent.providers": "stored",
|
|
58
|
+
"agent.reset": "write",
|
|
59
|
+
"agent.transcript": "stored",
|
|
60
|
+
"analytics": "stored",
|
|
61
|
+
"apply": "write",
|
|
62
|
+
"backfill": "write",
|
|
63
|
+
"backfill.ai-referral-paths": "write",
|
|
64
|
+
"backfill.answer-mentions": "write",
|
|
65
|
+
"backfill.answer-visibility": "write",
|
|
66
|
+
"backfill.insights": "write",
|
|
67
|
+
"backfill.normalized-paths": "write",
|
|
68
|
+
"backfill.snapshot-attribution": "write",
|
|
69
|
+
"backfill.traffic-classification": "write",
|
|
70
|
+
"backlinks.cache.prune": "write",
|
|
71
|
+
"backlinks.doctor": "live",
|
|
72
|
+
"backlinks.extract": "live",
|
|
73
|
+
"backlinks.install": "write",
|
|
74
|
+
"backlinks.list": "stored",
|
|
75
|
+
"backlinks.releases": "stored",
|
|
76
|
+
"backlinks.releases.latest": "live",
|
|
77
|
+
"backlinks.sources": "stored",
|
|
78
|
+
"backlinks.status": "stored",
|
|
79
|
+
"backlinks.sync": "write",
|
|
80
|
+
"bing": "write",
|
|
81
|
+
"bing.connect": "write",
|
|
82
|
+
"bing.coverage": "write",
|
|
83
|
+
"bing.coverage-history": "stored",
|
|
84
|
+
"bing.disconnect": "write",
|
|
85
|
+
"bing.inspect": "write",
|
|
86
|
+
"bing.inspect-sitemap": "write",
|
|
87
|
+
"bing.inspections": "stored",
|
|
88
|
+
"bing.performance": "live",
|
|
89
|
+
"bing.refresh": "write",
|
|
90
|
+
"bing.request-indexing": "write",
|
|
91
|
+
"bing.set-site": "write",
|
|
92
|
+
"bing.sites": "live",
|
|
93
|
+
"bing.status": "stored",
|
|
94
|
+
"bootstrap": "write",
|
|
95
|
+
"cdp": "stored",
|
|
96
|
+
"cdp.connect": "write",
|
|
97
|
+
"cdp.screenshot": "live",
|
|
98
|
+
"cdp.status": "live",
|
|
99
|
+
"cdp.targets": "live",
|
|
100
|
+
"citations.visibility": "stored",
|
|
101
|
+
"competitor": "write",
|
|
102
|
+
"competitor.add": "write",
|
|
103
|
+
"competitor.aliases": "stored",
|
|
104
|
+
"competitor.aliases.detect": "stored",
|
|
105
|
+
"competitor.delete": "write",
|
|
106
|
+
"competitor.import": "write",
|
|
107
|
+
"competitor.landscape": "stored",
|
|
108
|
+
"competitor.list": "stored",
|
|
109
|
+
"competitor.remove": "write",
|
|
110
|
+
"competitor.suggest": "stored",
|
|
111
|
+
"content.brief": "write",
|
|
112
|
+
"content.dismiss": "write",
|
|
113
|
+
"content.dismissals": "stored",
|
|
114
|
+
"content.gaps": "stored",
|
|
115
|
+
"content.map": "stored",
|
|
116
|
+
"content.restore": "write",
|
|
117
|
+
"content.sources": "stored",
|
|
118
|
+
"content.targets": "stored",
|
|
119
|
+
"conversion-tracking.contracts": "stored",
|
|
120
|
+
"conversion-tracking.contracts.create": "write",
|
|
121
|
+
"conversion-tracking.contracts.delete": "write",
|
|
122
|
+
"conversion-tracking.contracts.get": "stored",
|
|
123
|
+
"conversion-tracking.contracts.integrity": "stored",
|
|
124
|
+
"conversion-tracking.contracts.update": "write",
|
|
125
|
+
"dashboard": "write",
|
|
126
|
+
"dashboard.reset-password": "write",
|
|
127
|
+
"demo": "write",
|
|
128
|
+
"discover.eval": "write",
|
|
129
|
+
"discover.harvest": "live",
|
|
130
|
+
"discover.list": "stored",
|
|
131
|
+
"discover.probe": "stored",
|
|
132
|
+
"discover.promote": "write",
|
|
133
|
+
"discover.promote.preview": "stored",
|
|
134
|
+
"discover.run": "write",
|
|
135
|
+
"discover.seed": "write",
|
|
136
|
+
"discover.show": "stored",
|
|
137
|
+
"doctor": "live",
|
|
138
|
+
"evidence": "stored",
|
|
139
|
+
"export": "stored",
|
|
140
|
+
"feedback": "write",
|
|
141
|
+
"ga": "write",
|
|
142
|
+
"ga.acquisition": "stored",
|
|
143
|
+
"ga.ai-referral-daily": "stored",
|
|
144
|
+
"ga.ai-referral-history": "stored",
|
|
145
|
+
"ga.attribution": "stored",
|
|
146
|
+
"ga.connect": "write",
|
|
147
|
+
"ga.coverage": "stored",
|
|
148
|
+
"ga.disconnect": "write",
|
|
149
|
+
"ga.measurement-analysis": "stored",
|
|
150
|
+
"ga.properties": "live",
|
|
151
|
+
"ga.search-landing-pages": "stored",
|
|
152
|
+
"ga.session-history": "stored",
|
|
153
|
+
"ga.social-referral-history": "stored",
|
|
154
|
+
"ga.social-referral-summary": "stored",
|
|
155
|
+
"ga.status": "stored",
|
|
156
|
+
"ga.sync": "write",
|
|
157
|
+
"ga.traffic": "stored",
|
|
158
|
+
"gbp.accounts": "live",
|
|
159
|
+
"gbp.attributes": "stored",
|
|
160
|
+
"gbp.connect": "write",
|
|
161
|
+
"gbp.disconnect": "write",
|
|
162
|
+
"gbp.keywords": "stored",
|
|
163
|
+
"gbp.locations": "stored",
|
|
164
|
+
"gbp.locations.deselect": "write",
|
|
165
|
+
"gbp.locations.discover": "write",
|
|
166
|
+
"gbp.locations.select": "write",
|
|
167
|
+
"gbp.lodging": "stored",
|
|
168
|
+
"gbp.metrics": "stored",
|
|
169
|
+
"gbp.place-actions": "stored",
|
|
170
|
+
"gbp.places": "stored",
|
|
171
|
+
"gbp.reviews": "stored",
|
|
172
|
+
"gbp.summary": "stored",
|
|
173
|
+
"gbp.sync": "write",
|
|
174
|
+
"get": "stored",
|
|
175
|
+
"google": "write",
|
|
176
|
+
"google-ads.customers": "live",
|
|
177
|
+
"google-ads.disconnect": "write",
|
|
178
|
+
"google-ads.performance": "stored",
|
|
179
|
+
"google-ads.select": "write",
|
|
180
|
+
"google-ads.snapshot": "stored",
|
|
181
|
+
"google-ads.snapshots": "stored",
|
|
182
|
+
"google-ads.status": "stored",
|
|
183
|
+
"google-ads.sync": "write",
|
|
184
|
+
"google.connect": "write",
|
|
185
|
+
"google.coverage": "stored",
|
|
186
|
+
"google.coverage-history": "stored",
|
|
187
|
+
"google.deindexed": "stored",
|
|
188
|
+
"google.disconnect": "write",
|
|
189
|
+
"google.discover-sitemaps": "live",
|
|
190
|
+
"google.inspect": "write",
|
|
191
|
+
"google.inspect-sitemap": "write",
|
|
192
|
+
"google.inspections": "stored",
|
|
193
|
+
"google.list-sitemaps": "live",
|
|
194
|
+
"google.performance": "stored",
|
|
195
|
+
"google.performance-daily": "stored",
|
|
196
|
+
"google.properties": "live",
|
|
197
|
+
"google.query-totals": "stored",
|
|
198
|
+
"google.refresh": "write",
|
|
199
|
+
"google.request-indexing": "write",
|
|
200
|
+
"google.set-property": "write",
|
|
201
|
+
"google.set-sitemap": "write",
|
|
202
|
+
"google.status": "stored",
|
|
203
|
+
"google.submit-sitemap": "write",
|
|
204
|
+
"google.sync": "write",
|
|
205
|
+
"google.top-pages": "stored",
|
|
206
|
+
"gtm.accounts": "live",
|
|
207
|
+
"gtm.containers": "live",
|
|
208
|
+
"gtm.disconnect": "write",
|
|
209
|
+
"gtm.select": "write",
|
|
210
|
+
"gtm.snapshot": "stored",
|
|
211
|
+
"gtm.snapshots": "stored",
|
|
212
|
+
"gtm.status": "stored",
|
|
213
|
+
"gtm.sync": "write",
|
|
214
|
+
"gtm.workspaces": "live",
|
|
215
|
+
"health": "stored",
|
|
216
|
+
"help": "stored",
|
|
217
|
+
"history": "stored",
|
|
218
|
+
"init": "write",
|
|
219
|
+
"insights": "stored",
|
|
220
|
+
"insights.dismiss": "write",
|
|
221
|
+
"key": "stored",
|
|
222
|
+
"key.create": "write",
|
|
223
|
+
"key.list": "stored",
|
|
224
|
+
"key.revoke": "write",
|
|
225
|
+
"key.whoami": "stored",
|
|
226
|
+
"keyword": "stored",
|
|
227
|
+
"keyword.add": "write",
|
|
228
|
+
"keyword.delete": "write",
|
|
229
|
+
"keyword.generate": "write",
|
|
230
|
+
"keyword.import": "write",
|
|
231
|
+
"keyword.list": "stored",
|
|
232
|
+
"keyword.remove": "write",
|
|
233
|
+
"keyword.replace": "write",
|
|
234
|
+
"logs": "stored",
|
|
235
|
+
"mcp": "write",
|
|
236
|
+
"mcp.config": "write",
|
|
237
|
+
"mcp.install": "write",
|
|
238
|
+
"measurement-plan.advanced": "write",
|
|
239
|
+
"measurement-plan.assignments.apply": "write",
|
|
240
|
+
"measurement-plan.assignments.preview": "stored",
|
|
241
|
+
"measurement-plan.assignments.replace": "write",
|
|
242
|
+
"measurement-plan.discover": "live",
|
|
243
|
+
"measurement-plan.groups.apply": "write",
|
|
244
|
+
"measurement-plan.groups.preview": "stored",
|
|
245
|
+
"measurement-plan.property": "stored",
|
|
246
|
+
"measurement-plan.property-evidence": "stored",
|
|
247
|
+
"measurement-plan.publish": "write",
|
|
248
|
+
"measurement-plan.report": "stored",
|
|
249
|
+
"measurement-plan.retire": "write",
|
|
250
|
+
"measurement-plan.show": "stored",
|
|
251
|
+
"measurement-plan.versions": "stored",
|
|
252
|
+
"measurement-plan.visibility": "stored",
|
|
253
|
+
"notify": "write",
|
|
254
|
+
"notify.add": "write",
|
|
255
|
+
"notify.events": "stored",
|
|
256
|
+
"notify.list": "stored",
|
|
257
|
+
"notify.remove": "write",
|
|
258
|
+
"notify.test": "write",
|
|
259
|
+
"organic-evidence": "stored",
|
|
260
|
+
"overview": "stored",
|
|
261
|
+
"project": "write",
|
|
262
|
+
"project.add-location": "write",
|
|
263
|
+
"project.create": "write",
|
|
264
|
+
"project.delete": "write",
|
|
265
|
+
"project.list": "stored",
|
|
266
|
+
"project.locations": "stored",
|
|
267
|
+
"project.remove-location": "write",
|
|
268
|
+
"project.set-default-location": "write",
|
|
269
|
+
"project.show": "stored",
|
|
270
|
+
"project.update": "write",
|
|
271
|
+
"query": "write",
|
|
272
|
+
"query.add": "write",
|
|
273
|
+
"query.delete": "write",
|
|
274
|
+
"query.generate": "write",
|
|
275
|
+
"query.import": "write",
|
|
276
|
+
"query.list": "stored",
|
|
277
|
+
"query.remove": "write",
|
|
278
|
+
"query.replace": "write",
|
|
279
|
+
"research.batch": "write",
|
|
280
|
+
"research.list": "stored",
|
|
281
|
+
"research.run": "write",
|
|
282
|
+
"research.show": "stored",
|
|
283
|
+
"results.clear": "write",
|
|
284
|
+
"results.export": "stored",
|
|
285
|
+
"run": "write",
|
|
286
|
+
"run.cancel": "write",
|
|
287
|
+
"run.completeness": "stored",
|
|
288
|
+
"run.fill": "write",
|
|
289
|
+
"run.list": "stored",
|
|
290
|
+
"run.show": "stored",
|
|
291
|
+
"run.trigger": "write",
|
|
292
|
+
"runs": "stored",
|
|
293
|
+
"schedule": "write",
|
|
294
|
+
"schedule.disable": "write",
|
|
295
|
+
"schedule.enable": "write",
|
|
296
|
+
"schedule.list": "stored",
|
|
297
|
+
"schedule.remove": "write",
|
|
298
|
+
"schedule.set": "write",
|
|
299
|
+
"schedule.show": "stored",
|
|
300
|
+
"search": "stored",
|
|
301
|
+
"site-health.overview": "stored",
|
|
302
|
+
"site-health.issues": "stored",
|
|
303
|
+
"site-health.issue-pages": "stored",
|
|
304
|
+
"site-health.pages": "stored",
|
|
305
|
+
"site-health.page-audit": "stored",
|
|
306
|
+
"site-health.structure": "stored",
|
|
307
|
+
"site-health.links": "stored",
|
|
308
|
+
"site-health.neighbors": "stored",
|
|
309
|
+
"site-health.dead-links": "stored",
|
|
310
|
+
"site-health.subgraph": "stored",
|
|
311
|
+
"site-health.path": "stored",
|
|
312
|
+
"site-health.changes": "stored",
|
|
313
|
+
"sentiment": "stored",
|
|
314
|
+
"sentiment.backfill": "write",
|
|
315
|
+
"sentiment.compare": "stored",
|
|
316
|
+
"sentiment.configure": "write",
|
|
317
|
+
"sentiment.evidence": "stored",
|
|
318
|
+
"sentiment.job": "stored",
|
|
319
|
+
"sentiment.jobs": "stored",
|
|
320
|
+
"sentiment.settings": "stored",
|
|
321
|
+
"serve": "write",
|
|
322
|
+
"settings": "stored",
|
|
323
|
+
"settings.google": "write",
|
|
324
|
+
"settings.provider": "write",
|
|
325
|
+
"settings.reload-providers": "write",
|
|
326
|
+
"skills": "write",
|
|
327
|
+
"skills.install": "write",
|
|
328
|
+
"skills.list": "stored",
|
|
329
|
+
"snapshot": "write",
|
|
330
|
+
"sources": "stored",
|
|
331
|
+
"start": "write",
|
|
332
|
+
"status": "stored",
|
|
333
|
+
"stop": "write",
|
|
334
|
+
"support": "stored",
|
|
335
|
+
"technical-aeo.changes": "stored",
|
|
336
|
+
"technical-aeo.issues": "stored",
|
|
337
|
+
"technical-aeo.issue-pages": "stored",
|
|
338
|
+
"technical-aeo.crawl": "write",
|
|
339
|
+
"technical-aeo.crawl-pages": "stored",
|
|
340
|
+
"technical-aeo.dead-links": "stored",
|
|
341
|
+
"technical-aeo.links": "stored",
|
|
342
|
+
"technical-aeo.links.neighbors": "stored",
|
|
343
|
+
"technical-aeo.page-audit": "stored",
|
|
344
|
+
"technical-aeo.pages": "stored",
|
|
345
|
+
"technical-aeo.path": "stored",
|
|
346
|
+
"technical-aeo.progress": "stored",
|
|
347
|
+
"technical-aeo.run": "write",
|
|
348
|
+
"technical-aeo.score": "stored",
|
|
349
|
+
"technical-aeo.structure": "stored",
|
|
350
|
+
"technical-aeo.subgraph": "stored",
|
|
351
|
+
"technical-aeo.trend": "stored",
|
|
352
|
+
"telemetry": "write",
|
|
353
|
+
"telemetry.disable": "write",
|
|
354
|
+
"telemetry.enable": "write",
|
|
355
|
+
"telemetry.status": "stored",
|
|
356
|
+
"traffic": "write",
|
|
357
|
+
"traffic.activate": "write",
|
|
358
|
+
"traffic.analytics": "stored",
|
|
359
|
+
"traffic.backfill": "write",
|
|
360
|
+
"traffic.connect": "write",
|
|
361
|
+
"traffic.connect.cloud-run": "write",
|
|
362
|
+
"traffic.connect.cloudflare": "write",
|
|
363
|
+
"traffic.connect.vercel": "write",
|
|
364
|
+
"traffic.connect.wordpress": "write",
|
|
365
|
+
"traffic.events": "stored",
|
|
366
|
+
"traffic.referral-assessment": "stored",
|
|
367
|
+
"traffic.reset": "write",
|
|
368
|
+
"traffic.samples": "stored",
|
|
369
|
+
"traffic.sources": "stored",
|
|
370
|
+
"traffic.status": "stored",
|
|
371
|
+
"traffic.sync": "write",
|
|
372
|
+
"user": "stored",
|
|
373
|
+
"user.create": "write",
|
|
374
|
+
"user.delete": "write",
|
|
375
|
+
"user.list": "stored",
|
|
376
|
+
"visibility-compare": "stored",
|
|
377
|
+
"visibility-stats": "stored",
|
|
378
|
+
"wordpress": "write",
|
|
379
|
+
"wordpress.audit": "live",
|
|
380
|
+
"wordpress.connect": "write",
|
|
381
|
+
"wordpress.create-page": "write",
|
|
382
|
+
"wordpress.diff": "live",
|
|
383
|
+
"wordpress.disconnect": "write",
|
|
384
|
+
"wordpress.llms-txt": "live",
|
|
385
|
+
"wordpress.onboard": "write",
|
|
386
|
+
"wordpress.page": "live",
|
|
387
|
+
"wordpress.pages": "live",
|
|
388
|
+
"wordpress.schema": "live",
|
|
389
|
+
"wordpress.schema.deploy": "write",
|
|
390
|
+
"wordpress.schema.status": "live",
|
|
391
|
+
"wordpress.set-llms-txt": "write",
|
|
392
|
+
"wordpress.set-meta": "write",
|
|
393
|
+
"wordpress.set-schema": "write",
|
|
394
|
+
"wordpress.staging": "stored",
|
|
395
|
+
"wordpress.staging.push": "write",
|
|
396
|
+
"wordpress.staging.status": "live",
|
|
397
|
+
"wordpress.status": "live",
|
|
398
|
+
"wordpress.update-page": "write"
|
|
399
|
+
});
|
|
400
|
+
function resolveCliAccess(spec) {
|
|
401
|
+
const id = spec.path.join(".");
|
|
402
|
+
if (spec.access) return spec.access;
|
|
403
|
+
const access = CLI_ACCESS_BY_ID[id];
|
|
404
|
+
if (!access) throw new Error(`Missing CLI operation access classification: ${id}`);
|
|
405
|
+
return access;
|
|
406
|
+
}
|
|
407
|
+
function resolveCliAccessForInvocation(spec, input) {
|
|
408
|
+
return spec.accessFor?.(input) ?? resolveCliAccess(spec);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// src/cli-output.ts
|
|
412
|
+
function emitJsonl(records) {
|
|
413
|
+
let out = "";
|
|
414
|
+
for (const record of records) {
|
|
415
|
+
out += `${JSON.stringify(record)}
|
|
416
|
+
`;
|
|
417
|
+
}
|
|
418
|
+
if (out) process.stdout.write(out);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// src/cli-command-helpers.ts
|
|
422
|
+
function getString(values, key) {
|
|
423
|
+
const value = values[key];
|
|
424
|
+
return typeof value === "string" ? value : void 0;
|
|
425
|
+
}
|
|
426
|
+
function getBoolean(values, key) {
|
|
427
|
+
return values[key] === true;
|
|
428
|
+
}
|
|
429
|
+
function getStringArray(values, key) {
|
|
430
|
+
const value = values[key];
|
|
431
|
+
if (Array.isArray(value)) {
|
|
432
|
+
return value.filter((entry) => typeof entry === "string");
|
|
433
|
+
}
|
|
434
|
+
return void 0;
|
|
435
|
+
}
|
|
436
|
+
function requirePositional(input, index, config) {
|
|
437
|
+
const value = input.positionals[index];
|
|
438
|
+
if (value) return value;
|
|
439
|
+
throw usageError(`Error: ${config.message}
|
|
440
|
+
Usage: ${config.usage}`, {
|
|
441
|
+
message: config.message,
|
|
442
|
+
details: {
|
|
443
|
+
command: config.command,
|
|
444
|
+
usage: config.usage
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
function requireProject(input, command, usage, message = "project name is required") {
|
|
449
|
+
return requirePositional(input, 0, { command, usage, message });
|
|
450
|
+
}
|
|
451
|
+
function stringOption() {
|
|
452
|
+
return { type: "string" };
|
|
453
|
+
}
|
|
454
|
+
function multiStringOption() {
|
|
455
|
+
return { type: "string", multiple: true };
|
|
456
|
+
}
|
|
457
|
+
function requireStringOption(input, key, config) {
|
|
458
|
+
const value = getString(input.values, key);
|
|
459
|
+
if (value) return value;
|
|
460
|
+
throw usageError(`Error: ${config.message}
|
|
461
|
+
Usage: ${config.usage}`, {
|
|
462
|
+
message: config.message,
|
|
463
|
+
details: {
|
|
464
|
+
command: config.command,
|
|
465
|
+
usage: config.usage,
|
|
466
|
+
...config.details ?? {}
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
function parseIntegerOption(input, key, config) {
|
|
471
|
+
const value = getString(input.values, key);
|
|
472
|
+
if (!value) return void 0;
|
|
473
|
+
const parsed = Number.parseInt(value, 10);
|
|
474
|
+
if (!Number.isNaN(parsed)) {
|
|
475
|
+
return parsed;
|
|
476
|
+
}
|
|
477
|
+
throw usageError(`Error: ${config.message}
|
|
478
|
+
Usage: ${config.usage}`, {
|
|
479
|
+
message: config.message,
|
|
480
|
+
details: {
|
|
481
|
+
command: config.command,
|
|
482
|
+
usage: config.usage,
|
|
483
|
+
option: key,
|
|
484
|
+
value
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
function unknownSubcommand(subcommand, config) {
|
|
489
|
+
const resolved = subcommand ?? "(none)";
|
|
490
|
+
throw usageError(`Error: unknown ${config.command} subcommand: ${resolved}
|
|
491
|
+
Usage: ${config.usage}`, {
|
|
492
|
+
message: `unknown ${config.command} subcommand: ${resolved}`,
|
|
493
|
+
details: {
|
|
494
|
+
command: config.command,
|
|
495
|
+
usage: config.usage,
|
|
496
|
+
available: config.available
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
function windowOptions(config = {}) {
|
|
501
|
+
const options = {};
|
|
502
|
+
if (config.window) options.window = stringOption();
|
|
503
|
+
if (config.dates) {
|
|
504
|
+
options.start = stringOption();
|
|
505
|
+
options.end = stringOption();
|
|
506
|
+
}
|
|
507
|
+
for (const alias of [config.aliases?.window, config.aliases?.start, config.aliases?.end]) {
|
|
508
|
+
if (alias !== void 0) options[alias] = stringOption();
|
|
509
|
+
}
|
|
510
|
+
return options;
|
|
511
|
+
}
|
|
512
|
+
function readWindowOptions(input, config) {
|
|
513
|
+
const read = (canonical) => {
|
|
514
|
+
const direct = getString(input.values, canonical);
|
|
515
|
+
const alias = config.aliases?.[canonical];
|
|
516
|
+
const old = alias ? getString(input.values, alias) : void 0;
|
|
517
|
+
if (direct !== void 0 && old !== void 0) throw usageError(`Use either --${canonical} or --${alias}, not both.`, { details: { command: config.command, usage: config.usage } });
|
|
518
|
+
return direct ?? old;
|
|
519
|
+
};
|
|
520
|
+
const rawWindow = read("window");
|
|
521
|
+
try {
|
|
522
|
+
const window = rawWindow === void 0 || rawWindow === "" ? void 0 : parseWindowIn(rawWindow, config.allowed ?? [], { fallback: config.allowed?.[0] ?? "", field: "window" });
|
|
523
|
+
const startDate = read("start");
|
|
524
|
+
const endDate = read("end");
|
|
525
|
+
if (rawWindow !== void 0 && (startDate !== void 0 || endDate !== void 0)) throw usageError("Use --window or --start/--end, not both.");
|
|
526
|
+
const dates = resolveDateRange({ startDate, endDate });
|
|
527
|
+
return { window, startDate: dates.startDate ?? void 0, endDate: dates.endDate ?? void 0 };
|
|
528
|
+
} catch (error) {
|
|
529
|
+
if (error instanceof AppError) throw usageError(error.message, { details: error.details });
|
|
530
|
+
throw error;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export {
|
|
535
|
+
getString,
|
|
536
|
+
getBoolean,
|
|
537
|
+
getStringArray,
|
|
538
|
+
requirePositional,
|
|
539
|
+
requireProject,
|
|
540
|
+
stringOption,
|
|
541
|
+
multiStringOption,
|
|
542
|
+
requireStringOption,
|
|
543
|
+
parseIntegerOption,
|
|
544
|
+
unknownSubcommand,
|
|
545
|
+
windowOptions,
|
|
546
|
+
readWindowOptions,
|
|
547
|
+
resolveCliAccess,
|
|
548
|
+
resolveCliAccessForInvocation,
|
|
549
|
+
emitJsonl
|
|
550
|
+
};
|