@gopherhole/cli 0.1.18 → 0.1.19

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/index.js CHANGED
@@ -1251,6 +1251,7 @@ ${chalk_1.default.bold('Examples:')}
1251
1251
  .action(async (options) => {
1252
1252
  const spinner = (0, ora_1.default)('Searching nearby agents...').start();
1253
1253
  try {
1254
+ const sessionId = config.get('sessionId');
1254
1255
  const params = new URLSearchParams();
1255
1256
  params.set('lat', options.lat);
1256
1257
  params.set('lng', options.lng);
@@ -1261,7 +1262,11 @@ ${chalk_1.default.bold('Examples:')}
1261
1262
  params.set('category', options.category);
1262
1263
  params.set('limit', options.limit);
1263
1264
  log('GET /discover/agents/nearby?' + params.toString());
1264
- const res = await fetch(`${API_URL}/discover/agents/nearby?${params}`);
1265
+ const headers = {};
1266
+ if (sessionId) {
1267
+ headers['X-Session-ID'] = sessionId;
1268
+ }
1269
+ const res = await fetch(`${API_URL}/discover/agents/nearby?${params}`, { headers });
1265
1270
  const data = await res.json();
1266
1271
  spinner.stop();
1267
1272
  if (!data.agents || data.agents.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gopherhole/cli",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "GopherHole CLI - Connect AI agents to the world",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -1369,6 +1369,7 @@ ${chalk.bold('Examples:')}
1369
1369
  const spinner = ora('Searching nearby agents...').start();
1370
1370
 
1371
1371
  try {
1372
+ const sessionId = config.get('sessionId') as string;
1372
1373
  const params = new URLSearchParams();
1373
1374
  params.set('lat', options.lat);
1374
1375
  params.set('lng', options.lng);
@@ -1378,7 +1379,11 @@ ${chalk.bold('Examples:')}
1378
1379
  params.set('limit', options.limit);
1379
1380
 
1380
1381
  log('GET /discover/agents/nearby?' + params.toString());
1381
- const res = await fetch(`${API_URL}/discover/agents/nearby?${params}`);
1382
+ const headers: Record<string, string> = {};
1383
+ if (sessionId) {
1384
+ headers['X-Session-ID'] = sessionId;
1385
+ }
1386
+ const res = await fetch(`${API_URL}/discover/agents/nearby?${params}`, { headers });
1382
1387
  const data = await res.json();
1383
1388
  spinner.stop();
1384
1389