Skip to content

Default arkor SDK to https://api.arkor.ai#22

Merged
k-taro56 merged 1 commit intomainfrom
eng-448
Apr 27, 2026
Merged

Default arkor SDK to https://api.arkor.ai#22
k-taro56 merged 1 commit intomainfrom
eng-448

Conversation

@k-taro56
Copy link
Copy Markdown
Contributor

Summary

  • Switch the defaultArkorCloudApiUrl() fallback in the arkor SDK/CLI from http://localhost:3003 to the production endpoint https://api.arkor.ai, so a freshly-installed arkor binary talks to the managed cloud out of the box without extra configuration.
  • Override behavior is preserved: setting ARKOR_CLOUD_API_URL (with or without a trailing slash) still wins, which keeps arkor dev / arkor login etc. usable against a local dev:arkor-cloud-api on :3003 or any other deployment.
  • Updated the corresponding unit test to assert the new default.

Test plan

  • pnpm --filter arkor test (12 files, 81 tests passing)
  • Manual smoke: with ARKOR_CLOUD_API_URL unset, arkor whoami / arkor login should hit https://api.arkor.ai
  • Manual smoke: with ARKOR_CLOUD_API_URL=http://localhost:3003, the same commands should hit the local dev server

Changed the fallback URL in the defaultArkorCloudApiUrl function from http://localhost:3003 to https://api.arkor.ai, ensuring consistency with the expected production environment. Updated corresponding test case to reflect this change.
@k-taro56 k-taro56 self-assigned this Apr 27, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 27, 2026

Greptile Summary

This PR updates the defaultArkorCloudApiUrl() fallback from http://localhost:3003 to https://api.arkor.ai, so out-of-the-box installs of the arkor CLI target the production cloud API. The ARKOR_CLOUD_API_URL env-var override (with trailing-slash normalisation) is fully preserved, and the corresponding unit test is updated to assert the new default.

Confidence Score: 5/5

Safe to merge — minimal, well-tested change with no logic risk.

Both changed lines are correct and symmetric: the source value and the test assertion are updated together. Override behaviour is untouched, env-var cleanup in afterEach is already in place, and the suite passes. No P0/P1 findings.

No files require special attention.

Important Files Changed

Filename Overview
packages/arkor/src/core/credentials.ts Single-line change: default fallback URL updated from http://localhost:3003 to https://api.arkor.ai; env-var override path unchanged.
packages/arkor/src/core/credentials.test.ts Test description and expected value updated to match new default URL; all other tests unchanged and unaffected.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[defaultArkorCloudApiUrl called] --> B{ARKOR_CLOUD_API_URL set?}
    B -- Yes --> C[Strip trailing slash]
    C --> D[Return env-var value]
    B -- No --> E[Return 'https://api.arkor.ai']
Loading

Reviews (1): Last reviewed commit: "fix: update default API URL in credentia..." | Re-trigger Greptile

@k-taro56 k-taro56 requested a review from soleil-colza April 27, 2026 14:33
Copy link
Copy Markdown
Contributor

@soleil-colza soleil-colza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow

@k-taro56 k-taro56 merged commit 461821c into main Apr 27, 2026
@k-taro56 k-taro56 deleted the eng-448 branch April 27, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants