@fuzzle/opencode-accountant 0.1.0 → 0.1.1-next.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.
@@ -1,6 +1,6 @@
1
- # update-prices Tool
1
+ # fetch-currency-prices Tool
2
2
 
3
- The `update-prices` tool fetches end-of-day currency exchange rates and updates the price journals in `ledger/currencies/`. It uses the external `pricehist` tool to fetch data from various sources (Yahoo Finance, CoinMarketCap, ECB, etc.).
3
+ The `fetch-currency-prices` tool fetches end-of-day currency exchange rates and updates the price journals in `ledger/currencies/`. It uses the external `pricehist` tool to fetch data from various sources (Yahoo Finance, CoinMarketCap, ECB, etc.).
4
4
 
5
5
  This tool is **restricted to the accountant agent only**.
6
6
 
@@ -135,9 +135,9 @@ When called by the wrong agent:
135
135
  **Example:**
136
136
 
137
137
  ```
138
- update-prices()
138
+ fetch-currency-prices()
139
139
  # or
140
- update-prices(backfill: false)
140
+ fetch-currency-prices(backfill: false)
141
141
  ```
142
142
 
143
143
  **Use when:**
@@ -159,7 +159,7 @@ update-prices(backfill: false)
159
159
  **Example:**
160
160
 
161
161
  ```
162
- update-prices(backfill: true)
162
+ fetch-currency-prices(backfill: true)
163
163
  ```
164
164
 
165
165
  **Use when:**
@@ -342,7 +342,7 @@ ledger/
342
342
 
343
343
  **Goal:** Keep prices current with daily/weekly updates
344
344
 
345
- 1. Run `update-prices()` (or `update-prices(backfill: false)`)
345
+ 1. Run `fetch-currency-prices()` (or `fetch-currency-prices(backfill: false)`)
346
346
  2. Check output for any errors
347
347
  3. Verify prices were added:
348
348
  ```bash
@@ -366,14 +366,14 @@ ledger/
366
366
  file: gbp.journal
367
367
  backfill_date: '2024-01-01'
368
368
  ```
369
- 2. Run `update-prices(backfill: true)` to fetch historical data
369
+ 2. Run `fetch-currency-prices(backfill: true)` to fetch historical data
370
370
  3. Check output and verify `ledger/currencies/gbp.journal` created
371
371
  4. Inspect file to confirm date range:
372
372
  ```bash
373
373
  head -3 ledger/currencies/gbp.journal
374
374
  tail -3 ledger/currencies/gbp.journal
375
375
  ```
376
- 5. Subsequent updates: use daily mode (`update-prices()`)
376
+ 5. Subsequent updates: use daily mode (`fetch-currency-prices()`)
377
377
 
378
378
  ### Scenario 3: Fixing Missing Dates
379
379
 
@@ -384,7 +384,7 @@ ledger/
384
384
  cat ledger/currencies/eur.journal
385
385
  # Notice: prices for Feb 15-20 are missing
386
386
  ```
387
- 2. Run `update-prices(backfill: true)` to fill gaps
387
+ 2. Run `fetch-currency-prices(backfill: true)` to fill gaps
388
388
  3. Deduplication ensures:
389
389
  - Existing prices preserved
390
390
  - Missing dates added
@@ -398,7 +398,7 @@ ledger/
398
398
 
399
399
  **Goal:** Recover from partial failures
400
400
 
401
- 1. Run `update-prices()`
401
+ 1. Run `fetch-currency-prices()`
402
402
  2. Output shows `success: false` with partial results:
403
403
  ```json
404
404
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzzle/opencode-accountant",
3
- "version": "0.1.0",
3
+ "version": "0.1.1-next.1",
4
4
  "description": "An OpenCode accounting agent, specialized in double-entry-bookkepping with hledger",
5
5
  "author": {
6
6
  "name": "ali bengali",