@lobehub/market-cli 0.0.2 → 0.0.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.
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/cli.ts
4
- import { createRequire } from "module";
4
+ import { createRequire as createRequire2 } from "module";
5
5
  import { Command } from "commander";
6
6
 
7
7
  // src/commands/auth.ts
@@ -152,17 +152,11 @@ function registerAuthCommand(program2) {
152
152
 
153
153
  // src/commands/register.ts
154
154
  import { MarketSDK as MarketSDK2 } from "@lobehub/market-sdk";
155
+ import { createRequire } from "module";
155
156
 
156
157
  // src/utils/deviceId.ts
157
158
  import { createHash } from "crypto";
158
159
  import { hostname, networkInterfaces } from "os";
159
- function generateDeviceId() {
160
- const host = hostname();
161
- const mac = getPrimaryMacAddress();
162
- const input = mac ? `${host}:${mac}` : host;
163
- const hash = createHash("sha256").update(input).digest("hex").slice(0, 16);
164
- return `device-${hash}`;
165
- }
166
160
  function getPrimaryMacAddress() {
167
161
  const interfaces = networkInterfaces();
168
162
  for (const name of Object.keys(interfaces).sort()) {
@@ -176,10 +170,22 @@ function getPrimaryMacAddress() {
176
170
  }
177
171
  return void 0;
178
172
  }
173
+ function generateDeviceId() {
174
+ const host = hostname();
175
+ const mac = getPrimaryMacAddress();
176
+ const input = mac ? `${host}:${mac}` : host;
177
+ const hash = createHash("sha256").update(input).digest("hex").slice(0, 16);
178
+ return `device-${hash}`;
179
+ }
179
180
 
180
181
  // src/commands/register.ts
182
+ var require2 = createRequire(import.meta.url);
183
+ var pkg = require2("../../package.json");
181
184
  function registerRegisterCommand(program2) {
182
- program2.command("register").description("Register this device as an M2M client and save credentials locally").requiredOption("--name <name>", "Client name for registration").option("--description <desc>", "Description of the client").option("--source <source>", "Agent source (e.g. claude-code, open-claw, codex, cursor)").option("--device-id <id>", "Device identifier (auto-generated if omitted)").option("--base-url <url>", "Market API base URL", "https://market.lobehub.com").option("--output <format>", "Output format (text|json)", "text").action(async (options) => {
185
+ program2.command("register").description("Register this device as an M2M client and save credentials locally").requiredOption("--name <name>", "Client name for registration").option("--description <desc>", "Description of the client").option(
186
+ "--source <source>",
187
+ "Agent source, lowercase with hyphens (e.g. claude-code, open-claw, codex, cursor)"
188
+ ).option("--device-id <id>", "Device identifier (auto-generated if omitted)").option("--base-url <url>", "Market API base URL", "https://market.lobehub.com").option("--output <format>", "Output format (text|json)", "text").action(async (options) => {
183
189
  try {
184
190
  const deviceId = options.deviceId || generateDeviceId();
185
191
  const baseURL = process.env.MARKET_BASE_URL || options.baseUrl;
@@ -191,8 +197,12 @@ function registerRegisterCommand(program2) {
191
197
  clientType: "cli",
192
198
  description: description || void 0,
193
199
  deviceId,
200
+ metadata: {
201
+ nodeVersion: process.version
202
+ },
194
203
  platform: process.arch,
195
- version: process.version
204
+ source,
205
+ version: pkg.version
196
206
  });
197
207
  await saveCredentials({
198
208
  baseUrl: baseURL,
@@ -216,11 +226,10 @@ function registerRegisterCommand(program2) {
216
226
  }
217
227
 
218
228
  // src/cli.ts
219
- var require2 = createRequire(import.meta.url);
220
- var pkg = require2("../package.json");
229
+ var require3 = createRequire2(import.meta.url);
230
+ var pkg2 = require3("../package.json");
221
231
  var program = new Command();
222
- program.name("lobehub-market").description("LobeHub Market CLI - Device registration and auth management").version(pkg.version);
232
+ program.name("lobehub-market").description("LobeHub Market CLI - Device registration and auth management").version(pkg2.version);
223
233
  registerRegisterCommand(program);
224
234
  registerAuthCommand(program);
225
235
  program.parse();
226
- //# sourceMappingURL=cli.js.map
package/package.json CHANGED
@@ -1,19 +1,15 @@
1
1
  {
2
2
  "name": "@lobehub/market-cli",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "LobeHub Market CLI - Device registration and auth management",
5
5
  "keywords": [
6
6
  "lobehub",
7
7
  "market",
8
8
  "cli"
9
9
  ],
10
- "homepage": "https://github.com/lobehub/lobehub-market",
10
+ "homepage": "https://lobehub.com",
11
11
  "bugs": {
12
- "url": "https://github.com/lobehub/lobehub-market/issues/new/choose"
13
- },
14
- "repository": {
15
- "type": "git",
16
- "url": "https://github.com/lobehub/lobehub-market.git"
12
+ "url": "https://github.com/lobehub/lobehub/issues/new/choose"
17
13
  },
18
14
  "license": "MIT",
19
15
  "author": "LobeHub <i@lobehub.com>",
@@ -25,10 +21,10 @@
25
21
  "dist"
26
22
  ],
27
23
  "dependencies": {
28
- "@lobehub/market-sdk": "workspace:*",
29
- "commander": "^13.1.0"
24
+ "commander": "^13.1.0",
25
+ "@lobehub/market-sdk": "0.30.4"
30
26
  },
31
27
  "engines": {
32
28
  "node": ">=22.0.0"
33
29
  }
34
- }
30
+ }
package/dist/cli.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/cli.ts","../src/commands/auth.ts","../src/utils/config.ts","../src/utils/credentials.ts","../src/utils/output.ts","../src/commands/register.ts","../src/utils/deviceId.ts"],"sourcesContent":["import { createRequire } from 'node:module';\n\nimport { Command } from 'commander';\n\nimport { registerAuthCommand } from './commands/auth';\nimport { registerRegisterCommand } from './commands/register';\n\nconst require = createRequire(import.meta.url);\nconst pkg = require('../package.json');\n\nconst program = new Command();\n\nprogram\n .name('lobehub-market')\n .description('LobeHub Market CLI - Device registration and auth management')\n .version(pkg.version);\n\nregisterRegisterCommand(program);\nregisterAuthCommand(program);\n\nprogram.parse();\n","import type { Command } from 'commander';\nimport { MarketSDK } from '@lobehub/market-sdk';\n\nimport { resolveConfig } from '../utils/config';\nimport { deleteCredentials } from '../utils/credentials';\nimport { formatOutput } from '../utils/output';\n\nexport function registerAuthCommand(program: Command): void {\n const auth = program\n .command('auth')\n .description('Manage authentication credentials and tokens');\n\n auth\n .command('status')\n .description('Show credential and token status')\n .option('--output <format>', 'Output format (text|json)', 'text')\n .action(async (options) => {\n try {\n const config = resolveConfig();\n\n if (!config.clientId || !config.clientSecret) {\n console.error(\n 'No credentials found. Run `lobehub-market register` first or set MARKET_CLIENT_ID and MARKET_CLIENT_SECRET.',\n );\n process.exit(1);\n }\n\n const sdk = new MarketSDK({\n baseURL: config.baseUrl,\n clientId: config.clientId,\n clientSecret: config.clientSecret,\n });\n\n const tokenInfo = await sdk.fetchM2MToken();\n\n formatOutput(options.output, {\n baseUrl: config.baseUrl,\n clientId: config.clientId,\n expiresIn: `${tokenInfo.expiresIn}s`,\n source: config.source,\n status: 'authenticated',\n tokenPreview: `${tokenInfo.accessToken.slice(0, 12)}...`,\n });\n } catch (error: any) {\n console.error(`Auth status check failed: ${error.message}`);\n process.exit(1);\n }\n });\n\n auth\n .command('refresh')\n .description('Force refresh the M2M access token')\n .option('--output <format>', 'Output format (text|json)', 'text')\n .action(async (options) => {\n try {\n const config = resolveConfig();\n\n if (!config.clientId || !config.clientSecret) {\n console.error(\n 'No credentials found. Run `lobehub-market register` first or set MARKET_CLIENT_ID and MARKET_CLIENT_SECRET.',\n );\n process.exit(1);\n }\n\n const sdk = new MarketSDK({\n baseURL: config.baseUrl,\n clientId: config.clientId,\n clientSecret: config.clientSecret,\n });\n\n const tokenInfo = await sdk.fetchM2MToken();\n\n formatOutput(options.output, {\n accessToken: tokenInfo.accessToken,\n expiresIn: tokenInfo.expiresIn,\n message: 'Token refreshed successfully',\n });\n } catch (error: any) {\n console.error(`Token refresh failed: ${error.message}`);\n process.exit(1);\n }\n });\n\n auth\n .command('logout')\n .description('Clear local credentials')\n .action(async () => {\n try {\n const deleted = await deleteCredentials();\n if (deleted) {\n console.log('Credentials cleared successfully.');\n } else {\n console.log('No credentials file found.');\n }\n } catch (error: any) {\n console.error(`Logout failed: ${error.message}`);\n process.exit(1);\n }\n });\n}\n","import { existsSync, readFileSync } from 'node:fs';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\n\nexport interface ResolvedConfig {\n baseUrl: string;\n clientId: string | undefined;\n clientSecret: string | undefined;\n source: 'env' | 'file' | 'mixed' | 'none';\n}\n\nexport function resolveConfig(): ResolvedConfig {\n const envClientId = process.env.MARKET_CLIENT_ID;\n const envClientSecret = process.env.MARKET_CLIENT_SECRET;\n const envBaseUrl = process.env.MARKET_BASE_URL;\n\n let fileCredentials: { baseUrl?: string; clientId?: string; clientSecret?: string } | null = null;\n\n try {\n const filePath = join(homedir(), '.lobehub-market', 'credentials.json');\n if (existsSync(filePath)) {\n const content = readFileSync(filePath, 'utf-8');\n fileCredentials = JSON.parse(content);\n }\n } catch {\n // Ignore file read errors\n }\n\n const clientId = envClientId || fileCredentials?.clientId;\n const clientSecret = envClientSecret || fileCredentials?.clientSecret;\n const baseUrl = envBaseUrl || fileCredentials?.baseUrl || 'https://market.lobehub.com';\n\n let source: ResolvedConfig['source'] = 'none';\n if (clientId && clientSecret) {\n const idFromEnv = !!envClientId;\n const secretFromEnv = !!envClientSecret;\n\n if (idFromEnv && secretFromEnv) {\n source = 'env';\n } else if (!idFromEnv && !secretFromEnv) {\n source = 'file';\n } else {\n source = 'mixed';\n }\n }\n\n return { baseUrl, clientId, clientSecret, source };\n}\n","import { existsSync } from 'node:fs';\nimport { mkdir, readFile, rm, writeFile } from 'node:fs/promises';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\n\nexport interface StoredCredentials {\n baseUrl: string;\n clientId: string;\n clientSecret: string;\n deviceId: string;\n name: string;\n registeredAt: string;\n source?: string;\n}\n\nconst CREDENTIALS_DIR = join(homedir(), '.lobehub-market');\nconst CREDENTIALS_FILE = join(CREDENTIALS_DIR, 'credentials.json');\n\nexport async function saveCredentials(credentials: StoredCredentials): Promise<void> {\n if (!existsSync(CREDENTIALS_DIR)) {\n await mkdir(CREDENTIALS_DIR, { mode: 0o700, recursive: true });\n }\n\n const content = JSON.stringify(credentials, null, 2);\n await writeFile(CREDENTIALS_FILE, content, { encoding: 'utf-8', mode: 0o600 });\n}\n\nexport async function loadCredentials(): Promise<StoredCredentials | null> {\n if (!existsSync(CREDENTIALS_FILE)) {\n return null;\n }\n\n const content = await readFile(CREDENTIALS_FILE, 'utf-8');\n return JSON.parse(content) as StoredCredentials;\n}\n\nexport async function deleteCredentials(): Promise<boolean> {\n if (!existsSync(CREDENTIALS_FILE)) {\n return false;\n }\n\n await rm(CREDENTIALS_FILE);\n return true;\n}\n\nexport function getCredentialsPath(): string {\n return CREDENTIALS_FILE;\n}\n","export function formatOutput(format: string, data: Record<string, unknown>): void {\n if (format === 'json') {\n console.log(JSON.stringify(data, null, 2));\n return;\n }\n\n for (const [key, value] of Object.entries(data)) {\n const label = key\n .replaceAll(/([A-Z])/g, ' $1')\n .replace(/^./, (s) => s.toUpperCase())\n .trim();\n console.log(` ${label}: ${value}`);\n }\n}\n","import type { Command } from 'commander';\nimport { MarketSDK } from '@lobehub/market-sdk';\n\nimport { getCredentialsPath, saveCredentials } from '../utils/credentials';\nimport { generateDeviceId } from '../utils/deviceId';\nimport { formatOutput } from '../utils/output';\n\nexport function registerRegisterCommand(program: Command): void {\n program\n .command('register')\n .description('Register this device as an M2M client and save credentials locally')\n .requiredOption('--name <name>', 'Client name for registration')\n .option('--description <desc>', 'Description of the client')\n .option('--source <source>', 'Agent source (e.g. claude-code, open-claw, codex, cursor)')\n .option('--device-id <id>', 'Device identifier (auto-generated if omitted)')\n .option('--base-url <url>', 'Market API base URL', 'https://market.lobehub.com')\n .option('--output <format>', 'Output format (text|json)', 'text')\n .action(async (options) => {\n try {\n const deviceId = options.deviceId || generateDeviceId();\n const baseURL = process.env.MARKET_BASE_URL || options.baseUrl;\n const source = options.source;\n\n const description = [options.description, source && `source: ${source}`]\n .filter(Boolean)\n .join('. ');\n\n const sdk = new MarketSDK({ baseURL });\n\n const result = await sdk.auth.registerClient({\n clientName: options.name,\n clientType: 'cli',\n description: description || undefined,\n deviceId,\n platform: process.arch,\n version: process.version,\n });\n\n await saveCredentials({\n baseUrl: baseURL,\n clientId: result.client_id,\n clientSecret: result.client_secret,\n deviceId,\n name: options.name,\n registeredAt: new Date().toISOString(),\n source,\n });\n\n formatOutput(options.output, {\n clientId: result.client_id,\n credentialsPath: getCredentialsPath(),\n message: result.message || 'Client registered successfully',\n });\n } catch (error: any) {\n console.error(`Registration failed: ${error.message}`);\n process.exit(1);\n }\n });\n}\n","import { createHash } from 'node:crypto';\nimport { hostname, networkInterfaces } from 'node:os';\n\nexport function generateDeviceId(): string {\n const host = hostname();\n const mac = getPrimaryMacAddress();\n\n const input = mac ? `${host}:${mac}` : host;\n const hash = createHash('sha256').update(input).digest('hex').slice(0, 16);\n\n return `device-${hash}`;\n}\n\nfunction getPrimaryMacAddress(): string | undefined {\n const interfaces = networkInterfaces();\n\n for (const name of Object.keys(interfaces).sort()) {\n const entries = interfaces[name];\n if (!entries) continue;\n\n for (const entry of entries) {\n if (entry.internal) continue;\n if (entry.mac === '00:00:00:00:00:00') continue;\n\n return entry.mac;\n }\n }\n\n return undefined;\n}\n"],"mappings":";;;AAAA,SAAS,qBAAqB;AAE9B,SAAS,eAAe;;;ACDxB,SAAS,iBAAiB;;;ACD1B,SAAS,YAAY,oBAAoB;AACzC,SAAS,eAAe;AACxB,SAAS,YAAY;AASd,SAAS,gBAAgC;AAC9C,QAAM,cAAc,QAAQ,IAAI;AAChC,QAAM,kBAAkB,QAAQ,IAAI;AACpC,QAAM,aAAa,QAAQ,IAAI;AAE/B,MAAI,kBAAyF;AAE7F,MAAI;AACF,UAAM,WAAW,KAAK,QAAQ,GAAG,mBAAmB,kBAAkB;AACtE,QAAI,WAAW,QAAQ,GAAG;AACxB,YAAM,UAAU,aAAa,UAAU,OAAO;AAC9C,wBAAkB,KAAK,MAAM,OAAO;AAAA,IACtC;AAAA,EACF,QAAQ;AAAA,EAER;AAEA,QAAM,WAAW,eAAe,iBAAiB;AACjD,QAAM,eAAe,mBAAmB,iBAAiB;AACzD,QAAM,UAAU,cAAc,iBAAiB,WAAW;AAE1D,MAAI,SAAmC;AACvC,MAAI,YAAY,cAAc;AAC5B,UAAM,YAAY,CAAC,CAAC;AACpB,UAAM,gBAAgB,CAAC,CAAC;AAExB,QAAI,aAAa,eAAe;AAC9B,e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