@heyamiko/amiko-cli 0.5.2 → 0.5.4

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.
Files changed (2) hide show
  1. package/dist/index.js +21 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -75133,6 +75133,27 @@ function resolveAuth(cliConfig) {
75133
75133
  userId: cliConfig.userId
75134
75134
  };
75135
75135
  }
75136
+ if (cliConfig.apiKey) {
75137
+ return {
75138
+ mode: "connected",
75139
+ billingBase: cliConfig.billingBase,
75140
+ platformKey: cliConfig.apiKey,
75141
+ userId: cliConfig.userId,
75142
+ twinId: cliConfig.twinId,
75143
+ twinToken: cliConfig.twinToken
75144
+ };
75145
+ }
75146
+ const envToken = process.env.AMIKO_USER_TOKEN;
75147
+ if (envToken) {
75148
+ return {
75149
+ mode: "agent",
75150
+ twinId: process.env.AMIKO_TWIN_ID,
75151
+ twinToken: envToken,
75152
+ userId: process.env.AMIKO_USER_ID,
75153
+ billingBase: process.env.API_SERVICE_URL || process.env.BILLING_BASE,
75154
+ platformUrl: process.env.AMIKO_PLATFORM_URL
75155
+ };
75156
+ }
75136
75157
  const agentConfig = loadAgentConfig();
75137
75158
  if (agentConfig?.twinToken) {
75138
75159
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyamiko/amiko-cli",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "Amiko CLI — swap tokens, manage credits, bridge cross-chain, and call marketplace agents",
5
5
  "type": "module",
6
6
  "bin": {