@letterstory/cli 0.177.191 → 0.177.193
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/lib/cli.mjs +2 -2
- package/lib/commands/usage.mjs +3 -1
- package/lib/commands/visits.mjs +8 -9
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
94
94
|
|
|
95
95
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
96
|
-
export const VERSION = "0.177.
|
|
96
|
+
export const VERSION = "0.177.193";
|
|
97
97
|
|
|
98
98
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
99
99
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -2158,7 +2158,7 @@ Visits (Visitors: AI agents reading your site, and AI answers sending people to
|
|
|
2158
2158
|
visits health --site <id> Staff: how far to trust a site's numbers, each check and its fix
|
|
2159
2159
|
visits connect vercel|cloudflare [--site <id>] Send the host's request logs (no code to deploy)
|
|
2160
2160
|
visits connectors | disconnect <id> The site's host connectors
|
|
2161
|
-
visits transact [
|
|
2161
|
+
visits transact [--site <id>|--host <h>] Transact: cited public corpus answers with website fallback
|
|
2162
2162
|
visits transact add folder <path> | page <url> | site <url>
|
|
2163
2163
|
visits transact add text --title "Question?" --text "Public answer" [--ask <id>]
|
|
2164
2164
|
Publish a reviewed public answer
|
package/lib/commands/usage.mjs
CHANGED
|
@@ -91,6 +91,7 @@ export const ARGS = {
|
|
|
91
91
|
prompt: { positional: 0, required: true, label: "prompt" },
|
|
92
92
|
},
|
|
93
93
|
calculate_evidence_snapshot: { id: { positional: 0, required: true, label: "draft id" } },
|
|
94
|
+
discard_evidence_snapshot: { id: { positional: 0, required: true, label: "draft id" } },
|
|
94
95
|
publish_evidence_snapshot: {
|
|
95
96
|
website: { flag: "share-website", type: "bool" },
|
|
96
97
|
agent_site_id: { flag: "agent-site" },
|
|
@@ -431,10 +432,11 @@ export async function cmdUsage(ctx) {
|
|
|
431
432
|
list: "list_evidence_snapshots",
|
|
432
433
|
draft: "draft_evidence_snapshot",
|
|
433
434
|
calculate: "calculate_evidence_snapshot",
|
|
435
|
+
discard: "discard_evidence_snapshot",
|
|
434
436
|
publish: "publish_evidence_snapshot",
|
|
435
437
|
share: "publish_evidence_snapshot",
|
|
436
438
|
}[ctx.positionals[1] || "list"];
|
|
437
|
-
if (!tool) throw new CliError("Use evidence list, draft, calculate or publish");
|
|
439
|
+
if (!tool) throw new CliError("Use evidence list, draft, calculate, discard or publish");
|
|
438
440
|
printResult(io, flags, await client.callTool(tool, argsFromFlags(ARGS[tool], flags, ctx.positionals.slice(2))));
|
|
439
441
|
return 0;
|
|
440
442
|
}
|
package/lib/commands/visits.mjs
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
// letterstory visits connect vercel|cloudflare send the host's request logs (no code to deploy)
|
|
23
23
|
// letterstory visits connectors | disconnect <id>
|
|
24
24
|
// letterstory visits shortcut [mod+e | default] your own key for Letter Edit's card (⌘L by default)
|
|
25
|
-
// letterstory visits transact [
|
|
25
|
+
// letterstory visits transact [--host acme.com] Transact: agents' questions answered from your sources, cited
|
|
26
26
|
// letterstory visits transact add folder /answers | page <url> | site https://docs.acme.com/answers
|
|
27
27
|
// letterstory visits transact add text --text "Knowledge agents should know" [--title "Question?"] [--ask <id>]
|
|
28
28
|
// letterstory visits transact add text --prompt "Add our documentation at https://docs.acme.com/"
|
|
@@ -147,9 +147,8 @@ export const ARGS = {
|
|
|
147
147
|
},
|
|
148
148
|
visitors_set_modules: {
|
|
149
149
|
site_id: "site",
|
|
150
|
-
agent_visitors: { internal: "visits
|
|
151
|
-
editor: { internal: "visits
|
|
152
|
-
transact: { value: (flags, positionals) => ({ on: true, off: false })[positionals[0]] },
|
|
150
|
+
agent_visitors: { internal: "no visits command switches the AI-agent module yet" },
|
|
151
|
+
editor: { internal: "no visits command switches Letter Edit yet" },
|
|
153
152
|
},
|
|
154
153
|
visitors_get_transact: { site_id: "site", host: "host" },
|
|
155
154
|
visitors_add_transact_source: {
|
|
@@ -428,7 +427,7 @@ async function visitsDisconnect(ctx) {
|
|
|
428
427
|
|
|
429
428
|
/** Transact on a site, as the CLI prints it: its state and URL, the folders, then everything else chosen. */
|
|
430
429
|
function transactLines(t) {
|
|
431
|
-
const state = { off: "off
|
|
430
|
+
const state = { off: "off, until the Agent Site is live on the site's own address", on: "on" }[t.state] ?? t.state;
|
|
432
431
|
const lines = [`Transact: ${state}`];
|
|
433
432
|
if (t.url) lines.push(` ${t.url}`, ` MCP ${t.mcp_url}`);
|
|
434
433
|
lines.push("", `Public website fallback: ${t.website?.read ?? t.read} pages read`, "", "Answer corpus:");
|
|
@@ -443,10 +442,10 @@ async function visitsTransact(ctx) {
|
|
|
443
442
|
const { flags, io } = ctx;
|
|
444
443
|
const sub = ctx.positionals[0];
|
|
445
444
|
const rest = { ...ctx, positionals: ctx.positionals.slice(1) };
|
|
445
|
+
// Answering has no switch of its own (2026-11-30): it follows the Agent Site, live on the site's own address.
|
|
446
446
|
if (sub === "on" || sub === "off") {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
return 0;
|
|
447
|
+
io.error("Answering follows the Agent Site: visits transact site --domain agents.acme.com (or --domain none)");
|
|
448
|
+
return 1;
|
|
450
449
|
}
|
|
451
450
|
if (sub === "add") {
|
|
452
451
|
const result = await call(rest, "visitors_add_transact_source");
|
|
@@ -572,7 +571,7 @@ async function visitsTransact(ctx) {
|
|
|
572
571
|
}
|
|
573
572
|
if (sub !== undefined)
|
|
574
573
|
throw new CliError(
|
|
575
|
-
"Usage: visits transact [
|
|
574
|
+
"Usage: visits transact [add <kind>|source <id>|search <query>|remove <id>|test|asks|learnings]"
|
|
576
575
|
);
|
|
577
576
|
const result = await call(ctx, "visitors_get_transact");
|
|
578
577
|
printResult(io, flags, result, (t) => transactLines(t).join("\n"));
|