@letterstory/cli 0.177.174 → 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 +1 -1
- package/lib/commands/visits.mjs +2 -14
- 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;
|
package/lib/commands/visits.mjs
CHANGED
|
@@ -25,7 +25,6 @@
|
|
|
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>
|
|
@@ -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" ||
|
|
@@ -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"));
|