@letterstory/cli 0.177.151 → 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.151";
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,7 @@ 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",
105
106
  "as-test",
106
107
  "discover",
107
108
  // visits transact add folder|page|connection: leave it out of the set (a connection: switch it off).
@@ -2139,6 +2140,7 @@ Visits (Visitors: AI agents reading your site, and AI answers sending people to
2139
2140
  One pull request: the line for agents, and answers to what they asked
2140
2141
  visits transact source <source-id>|--folder <path> | remove <id> | tests | test "<question>" [--discover]
2141
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]
2142
2144
  visits transact asks [--since 7d] [--limit <n>] What agents asked, answered, and asks per agent visit
2143
2145
 
2144
2146
  Sim (Simulations: a free, simulated copy of your API for agents, and what they did with it):
@@ -161,6 +161,12 @@ export const ARGS = {
161
161
  ask_id: { positional: 0, label: "ask id", required: true },
162
162
  is_test: { flag: "as-test", type: "bool" },
163
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
+ },
164
170
  visitors_list_transact_tests: { site_id: "site" },
165
171
  visitors_test_transact: {
166
172
  discovery: { flag: "discover", type: "bool" },
@@ -208,6 +214,9 @@ export async function cmdVisits(ctx) {
208
214
  case "list":
209
215
  case "ls":
210
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;
211
220
  case "citations":
212
221
  return visitsCitations(rest);
213
222
  case "people":
@@ -242,7 +251,7 @@ export async function cmdVisits(ctx) {
242
251
  return visitsTransact(rest);
243
252
  default:
244
253
  throw new CliError(
245
- "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]"
246
255
  );
247
256
  }
248
257
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.151",
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",