@letterstory/cli 0.177.173 → 0.177.175
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/visits.mjs +4 -16
- 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.175";
|
|
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;
|
|
@@ -2226,7 +2226,7 @@ Refs (Visual Refs: other companies' brands to design something new after, apart
|
|
|
2226
2226
|
Every brand's direction for it, as one file
|
|
2227
2227
|
refs brief-show <brief-id> The brief, once ready
|
|
2228
2228
|
|
|
2229
|
-
|
|
2229
|
+
Evidence (what signed-in people do in your own app):
|
|
2230
2230
|
usage proofs [--id <id>] Read saved proof analysis
|
|
2231
2231
|
usage proof-audit [--id <run>] [--org-id <org>] Passed/not-passed suggestion history
|
|
2232
2232
|
usage find-proofs --since <ISO> --until <ISO> [--focus <text>] Analyze actions
|
package/lib/commands/visits.mjs
CHANGED
|
@@ -25,14 +25,13 @@
|
|
|
25
25
|
// letterstory visits transact [on|off] [--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
|
-
// letterstory visits transact pr [--repo owner/name] [--base branch] the line and the missed answers, as one pull request
|
|
29
28
|
// letterstory visits transact source <source-id> | --folder /docs | --section /blog
|
|
30
29
|
// letterstory visits transact search "sso" the knowledge base and the site's pages, as an ask searches them
|
|
31
30
|
// letterstory visits transact remove <source-id>
|
|
32
31
|
// letterstory visits transact test "What does it cost?"
|
|
33
32
|
// letterstory visits transact asks [--since 7d] [--limit 50]
|
|
34
33
|
// letterstory visits transact learnings [--since 7d]
|
|
35
|
-
// letterstory visits transact site [publish|unpublish] [--domain ask.acme.com | --domain none] [--remove <slug>] the
|
|
34
|
+
// letterstory visits transact site [publish|unpublish] [--domain ask.acme.com | --domain none] [--remove <slug>] the Agent Site tab
|
|
36
35
|
|
|
37
36
|
import { CliError } from "../client.mjs";
|
|
38
37
|
import { flagStr, printResult, argsFromFlags } from "./shared.mjs";
|
|
@@ -185,13 +184,6 @@ export const ARGS = {
|
|
|
185
184
|
site_id: "site",
|
|
186
185
|
source_id: { positional: 0, label: "source id", required: true },
|
|
187
186
|
},
|
|
188
|
-
visitors_open_transact_pr: {
|
|
189
|
-
site_id: "site",
|
|
190
|
-
host: "host",
|
|
191
|
-
repo: "repo",
|
|
192
|
-
base_branch: "base",
|
|
193
|
-
update: { flag: "update", type: "bool" },
|
|
194
|
-
},
|
|
195
187
|
visitors_list_transact_asks: { site_id: "site", days, limit: { flag: "limit", type: "num" } },
|
|
196
188
|
visitors_get_transact_learnings: { site_id: "site", days },
|
|
197
189
|
visitors_get_agent_site: { site_id: "site" },
|
|
@@ -378,7 +370,7 @@ function transactLines(t) {
|
|
|
378
370
|
return lines;
|
|
379
371
|
}
|
|
380
372
|
|
|
381
|
-
/** `visits transact`: read it; `on` / `off`; `add <kind> …`; `source <id>`; `search "…"`; `remove <id>`; `test "…"`; `
|
|
373
|
+
/** `visits transact`: read it; `on` / `off`; `add <kind> …`; `source <id>`; `search "…"`; `remove <id>`; `test "…"`; `asks`; `learnings`; `site`. */
|
|
382
374
|
async function visitsTransact(ctx) {
|
|
383
375
|
const { flags, io } = ctx;
|
|
384
376
|
const sub = ctx.positionals[0];
|
|
@@ -448,10 +440,6 @@ async function visitsTransact(ctx) {
|
|
|
448
440
|
);
|
|
449
441
|
return 0;
|
|
450
442
|
}
|
|
451
|
-
if (sub === "pr") {
|
|
452
|
-
printResult(io, flags, await call(rest, "visitors_open_transact_pr"));
|
|
453
|
-
return 0;
|
|
454
|
-
}
|
|
455
443
|
if (sub === "site") {
|
|
456
444
|
const write =
|
|
457
445
|
rest.positionals[0] === "publish" ||
|
|
@@ -460,7 +448,7 @@ async function visitsTransact(ctx) {
|
|
|
460
448
|
flags.remove !== undefined;
|
|
461
449
|
const result = await call(rest, write ? "visitors_set_agent_site" : "visitors_get_agent_site");
|
|
462
450
|
printResult(io, flags, result, (r) => {
|
|
463
|
-
if (!r.available) return "Agent
|
|
451
|
+
if (!r.available) return "Agent Sites aren't available yet";
|
|
464
452
|
if (!r.published) return "Not published";
|
|
465
453
|
const lines = [`Staging: ${r.staging_url}`];
|
|
466
454
|
if (r.domain) {
|
|
@@ -505,7 +493,7 @@ async function visitsTransact(ctx) {
|
|
|
505
493
|
}
|
|
506
494
|
if (sub !== undefined)
|
|
507
495
|
throw new CliError(
|
|
508
|
-
"Usage: visits transact [on|off|add <kind>|source <id>|search <query>|remove <id>|test|
|
|
496
|
+
"Usage: visits transact [on|off|add <kind>|source <id>|search <query>|remove <id>|test|asks|learnings]"
|
|
509
497
|
);
|
|
510
498
|
const result = await call(ctx, "visitors_get_transact");
|
|
511
499
|
printResult(io, flags, result, (t) => transactLines(t).join("\n"));
|