@purveyors/sdk 0.48.0 → 0.50.0

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/dist/index.js CHANGED
@@ -158,6 +158,10 @@ function createParchmentClient(options) {
158
158
  /** Find catalog coffees similar to a target coffee. */
159
159
  similar: (id, query) => client.GET("/v1/catalog/{id}/similar", {
160
160
  params: { path: { id }, query }
161
+ }),
162
+ /** Daily price history for one catalog coffee, with minimum-tier change events. */
163
+ priceHistory: (id, query) => client.GET("/v1/catalog/{id}/price-history", {
164
+ params: { path: { id }, query }
161
165
  })
162
166
  },
163
167
  priceIndex: {
@@ -595,7 +599,399 @@ function createParchmentClient(options) {
595
599
  }
596
600
  };
597
601
  }
602
+
603
+ // src/chatAgentCapabilities.ts
604
+ var CHAT_AGENT_CAPABILITIES = [
605
+ "me",
606
+ "catalog.list",
607
+ "catalog.facets",
608
+ "catalog.rank",
609
+ "catalog.suppliers",
610
+ "catalog.similar",
611
+ "inventory.list",
612
+ "roasts.list",
613
+ "roasts.get",
614
+ "roasts.chartData",
615
+ "referenceProfiles.list",
616
+ "referenceProfiles.get",
617
+ "referenceProfiles.chart",
618
+ "referenceProfiles.compare",
619
+ "referenceProfiles.preview",
620
+ "tasting.get",
621
+ "priceIndex.list",
622
+ "priceIndex.stats",
623
+ "priceIndex.comparisons",
624
+ "priceIndex.comparison",
625
+ "priceIndex.history",
626
+ "market.signals",
627
+ "market.metadataIndex",
628
+ "market.overview",
629
+ "market.evidence"
630
+ ];
631
+ var CHAT_AGENT_CONFIRMED_ACTION_TYPES = [
632
+ "add_bean_to_inventory",
633
+ "update_bean",
634
+ "create_roast_session",
635
+ "create_roast_from_reference",
636
+ "create_generated_reference",
637
+ "update_roast_notes",
638
+ "record_sale"
639
+ ];
640
+ var CHAT_AGENT_CAPABILITY_EXCLUSIONS = {
641
+ health: { reason: "infrastructure", note: "Liveness only." },
642
+ "apiKeys.list": {
643
+ reason: "session_only",
644
+ note: "API key management belongs to the account owner."
645
+ },
646
+ "apiKeys.create": {
647
+ reason: "auth_bootstrap",
648
+ note: "Issues a raw credential."
649
+ },
650
+ "apiKeys.revoke": {
651
+ reason: "session_only",
652
+ note: "API key management belongs to the account owner."
653
+ },
654
+ "apiKeys.rotate": {
655
+ reason: "auth_bootstrap",
656
+ note: "Issues a replacement raw credential."
657
+ },
658
+ "apiUsage.get": {
659
+ reason: "session_only",
660
+ note: "Developer account analytics, not coffee data."
661
+ },
662
+ "emailSubscriptions.get": {
663
+ reason: "session_only",
664
+ note: "Email preferences are managed in account settings."
665
+ },
666
+ "emailSubscriptions.setMarketRead": {
667
+ reason: "session_only",
668
+ note: "Email preferences are managed in account settings."
669
+ },
670
+ "emailSubscriptions.unsubscribeMarketRead": {
671
+ reason: "session_only",
672
+ note: "Capability-link unsubscribe from email."
673
+ },
674
+ "marketBrief.drafts.create": {
675
+ reason: "admin_only",
676
+ note: "Market Brief publication pipeline."
677
+ },
678
+ "accountDeletion.request": {
679
+ reason: "session_only",
680
+ note: "Requires a purpose-bound reauthentication assertion."
681
+ },
682
+ "billing.checkout.create": {
683
+ reason: "session_only",
684
+ note: "Billing is user-driven checkout."
685
+ },
686
+ "billing.checkout.get": {
687
+ reason: "session_only",
688
+ note: "Billing is user-driven checkout."
689
+ },
690
+ "billing.checkout.reconcile": {
691
+ reason: "session_only",
692
+ note: "Billing is user-driven checkout."
693
+ },
694
+ "billing.subscriptions.list": {
695
+ reason: "session_only",
696
+ note: "Billing state is shown in account settings."
697
+ },
698
+ "billing.subscriptions.mutate": {
699
+ reason: "session_only",
700
+ note: "Cancel or resume is user-driven."
701
+ },
702
+ "billingAdministration.discrepancies": {
703
+ reason: "admin_only",
704
+ note: "Staff billing reconciliation."
705
+ },
706
+ "billingAdministration.recompute": {
707
+ reason: "admin_only",
708
+ note: "Staff billing reconciliation."
709
+ },
710
+ "billingAdministration.setManual": {
711
+ reason: "admin_only",
712
+ note: "Staff entitlement grants."
713
+ },
714
+ "cliAuth.create": { reason: "auth_bootstrap", note: "CLI login flow." },
715
+ "cliAuth.inspect": { reason: "auth_bootstrap", note: "CLI login flow." },
716
+ "cliAuth.approve": { reason: "auth_bootstrap", note: "CLI login flow." },
717
+ "cliAuth.exchange": { reason: "auth_bootstrap", note: "CLI login flow." },
718
+ "catalog.access": {
719
+ reason: "read_not_wired",
720
+ note: "Catalog visibility metadata; the agent reads `me` instead."
721
+ },
722
+ "catalog.map": {
723
+ reason: "read_not_wired",
724
+ note: "Map clusters and geometry for the web map view."
725
+ },
726
+ "catalog.originPriceStats": {
727
+ reason: "read_not_wired",
728
+ note: "Covered for the agent by market.overview origin price distribution."
729
+ },
730
+ "catalog.stats": {
731
+ reason: "read_not_wired",
732
+ note: "No chat tool yet."
733
+ },
734
+ "catalog.rankPremium": {
735
+ reason: "read_not_wired",
736
+ note: "The agent ranks through catalog.rank objectives."
737
+ },
738
+ "catalog.supplierDetail": {
739
+ reason: "read_not_wired",
740
+ note: "The agent reads supplier aggregates through catalog.suppliers."
741
+ },
742
+ "catalog.supplierRank": {
743
+ reason: "read_not_wired",
744
+ note: "The agent reads supplier aggregates through catalog.suppliers."
745
+ },
746
+ "catalog.proofCoverage": {
747
+ reason: "read_not_wired",
748
+ note: "No chat tool yet."
749
+ },
750
+ "catalog.priceHistory": {
751
+ reason: "read_not_wired",
752
+ note: "Per-lot daily price history for the coffee detail chart; no chat tool yet."
753
+ },
754
+ "procurement.briefs.list": {
755
+ reason: "read_not_wired",
756
+ note: "Active briefs reach the agent as prompt context, not a tool."
757
+ },
758
+ "procurement.briefs.create": {
759
+ reason: "write_not_agent_facing",
760
+ note: "No confirmed action exists for sourcing briefs."
761
+ },
762
+ "procurement.briefs.get": {
763
+ reason: "read_not_wired",
764
+ note: "Active briefs reach the agent as prompt context, not a tool."
765
+ },
766
+ "procurement.briefs.matches": {
767
+ reason: "read_not_wired",
768
+ note: "No chat tool yet."
769
+ },
770
+ "portfolio.trackedLots.list": {
771
+ reason: "read_not_wired",
772
+ note: "Tracked lots reach the agent as prompt context, not a tool."
773
+ },
774
+ "portfolio.trackedLots.track": {
775
+ reason: "write_not_agent_facing",
776
+ note: "No confirmed action exists for tracked lots."
777
+ },
778
+ "portfolio.trackedLots.untrack": {
779
+ reason: "write_not_agent_facing",
780
+ note: "No confirmed action exists for tracked lots."
781
+ },
782
+ "confirmedActions.execute": {
783
+ reason: "session_only",
784
+ note: "Runs only after the user confirms an agent-proposed action card."
785
+ },
786
+ "conversation.chat.stream": {
787
+ reason: "session_only",
788
+ note: "The agent's own transport."
789
+ },
790
+ "conversation.workspaces.getOrCreate": {
791
+ reason: "session_only",
792
+ note: "Conversation persistence owned by the chat client."
793
+ },
794
+ "conversation.workspaces.get": {
795
+ reason: "session_only",
796
+ note: "Conversation persistence owned by the chat client."
797
+ },
798
+ "conversation.workspaces.update": {
799
+ reason: "session_only",
800
+ note: "Conversation persistence owned by the chat client."
801
+ },
802
+ "conversation.workspaces.messages.history": {
803
+ reason: "session_only",
804
+ note: "Conversation persistence owned by the chat client."
805
+ },
806
+ "conversation.workspaces.messages.append": {
807
+ reason: "session_only",
808
+ note: "Conversation persistence owned by the chat client."
809
+ },
810
+ "conversation.workspaces.messages.clear": {
811
+ reason: "session_only",
812
+ note: "Conversation persistence owned by the chat client."
813
+ },
814
+ "conversation.workspaces.updateCanvas": {
815
+ reason: "session_only",
816
+ note: "Conversation persistence owned by the chat client."
817
+ },
818
+ "conversation.workspaces.getCompactionInputs": {
819
+ reason: "session_only",
820
+ note: "Conversation persistence owned by the chat client."
821
+ },
822
+ "conversation.workspaces.updateSummary": {
823
+ reason: "session_only",
824
+ note: "Conversation persistence owned by the chat client."
825
+ },
826
+ "conversation.workspaces.compactSummary": {
827
+ reason: "session_only",
828
+ note: "Conversation persistence owned by the chat client."
829
+ },
830
+ "conversation.memory.get": {
831
+ reason: "session_only",
832
+ note: "Memory reaches the agent as prompt context."
833
+ },
834
+ "conversation.memory.update": {
835
+ reason: "session_only",
836
+ note: "Memory is edited by the user or the memory pipeline."
837
+ },
838
+ "conversation.memory.dream": {
839
+ reason: "session_only",
840
+ note: "Memory is edited by the user or the memory pipeline."
841
+ },
842
+ "inventory.shareGrants.create": {
843
+ reason: "write_not_agent_facing",
844
+ note: "Mints a cross-user capability token."
845
+ },
846
+ "inventory.shareGrants.redeem": {
847
+ reason: "write_not_agent_facing",
848
+ note: "Redeems a cross-user capability token."
849
+ },
850
+ "inventory.create": {
851
+ reason: "confirmed_action_write",
852
+ note: "Confirmed action add_bean_to_inventory."
853
+ },
854
+ "inventory.createManualBatch": {
855
+ reason: "write_not_agent_facing",
856
+ note: "Bulk import; no confirmed action."
857
+ },
858
+ "inventory.getManualBatch": {
859
+ reason: "read_not_wired",
860
+ note: "Bulk-import recovery read."
861
+ },
862
+ "inventory.reserveManualBatch": {
863
+ reason: "write_not_agent_facing",
864
+ note: "Bulk import; no confirmed action."
865
+ },
866
+ "inventory.commitManualBatch": {
867
+ reason: "write_not_agent_facing",
868
+ note: "Bulk import; no confirmed action."
869
+ },
870
+ "inventory.getManualBatchStatus": {
871
+ reason: "read_not_wired",
872
+ note: "Bulk-import recovery read."
873
+ },
874
+ "inventory.reserveCatalogBatch": {
875
+ reason: "write_not_agent_facing",
876
+ note: "Bulk import; no confirmed action."
877
+ },
878
+ "inventory.commitCatalogBatch": {
879
+ reason: "write_not_agent_facing",
880
+ note: "Bulk import; no confirmed action."
881
+ },
882
+ "inventory.getCatalogBatchStatus": {
883
+ reason: "read_not_wired",
884
+ note: "Bulk-import recovery read."
885
+ },
886
+ "inventory.update": {
887
+ reason: "confirmed_action_write",
888
+ note: "Confirmed action update_bean."
889
+ },
890
+ "inventory.delete": {
891
+ reason: "write_not_agent_facing",
892
+ note: "Destructive; no confirmed action."
893
+ },
894
+ "roasts.classify": {
895
+ reason: "read_not_wired",
896
+ note: "Artisan import matching helper for upload flows."
897
+ },
898
+ "roasts.create": {
899
+ reason: "confirmed_action_write",
900
+ note: "Confirmed action create_roast_session."
901
+ },
902
+ "roasts.createBatch": {
903
+ reason: "write_not_agent_facing",
904
+ note: "Bulk roast creation; no confirmed action."
905
+ },
906
+ "roasts.update": {
907
+ reason: "confirmed_action_write",
908
+ note: "Confirmed action update_roast_notes (notes and targets only)."
909
+ },
910
+ "roasts.delete": {
911
+ reason: "write_not_agent_facing",
912
+ note: "Destructive; no confirmed action."
913
+ },
914
+ "roasts.deleteBatch": {
915
+ reason: "write_not_agent_facing",
916
+ note: "Destructive; no confirmed action."
917
+ },
918
+ "roasts.replaceLiveCurve": {
919
+ reason: "write_not_agent_facing",
920
+ note: "Live roast logging client only."
921
+ },
922
+ "roasts.import": {
923
+ reason: "write_not_agent_facing",
924
+ note: "Artisan file upload; saved references import through confirmed action create_roast_from_reference."
925
+ },
926
+ "roasts.replaceArtisanImport": {
927
+ reason: "write_not_agent_facing",
928
+ note: "Artisan file upload."
929
+ },
930
+ "roasts.clearArtisanImport": {
931
+ reason: "write_not_agent_facing",
932
+ note: "Destructive; no confirmed action."
933
+ },
934
+ "referenceProfiles.generate": {
935
+ reason: "confirmed_action_write",
936
+ note: "Confirmed action create_generated_reference."
937
+ },
938
+ "referenceProfiles.exportGenerated": {
939
+ reason: "read_not_wired",
940
+ note: "File export for Artisan, not a chat read."
941
+ },
942
+ "referenceProfiles.import": {
943
+ reason: "write_not_agent_facing",
944
+ note: "Artisan file upload."
945
+ },
946
+ "referenceProfiles.fromRoast": {
947
+ reason: "write_not_agent_facing",
948
+ note: "No confirmed action."
949
+ },
950
+ "referenceProfiles.update": {
951
+ reason: "write_not_agent_facing",
952
+ note: "No confirmed action."
953
+ },
954
+ "referenceProfiles.delete": {
955
+ reason: "write_not_agent_facing",
956
+ note: "Destructive; no confirmed action."
957
+ },
958
+ "referenceProfiles.linkRoast": {
959
+ reason: "write_not_agent_facing",
960
+ note: "No confirmed action."
961
+ },
962
+ "referenceProfiles.unlinkRoast": {
963
+ reason: "write_not_agent_facing",
964
+ note: "No confirmed action."
965
+ },
966
+ "sales.list": {
967
+ reason: "read_not_wired",
968
+ note: "No chat tool yet."
969
+ },
970
+ "sales.create": {
971
+ reason: "confirmed_action_write",
972
+ note: "Confirmed action record_sale."
973
+ },
974
+ "sales.update": {
975
+ reason: "write_not_agent_facing",
976
+ note: "No confirmed action."
977
+ },
978
+ "sales.delete": {
979
+ reason: "write_not_agent_facing",
980
+ note: "Destructive; no confirmed action."
981
+ },
982
+ "profit.list": {
983
+ reason: "read_not_wired",
984
+ note: "No chat tool yet."
985
+ },
986
+ "tasting.rate": {
987
+ reason: "write_not_agent_facing",
988
+ note: "No confirmed action."
989
+ }
990
+ };
598
991
  export {
992
+ CHAT_AGENT_CAPABILITIES,
993
+ CHAT_AGENT_CAPABILITY_EXCLUSIONS,
994
+ CHAT_AGENT_CONFIRMED_ACTION_TYPES,
599
995
  createParchmentClient
600
996
  };
601
997
  //# sourceMappingURL=index.js.map