heyatlas 1.0.0 → 1.1.1

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/cli.js +44 -6
  2. package/package.json +8 -7
package/dist/cli.js CHANGED
@@ -1872,7 +1872,7 @@ import { homedir } from "os";
1872
1872
  import { mkdirSync, readFileSync, writeFileSync, existsSync } from "fs";
1873
1873
  var CONFIG_DIR = join(homedir(), ".heyatlas");
1874
1874
  var CREDENTIALS_FILE = join(CONFIG_DIR, "credentials.json");
1875
- var API_BASE = process.env.HEYATLAS_API || "https://www.heyatlas.app";
1875
+ var API_BASE = process.env.HEYATLAS_API || "https://heyatlas.app";
1876
1876
  var CLIENT_ID = "heyatlas-cli";
1877
1877
  function ensureConfigDir() {
1878
1878
  if (!existsSync(CONFIG_DIR)) {
@@ -1975,7 +1975,13 @@ async function login() {
1975
1975
  if (existing) {
1976
1976
  return existing;
1977
1977
  }
1978
- const { deviceCode, userCode, verificationUri, verificationUriComplete, interval } = await requestDeviceCode();
1978
+ const {
1979
+ deviceCode,
1980
+ userCode,
1981
+ verificationUri,
1982
+ verificationUriComplete,
1983
+ interval
1984
+ } = await requestDeviceCode();
1979
1985
  const formattedCode = userCode.length === 8 ? `${userCode.slice(0, 4)}-${userCode.slice(4)}` : userCode;
1980
1986
  console.log(`\uD83D\uDD10 Enter code: ${formattedCode}`);
1981
1987
  console.log(` at ${verificationUri}
@@ -49384,6 +49390,7 @@ async function connect(agentType, options = {}) {
49384
49390
  const result = agent.stream(prompt);
49385
49391
  const parts = [];
49386
49392
  const toolCalls = new Map;
49393
+ const activeReasoningParts = new Map;
49387
49394
  for await (const chunk of result.toUIMessageStream()) {
49388
49395
  await tunnel.broadcastTaskEvent(task.id, {
49389
49396
  type: "ui_stream_chunk",
@@ -49400,6 +49407,31 @@ async function connect(agentType, options = {}) {
49400
49407
  }
49401
49408
  break;
49402
49409
  }
49410
+ case "reasoning-start": {
49411
+ const reasoningPart = {
49412
+ type: "reasoning",
49413
+ text: "",
49414
+ state: "streaming"
49415
+ };
49416
+ activeReasoningParts.set(chunk.id, reasoningPart);
49417
+ parts.push(reasoningPart);
49418
+ break;
49419
+ }
49420
+ case "reasoning-delta": {
49421
+ const reasoningPart = activeReasoningParts.get(chunk.id);
49422
+ if (reasoningPart && "text" in reasoningPart) {
49423
+ reasoningPart.text += chunk.delta || "";
49424
+ }
49425
+ break;
49426
+ }
49427
+ case "reasoning-end": {
49428
+ const reasoningPart = activeReasoningParts.get(chunk.id);
49429
+ if (reasoningPart) {
49430
+ reasoningPart.state = "done";
49431
+ activeReasoningParts.delete(chunk.id);
49432
+ }
49433
+ break;
49434
+ }
49403
49435
  case "tool-input-available":
49404
49436
  toolCalls.set(chunk.toolCallId, {
49405
49437
  type: "dynamic-tool",
@@ -49454,7 +49486,7 @@ async function connect(agentType, options = {}) {
49454
49486
  });
49455
49487
  await tunnel.connect(credentials.userId, agentType);
49456
49488
  console.log(`Tunnel established`);
49457
- const voiceUrl = `${process.env.HEYATLAS_API || "https://www.heyatlas.app"}/chat`;
49489
+ const voiceUrl = `${process.env.HEYATLAS_API || "https://heyatlas.app"}/chat`;
49458
49490
  if (options.openBrowser !== false) {
49459
49491
  try {
49460
49492
  const { execSync } = await import("child_process");
@@ -49464,7 +49496,7 @@ async function connect(agentType, options = {}) {
49464
49496
  }
49465
49497
  console.log(`
49466
49498
  HeyAtlas connected to ${agentType}`);
49467
- console.log(`Talk here: ${voiceUrl}`);
49499
+ console.log(`Continue here: ${voiceUrl}`);
49468
49500
  console.log(`
49469
49501
  Press Ctrl+C to disconnect
49470
49502
  `);
@@ -49489,13 +49521,19 @@ function buildPromptWithContext(task) {
49489
49521
  if (parts) {
49490
49522
  const textPart = parts.find((p) => p.type === "text");
49491
49523
  if (textPart && textPart.text) {
49492
- messages.push({ role: String(data.role || "assistant"), content: String(textPart.text) });
49524
+ messages.push({
49525
+ role: String(data.role || "assistant"),
49526
+ content: String(textPart.text)
49527
+ });
49493
49528
  }
49494
49529
  }
49495
49530
  } else if (e.type === "message" && e.data) {
49496
49531
  const data = e.data;
49497
49532
  if (data.role && data.content) {
49498
- messages.push({ role: String(data.role), content: String(data.content) });
49533
+ messages.push({
49534
+ role: String(data.role),
49535
+ content: String(data.content)
49536
+ });
49499
49537
  }
49500
49538
  } else if (e.role && e.content) {
49501
49539
  messages.push({ role: String(e.role), content: String(e.content) });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heyatlas",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "Tunnel local AI agents to the cloud for voice-powered interactions",
5
5
  "author": "Bishwendu Kundu <bishwenduk029@gmail.com>",
6
6
  "license": "MIT",
@@ -20,6 +20,12 @@
20
20
  "LICENSE",
21
21
  "README.md"
22
22
  ],
23
+ "scripts": {
24
+ "start": "bun run index.ts",
25
+ "dev": "bun run --hot index.ts",
26
+ "build": "bun build index.ts --target=node --outfile=dist/cli.js && { echo '#!/usr/bin/env node'; cat dist/cli.js; } > dist/cli.tmp && mv dist/cli.tmp dist/cli.js",
27
+ "prepublishOnly": "bun run build"
28
+ },
23
29
  "devDependencies": {
24
30
  "@types/bun": "latest"
25
31
  },
@@ -42,10 +48,5 @@
42
48
  ],
43
49
  "engines": {
44
50
  "node": ">=18.0.0"
45
- },
46
- "scripts": {
47
- "start": "bun run index.ts",
48
- "dev": "bun run --hot index.ts",
49
- "build": "bun build index.ts --target=node --outfile=dist/cli.js && { echo '#!/usr/bin/env node'; cat dist/cli.js; } > dist/cli.tmp && mv dist/cli.tmp dist/cli.js"
50
51
  }
51
- }
52
+ }