@letterstory/cli 0.177.150 → 0.177.152

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 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.150";
96
+ export const VERSION = "0.177.152";
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;
@@ -102,6 +102,8 @@ export const EXIT_PAYMENT_REQUIRED = 3;
102
102
  // can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
103
103
  // `negate` spelling) in a command's ARGS map must be listed; boolean-flags.test.ts enforces it.
104
104
  export const BOOLEAN_FLAGS = new Set([
105
+ "include-tests",
106
+ "as-test",
105
107
  "discover",
106
108
  // visits transact add folder|page|connection: leave it out of the set (a connection: switch it off).
107
109
  "uncheck",
@@ -2137,6 +2139,8 @@ Visits (Visitors: AI agents reading your site, and AI answers sending people to
2137
2139
  visits transact pr [--repo owner/name] [--base <branch>] [--site <id>|--host <h>]
2138
2140
  One pull request: the line for agents, and answers to what they asked
2139
2141
  visits transact source <source-id>|--folder <path> | remove <id> | tests | test "<question>" [--discover]
2142
+ visits transact mark-ask <ask-id> --as-test|--as-test=false [--site <id>]
2143
+ visits requests [--site <id>] [--limit 50] [--before <cursor>] [--include-tests]
2140
2144
  visits transact asks [--since 7d] [--limit <n>] What agents asked, answered, and asks per agent visit
2141
2145
 
2142
2146
  Sim (Simulations: a free, simulated copy of your API for agents, and what they did with it):
@@ -156,6 +156,17 @@ export const ARGS = {
156
156
  folder: "folder",
157
157
  limit: { flag: "limit", type: "num" },
158
158
  },
159
+ visitors_set_transact_ask_test: {
160
+ site_id: "site",
161
+ ask_id: { positional: 0, label: "ask id", required: true },
162
+ is_test: { flag: "as-test", type: "bool" },
163
+ },
164
+ visitors_list_agent_requests: {
165
+ site_id: "site",
166
+ limit: { flag: "limit", type: "num" },
167
+ before: "before",
168
+ include_tests: { flag: "include-tests", type: "bool" },
169
+ },
159
170
  visitors_list_transact_tests: { site_id: "site" },
160
171
  visitors_test_transact: {
161
172
  discovery: { flag: "discover", type: "bool" },
@@ -203,6 +214,9 @@ export async function cmdVisits(ctx) {
203
214
  case "list":
204
215
  case "ls":
205
216
  return visitsList(sub === undefined ? ctx : rest);
217
+ case "requests":
218
+ printResult(ctx.io, ctx.flags, await call(rest, "visitors_list_agent_requests"));
219
+ return 0;
206
220
  case "citations":
207
221
  return visitsCitations(rest);
208
222
  case "people":
@@ -237,7 +251,7 @@ export async function cmdVisits(ctx) {
237
251
  return visitsTransact(rest);
238
252
  default:
239
253
  throw new CliError(
240
- "Usage: visits [list|citations|people|who|compare|export|sites|domain|pages|health|connect|connectors|disconnect|shortcut|transact]"
254
+ "Usage: visits [list|requests|citations|people|who|compare|export|sites|domain|pages|health|connect|connectors|disconnect|shortcut|transact]"
241
255
  );
242
256
  }
243
257
  }
@@ -384,6 +398,10 @@ async function visitsTransact(ctx) {
384
398
  printResult(io, flags, result, () => "Removed");
385
399
  return 0;
386
400
  }
401
+ if (sub === "mark-ask") {
402
+ printResult(io, flags, await call(rest, "visitors_set_transact_ask_test"));
403
+ return 0;
404
+ }
387
405
  if (sub === "tests") {
388
406
  printResult(io, flags, await call(rest, "visitors_list_transact_tests"));
389
407
  return 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.150",
3
+ "version": "0.177.152",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",