@purveyors/cli 0.36.0 → 0.36.2

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.
Files changed (54) hide show
  1. package/README.md +17 -17
  2. package/dist/commands/auth.d.ts.map +1 -1
  3. package/dist/commands/auth.js +6 -6
  4. package/dist/commands/auth.js.map +1 -1
  5. package/dist/commands/catalog.d.ts +3 -3
  6. package/dist/commands/catalog.d.ts.map +1 -1
  7. package/dist/commands/catalog.js +96 -105
  8. package/dist/commands/catalog.js.map +1 -1
  9. package/dist/commands/context.js +2 -2
  10. package/dist/commands/context.js.map +1 -1
  11. package/dist/commands/inventory.js +32 -32
  12. package/dist/commands/inventory.js.map +1 -1
  13. package/dist/commands/manifest.js +3 -3
  14. package/dist/commands/manifest.js.map +1 -1
  15. package/dist/commands/market.d.ts.map +1 -1
  16. package/dist/commands/market.js +24 -24
  17. package/dist/commands/market.js.map +1 -1
  18. package/dist/commands/price-index.d.ts.map +1 -1
  19. package/dist/commands/price-index.js +17 -17
  20. package/dist/commands/price-index.js.map +1 -1
  21. package/dist/commands/procurement.d.ts.map +1 -1
  22. package/dist/commands/procurement.js +3 -3
  23. package/dist/commands/procurement.js.map +1 -1
  24. package/dist/commands/reference-profile.d.ts.map +1 -1
  25. package/dist/commands/reference-profile.js +15 -15
  26. package/dist/commands/reference-profile.js.map +1 -1
  27. package/dist/commands/roast.d.ts.map +1 -1
  28. package/dist/commands/roast.js +50 -50
  29. package/dist/commands/roast.js.map +1 -1
  30. package/dist/commands/sales.js +21 -21
  31. package/dist/commands/sales.js.map +1 -1
  32. package/dist/commands/skill.d.ts.map +1 -1
  33. package/dist/commands/skill.js +7 -7
  34. package/dist/commands/skill.js.map +1 -1
  35. package/dist/commands/tasting.d.ts.map +1 -1
  36. package/dist/commands/tasting.js +16 -16
  37. package/dist/commands/tasting.js.map +1 -1
  38. package/dist/lib/agent-skill.d.ts.map +1 -1
  39. package/dist/lib/agent-skill.js +1 -5
  40. package/dist/lib/agent-skill.js.map +1 -1
  41. package/dist/lib/catalog.d.ts.map +1 -1
  42. package/dist/lib/catalog.js +11 -16
  43. package/dist/lib/catalog.js.map +1 -1
  44. package/dist/lib/manifest.d.ts.map +1 -1
  45. package/dist/lib/manifest.js +890 -364
  46. package/dist/lib/manifest.js.map +1 -1
  47. package/dist/lib/parchment.d.ts +5 -0
  48. package/dist/lib/parchment.d.ts.map +1 -1
  49. package/dist/lib/parchment.js +5 -1
  50. package/dist/lib/parchment.js.map +1 -1
  51. package/dist/program.d.ts.map +1 -1
  52. package/dist/program.js +66 -15
  53. package/dist/program.js.map +1 -1
  54. package/package.json +1 -1
package/README.md CHANGED
@@ -12,7 +12,7 @@ Use `purvey --help` for quick command discovery, `purvey context` for the dense
12
12
  - Package: `@purveyors/cli`
13
13
  - Runtime: Node.js 20+
14
14
  - No pre-existing credentials required: `auth`, `config`, `context`, `manifest`, `skill`
15
- - Viewer role required: `catalog` (excluding structured process filters on `catalog search`)
15
+ - Viewer role required: `catalog`, including structured process filters and `catalog similar`
16
16
  - Member role required: `procurement`, `inventory`, `roast`, `sales`, `tasting`
17
17
  - Mixed public and entitled access: `market` and `price-index` public teaser slices are unauthenticated; filtered, non-public, and evidence slices require a credential and, where entitled, Parchment Intelligence access
18
18
  - Preferred machine-readable contract: `purvey manifest`
@@ -76,7 +76,7 @@ purvey auth login
76
76
  # 2. Confirm the stored API key and role
77
77
  purvey auth status
78
78
 
79
- # 3. Search the catalog (viewer role for basic filters, member role for structured process filters)
79
+ # 3. Search the catalog (any signed-in account)
80
80
  purvey catalog search --origin "Ethiopia" --stocked --pretty
81
81
 
82
82
  # Example with structured process filters and proof output
@@ -148,8 +148,7 @@ No pre-existing credentials are required for `auth`, `config`, `context`, `manif
148
148
 
149
149
  Remote data commands require a valid owner-bound API key with the required scope:
150
150
 
151
- - `catalog` requires the `viewer` role by default
152
- - `catalog search` structured process filters require the `member` role
151
+ - `catalog` requires the `viewer` role, which any sign-in provides; Parchment decides access to structured process filters and `catalog similar`, and admits any API key with `catalog:read`
153
152
  - `market` has public teaser slices for `signals --summary`, unfiltered retail `stats`, and process/retail/month `metadata`; all filtered or non-public slices require Parchment Intelligence access enforced server-side
154
153
  - `market overview` requires any signed-in session or API key; `market evidence` requires Parchment Intelligence access
155
154
  - `price-index history` is public for windows up to 90 days; longer windows require Parchment Intelligence access
@@ -197,13 +196,15 @@ Credentials are stored at `~/.config/purvey/credentials.json`.
197
196
 
198
197
  ### Auth roles
199
198
 
200
- | Role | Access |
201
- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
202
- | `viewer` | `catalog search`, `catalog get`, `catalog stats`, excluding structured process filters |
203
- | `member` | All viewer commands, `catalog similar`, structured process filters on `catalog search`, plus `price-index`, `procurement`, `inventory`, `roast`, `sales`, and `tasting` through the scoped key created by `purvey auth login` |
199
+ | Role | Access |
200
+ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
201
+ | `viewer` | Every `catalog` command, including structured process filters on `catalog search` and `catalog similar` |
202
+ | `member` | All viewer commands, plus `price-index`, `procurement`, `inventory`, `roast`, `sales`, and `tasting` through the scoped key created by `purvey auth login` |
204
203
 
205
204
  The `reference-profile` commands also require Studio access; the API enforces this entitlement.
206
205
 
206
+ `catalog similar` needs a sign-in (`purvey auth login`) or any API key with `catalog:read`. The free Green API plan includes it within its monthly quota. Parchment decides access and the CLI maps its 401 and 403 responses to exit code 3 with Parchment's message.
207
+
207
208
  Market Index teaser slices are public. Filtered `market signals`, origin/process/wholesale `market stats`, non-public `market metadata`, `market evidence`, `price-index comparisons`, `price-index comparison`, and `price-index history` windows over 90 days require Parchment Intelligence access; API-key denial is enforced by the canonical API. The stored login key carries `catalog:read`, which is also the canonical read scope for Market Index, Price Index, and procurement.
208
209
 
209
210
  `auth`, `config`, `context`, `manifest`, and `skill` remain available without pre-existing credentials.
@@ -315,7 +316,7 @@ Notes:
315
316
  - `auth login --headless` prints the approval URL without trying to open a local browser. Approve it from any browser; nothing is pasted back.
316
317
  - `auth status --json` is the safest mode for scripts.
317
318
  - `auth status --csv` is supported for spreadsheet-style checks, but JSON remains the better integration format.
318
- - `auth whoami` prints Parchment's `GET /v1/me` response unchanged for the credential the CLI would send: roles, API plan, scopes, Price Index access, and capabilities such as `capabilities.profileStudio`. Like the rest of `auth`, it needs no existing credential; without one it prints Parchment's anonymous principal (`authenticated: false`).
319
+ - `auth whoami` prints Parchment's `GET /v1/me` response unchanged for the credential the CLI would send: roles, API plan, scopes, Price Index access, and capabilities such as `capabilities.profileStudio`. Like the rest of `auth`, it needs no existing credential; without one it prints a signed-out result (`authenticated: false`).
319
320
 
320
321
  ### catalog
321
322
 
@@ -356,7 +357,7 @@ Notes:
356
357
 
357
358
  `catalog similar <id>` options:
358
359
 
359
- - `--threshold <score>`; canonical similarity threshold `0.5` to `0.99`, default `0.70`
360
+ - `--threshold <score>`; canonical similarity threshold `0.5` to `0.99`, default `0.7`
360
361
  - `--limit <count>`; default `10`, max `25`
361
362
  - `--stocked-only`; request only currently stocked coffees
362
363
  - `--mode <all|likely_same|similar_profile>`; default `all`
@@ -426,8 +427,7 @@ purvey catalog get 1182 --include-proof --json
426
427
 
427
428
  Notes:
428
429
 
429
- - Catalog commands require an authenticated `viewer` role by default.
430
- - Structured process filters on `catalog search` require an authenticated `member` role.
430
+ - Catalog commands require an authenticated `viewer` role. Parchment decides access to structured process filters and admits any API key with `catalog:read`, including the key `purvey auth login` stores.
431
431
  - Structured process filters use the canonical `/v1/catalog` query contract names while preserving the legacy `--process` label filter.
432
432
  - `--supplier`, `--drying-method`, and `--flavor` pass through to the canonical `/v1/catalog` `supplier`, `dryingMethod`, and `flavorKeywords` parameters; Parchment applies them, not the CLI.
433
433
  - `--include-proof` is an opt-in API-backed catalog read. It consumes the canonical proof summary returned by `/v1/catalog?include=proof`; the CLI does not compute proof fields locally or duplicate web/API proof logic.
@@ -438,7 +438,7 @@ Notes:
438
438
  - Catalog intelligence responses include `meta.sample_limited`, `meta.sample_order`, `meta.truncated`, and rows-examined style metadata where relevant so agents can distinguish ranked samples from full supplier aggregates. Supplier aggregate responses also include `meta.rows_examined`.
439
439
  - Supplier aggregate commands summarize catalog row counts, stocked counts, Purveyor Score coverage, average score, average confidence, price range, origin/process coverage, and representative top coffees with score qualifiers.
440
440
  - `catalog similar` uses the beta canonical `/v1/catalog/{id}/similar` API contract, not the legacy direct RPC path.
441
- - `catalog similar --json` requires member access or a paid API tier and returns the grouped canonical response object: `data.target`, `data.groups.canonical_candidates`, `data.groups.similar_recommendations`, optional `data.matches`, and `meta`.
441
+ - `catalog similar --json` works with the `purvey auth login` key or any API key with `catalog:read`, on any API plan, and returns the grouped canonical response object: `data.target`, `data.groups.canonical_candidates`, `data.groups.similar_recommendations`, optional `data.matches`, and `meta`.
442
442
  - `canonical_candidates` are likely same-lot candidates; `similar_recommendations` are substitutes/profile matches and include blocker reasons when identity gates disagree.
443
443
  - The command preserves `classification_version`, `query_strategy`, score dimensions, proof summaries, pricing metadata, and classification/blocker details supplied by the API.
444
444
  - `catalog stats` returns aggregate catalog metrics, not your personal inventory metrics.
@@ -608,7 +608,7 @@ Notes:
608
608
  - `--catalog-id <id>`; the catalog lot to add
609
609
  - `--manual-name <name>`; name for a coffee that is not in the catalog (flag mode needs exactly one of `--catalog-id` or `--manual-name`)
610
610
  - `--qty <lbs>`; required in flag mode
611
- - `--cost <dollars>`
611
+ - `--cost <dollars>`; total amount paid for the beans, not the price per pound
612
612
  - `--tax-ship <dollars>`
613
613
  - `--notes <text>`
614
614
  - `--purchase-date <YYYY-MM-DD>`
@@ -631,7 +631,7 @@ Examples:
631
631
 
632
632
  ```bash
633
633
  purvey inventory list --stocked --pretty
634
- purvey inventory add --catalog-id 128 --qty 10 --cost 8.50
634
+ purvey inventory add --catalog-id 128 --qty 10 --cost 85.00
635
635
  purvey inventory add --manual-name "Farm-gate Ethiopia lot 7" --qty 12 --cost 96
636
636
  purvey inventory add --form
637
637
  purvey inventory update 7 --stocked false
@@ -1017,7 +1017,7 @@ const manifest = getCliManifest();
1017
1017
 
1018
1018
  ```bash
1019
1019
  purvey catalog search --origin "Ethiopia" --process "natural" --stocked --pretty
1020
- purvey inventory add --catalog-id 128 --qty 10 --cost 8.50
1020
+ purvey inventory add --catalog-id 128 --qty 10 --cost 85.00
1021
1021
  purvey roast import ~/artisan/guji-light.alog --coffee-id 7 --pretty
1022
1022
  purvey tasting rate 7 --aroma 5 --body 3 --acidity 5 --sweetness 4 --aftertaste 4
1023
1023
  purvey sales record --coffee-id 7 --batch-name "Ethiopia Guji Light" --oz 12 --price 22.00 --buyer "Jane Smith"
@@ -1081,7 +1081,7 @@ Use the right ID for the right command.
1081
1081
 
1082
1082
  - `PURVEYORS_BASE_URL`: override the Purveyors web base URL
1083
1083
  - `PURVEYORS_API_KEY`: explicit API-key override for canonical Parchment commands
1084
- - `PARCHMENT_API_KEY`: preferred API-key variable for SDK-backed Parchment commands; also accepted for API-backed proof and paid-tier similarity paths
1084
+ - `PARCHMENT_API_KEY`: preferred API-key variable for SDK-backed Parchment commands; also accepted for API-backed proof and API-key similarity requests
1085
1085
  - `PARCHMENT_API_BASE_URL`: override the SDK-backed Parchment API base URL, including `market`, `price-index`, `procurement`, `reference-profile`, and roast auto-classification requests
1086
1086
  - `PURVEY_DEBUG`: enable verbose error output
1087
1087
 
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAS7E,OAAO,KAAK,EAAiB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAK1E,KAAK,aAAa,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;AAEtD,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,a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AC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAChD,KAAK,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC,0BAA0B,CAAC,EAAE,MAAM,IAAI,CAAC;CACzC;AAWD,4DAA4D;AAC5D,wBAAgB,cAAc,IAAI;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAIxE;AAUD,uFAAuF;AACvF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAS1D;AAuFD,wFAAwF;AACxF,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAiBxE;AAeD;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAiGhG;AAiFD,wBAAgB,gBAAgB,IAAI,OAAO,CAoG1C"}
@@ -303,7 +303,7 @@ export function buildAuthCommand() {
303
303
  auth
304
304
  .command('login')
305
305
  .description('Log in to purveyors.io')
306
- .option('--headless', 'Print the approval URL without opening a browser')
306
+ .option('--headless')
307
307
  .action(async (opts) => login(Boolean(opts.headless)))
308
308
  .addHelpText('after', `
309
309
  Examples:
@@ -323,8 +323,8 @@ Notes:
323
323
  auth
324
324
  .command('status')
325
325
  .description('Show current authentication status')
326
- .option('--pretty', 'Pretty-print JSON output')
327
- .option('--csv', 'Output as CSV')
326
+ .option('--pretty')
327
+ .option('--csv')
328
328
  .addHelpText('after', `
329
329
  Examples:
330
330
  purvey auth status # human-readable in terminal, JSON when piped
@@ -348,18 +348,18 @@ Notes:
348
348
  .action(statusAction);
349
349
  auth
350
350
  .command('whoami')
351
- .description('Show the canonical identity, plan, scopes, and capabilities for the active credential')
351
+ .description('Show the identity, plan, scopes, and capabilities of the active credential')
352
352
  .addHelpText('after', `
353
353
  Examples:
354
354
  purvey auth whoami --pretty
355
355
  purvey auth whoami | jq '.capabilities.profileStudio'
356
356
 
357
357
  Notes:
358
- Prints Parchment's GET /v1/me response unchanged: authenticated, userId, appRoles,
358
+ Prints your account details unchanged: authenticated, userId, appRoles,
359
359
  primaryAppRole, apiPlan, ppiAccess, apiScopes, and capabilities (for example
360
360
  capabilities.profileStudio for Studio reference-profile access).
361
361
  Uses PARCHMENT_API_KEY or PURVEYORS_API_KEY when set, otherwise the key stored by
362
- 'purvey auth login'. With no credential it prints Parchment's anonymous principal
362
+ 'purvey auth login'. With no credential it prints a signed-out result
363
363
  (authenticated: false). Use 'purvey auth status' for a local check.
364
364
  `)
365
365
  .action(withErrorHandling(async (_, cmd) => {
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAwB,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qB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Stats };
6
6
  /**
7
7
  * `purvey catalog` — Browse the coffee catalog.
8
- * Requires an authenticated viewer session. Structured process filters on
9
- * `catalog search` require member access under the current session-authenticated
10
- * CLI path.
8
+ * Requires an authenticated viewer session or an API key. Parchment decides
9
+ * access to structured process filters and similarity; the CLI does not pre-check
10
+ * roles for them.
11
11
  */
12
12
  export declare function buildCatalogCommand(): Command;
13
13
  //# sourceMappingURL=catalog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/commands/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAYL,mBAAmB,EACnB,mBAAmB,EAOpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAoB,MAAM,mBAAmB,CAAC;AAUrF,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;AAkEpD;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAisB7C"}
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/commands/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAYL,mBAAmB,EACnB,mBAAmB,EAOpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAoB,MAAM,mBAAmB,CAAC;AAUrF,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;AAkEpD;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CA4pB7C"}
@@ -47,9 +47,9 @@ function parseNonNegativeIntegerArg(rawValue, message) {
47
47
  // ─── Command builder ──────────────────────────────────────────────────────────
48
48
  /**
49
49
  * `purvey catalog` — Browse the coffee catalog.
50
- * Requires an authenticated viewer session. Structured process filters on
51
- * `catalog search` require member access under the current session-authenticated
52
- * CLI path.
50
+ * Requires an authenticated viewer session or an API key. Parchment decides
51
+ * access to structured process filters and similarity; the CLI does not pre-check
52
+ * roles for them.
53
53
  */
54
54
  export function buildCatalogCommand() {
55
55
  const catalog = new Command('catalog').description('Browse the coffee catalog');
@@ -57,27 +57,27 @@ export function buildCatalogCommand() {
57
57
  catalog
58
58
  .command('search')
59
59
  .description('Search coffees by origin, process, price, or catalog metadata')
60
- .option('--origin <origin>', 'Filter by origin (country, continent, or region)')
61
- .option('--process <method>', 'Filter by processing method (e.g. natural, washed)')
62
- .option('--processing-base-method <method>', 'Filter by canonical process base method')
63
- .option('--fermentation-type <type>', 'Filter by structured fermentation type')
64
- .option('--process-additive <additive>', 'Filter by disclosed process additive')
65
- .option('--processing-disclosure-level <level>', 'Filter by process disclosure level')
66
- .option('--processing-confidence-min <n>', 'Minimum process metadata confidence (0-1)')
67
- .option('--price-min <n>', 'Minimum price per lb (USD)')
68
- .option('--price-max <n>', 'Maximum price per lb (USD)')
69
- .option('--name <text>', 'Filter by coffee name (partial match, case-insensitive)')
70
- .option('--ids <n,n,...>', 'Fetch specific catalog IDs (comma-separated, ignores limit)')
71
- .option('--variety <text>', 'Filter by coffee variety/cultivar (partial match)')
72
- .option('--stocked-days <n>', 'Only show coffees stocked within N days')
73
- .option('--supplier <name>', 'Filter by supplier/source name (partial match)')
74
- .option('--drying-method <method>', 'Filter by drying method (matched by Parchment)')
75
- .option('--flavor <keywords>', 'Comma-separated flavor keywords; matches any keyword')
76
- .option('--stocked', 'Only show currently stocked coffees')
77
- .option('--sort <field>', `Sort results by: ${catalogSortFields.join(', ')}`)
78
- .option('--offset <n>', 'Skip N results (for pagination)', '0')
79
- .option('--limit <n>', `Maximum results to return (${CLI_NUMERIC_BOUNDS.catalogSearchLimit.minimum}-${CLI_NUMERIC_BOUNDS.catalogSearchLimit.maximum})`, '10')
80
- .option('--include-proof', 'Request canonical catalog proof summaries from /v1/catalog')
60
+ .option('--origin <origin>')
61
+ .option('--process <method>')
62
+ .option('--processing-base-method <method>')
63
+ .option('--fermentation-type <type>')
64
+ .option('--process-additive <additive>')
65
+ .option('--processing-disclosure-level <level>')
66
+ .option('--processing-confidence-min <n>')
67
+ .option('--price-min <n>')
68
+ .option('--price-max <n>')
69
+ .option('--name <text>')
70
+ .option('--ids <n,n,...>')
71
+ .option('--variety <text>')
72
+ .option('--stocked-days <n>')
73
+ .option('--supplier <name>')
74
+ .option('--drying-method <method>')
75
+ .option('--flavor <keywords>')
76
+ .option('--stocked')
77
+ .option('--sort <field>')
78
+ .option('--offset <n>', '', '0')
79
+ .option('--limit <n>', '', '10')
80
+ .option('--include-proof')
81
81
  .addHelpText('after', `
82
82
  Examples:
83
83
  purvey catalog search --origin "Ethiopia" --pretty
@@ -106,23 +106,17 @@ Sort fields:
106
106
  Notes:
107
107
  All filters are optional. Without flags, returns up to --limit results.
108
108
  --origin accepts partial matches (e.g. "Ethiopia" matches "Ethiopia Guji").
109
- Structured process filters map to canonical /v1/catalog query names.
110
- --process remains the legacy broad processing-label filter.
111
- --processing-base-method, --fermentation-type, --process-additive,
112
- --processing-disclosure-level, and --processing-confidence-min require member
113
- access under the current session-authenticated CLI path.
109
+ --process matches the broad processing label.
114
110
  --processing-base-method, --fermentation-type, --process-additive, and
115
111
  --processing-disclosure-level require exact structured metadata matches.
116
112
  --processing-confidence-min accepts a decimal from 0 to 1.
117
113
  --variety filters on cultivar_detail (partial match, case-insensitive).
118
114
  --stocked-days N shows only coffees stocked within the last N days.
119
- --supplier, --drying-method, and --flavor map to the canonical /v1/catalog
120
- supplier, dryingMethod, and flavorKeywords parameters; Parchment applies them.
121
115
  --ids fetches specific catalog items by ID, ignoring --limit and --offset.
122
116
  --offset + --limit enables pagination through large result sets.
123
- --include-proof uses the canonical /v1/catalog?include=proof response and does
124
- not compute proof fields locally in the CLI.
125
- Requires an authenticated viewer session.
117
+ --include-proof adds a proof summary to each coffee; without it the output shape
118
+ is unchanged.
119
+ Requires a sign-in ('purvey auth login') or an API key with catalog:read.
126
120
  `)
127
121
  .action(withErrorHandling(async (opts, cmd) => {
128
122
  const globalOpts = cmd.optsWithGlobals();
@@ -208,7 +202,7 @@ Notes:
208
202
  catalog
209
203
  .command('get <id>')
210
204
  .description('Fetch a single coffee by ID')
211
- .option('--include-proof', 'Request the canonical catalog proof summary from /v1/catalog')
205
+ .option('--include-proof')
212
206
  .addHelpText('after', `
213
207
  Examples:
214
208
  purvey catalog get 128 --pretty
@@ -217,15 +211,14 @@ Examples:
217
211
  purvey catalog get 77 --csv
218
212
 
219
213
  Notes:
220
- <id> is the coffee_catalog.catalog_id (integer).
214
+ <id> is the catalog ID (integer).
221
215
  Use 'purvey catalog search' to find IDs.
222
- --include-proof uses the canonical /v1/catalog?include=proof response and does
223
- not compute proof fields locally in the CLI.
224
- Requires an authenticated viewer session.
216
+ --include-proof adds the coffee's proof summary.
217
+ Requires a sign-in ('purvey auth login') or an API key with catalog:read.
225
218
  `)
226
219
  .action(withErrorHandling(async (id, opts, cmd) => {
227
220
  const globalOpts = cmd.optsWithGlobals();
228
- const catalogId = parseInt4IdArg(id, `Invalid ID: "${id}". Please provide a numeric coffee_catalog ID.`);
221
+ const catalogId = parseInt4IdArg(id, `Invalid ID: "${id}". Please provide a numeric catalog ID.`);
229
222
  const includeProof = opts.includeProof ? true : undefined;
230
223
  const data = await getCatalog(catalogId, {
231
224
  includeProof,
@@ -245,7 +238,7 @@ Examples:
245
238
  Notes:
246
239
  Returns aggregated data: total count, average price, unique origins,
247
240
  processing method breakdown, and stocked count.
248
- Requires an authenticated viewer session.
241
+ Requires a sign-in ('purvey auth login') or an API key with catalog:read.
249
242
  `)
250
243
  .action(withErrorHandling(async (_opts, cmd) => {
251
244
  const globalOpts = cmd.optsWithGlobals();
@@ -256,7 +249,7 @@ Notes:
256
249
  catalog
257
250
  .command('facets [field]')
258
251
  .description('List counted catalog facet values for filter discovery')
259
- .option('--all', 'Use all visible catalog rows instead of default stocked-only scope')
252
+ .option('--all')
260
253
  .addHelpText('after', `
261
254
  Examples:
262
255
  purvey catalog facets supplier --pretty
@@ -267,12 +260,12 @@ Fields:
267
260
  supplier, country, processing_base_method, fermentation_type, drying_method, grade, wholesale
268
261
 
269
262
  Notes:
270
- Without a field, prints the canonical /v1/catalog/facets envelope (values, facets, meta) unchanged.
271
- With a field, prints { field, facet, data, meta }: that facet's counted values and Parchment's meta.
272
- Counts are computed by Parchment after visibility and entitlement filters; counts for
273
- multi-valued dimensions can overlap, so do not sum them.
263
+ Without a field, prints every facet with its counted values and meta (values, facets, meta).
264
+ With a field, prints { field, facet, data, meta }: that facet's counted values and meta.
265
+ Counts include only coffees you can see; counts for multi-valued dimensions can
266
+ overlap, so do not sum them.
274
267
  By default only currently stocked catalog rows are included; use --all for all visible rows.
275
- Requires an authenticated viewer session.
268
+ Requires a sign-in ('purvey auth login') or an API key with catalog:read.
276
269
  `)
277
270
  .action(withErrorHandling(async (field, opts, cmd) => {
278
271
  const globalOpts = cmd.optsWithGlobals();
@@ -293,18 +286,18 @@ Notes:
293
286
  // ── catalog rank ─────────────────────────────────────────────────────────
294
287
  catalog
295
288
  .command('rank')
296
- .description('Rank catalog candidates by a deterministic objective')
297
- .option('--objective <objective>', `Ranking objective: ${catalogRankObjectives.join(', ')}`, 'premium')
298
- .option('--supplier <name>', 'Filter by supplier/source name')
299
- .option('--country <country>', 'Filter by country')
300
- .option('--process <method>', 'Filter by processing method')
301
- .option('--stocked', 'Only include currently stocked coffees')
302
- .option('--all', 'Use all visible catalog rows instead of default stocked-only scope')
303
- .option('--price-max <n>', 'Maximum price per lb (USD)')
304
- .option('--min-score <n>', 'Minimum Purveyor Score')
305
- .option('--non-wholesale-only', 'Exclude wholesale listings before sampling')
306
- .option('--sample-size <n>', 'Rows to sample before ranking (1-5000)', '5000')
307
- .option('--limit <n>', 'Maximum ranked coffees to return (1-50)', '10')
289
+ .description('Rank catalog coffees for a goal: premium, value, fresh arrivals, or rare origins')
290
+ .option('--objective <objective>', '', 'premium')
291
+ .option('--supplier <name>')
292
+ .option('--country <country>')
293
+ .option('--process <method>')
294
+ .option('--stocked')
295
+ .option('--all')
296
+ .option('--price-max <n>')
297
+ .option('--min-score <n>')
298
+ .option('--non-wholesale-only')
299
+ .option('--sample-size <n>', '', '5000')
300
+ .option('--limit <n>', '', '10')
308
301
  .addHelpText('after', `
309
302
  Examples:
310
303
  purvey catalog rank --objective premium --stocked --limit 10 --pretty
@@ -314,10 +307,10 @@ Examples:
314
307
 
315
308
  Notes:
316
309
  Objectives: premium, value, fresh_arrival, rare_origin.
317
- Uses coffee_catalog.purveyor_score as the canonical quality signal.
310
+ Uses the Purveyor Score as the quality signal.
318
311
  Generic ranking samples catalog rows ordered by id before deterministic ranking;
319
312
  meta.stocked_only/scope, sample_size, and truncated describe that scope, which matters for rare_origin.
320
- Requires an authenticated viewer session.
313
+ Requires a sign-in ('purvey auth login') or an API key with catalog:read.
321
314
  `)
322
315
  .action(withErrorHandling(async (opts, cmd) => {
323
316
  const globalOpts = cmd.optsWithGlobals();
@@ -348,24 +341,23 @@ Notes:
348
341
  catalog
349
342
  .command('rank-premium')
350
343
  .description('Rank premium catalog candidates by Purveyor Score')
351
- .option('--origin <origin>', 'Filter by origin (country, continent, or region)')
352
- .option('--process <method>', 'Filter by processing method')
353
- .option('--stocked', 'Only include currently stocked coffees')
354
- .option('--price-max <n>', 'Maximum price per lb (USD)')
355
- .option('--min-score <n>', 'Minimum Purveyor Score')
356
- .option('--include-unscored', 'Allow unscored rows to appear after scored rows')
357
- .option('--sample-size <n>', 'Rows to sample before ranking (1-5000)', '250')
358
- .option('--limit <n>', 'Maximum ranked coffees to return (1-50)', '10')
344
+ .option('--origin <origin>')
345
+ .option('--process <method>')
346
+ .option('--stocked')
347
+ .option('--price-max <n>')
348
+ .option('--min-score <n>')
349
+ .option('--include-unscored')
350
+ .option('--sample-size <n>', '', '250')
351
+ .option('--limit <n>', '', '10')
359
352
  .addHelpText('after', `
360
353
  Examples:
361
354
  purvey catalog rank-premium --stocked --limit 10 --pretty
362
355
  purvey catalog rank-premium --origin Ethiopia --min-score 88 --json
363
356
 
364
357
  Notes:
365
- Ranks by coffee_catalog.score_value, exposed as purveyor_score in output.
366
- The CLI does not recompute the upstream score model; it preserves the score field
367
- and adds transparent ranking signals for agents.
368
- Requires an authenticated viewer session.
358
+ Ranks by Purveyor Score (purveyor_score in output) and adds transparent ranking
359
+ signals for agents.
360
+ Requires a sign-in ('purvey auth login') or an API key with catalog:read.
369
361
  `)
370
362
  .action(withErrorHandling(async (opts, cmd) => {
371
363
  const globalOpts = cmd.optsWithGlobals();
@@ -389,12 +381,12 @@ Notes:
389
381
  // ── catalog supplier aggregates ──────────────────────────────────────────
390
382
  catalog
391
383
  .command('supplier-list')
392
- .description('List supplier aggregates from catalog rows')
393
- .option('--country <country>', 'Filter by country')
394
- .option('--stocked', 'Only include currently stocked coffees')
395
- .option('--non-wholesale-only', 'Exclude wholesale listings before aggregation')
396
- .option('--sample-size <n>', 'Catalog rows to fetch per page before aggregation (1-5000)', '5000')
397
- .option('--limit <n>', 'Maximum suppliers to return (1-100)', '25')
384
+ .description('Summarize suppliers from the catalog coffees they list')
385
+ .option('--country <country>')
386
+ .option('--stocked')
387
+ .option('--non-wholesale-only')
388
+ .option('--sample-size <n>', '', '5000')
389
+ .option('--limit <n>', '', '25')
398
390
  .addHelpText('after', `
399
391
  Examples:
400
392
  purvey catalog supplier-list --stocked --pretty
@@ -404,7 +396,7 @@ Examples:
404
396
  Notes:
405
397
  Aggregates supplier count, stocked count, Purveyor Score coverage, average score,
406
398
  price range, origin coverage, process coverage, and representative top coffees.
407
- Requires an authenticated viewer session.
399
+ Requires a sign-in ('purvey auth login') or an API key with catalog:read.
408
400
  `)
409
401
  .action(withErrorHandling(async (opts, cmd) => {
410
402
  const globalOpts = cmd.optsWithGlobals();
@@ -421,11 +413,11 @@ Notes:
421
413
  catalog
422
414
  .command('supplier-detail <supplier>')
423
415
  .description('Show aggregate detail for a supplier query')
424
- .option('--country <country>', 'Filter by country')
425
- .option('--stocked', 'Only include currently stocked coffees')
426
- .option('--non-wholesale-only', 'Exclude wholesale listings before aggregation')
427
- .option('--top-coffees <n>', 'Representative top coffees to include (1-25)', '5')
428
- .option('--sample-size <n>', 'Catalog rows to fetch per page before aggregation (1-5000)', '5000')
416
+ .option('--country <country>')
417
+ .option('--stocked')
418
+ .option('--non-wholesale-only')
419
+ .option('--top-coffees <n>', '', '5')
420
+ .option('--sample-size <n>', '', '5000')
429
421
  .addHelpText('after', `
430
422
  Examples:
431
423
  purvey catalog supplier-detail "Royal Coffee" --pretty
@@ -433,7 +425,7 @@ Examples:
433
425
 
434
426
  Notes:
435
427
  Supplier matching is case-insensitive and partial, mirroring catalog search.
436
- Requires an authenticated viewer session.
428
+ Requires a sign-in ('purvey auth login') or an API key with catalog:read.
437
429
  `)
438
430
  .action(withErrorHandling(async (supplier, opts, cmd) => {
439
431
  const globalOpts = cmd.optsWithGlobals();
@@ -451,12 +443,12 @@ Notes:
451
443
  catalog
452
444
  .command('supplier-rank')
453
445
  .description('Rank suppliers by average Purveyor Score and stocked coverage')
454
- .option('--country <country>', 'Filter by country')
455
- .option('--stocked', 'Only include currently stocked coffees')
456
- .option('--non-wholesale-only', 'Exclude wholesale listings before aggregation')
457
- .option('--min-coffees <n>', `Minimum catalog rows required per supplier (${CLI_NUMERIC_BOUNDS.supplierMinCoffees.minimum}-${CLI_NUMERIC_BOUNDS.supplierMinCoffees.maximum})`, '1')
458
- .option('--sample-size <n>', 'Catalog rows to fetch per page before aggregation (1-5000)', '5000')
459
- .option('--limit <n>', 'Maximum suppliers to return (1-100)', '25')
446
+ .option('--country <country>')
447
+ .option('--stocked')
448
+ .option('--non-wholesale-only')
449
+ .option('--min-coffees <n>', '', '1')
450
+ .option('--sample-size <n>', '', '5000')
451
+ .option('--limit <n>', '', '25')
460
452
  .addHelpText('after', `
461
453
  Examples:
462
454
  purvey catalog supplier-rank --stocked --min-coffees 3 --pretty
@@ -464,7 +456,7 @@ Examples:
464
456
 
465
457
  Notes:
466
458
  Ranks suppliers by average Purveyor Score, then currently stocked count.
467
- Requires an authenticated viewer session.
459
+ Requires a sign-in ('purvey auth login') or an API key with catalog:read.
468
460
  `)
469
461
  .action(withErrorHandling(async (opts, cmd) => {
470
462
  const globalOpts = cmd.optsWithGlobals();
@@ -482,11 +474,11 @@ Notes:
482
474
  // ── catalog similar <id> ──────────────────────────────────────────────────
483
475
  catalog
484
476
  .command('similar <id>')
485
- .description('Find canonical candidates and similar recommendations for a catalog coffee')
486
- .option('--threshold <score>', 'Minimum canonical similarity threshold (0.5-0.99)', '0.70')
487
- .option('--limit <count>', 'Max results (1-25)', '10')
488
- .option('--stocked-only', 'Only show currently stocked beans')
489
- .option('--mode <mode>', `Filter canonical groups by mode: ${catalogSimilarityModes.join(', ')}`, 'all')
477
+ .description('Beta: find likely same-lot candidates and similar coffees for a catalog coffee')
478
+ .option('--threshold <score>', '', '0.7')
479
+ .option('--limit <count>', '', '10')
480
+ .option('--stocked-only')
481
+ .option('--mode <mode>', '', 'all')
490
482
  .addHelpText('after', `
491
483
  Examples:
492
484
  purvey catalog similar 1182
@@ -495,20 +487,19 @@ Examples:
495
487
  purvey catalog similar 1182 --json | jq '.data.groups.similar_recommendations[0].match.classification.blockers'
496
488
 
497
489
  Notes:
498
- Uses the beta canonical /v1/catalog/{id}/similar contract.
499
- JSON output is the canonical grouped response object, not the legacy flat RPC array.
490
+ Results are beta candidates to review, not confirmed matches.
491
+ JSON output groups matches under data.target and data.groups.
500
492
  data.groups.canonical_candidates are likely same-lot candidates.
501
493
  data.groups.similar_recommendations are useful substitutes or profile matches.
502
494
  Blockers, proof summaries, score dimensions, classification_version,
503
- query_strategy, and pricing metadata are preserved when supplied by the API.
504
- --threshold controls sensitivity (higher = more strict match, 0.5-0.99).
505
- --mode can be all, likely_same, or similar_profile.
495
+ query_strategy, and pricing metadata are kept as returned.
506
496
  Default output is compact JSON. Use --pretty for formatted JSON.
507
- Requires an authenticated member session, or a paid PARCHMENT_API_KEY/PURVEYORS_API_KEY.
497
+ Needs a sign-in ('purvey auth login') or any API key with catalog:read. The free
498
+ Green API plan includes it within its monthly quota.
508
499
  `)
509
500
  .action(withErrorHandling(async (id, opts, cmd) => {
510
501
  const globalOpts = cmd.optsWithGlobals();
511
- const coffeeId = parseInt4IdArg(id, `Invalid ID: "${id}". Please provide a numeric coffee_catalog ID.`);
502
+ const coffeeId = parseInt4IdArg(id, `Invalid ID: "${id}". Please provide a numeric catalog ID.`);
512
503
  const threshold = parseFiniteNumberArg(opts.threshold, `Invalid --threshold: "${opts.threshold}". Must be a number between 0 and 1.`);
513
504
  const limit = parseBoundedPositiveIntegerArg(opts.limit, '--limit', 1, 25);
514
505
  if (threshold < 0.5 || threshold > 0.99) {