@purveyors/cli 0.35.1 → 0.36.1

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 (49) hide show
  1. package/README.md +51 -12
  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.map +1 -1
  6. package/dist/commands/catalog.js +84 -89
  7. package/dist/commands/catalog.js.map +1 -1
  8. package/dist/commands/context.js +2 -2
  9. package/dist/commands/context.js.map +1 -1
  10. package/dist/commands/inventory.js +32 -32
  11. package/dist/commands/inventory.js.map +1 -1
  12. package/dist/commands/manifest.js +3 -3
  13. package/dist/commands/manifest.js.map +1 -1
  14. package/dist/commands/market.d.ts.map +1 -1
  15. package/dist/commands/market.js +24 -24
  16. package/dist/commands/market.js.map +1 -1
  17. package/dist/commands/price-index.d.ts.map +1 -1
  18. package/dist/commands/price-index.js +17 -17
  19. package/dist/commands/price-index.js.map +1 -1
  20. package/dist/commands/procurement.d.ts.map +1 -1
  21. package/dist/commands/procurement.js +2 -2
  22. package/dist/commands/procurement.js.map +1 -1
  23. package/dist/commands/reference-profile.d.ts.map +1 -1
  24. package/dist/commands/reference-profile.js +15 -15
  25. package/dist/commands/reference-profile.js.map +1 -1
  26. package/dist/commands/roast.d.ts.map +1 -1
  27. package/dist/commands/roast.js +50 -50
  28. package/dist/commands/roast.js.map +1 -1
  29. package/dist/commands/sales.js +21 -21
  30. package/dist/commands/sales.js.map +1 -1
  31. package/dist/commands/skill.d.ts +3 -0
  32. package/dist/commands/skill.d.ts.map +1 -0
  33. package/dist/commands/skill.js +145 -0
  34. package/dist/commands/skill.js.map +1 -0
  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 +110 -0
  39. package/dist/lib/agent-skill.d.ts.map +1 -0
  40. package/dist/lib/agent-skill.js +611 -0
  41. package/dist/lib/agent-skill.js.map +1 -0
  42. package/dist/lib/manifest.d.ts +2 -0
  43. package/dist/lib/manifest.d.ts.map +1 -1
  44. package/dist/lib/manifest.js +992 -351
  45. package/dist/lib/manifest.js.map +1 -1
  46. package/dist/program.d.ts.map +1 -1
  47. package/dist/program.js +68 -12
  48. package/dist/program.js.map +1 -1
  49. package/package.json +1 -1
package/README.md CHANGED
@@ -11,7 +11,7 @@ Use `purvey --help` for quick command discovery, `purvey context` for the dense
11
11
  - Official binary: `purvey`
12
12
  - Package: `@purveyors/cli`
13
13
  - Runtime: Node.js 20+
14
- - No pre-existing credentials required: `auth`, `config`, `context`, `manifest`
14
+ - No pre-existing credentials required: `auth`, `config`, `context`, `manifest`, `skill`
15
15
  - Viewer role required: `catalog` (excluding structured process filters on `catalog search`)
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
@@ -19,6 +19,7 @@ Use `purvey --help` for quick command discovery, `purvey context` for the dense
19
19
  - Dense human-readable reference: `purvey context`
20
20
  - Compatibility JSON alias: `purvey context --json`
21
21
  - In-process machine contract: `@purveyors/cli/manifest`
22
+ - Agent instructions generated from the manifest: `purvey skill print`, `purvey skill install`
22
23
 
23
24
  ## Installation
24
25
 
@@ -105,6 +106,7 @@ Use the right reference surface for the job:
105
106
  - `purvey context` is the dense human-readable operator reference for reviewers and interactive use.
106
107
  - `purvey context --json` and `purvey context --pretty` emit the same JSON payload as `purvey manifest`, but exist mainly for compatibility with tooling that already shells out to `context`.
107
108
  - `@purveyors/cli/manifest` exposes the same contract in-process for Node.js and agent runtimes.
109
+ - `purvey skill print` renders an agent skill from the manifest: a compact SKILL.md plus workflows.md with the step-by-step workflows. `purvey skill install` puts it where Claude Code, Codex, or Cursor will load it, or adds a short block to a repository AGENTS.md.
108
110
 
109
111
  Manifest commands carry `sdkMethods`, the `@purveyors/sdk` operations whose canonical endpoints
110
112
  they consume, and, for writes, `confirmedActionEquivalents`, the Purveyors web assistant's
@@ -142,7 +144,7 @@ Export discipline:
142
144
 
143
145
  ## Authentication and access model
144
146
 
145
- No pre-existing credentials are required for `auth`, `config`, `context`, or `manifest`.
147
+ No pre-existing credentials are required for `auth`, `config`, `context`, `manifest`, or `skill`.
146
148
 
147
149
  Remote data commands require a valid owner-bound API key with the required scope:
148
150
 
@@ -202,9 +204,11 @@ Credentials are stored at `~/.config/purvey/credentials.json`.
202
204
 
203
205
  The `reference-profile` commands also require Studio access; the API enforces this entitlement.
204
206
 
207
+ `catalog similar` checks for member access when it uses the key stored by `purvey auth login`. An API key in `PURVEYORS_API_KEY` or `PARCHMENT_API_KEY` works on any API plan when it has the `catalog:read` scope.
208
+
205
209
  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.
206
210
 
207
- `auth`, `config`, `context`, and `manifest` remain available without pre-existing credentials.
211
+ `auth`, `config`, `context`, `manifest`, and `skill` remain available without pre-existing credentials.
208
212
 
209
213
  Commands that require a higher role exit with code `3` on auth failure. That includes missing, revoked, or invalid credentials and an insufficient role.
210
214
 
@@ -354,7 +358,7 @@ Notes:
354
358
 
355
359
  `catalog similar <id>` options:
356
360
 
357
- - `--threshold <score>`; canonical similarity threshold `0.5` to `0.99`, default `0.70`
361
+ - `--threshold <score>`; canonical similarity threshold `0.5` to `0.99`, default `0.7`
358
362
  - `--limit <count>`; default `10`, max `25`
359
363
  - `--stocked-only`; request only currently stocked coffees
360
364
  - `--mode <all|likely_same|similar_profile>`; default `all`
@@ -436,7 +440,7 @@ Notes:
436
440
  - 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`.
437
441
  - 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.
438
442
  - `catalog similar` uses the beta canonical `/v1/catalog/{id}/similar` API contract, not the legacy direct RPC path.
439
- - `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`.
443
+ - `catalog similar --json` requires member access with the `purvey auth login` key, or an 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`.
440
444
  - `canonical_candidates` are likely same-lot candidates; `similar_recommendations` are substitutes/profile matches and include blocker reasons when identity gates disagree.
441
445
  - The command preserves `classification_version`, `query_strategy`, score dimensions, proof summaries, pricing metadata, and classification/blocker details supplied by the API.
442
446
  - `catalog stats` returns aggregate catalog metrics, not your personal inventory metrics.
@@ -606,7 +610,7 @@ Notes:
606
610
  - `--catalog-id <id>`; the catalog lot to add
607
611
  - `--manual-name <name>`; name for a coffee that is not in the catalog (flag mode needs exactly one of `--catalog-id` or `--manual-name`)
608
612
  - `--qty <lbs>`; required in flag mode
609
- - `--cost <dollars>`
613
+ - `--cost <dollars>`; total amount paid for the beans, not the price per pound
610
614
  - `--tax-ship <dollars>`
611
615
  - `--notes <text>`
612
616
  - `--purchase-date <YYYY-MM-DD>`
@@ -629,7 +633,7 @@ Examples:
629
633
 
630
634
  ```bash
631
635
  purvey inventory list --stocked --pretty
632
- purvey inventory add --catalog-id 128 --qty 10 --cost 8.50
636
+ purvey inventory add --catalog-id 128 --qty 10 --cost 85.00
633
637
  purvey inventory add --manual-name "Farm-gate Ethiopia lot 7" --qty 12 --cost 96
634
638
  purvey inventory add --form
635
639
  purvey inventory update 7 --stocked false
@@ -964,6 +968,39 @@ Notes:
964
968
  - Use `purvey manifest` for new automation and treat `purvey context --json` as a compatibility alias.
965
969
  - `--csv` is not supported.
966
970
 
971
+ ### skill
972
+
973
+ - `purvey skill print [--file SKILL.md|workflows.md|all]`
974
+ - `purvey skill print --agents-md`
975
+ - `purvey skill install --target <claude|agents|agents-md> [--scope user|project] [--force] [--dry-run] [--link-claude-md]`
976
+
977
+ The skill is a folder in the open [Agent Skills](https://agentskills.io/specification) format, rendered from `purvey manifest` so it changes only when the CLI contract changes:
978
+
979
+ - `SKILL.md` loads whenever the skill triggers. It covers when to use `purvey`, headless sign-in, output and exit codes, the ID map, an index of workflows, and working rules, and points to `purvey manifest` for everything else.
980
+ - `workflows.md` holds the step-by-step command sequence for each manifest workflow. `SKILL.md` links to it and tells the agent to read it before a multi-step task, so it is loaded only when needed ([Claude Code](https://code.claude.com/docs/en/skills#add-supporting-files), [Agent Skills](https://agentskills.io/specification#progressive-disclosure)).
981
+
982
+ `skill print` writes `SKILL.md` to stdout; `--file workflows.md` prints the other file. `--json` or `--pretty` wraps one file as `{ name, file, cliVersion, bytes, content }`, and `--file all --json` prints both as `{ name, cliVersion, files: [{ file, bytes, content }] }`. `--agents-md` prints a shorter block for a repository's AGENTS.md instead.
983
+
984
+ `skill install` writes the same content to a location an agent loads:
985
+
986
+ | Target | User scope (default) | Project scope (`--scope project`) | Loaded by |
987
+ | ----------- | -------------------------------------------------------------- | ------------------------------------------------- | --------------------------------------------------------------- |
988
+ | `claude` | `SKILL.md` and `workflows.md` in `~/.claude/skills/purveyors/` | the same files in `.claude/skills/purveyors/` | Claude Code |
989
+ | `agents` | `SKILL.md` and `workflows.md` in `~/.agents/skills/purveyors/` | the same files in `.agents/skills/purveyors/` | Codex, Cursor, and other Agent Skills clients (not Claude Code) |
990
+ | `agents-md` | n/a | one block in `AGENTS.md` in the current directory | Codex and Cursor; Claude Code only as described below |
991
+
992
+ Notes:
993
+
994
+ - No credentials or network access are needed.
995
+ - Prints `{ target, scope, path, action, written, dryRun, cliVersion, bytes }` as JSON; `action` is `create`, `update`, `unchanged`, `append`, or `overwrite`.
996
+ - `claude` and `agents` also print `files: [{ file, path, action, written, bytes }]`, one entry per file. The top-level `path` is `SKILL.md`, `action` is the most significant file action (`overwrite`, then `update`, `create`, `unchanged`), `written` is true when any file changed, and `bytes` is the total.
997
+ - Re-running is safe. Identical files are left alone, an unedited file from an earlier CLI version is updated in place, and a missing `workflows.md` is created, so a `SKILL.md`-only install from an earlier version upgrades cleanly. Rerun after upgrading the CLI.
998
+ - Each file is checked on its own. A file with local edits, or one `purvey` did not write, is refused with exit code `6` unless you pass `--force`; the refusal names every such file and writes nothing. `--dry-run` reports the paths and actions without writing.
999
+ - `agents-md` adds one marked block to `AGENTS.md` (creating the file if needed) and leaves the rest of the file untouched.
1000
+ - Claude Code loads skills only from `.claude/skills`, so use `--target claude` for it. It does not read `.agents/`.
1001
+ - Claude Code reads `AGENTS.md` only as a fallback: when a `CLAUDE.md`, `.claude/CLAUDE.md`, or `CLAUDE.local.md` exists in the current directory or any directory above it, it reads those instead, unless one imports `@AGENTS.md` ([Claude Code docs](https://code.claude.com/docs/en/memory#agents-md)). `agents-md` reports this as `claudeCode: { visible, via, reason, claudeMdFiles }` in its JSON output and prints a warning on stderr when Claude Code will not see the block. It does not change your `CLAUDE.md` unless you ask.
1002
+ - `--link-claude-md` (with `agents-md`) adds that import: one `@AGENTS.md` line appended to `./CLAUDE.md` (or `@../AGENTS.md` to `./.claude/CLAUDE.md`), creating `./CLAUDE.md` if neither exists. It is a no-op when Claude Code already sees the block, honors `--dry-run`, and never edits `CLAUDE.local.md` or a parent directory's `CLAUDE.md`. `claudeCode.link` reports `{ path, action, written }`, where `action` is `create`, `append`, `unchanged`, or `not-needed`.
1003
+
967
1004
  ### In-process manifest export
968
1005
 
969
1006
  - `@purveyors/cli/manifest`
@@ -982,7 +1019,7 @@ const manifest = getCliManifest();
982
1019
 
983
1020
  ```bash
984
1021
  purvey catalog search --origin "Ethiopia" --process "natural" --stocked --pretty
985
- purvey inventory add --catalog-id 128 --qty 10 --cost 8.50
1022
+ purvey inventory add --catalog-id 128 --qty 10 --cost 85.00
986
1023
  purvey roast import ~/artisan/guji-light.alog --coffee-id 7 --pretty
987
1024
  purvey tasting rate 7 --aroma 5 --body 3 --acidity 5 --sweetness 4 --aftertaste 4
988
1025
  purvey sales record --coffee-id 7 --batch-name "Ethiopia Guji Light" --oz 12 --price 22.00 --buyer "Jane Smith"
@@ -1046,7 +1083,7 @@ Use the right ID for the right command.
1046
1083
 
1047
1084
  - `PURVEYORS_BASE_URL`: override the Purveyors web base URL
1048
1085
  - `PURVEYORS_API_KEY`: explicit API-key override for canonical Parchment commands
1049
- - `PARCHMENT_API_KEY`: preferred API-key variable for SDK-backed Parchment commands; also accepted for API-backed proof and paid-tier similarity paths
1086
+ - `PARCHMENT_API_KEY`: preferred API-key variable for SDK-backed Parchment commands; also accepted for API-backed proof and API-key similarity requests
1050
1087
  - `PARCHMENT_API_BASE_URL`: override the SDK-backed Parchment API base URL, including `market`, `price-index`, `procurement`, `reference-profile`, and roast auto-classification requests
1051
1088
  - `PURVEY_DEBUG`: enable verbose error output
1052
1089
 
@@ -1055,11 +1092,13 @@ Use the right ID for the right command.
1055
1092
  Recommended bootstrap order:
1056
1093
 
1057
1094
  ```bash
1058
- purvey manifest
1059
- purvey context
1095
+ purvey skill install --target claude # Claude Code; Codex and Cursor: --target agents
1060
1096
  purvey auth login --headless
1097
+ purvey manifest
1061
1098
  ```
1062
1099
 
1100
+ The installed skill gives a coding agent the sign-in flow, output contract, and ID map up front, the step-by-step workflows in `workflows.md` when a task needs them, and `purvey manifest` for the full contract.
1101
+
1063
1102
  Use `purvey manifest` as the authoritative machine-readable entry point. Keep `purvey context` for dense operator context, or use `purvey context --json` only when you need compatibility with an existing wrapper.
1064
1103
 
1065
1104
  Why this CLI works well for agents:
@@ -1105,7 +1144,7 @@ Use the [ID reference](#id-reference) section above. `catalog_id` and inventory
1105
1144
 
1106
1145
  **Pagination only shows the first page**
1107
1146
 
1108
- All list commands default to 20 results. Use `--limit` and `--offset`.
1147
+ Only `catalog search` (default 10 results), `inventory list`, `roast list`, and `sales list` (default 20) page with `--limit` and `--offset`.
1109
1148
 
1110
1149
  ```bash
1111
1150
  purvey inventory list --limit 20 --offset 0
@@ -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,aAAa,CAAC;IACvB,WAAW,CAAC,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,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AiBxE;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 the anonymous principal
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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SACD,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,4EAA4E,CAAC;SACzF,WAAW,CACV,OAAO,EACP;;;;;;;;;;;;CAYL,CACI;SACA,MAAM,CACL,iBAAiB,CAAC,KAAK,EAAE,CAAU,EAAE,GAAY,EAAE,EAAE;QACnD,MAAM,IAAI,GAAG,GAAG,CAAC,eAAe,EAAmB,CAAC;QACpD,UAAU,CAAC,MAAM,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC,CAAC,CACH,CAAC;IAEJ,IAAI;SACD,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,0BAA0B,CAAC;SACvC,WAAW,CACV,OAAO,EACP;;;;;;;CAOL,CACI;SACA,MAAM,CAAC,YAAY,CAAC,CAAC;IAExB,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -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,CAgqB7C"}
@@ -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,22 +106,19 @@ 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.
109
+ --process matches the broad processing label.
111
110
  --processing-base-method, --fermentation-type, --process-additive,
112
111
  --processing-disclosure-level, and --processing-confidence-min require member
113
- access under the current session-authenticated CLI path.
112
+ access.
114
113
  --processing-base-method, --fermentation-type, --process-additive, and
115
114
  --processing-disclosure-level require exact structured metadata matches.
116
115
  --processing-confidence-min accepts a decimal from 0 to 1.
117
116
  --variety filters on cultivar_detail (partial match, case-insensitive).
118
117
  --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
118
  --ids fetches specific catalog items by ID, ignoring --limit and --offset.
122
119
  --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.
120
+ --include-proof adds a proof summary to each coffee; without it the output shape
121
+ is unchanged.
125
122
  Requires an authenticated viewer session.
126
123
  `)
127
124
  .action(withErrorHandling(async (opts, cmd) => {
@@ -208,7 +205,7 @@ Notes:
208
205
  catalog
209
206
  .command('get <id>')
210
207
  .description('Fetch a single coffee by ID')
211
- .option('--include-proof', 'Request the canonical catalog proof summary from /v1/catalog')
208
+ .option('--include-proof')
212
209
  .addHelpText('after', `
213
210
  Examples:
214
211
  purvey catalog get 128 --pretty
@@ -217,15 +214,14 @@ Examples:
217
214
  purvey catalog get 77 --csv
218
215
 
219
216
  Notes:
220
- <id> is the coffee_catalog.catalog_id (integer).
217
+ <id> is the catalog ID (integer).
221
218
  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.
219
+ --include-proof adds the coffee's proof summary.
224
220
  Requires an authenticated viewer session.
225
221
  `)
226
222
  .action(withErrorHandling(async (id, opts, cmd) => {
227
223
  const globalOpts = cmd.optsWithGlobals();
228
- const catalogId = parseInt4IdArg(id, `Invalid ID: "${id}". Please provide a numeric coffee_catalog ID.`);
224
+ const catalogId = parseInt4IdArg(id, `Invalid ID: "${id}". Please provide a numeric catalog ID.`);
229
225
  const includeProof = opts.includeProof ? true : undefined;
230
226
  const data = await getCatalog(catalogId, {
231
227
  includeProof,
@@ -256,7 +252,7 @@ Notes:
256
252
  catalog
257
253
  .command('facets [field]')
258
254
  .description('List counted catalog facet values for filter discovery')
259
- .option('--all', 'Use all visible catalog rows instead of default stocked-only scope')
255
+ .option('--all')
260
256
  .addHelpText('after', `
261
257
  Examples:
262
258
  purvey catalog facets supplier --pretty
@@ -267,10 +263,10 @@ Fields:
267
263
  supplier, country, processing_base_method, fermentation_type, drying_method, grade, wholesale
268
264
 
269
265
  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.
266
+ Without a field, prints every facet with its counted values and meta (values, facets, meta).
267
+ With a field, prints { field, facet, data, meta }: that facet's counted values and meta.
268
+ Counts include only coffees you can see; counts for multi-valued dimensions can
269
+ overlap, so do not sum them.
274
270
  By default only currently stocked catalog rows are included; use --all for all visible rows.
275
271
  Requires an authenticated viewer session.
276
272
  `)
@@ -294,17 +290,17 @@ Notes:
294
290
  catalog
295
291
  .command('rank')
296
292
  .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')
293
+ .option('--objective <objective>', '', 'premium')
294
+ .option('--supplier <name>')
295
+ .option('--country <country>')
296
+ .option('--process <method>')
297
+ .option('--stocked')
298
+ .option('--all')
299
+ .option('--price-max <n>')
300
+ .option('--min-score <n>')
301
+ .option('--non-wholesale-only')
302
+ .option('--sample-size <n>', '', '5000')
303
+ .option('--limit <n>', '', '10')
308
304
  .addHelpText('after', `
309
305
  Examples:
310
306
  purvey catalog rank --objective premium --stocked --limit 10 --pretty
@@ -314,7 +310,7 @@ Examples:
314
310
 
315
311
  Notes:
316
312
  Objectives: premium, value, fresh_arrival, rare_origin.
317
- Uses coffee_catalog.purveyor_score as the canonical quality signal.
313
+ Uses the Purveyor Score as the quality signal.
318
314
  Generic ranking samples catalog rows ordered by id before deterministic ranking;
319
315
  meta.stocked_only/scope, sample_size, and truncated describe that scope, which matters for rare_origin.
320
316
  Requires an authenticated viewer session.
@@ -348,23 +344,22 @@ Notes:
348
344
  catalog
349
345
  .command('rank-premium')
350
346
  .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')
347
+ .option('--origin <origin>')
348
+ .option('--process <method>')
349
+ .option('--stocked')
350
+ .option('--price-max <n>')
351
+ .option('--min-score <n>')
352
+ .option('--include-unscored')
353
+ .option('--sample-size <n>', '', '250')
354
+ .option('--limit <n>', '', '10')
359
355
  .addHelpText('after', `
360
356
  Examples:
361
357
  purvey catalog rank-premium --stocked --limit 10 --pretty
362
358
  purvey catalog rank-premium --origin Ethiopia --min-score 88 --json
363
359
 
364
360
  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.
361
+ Ranks by Purveyor Score (purveyor_score in output) and adds transparent ranking
362
+ signals for agents.
368
363
  Requires an authenticated viewer session.
369
364
  `)
370
365
  .action(withErrorHandling(async (opts, cmd) => {
@@ -390,11 +385,11 @@ Notes:
390
385
  catalog
391
386
  .command('supplier-list')
392
387
  .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')
388
+ .option('--country <country>')
389
+ .option('--stocked')
390
+ .option('--non-wholesale-only')
391
+ .option('--sample-size <n>', '', '5000')
392
+ .option('--limit <n>', '', '25')
398
393
  .addHelpText('after', `
399
394
  Examples:
400
395
  purvey catalog supplier-list --stocked --pretty
@@ -421,11 +416,11 @@ Notes:
421
416
  catalog
422
417
  .command('supplier-detail <supplier>')
423
418
  .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')
419
+ .option('--country <country>')
420
+ .option('--stocked')
421
+ .option('--non-wholesale-only')
422
+ .option('--top-coffees <n>', '', '5')
423
+ .option('--sample-size <n>', '', '5000')
429
424
  .addHelpText('after', `
430
425
  Examples:
431
426
  purvey catalog supplier-detail "Royal Coffee" --pretty
@@ -451,12 +446,12 @@ Notes:
451
446
  catalog
452
447
  .command('supplier-rank')
453
448
  .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')
449
+ .option('--country <country>')
450
+ .option('--stocked')
451
+ .option('--non-wholesale-only')
452
+ .option('--min-coffees <n>', '', '1')
453
+ .option('--sample-size <n>', '', '5000')
454
+ .option('--limit <n>', '', '25')
460
455
  .addHelpText('after', `
461
456
  Examples:
462
457
  purvey catalog supplier-rank --stocked --min-coffees 3 --pretty
@@ -482,11 +477,11 @@ Notes:
482
477
  // ── catalog similar <id> ──────────────────────────────────────────────────
483
478
  catalog
484
479
  .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')
480
+ .description('Beta: find likely same-lot candidates and similar coffees for a catalog coffee')
481
+ .option('--threshold <score>', '', '0.7')
482
+ .option('--limit <count>', '', '10')
483
+ .option('--stocked-only')
484
+ .option('--mode <mode>', '', 'all')
490
485
  .addHelpText('after', `
491
486
  Examples:
492
487
  purvey catalog similar 1182
@@ -495,20 +490,20 @@ Examples:
495
490
  purvey catalog similar 1182 --json | jq '.data.groups.similar_recommendations[0].match.classification.blockers'
496
491
 
497
492
  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.
493
+ Results are beta candidates to review, not confirmed matches.
494
+ JSON output groups matches under data.target and data.groups.
500
495
  data.groups.canonical_candidates are likely same-lot candidates.
501
496
  data.groups.similar_recommendations are useful substitutes or profile matches.
502
497
  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.
498
+ query_strategy, and pricing metadata are kept as returned.
506
499
  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.
500
+ Signed in with 'purvey auth login', your account needs member access. An API key
501
+ in PURVEYORS_API_KEY or PARCHMENT_API_KEY works on any API plan when it has the
502
+ catalog:read scope.
508
503
  `)
509
504
  .action(withErrorHandling(async (id, opts, cmd) => {
510
505
  const globalOpts = cmd.optsWithGlobals();
511
- const coffeeId = parseInt4IdArg(id, `Invalid ID: "${id}". Please provide a numeric coffee_catalog ID.`);
506
+ const coffeeId = parseInt4IdArg(id, `Invalid ID: "${id}". Please provide a numeric catalog ID.`);
512
507
  const threshold = parseFiniteNumberArg(opts.threshold, `Invalid --threshold: "${opts.threshold}". Must be a number between 0 and 1.`);
513
508
  const limit = parseBoundedPositiveIntegerArg(opts.limit, '--limit', 1, 25);
514
509
  if (threshold < 0.5 || threshold > 0.99) {