@letterstory/cli 0.61.2 → 0.63.1
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/README.md +6 -0
- package/lib/cli.mjs +6 -5
- package/lib/commands/admin.mjs +6 -14
- package/lib/commands/insights.mjs +10 -3
- package/lib/commands/posts.mjs +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -144,6 +144,7 @@ letterstory phantom domain connect <phantom-id> myblog.com # attach one you
|
|
|
144
144
|
letterstory posts list [--limit <n>] [--collection <uuid>]
|
|
145
145
|
letterstory posts show <article-id>
|
|
146
146
|
letterstory posts new --title "…" --collection <uuid> --body "…" [--article-id <uuid>] # or --file <path|->; --article-id updates that article instead of creating one
|
|
147
|
+
letterstory posts new --title "…" --collection <uuid> --body "…" --context "Internal data from 120 accounts: disputes fell 38%." # your own data: stated in the post with your attribution
|
|
147
148
|
letterstory posts publish <article-id>
|
|
148
149
|
letterstory posts unpublish <article-id>
|
|
149
150
|
letterstory posts delete --id <uuid> [--id <uuid> ...] # permanent; content, history, and any published copy are all removed
|
|
@@ -725,6 +726,11 @@ letterstory insights top [--period 14d|30d|90d] [--collection <uuid>] [--limit <
|
|
|
725
726
|
AI visibility and page access — the Measure tabs' reads, for scripts and agents:
|
|
726
727
|
|
|
727
728
|
```bash
|
|
729
|
+
# The Measure Overview: how often AI answers name you and cite your pages (rates
|
|
730
|
+
# with 95% intervals and gated trends), share of voice, search for your site and
|
|
731
|
+
# the phantom network kept apart, and each ranking target's standing.
|
|
732
|
+
letterstory insights summary [--period 14d|30d|90d]
|
|
733
|
+
|
|
728
734
|
# The AI Visibility Bank: which questions named you, cited your pages, or both (a
|
|
729
735
|
# breakthrough). All time unless --period; --source picks the phantom network
|
|
730
736
|
# (default), your marketing site, or the whole portfolio; --phantom narrows to
|
package/lib/cli.mjs
CHANGED
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
} from "./commands.mjs";
|
|
56
56
|
|
|
57
57
|
// Keep in sync with cli/package.json.
|
|
58
|
-
export const VERSION = "0.
|
|
58
|
+
export const VERSION = "0.63.1";
|
|
59
59
|
|
|
60
60
|
// Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
|
|
61
61
|
// can't accidentally swallow the id as --json's value.
|
|
@@ -240,7 +240,7 @@ Phantomstory (a collection Letterstory hosts as an independent publication):
|
|
|
240
240
|
Content:
|
|
241
241
|
posts list [--limit <n>] [--collection <uuid>] List your articles
|
|
242
242
|
posts show <article-id> Show one article
|
|
243
|
-
posts new --title <t> --collection <uuid> (--body <text> | --file <path|->) [--article-id <uuid>]
|
|
243
|
+
posts new --title <t> --collection <uuid> (--body <text> | --file <path|->) [--article-id <uuid>] [--context <text>]
|
|
244
244
|
posts publish <article-id> Publish an article
|
|
245
245
|
posts unpublish <article-id> Unpublish an article
|
|
246
246
|
posts delete --id <uuid> [--id <uuid> ...] Permanently delete article(s)
|
|
@@ -615,9 +615,9 @@ Admin (STAFF key — --staff-key / LETTERSTORY_STAFF_API_KEY; acts before an org
|
|
|
615
615
|
admin tuning-context [--q "<question>"] The experiment agent's context pack (JSON):
|
|
616
616
|
the pipeline as deployed, levers, measures,
|
|
617
617
|
goals, related history.
|
|
618
|
-
admin tuning
|
|
619
|
-
|
|
620
|
-
|
|
618
|
+
admin tuning pipeline [--primitive write|research|shred|enhance|chain] [--refresh]
|
|
619
|
+
One primitive's stages as deployed, the
|
|
620
|
+
registry the Pipeline tab draws (JSON).
|
|
621
621
|
admin tuning <sub> … The console's loop over a staff key: kernels,
|
|
622
622
|
candidate, compare, comparisons, picks, pick,
|
|
623
623
|
reading-list, pair, side-by-side, promote,
|
|
@@ -862,6 +862,7 @@ Mail:
|
|
|
862
862
|
mail postal-address "<address>" Set the org's CAN-SPAM mailing address (email footers)
|
|
863
863
|
|
|
864
864
|
Insights:
|
|
865
|
+
insights summary [--period 14d|30d|90d] Measure Overview: AI named/cited rates, share of voice, search, targets
|
|
865
866
|
insights site [--period 14d|30d|90d] [--collection <uuid>]
|
|
866
867
|
insights post <article-id> [--period 14d|30d|90d]
|
|
867
868
|
insights top [--period 14d|30d|90d] [--collection <uuid>] [--limit <n>] [--sort clicks|impressions]
|
package/lib/commands/admin.mjs
CHANGED
|
@@ -420,7 +420,7 @@ async function cmdAdminTuningContext(ctx) {
|
|
|
420
420
|
* and promotion from the ledger (docs/architecture/tuning-foundation.md): the headless half of the
|
|
421
421
|
* tuning console's Write › Kernels and Compare tabs. Needs `tuning:experiment` on the key.
|
|
422
422
|
*
|
|
423
|
-
* admin tuning
|
|
423
|
+
* admin tuning pipeline [--primitive write|research|shred|enhance|chain] [--refresh] one primitive's stages as deployed (JSON)
|
|
424
424
|
* admin tuning kernels every catalog kernel, live version, writer, candidates
|
|
425
425
|
* admin tuning kernel <service-kernel-id> [--version N|live] one version's file (JSON)
|
|
426
426
|
* admin tuning candidate <service-kernel-id> --file f.json [--note "…"] save a file as a candidate version
|
|
@@ -530,19 +530,11 @@ async function cmdAdminTuning(ctx) {
|
|
|
530
530
|
const json = flagBool(flags.json);
|
|
531
531
|
const T = "/api/superadmin/tuning";
|
|
532
532
|
switch (sub) {
|
|
533
|
-
case "
|
|
534
|
-
const
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
lines.push(`read blind ${c.read}/${c.target} ${c.primitive.padEnd(8)} ${c.title} ${c.id}`);
|
|
539
|
-
for (const e of d.to_decide) lines.push(`decide ${e.status.padEnd(9)} ${e.question} ${e.id}`);
|
|
540
|
-
for (const e of d.to_promote) lines.push(`promote ship ${e.question} ${e.id}`);
|
|
541
|
-
if (d.flags_open) lines.push(`flags ${d.flags_open} corpus flags open`);
|
|
542
|
-
if (d.findings_overdue)
|
|
543
|
-
lines.push(`triage ${d.findings_overdue} shipped patterns past their due date`);
|
|
544
|
-
for (const err of d.errors ?? []) lines.push(`(could not read: ${err})`);
|
|
545
|
-
return io.log(lines.join("\n") || "Nothing waits on a person.");
|
|
533
|
+
case "pipeline": {
|
|
534
|
+
const primitive = flagStr(flags.primitive) ?? "write";
|
|
535
|
+
const q = new URLSearchParams({ primitive });
|
|
536
|
+
if (flagBool(flags.refresh)) q.set("refresh", "1");
|
|
537
|
+
return printResult(io, { ...flags, json: true }, await staffRequest(ctx, "GET", `${T}/pipeline?${q}`));
|
|
546
538
|
}
|
|
547
539
|
case "kernels": {
|
|
548
540
|
const r = await staffRequest(ctx, "GET", `${T}/kernel-files`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// `insights` — Search Console impressions/clicks across the phantom network, at the
|
|
2
2
|
// network, single-post, and top-posts levels (ported from phantomstory-cli's
|
|
3
|
-
// insights.ts); plus Measure's AI Visibility Bank (`bank`)
|
|
4
|
-
// Access (`access`) — the same reads the web app's Measure tabs render.
|
|
3
|
+
// insights.ts); plus Measure's Overview (`summary`), AI Visibility Bank (`bank`)
|
|
4
|
+
// and phantom Page Access (`access`) — the same reads the web app's Measure tabs render.
|
|
5
5
|
|
|
6
6
|
import { CliError } from "../client.mjs";
|
|
7
7
|
import { flagStr, flagNum, requirePositional, printResult, compact, argsFromFlags } from "./shared.mjs";
|
|
@@ -19,6 +19,9 @@ export const ARGS = {
|
|
|
19
19
|
period: { flag: "period", enum: PERIODS },
|
|
20
20
|
collection_id: { flag: "collection" },
|
|
21
21
|
},
|
|
22
|
+
get_measure_summary: {
|
|
23
|
+
period: { flag: "period", enum: PERIODS },
|
|
24
|
+
},
|
|
22
25
|
};
|
|
23
26
|
|
|
24
27
|
export async function cmdInsights(ctx) {
|
|
@@ -35,8 +38,12 @@ export async function cmdInsights(ctx) {
|
|
|
35
38
|
return call(rest, "get_ai_visibility_bank");
|
|
36
39
|
case "access":
|
|
37
40
|
return call(rest, "get_page_access");
|
|
41
|
+
case "summary":
|
|
42
|
+
return call(rest, "get_measure_summary");
|
|
38
43
|
default:
|
|
39
|
-
throw new CliError(
|
|
44
|
+
throw new CliError(
|
|
45
|
+
`Unknown insights subcommand: ${sub ?? "(none)"}. Try: summary, site, post, top, bank, access`
|
|
46
|
+
);
|
|
40
47
|
}
|
|
41
48
|
}
|
|
42
49
|
|
package/lib/commands/posts.mjs
CHANGED
|
@@ -73,7 +73,9 @@ async function postsNew(ctx) {
|
|
|
73
73
|
const body = readBodyInput(flags);
|
|
74
74
|
if (!body) throw new CliError("Provide --body or --file <path>.");
|
|
75
75
|
const articleId = flagStr(flags["article-id"]);
|
|
76
|
-
|
|
76
|
+
// Steering and/or your own data: figures in it are stated in the post with your attribution.
|
|
77
|
+
const context = flagStr(flags.context);
|
|
78
|
+
const args = compact({ title, body, collection_id: collection, article_id: articleId, context });
|
|
77
79
|
const result = await client.callTool("ingest_article", args);
|
|
78
80
|
ok(ctx, articleId ? `Updated "${title}".` : `Created draft "${title}".`);
|
|
79
81
|
printResult(io, flags, result);
|