{"version":"0.2.86","anchor":"api-changes","canonical_anchor":"api-changes","heading":"API Changes","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/0.2.86\/e\/api-changes","release_url":"https:\/\/changelogs.core-directive.com\/v\/0.2.86","markdown":"### API Changes\n\nNew Functions for Session Tracking\n\n- `WN0(cwd)`: Set the current working directory for the session\n- `YN0(cost, duration, durationWithoutRetries, inputTokens, outputTokens, cacheReadTokens, cacheCreationTokens)`: Track API usage metrics including:\n- Total cost in USD\n- API call durations (with and without retries)\n- Token usage breakdown (input, output, cache read, cache creation)\n\nImproved Current Directory Detection\n\n- New `d0()` function provides more robust current working directory detection with fallback handling"}