@agentcentral/cli 0.1.6 → 0.1.7

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/README.md CHANGED
@@ -85,7 +85,7 @@ the concatenated rows:
85
85
  ```bash
86
86
  agentcentral tools call get_sponsored_ads_entities_live '{"ad_product":"SP"}' --all
87
87
  agentcentral tools call get_audience_segments '{}' --all --format ndjson
88
- agentcentral tools call get_report_document '{"report_document_id":"amzn1.tortuga..."}' --all --format csv --output report.csv
88
+ agentcentral tools call get_report_document '{"report_id":"...","report_document_id":"amzn1.tortuga..."}' --all --format csv --output report.csv
89
89
  ```
90
90
 
91
91
  Notes:
package/dist/index.js CHANGED
@@ -11356,7 +11356,6 @@ var TOOL_DOMAINS = [
11356
11356
  { name: "get_catalog_cleanup", title: "Listing quality signals", description: "Stored listing errors, warnings, and content or fulfillment gaps" },
11357
11357
  { name: "get_listing_content_changes", title: "Listing content changes", description: "Title, brand, image, and bullet changes between the two most recent catalog snapshots" },
11358
11358
  { name: "get_product_type_definition", title: "Product type definition (live)", description: "Canonical Product Type Definition with required attributes and accepted values", live: true },
11359
- { name: "get_listing_state_live", title: "Listing state (live)", description: "Current listing attributes, category facts, and issues for up to 20 SKUs", live: true },
11360
11359
  { name: "create_listing", title: "Create listing", description: "Validate or submit a full catalog listing creation request", write: true },
11361
11360
  { name: "create_listing_offer", title: "Create offer-only SKU", description: "Create a seller SKU and sales terms for an existing ASIN", write: true },
11362
11361
  { name: "convert_listings_to_fba", title: "Convert listings to FBA", description: "Convert existing seller-fulfilled SKUs to Amazon fulfillment with eligibility checks and validation", write: true },
@@ -11420,7 +11419,7 @@ var UTILITY_TOOLS = [
11420
11419
  {
11421
11420
  name: "get_report_document",
11422
11421
  title: "Report document",
11423
- description: "Download, decompress, and parse an SP-API report document into rows/columns (non-restricted report types only)",
11422
+ description: "Download and parse an SP-API report document after verifying its required parent report_id and selected-marketplace metadata (non-restricted types only)",
11424
11423
  live: true
11425
11424
  }
11426
11425
  ];
@@ -12141,11 +12140,10 @@ var READ_FACT_CONTRACTS = Object.freeze([
12141
12140
  ReadFactContractSchema.parse({ contract_version: READ_FACT_CONTRACT_VERSION, tool_name: "get_variations", domain: "catalog", entity_types: ["variation_family", "product"], grain: ["asin", "relationship_type"], join_keys: [{ field: "asin", role: "child_asin", entity_type: "product" }, { field: "parent_asin", role: "parent_asin", entity_type: "variation_family" }], metric_families: ["catalog"], date_basis: ["live_observation_time"], currency_basis: "non_monetary", source_families: ["amazon_live_api"], comparability: [], relationships: [] }),
12142
12141
  ReadFactContractSchema.parse({ contract_version: READ_FACT_CONTRACT_VERSION, tool_name: "get_product_reviews", domain: "catalog", entity_types: ["product", "review"], grain: ["asin", "topic"], join_keys: [{ field: "asin", role: "asin", entity_type: "product" }], metric_families: ["reviews"], date_basis: ["live_observation_time"], currency_basis: "non_monetary", source_families: ["amazon_live_api"], comparability: [], relationships: [] }),
12143
12142
  ReadFactContractSchema.parse({ contract_version: READ_FACT_CONTRACT_VERSION, tool_name: "get_review_trends", domain: "catalog", entity_types: ["product", "review"], grain: ["view", "asin", "month", "snapshot_date"], join_keys: [{ field: "asin", role: "asin", entity_type: "product" }], metric_families: ["reviews"], date_basis: ["live_observation_time", "snapshot_date"], currency_basis: "non_monetary", source_families: ["amazon_live_api", "retained_snapshot"], comparability: [], relationships: [] }),
12144
- ReadFactContractSchema.parse({ contract_version: READ_FACT_CONTRACT_VERSION, tool_name: "get_listing_quality", domain: "catalog", entity_types: ["listing", "product"], grain: ["view", "asin", "sku", "snapshot_date"], join_keys: [{ field: "asin", role: "asin", entity_type: "product" }, { field: "sku", role: "seller_sku", entity_type: "listing" }], metric_families: ["catalog"], date_basis: ["snapshot_date"], currency_basis: "non_monetary", source_families: ["normalized_amazon_report"], comparability: [], relationships: [] }),
12143
+ ReadFactContractSchema.parse({ contract_version: READ_FACT_CONTRACT_VERSION, tool_name: "get_listing_quality", domain: "catalog", entity_types: ["listing", "product"], grain: ["view", "asin", "sku", "snapshot_date"], join_keys: [{ field: "asin", role: "asin", entity_type: "product" }, { field: "sku", role: "seller_sku", entity_type: "listing" }], metric_families: ["catalog"], date_basis: ["snapshot_date", "live_observation_time"], currency_basis: "non_monetary", source_families: ["normalized_amazon_report", "amazon_live_api"], comparability: [], relationships: [] }),
12145
12144
  ReadFactContractSchema.parse({ contract_version: READ_FACT_CONTRACT_VERSION, tool_name: "get_catalog_cleanup", domain: "catalog", entity_types: ["listing", "product"], grain: ["asin", "sku", "snapshot_date"], join_keys: [{ field: "asin", role: "asin", entity_type: "product" }, { field: "sku", role: "seller_sku", entity_type: "listing" }], metric_families: ["catalog"], date_basis: ["snapshot_date"], currency_basis: "non_monetary", source_families: ["normalized_amazon_report"], comparability: [], relationships: [] }),
12146
12145
  ReadFactContractSchema.parse({ contract_version: READ_FACT_CONTRACT_VERSION, tool_name: "get_listing_content_changes", domain: "catalog", entity_types: ["listing", "product"], grain: ["asin", "sku", "changed_field", "current_snapshot_date", "previous_snapshot_date"], join_keys: [{ field: "asin", role: "asin", entity_type: "product" }, { field: "sku", role: "seller_sku", entity_type: "listing" }], metric_families: ["catalog"], date_basis: ["snapshot_date"], currency_basis: "non_monetary", source_families: ["normalized_amazon_report"], comparability: [], relationships: [] }),
12147
12146
  ReadFactContractSchema.parse({ contract_version: READ_FACT_CONTRACT_VERSION, tool_name: "get_product_type_definition", domain: "catalog", entity_types: ["catalog_definition", "marketplace"], grain: ["product_type", "marketplace_id", "view"], join_keys: [{ field: "marketplace_id", role: "marketplace_id", entity_type: "marketplace" }], metric_families: ["catalog"], date_basis: ["live_observation_time"], currency_basis: "non_monetary", source_families: ["amazon_live_api"], comparability: [], relationships: [] }),
12148
- ReadFactContractSchema.parse({ contract_version: READ_FACT_CONTRACT_VERSION, tool_name: "get_listing_state_live", domain: "catalog", entity_types: ["listing", "product"], grain: ["sku"], join_keys: [{ field: "asin", role: "asin", entity_type: "product" }, { field: "sku", role: "seller_sku", entity_type: "listing" }], metric_families: ["catalog"], date_basis: ["live_observation_time"], currency_basis: "non_monetary", source_families: ["amazon_live_api"], comparability: [], relationships: [] }),
12149
12147
  ReadFactContractSchema.parse({ contract_version: READ_FACT_CONTRACT_VERSION, tool_name: "get_product_fee_estimates", domain: "finance", entity_types: ["product", "listing"], grain: ["view", "asin", "sku", "fnsku", "snapshot_date"], join_keys: [{ field: "asin", role: "asin", entity_type: "product" }, { field: "sku", role: "seller_sku", entity_type: "listing" }, { field: "fnsku", role: "fnsku", entity_type: "inventory_item" }], metric_families: ["fees"], date_basis: ["snapshot_date", "live_observation_time"], currency_basis: "marketplace_currency", source_families: ["normalized_amazon_report", "amazon_live_api"], comparability: [], relationships: [] }),
12150
12148
  ReadFactContractSchema.parse({ contract_version: READ_FACT_CONTRACT_VERSION, tool_name: "get_financial_events", domain: "finance", entity_types: ["financial_event", "transaction", "product", "order"], grain: ["view", "grain", "posted_date", "order_id", "asin", "seller_sku"], join_keys: [{ field: "order_id", role: "order_id", entity_type: "order" }, { field: "asin", role: "asin", entity_type: "product" }, { field: "seller_sku", role: "seller_sku", entity_type: "listing" }], metric_families: ["fees", "profitability"], date_basis: ["posted_date"], currency_basis: "mixed_currency_possible", source_families: ["normalized_amazon_report"], comparability: [], relationships: [] }),
12151
12149
  ReadFactContractSchema.parse({ contract_version: READ_FACT_CONTRACT_VERSION, tool_name: "get_profitability_review", domain: "finance", entity_types: ["product", "listing"], grain: ["asin", "sku", "start_date", "end_date"], join_keys: [{ field: "asin", role: "asin", entity_type: "product" }, { field: "sku", role: "seller_sku", entity_type: "listing" }], metric_families: ["profitability", "sales", "advertising", "fees"], date_basis: ["reporting_date", "posted_date"], currency_basis: "mixed_currency_possible", source_families: ["normalized_amazon_report", "derived_from_normalized_facts"], comparability: [], relationships: [] }),
@@ -13379,7 +13377,6 @@ var TOOL_MARKETPLACE_SUPPORT_DECLARED_TOOL_NAMES = [
13379
13377
  "get_catalog_cleanup",
13380
13378
  "get_listing_content_changes",
13381
13379
  "get_product_type_definition",
13382
- "get_listing_state_live",
13383
13380
  "create_listing",
13384
13381
  "create_listing_offer",
13385
13382
  "convert_listings_to_fba",
@@ -16069,8 +16066,27 @@ async function run(argv) {
16069
16066
  }
16070
16067
  }
16071
16068
 
16069
+ // src/exit.ts
16070
+ function flushStreams(streams) {
16071
+ return Promise.all(
16072
+ streams.map(
16073
+ (stream) => new Promise((resolve) => {
16074
+ try {
16075
+ stream.write("", () => resolve());
16076
+ } catch {
16077
+ resolve();
16078
+ }
16079
+ })
16080
+ )
16081
+ ).then(() => void 0);
16082
+ }
16083
+ async function exitAfterFlush(code, exit = (value) => process.exit(value), streams = [process.stdout, process.stderr]) {
16084
+ await flushStreams(streams);
16085
+ exit(code);
16086
+ }
16087
+
16072
16088
  // src/index.ts
16073
- run(process.argv).then((code) => process.exit(code)).catch((e) => {
16089
+ run(process.argv).then((code) => exitAfterFlush(code)).catch((e) => {
16074
16090
  process.stderr.write(String(e?.message ?? e) + "\n");
16075
- process.exit(1);
16091
+ return exitAfterFlush(1);
16076
16092
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentcentral/cli",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "license": "MIT",
5
5
  "description": "agentcentral CLI — local MCP bridge and generic tool runner for Amazon seller data",
6
6
  "keywords": [