heyio 4.0.1 → 4.0.3

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.
@@ -31151,7 +31151,7 @@ var require_view = __commonJS({
31151
31151
  var debug = require_src()("express:view");
31152
31152
  var path = __require("node:path");
31153
31153
  var fs = __require("node:fs");
31154
- var dirname8 = path.dirname;
31154
+ var dirname9 = path.dirname;
31155
31155
  var basename6 = path.basename;
31156
31156
  var extname4 = path.extname;
31157
31157
  var join14 = path.join;
@@ -31190,7 +31190,7 @@ var require_view = __commonJS({
31190
31190
  for (var i = 0; i < roots.length && !path2; i++) {
31191
31191
  var root = roots[i];
31192
31192
  var loc = resolve5(root, name);
31193
- var dir = dirname8(loc);
31193
+ var dir = dirname9(loc);
31194
31194
  var file2 = basename6(loc);
31195
31195
  path2 = this.resolve(dir, file2);
31196
31196
  }
@@ -59888,11 +59888,12 @@ var init_websocket = __esm({
59888
59888
  // packages/daemon/src/api/server.ts
59889
59889
  import { existsSync as existsSync2 } from "node:fs";
59890
59890
  import { createServer } from "node:http";
59891
- import { resolve as resolve2 } from "node:path";
59891
+ import { dirname as dirname4, resolve as resolve2 } from "node:path";
59892
+ import { fileURLToPath } from "node:url";
59892
59893
  function createApiServer(config2) {
59893
59894
  const app = (0, import_express10.default)();
59894
59895
  const server = createServer(app);
59895
- const webDirectory = resolve2(config2.webDir ?? resolve2(process.cwd(), "dist", "web"));
59896
+ const webDirectory = resolve2(config2.webDir ?? resolve2(__dirname2, "..", "web"));
59896
59897
  app.use((req, res, next) => {
59897
59898
  res.header("Access-Control-Allow-Origin", "*");
59898
59899
  res.header("Access-Control-Allow-Headers", "Authorization, Content-Type");
@@ -59904,6 +59905,12 @@ function createApiServer(config2) {
59904
59905
  next();
59905
59906
  });
59906
59907
  app.use(import_express10.default.json({ limit: "1mb" }));
59908
+ app.get("/api/auth/config", (_req, res) => {
59909
+ res.json({
59910
+ supabaseUrl: config2.supabaseUrl ?? null,
59911
+ supabaseAnonKey: config2.supabaseAnonKey ?? null
59912
+ });
59913
+ });
59907
59914
  app.use("/api", createAuthMiddleware(config2));
59908
59915
  app.use(router2);
59909
59916
  app.use(router7);
@@ -59962,7 +59969,7 @@ function createApiServer(config2) {
59962
59969
  }
59963
59970
  };
59964
59971
  }
59965
- var import_express10;
59972
+ var import_express10, __filename, __dirname2;
59966
59973
  var init_server = __esm({
59967
59974
  "packages/daemon/src/api/server.ts"() {
59968
59975
  "use strict";
@@ -59981,6 +59988,8 @@ var init_server = __esm({
59981
59988
  init_usage();
59982
59989
  init_wiki3();
59983
59990
  init_websocket();
59991
+ __filename = fileURLToPath(import.meta.url);
59992
+ __dirname2 = dirname4(__filename);
59984
59993
  }
59985
59994
  });
59986
59995
 
@@ -67383,7 +67392,7 @@ var init_session = __esm({
67383
67392
 
67384
67393
  // packages/daemon/src/skills/loader.ts
67385
67394
  import { readFile as readFile4, readdir as readdir2 } from "node:fs/promises";
67386
- import { basename as basename3, dirname as dirname4, join as join7 } from "node:path";
67395
+ import { basename as basename3, dirname as dirname5, join as join7 } from "node:path";
67387
67396
  async function scanSkills() {
67388
67397
  const skillFilePaths = await collectSkillFiles(SKILLS_DIR);
67389
67398
  const skills = await Promise.all(skillFilePaths.map((filePath) => readSkillFromFile(filePath)));
@@ -67414,7 +67423,7 @@ async function collectSkillFiles(directory) {
67414
67423
  async function readSkillFromFile(filePath) {
67415
67424
  const rawContent = await readFile4(filePath, "utf8");
67416
67425
  const parsed = (0, import_gray_matter2.default)(rawContent);
67417
- const skillId = basename3(dirname4(filePath));
67426
+ const skillId = basename3(dirname5(filePath));
67418
67427
  return {
67419
67428
  id: skillId,
67420
67429
  name: typeof parsed.data.name === "string" && parsed.data.name.trim() !== "" ? parsed.data.name : skillId,
@@ -67438,7 +67447,7 @@ var init_loader = __esm({
67438
67447
 
67439
67448
  // packages/daemon/src/skills/manager.ts
67440
67449
  import { mkdir as mkdir5, readFile as readFile5, rm as rm3, writeFile as writeFile4 } from "node:fs/promises";
67441
- import { basename as basename4, dirname as dirname5, join as join8 } from "node:path";
67450
+ import { basename as basename4, dirname as dirname6, join as join8 } from "node:path";
67442
67451
  async function installSkill2(url2) {
67443
67452
  const response = await fetch(url2);
67444
67453
  if (!response.ok) {
@@ -67492,7 +67501,7 @@ async function readSkillsLock() {
67492
67501
  }
67493
67502
  }
67494
67503
  async function writeSkillsLock2(lockFile) {
67495
- await mkdir5(dirname5(SKILLS_LOCK_PATH), { recursive: true });
67504
+ await mkdir5(dirname6(SKILLS_LOCK_PATH), { recursive: true });
67496
67505
  await writeFile4(SKILLS_LOCK_PATH, `${JSON.stringify(lockFile, null, 2)}
67497
67506
  `, "utf8");
67498
67507
  }
@@ -67584,7 +67593,7 @@ var init_skills2 = __esm({
67584
67593
  // packages/daemon/src/orchestrator/tools/coding.ts
67585
67594
  import { exec } from "node:child_process";
67586
67595
  import { mkdir as mkdir6, readFile as readFile6, readdir as readdir3, stat as stat2, writeFile as writeFile5 } from "node:fs/promises";
67587
- import { dirname as dirname6, relative as relative2, resolve as resolve3 } from "node:path";
67596
+ import { dirname as dirname7, relative as relative2, resolve as resolve3 } from "node:path";
67588
67597
  import { promisify } from "node:util";
67589
67598
  function resolveWorkspacePath(inputPath = ".") {
67590
67599
  const resolvedPath = resolve3(DEFAULT_ROOT, inputPath);
@@ -67693,7 +67702,7 @@ var init_coding = __esm({
67693
67702
  case "edit_file": {
67694
67703
  const { path, content } = editFileSchema.parse(rawArgs);
67695
67704
  const filePath = resolveWorkspacePath(path);
67696
- await mkdir6(dirname6(filePath), { recursive: true });
67705
+ await mkdir6(dirname7(filePath), { recursive: true });
67697
67706
  await writeFile5(filePath, content, "utf8");
67698
67707
  return { message: `Wrote ${filePath}.`, path: filePath };
67699
67708
  }
@@ -67714,7 +67723,7 @@ var init_coding = __esm({
67714
67723
  case "search_code": {
67715
67724
  const { pattern, path, glob } = searchCodeSchema.parse(rawArgs);
67716
67725
  const basePath = resolveWorkspacePath(path ?? ".");
67717
- const searchRoot = (await stat2(basePath)).isDirectory() ? basePath : dirname6(basePath);
67726
+ const searchRoot = (await stat2(basePath)).isDirectory() ? basePath : dirname7(basePath);
67718
67727
  const args = ["--line-number", "--no-heading", pattern, searchRoot];
67719
67728
  if (glob) {
67720
67729
  args.unshift("--glob", glob);
@@ -68075,7 +68084,7 @@ var init_history = __esm({
68075
68084
  // packages/daemon/src/execution/agent.ts
68076
68085
  import { exec as exec2 } from "node:child_process";
68077
68086
  import { mkdir as mkdir7, readFile as readFile7, readdir as readdir4, stat as stat3, writeFile as writeFile6 } from "node:fs/promises";
68078
- import { dirname as dirname7, extname as extname3, isAbsolute, join as join9, relative as relative3, resolve as resolve4 } from "node:path";
68087
+ import { dirname as dirname8, extname as extname3, isAbsolute, join as join9, relative as relative3, resolve as resolve4 } from "node:path";
68079
68088
  import { promisify as promisify2 } from "node:util";
68080
68089
  import {
68081
68090
  CopilotClient as CopilotClient2,
@@ -68190,7 +68199,7 @@ function createAgentToolSet(worktreePath) {
68190
68199
  skipPermission: true,
68191
68200
  handler: async (args) => {
68192
68201
  const targetPath = ensureWithinWorktree(worktreePath, args.path);
68193
- await mkdir7(dirname7(targetPath), { recursive: true });
68202
+ await mkdir7(dirname8(targetPath), { recursive: true });
68194
68203
  let nextContent = args.content ?? "";
68195
68204
  let previousContent = "";
68196
68205
  try {
@@ -27986,7 +27986,7 @@ var require_view = __commonJS({
27986
27986
  var debug = require_src()("express:view");
27987
27987
  var path = __require("node:path");
27988
27988
  var fs = __require("node:fs");
27989
- var dirname8 = path.dirname;
27989
+ var dirname9 = path.dirname;
27990
27990
  var basename6 = path.basename;
27991
27991
  var extname4 = path.extname;
27992
27992
  var join14 = path.join;
@@ -28025,7 +28025,7 @@ var require_view = __commonJS({
28025
28025
  for (var i = 0; i < roots.length && !path2; i++) {
28026
28026
  var root = roots[i];
28027
28027
  var loc = resolve5(root, name);
28028
- var dir = dirname8(loc);
28028
+ var dir = dirname9(loc);
28029
28029
  var file2 = basename6(loc);
28030
28030
  path2 = this.resolve(dir, file2);
28031
28031
  }
@@ -63017,7 +63017,8 @@ async function createNotificationItemIfMissing(eventBus2, payload, type, title,
63017
63017
  // packages/daemon/src/api/server.ts
63018
63018
  import { existsSync as existsSync2 } from "node:fs";
63019
63019
  import { createServer } from "node:http";
63020
- import { resolve as resolve2 } from "node:path";
63020
+ import { dirname as dirname4, resolve as resolve2 } from "node:path";
63021
+ import { fileURLToPath } from "node:url";
63021
63022
  var import_express10 = __toESM(require_express2(), 1);
63022
63023
 
63023
63024
  // packages/daemon/src/api/routes/activity.ts
@@ -78976,10 +78977,12 @@ function send(socket, type, payload, channel) {
78976
78977
  }
78977
78978
 
78978
78979
  // packages/daemon/src/api/server.ts
78980
+ var __filename = fileURLToPath(import.meta.url);
78981
+ var __dirname2 = dirname4(__filename);
78979
78982
  function createApiServer(config2) {
78980
78983
  const app = (0, import_express10.default)();
78981
78984
  const server = createServer(app);
78982
- const webDirectory = resolve2(config2.webDir ?? resolve2(process.cwd(), "dist", "web"));
78985
+ const webDirectory = resolve2(config2.webDir ?? resolve2(__dirname2, "..", "web"));
78983
78986
  app.use((req, res, next) => {
78984
78987
  res.header("Access-Control-Allow-Origin", "*");
78985
78988
  res.header("Access-Control-Allow-Headers", "Authorization, Content-Type");
@@ -78991,6 +78994,12 @@ function createApiServer(config2) {
78991
78994
  next();
78992
78995
  });
78993
78996
  app.use(import_express10.default.json({ limit: "1mb" }));
78997
+ app.get("/api/auth/config", (_req, res) => {
78998
+ res.json({
78999
+ supabaseUrl: config2.supabaseUrl ?? null,
79000
+ supabaseAnonKey: config2.supabaseAnonKey ?? null
79001
+ });
79002
+ });
78994
79003
  app.use("/api", createAuthMiddleware(config2));
78995
79004
  app.use(router2);
78996
79005
  app.use(router7);
@@ -79568,7 +79577,7 @@ async function sendMessage(session, message2, onChunk) {
79568
79577
  // packages/daemon/src/skills/loader.ts
79569
79578
  var import_gray_matter2 = __toESM(require_gray_matter(), 1);
79570
79579
  import { readFile as readFile4, readdir as readdir2 } from "node:fs/promises";
79571
- import { basename as basename3, dirname as dirname4, join as join7 } from "node:path";
79580
+ import { basename as basename3, dirname as dirname5, join as join7 } from "node:path";
79572
79581
  async function scanSkills() {
79573
79582
  const skillFilePaths = await collectSkillFiles(SKILLS_DIR);
79574
79583
  const skills = await Promise.all(skillFilePaths.map((filePath) => readSkillFromFile(filePath)));
@@ -79599,7 +79608,7 @@ async function collectSkillFiles(directory) {
79599
79608
  async function readSkillFromFile(filePath) {
79600
79609
  const rawContent = await readFile4(filePath, "utf8");
79601
79610
  const parsed = (0, import_gray_matter2.default)(rawContent);
79602
- const skillId = basename3(dirname4(filePath));
79611
+ const skillId = basename3(dirname5(filePath));
79603
79612
  return {
79604
79613
  id: skillId,
79605
79614
  name: typeof parsed.data.name === "string" && parsed.data.name.trim() !== "" ? parsed.data.name : skillId,
@@ -79616,7 +79625,7 @@ function isMissingFileError4(error51) {
79616
79625
  // packages/daemon/src/skills/manager.ts
79617
79626
  var import_gray_matter3 = __toESM(require_gray_matter(), 1);
79618
79627
  import { mkdir as mkdir5, readFile as readFile5, rm as rm3, writeFile as writeFile4 } from "node:fs/promises";
79619
- import { basename as basename4, dirname as dirname5, join as join8 } from "node:path";
79628
+ import { basename as basename4, dirname as dirname6, join as join8 } from "node:path";
79620
79629
  async function installSkill2(url2) {
79621
79630
  const response = await fetch(url2);
79622
79631
  if (!response.ok) {
@@ -79670,7 +79679,7 @@ async function readSkillsLock() {
79670
79679
  }
79671
79680
  }
79672
79681
  async function writeSkillsLock2(lockFile) {
79673
- await mkdir5(dirname5(SKILLS_LOCK_PATH), { recursive: true });
79682
+ await mkdir5(dirname6(SKILLS_LOCK_PATH), { recursive: true });
79674
79683
  await writeFile4(SKILLS_LOCK_PATH, `${JSON.stringify(lockFile, null, 2)}
79675
79684
  `, "utf8");
79676
79685
  }
@@ -79739,7 +79748,7 @@ function getSkillsForActivation(skills, userMessage) {
79739
79748
  // packages/daemon/src/orchestrator/tools/coding.ts
79740
79749
  import { exec } from "node:child_process";
79741
79750
  import { mkdir as mkdir6, readFile as readFile6, readdir as readdir3, stat as stat2, writeFile as writeFile5 } from "node:fs/promises";
79742
- import { dirname as dirname6, relative as relative2, resolve as resolve3 } from "node:path";
79751
+ import { dirname as dirname7, relative as relative2, resolve as resolve3 } from "node:path";
79743
79752
  import { promisify } from "node:util";
79744
79753
  var execAsync = promisify(exec);
79745
79754
  var DEFAULT_ROOT = process.cwd();
@@ -79843,7 +79852,7 @@ var executeCodingToolCall = async (toolName, rawArgs) => {
79843
79852
  case "edit_file": {
79844
79853
  const { path, content } = editFileSchema.parse(rawArgs);
79845
79854
  const filePath = resolveWorkspacePath(path);
79846
- await mkdir6(dirname6(filePath), { recursive: true });
79855
+ await mkdir6(dirname7(filePath), { recursive: true });
79847
79856
  await writeFile5(filePath, content, "utf8");
79848
79857
  return { message: `Wrote ${filePath}.`, path: filePath };
79849
79858
  }
@@ -79864,7 +79873,7 @@ var executeCodingToolCall = async (toolName, rawArgs) => {
79864
79873
  case "search_code": {
79865
79874
  const { pattern, path, glob } = searchCodeSchema.parse(rawArgs);
79866
79875
  const basePath = resolveWorkspacePath(path ?? ".");
79867
- const searchRoot = (await stat2(basePath)).isDirectory() ? basePath : dirname6(basePath);
79876
+ const searchRoot = (await stat2(basePath)).isDirectory() ? basePath : dirname7(basePath);
79868
79877
  const args = ["--line-number", "--no-heading", pattern, searchRoot];
79869
79878
  if (glob) {
79870
79879
  args.unshift("--glob", glob);
@@ -80162,7 +80171,7 @@ async function isSquadAvailable(squadId) {
80162
80171
  // packages/daemon/src/execution/agent.ts
80163
80172
  import { exec as exec2 } from "node:child_process";
80164
80173
  import { mkdir as mkdir7, readFile as readFile7, readdir as readdir4, stat as stat3, writeFile as writeFile6 } from "node:fs/promises";
80165
- import { dirname as dirname7, extname as extname3, isAbsolute, join as join9, relative as relative3, resolve as resolve4 } from "node:path";
80174
+ import { dirname as dirname8, extname as extname3, isAbsolute, join as join9, relative as relative3, resolve as resolve4 } from "node:path";
80166
80175
  import { promisify as promisify2 } from "node:util";
80167
80176
  import {
80168
80177
  CopilotClient as CopilotClient2,
@@ -80307,7 +80316,7 @@ function createAgentToolSet(worktreePath) {
80307
80316
  skipPermission: true,
80308
80317
  handler: async (args) => {
80309
80318
  const targetPath = ensureWithinWorktree(worktreePath, args.path);
80310
- await mkdir7(dirname7(targetPath), { recursive: true });
80319
+ await mkdir7(dirname8(targetPath), { recursive: true });
80311
80320
  let nextContent = args.content ?? "";
80312
80321
  let previousContent = "";
80313
80322
  try {