@hasna/assistants 1.0.6 → 1.0.8

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.
@@ -0,0 +1,22 @@
1
+ {
2
+ "id": "2482ffd8-a279-4b43-9390-1d5be17e34b0",
3
+ "createdAt": 1770367129097,
4
+ "updatedAt": 1770367170884,
5
+ "createdBy": "assistant",
6
+ "sessionId": "9dd05968-fd17-4d10-9a99-db0d1f106e1b",
7
+ "actionType": "command",
8
+ "command": "telegram updates",
9
+ "description": "Check Telegram for new messages",
10
+ "status": "active",
11
+ "schedule": {
12
+ "kind": "interval",
13
+ "unit": "seconds",
14
+ "interval": 15
15
+ },
16
+ "nextRunAt": 1770367185884,
17
+ "lastRunAt": 1770367170884,
18
+ "lastResult": {
19
+ "ok": true,
20
+ "summary": "No new messages yet - still showing the earlier ones.\n\nSend something to @hasna_assistant_bot and I'll see it on the next check."
21
+ }
22
+ }
package/dist/index.js CHANGED
@@ -6978,13 +6978,30 @@ async function loadConfig(cwd = process.cwd()) {
6978
6978
  const userConfigPath = getConfigPath("config.json");
6979
6979
  const legacyUserConfigPath = getConfigPath("settings.json");
6980
6980
  const userConfig = await loadJsonFile(userConfigPath) || await loadJsonFile(legacyUserConfigPath);
6981
- config = mergeConfig(config, userConfig || undefined);
6981
+ config = mergeConfig(config, migrateConfigKeys(userConfig) || undefined);
6982
6982
  const projectConfigPath = join(getProjectConfigDir(cwd), "config.json");
6983
6983
  const projectConfig = await loadJsonFile(projectConfigPath);
6984
- config = mergeConfig(config, projectConfig || undefined);
6984
+ config = mergeConfig(config, migrateConfigKeys(projectConfig) || undefined);
6985
6985
  const localConfigPath = join(getProjectConfigDir(cwd), "config.local.json");
6986
6986
  const localConfig = await loadJsonFile(localConfigPath);
6987
- config = mergeConfig(config, localConfig || undefined);
6987
+ config = mergeConfig(config, migrateConfigKeys(localConfig) || undefined);
6988
+ return config;
6989
+ }
6990
+ function migrateConfigKeys(config) {
6991
+ if (!config)
6992
+ return null;
6993
+ const c = config;
6994
+ if (c.subagents && !c.subassistants) {
6995
+ c.subassistants = c.subagents;
6996
+ delete c.subagents;
6997
+ }
6998
+ if (config.budget) {
6999
+ const b = config.budget;
7000
+ if (b.agent && !b.assistant) {
7001
+ b.assistant = b.agent;
7002
+ delete b.agent;
7003
+ }
7004
+ }
6988
7005
  return config;
6989
7006
  }
6990
7007
  async function loadHooksConfig(cwd = process.cwd()) {
@@ -51257,7 +51274,8 @@ class BudgetTracker {
51257
51274
  return;
51258
51275
  this.sessionUsage = data.session;
51259
51276
  this.swarmUsage = data.swarm;
51260
- for (const [assistantId, usage] of Object.entries(data.assistants)) {
51277
+ const assistantData = data.assistants || data.agents || {};
51278
+ for (const [assistantId, usage] of Object.entries(assistantData)) {
51261
51279
  this.assistantUsages.set(assistantId, usage);
51262
51280
  }
51263
51281
  } catch {}
@@ -136072,7 +136090,7 @@ async function cancelRecurringTask(cwd, id) {
136072
136090
  return task;
136073
136091
  }
136074
136092
  // packages/core/src/commands/builtin.ts
136075
- var VERSION = "1.0.6";
136093
+ var VERSION = "1.0.8";
136076
136094
  function resolveAuthTimeout(resolve5) {
136077
136095
  resolve5({ exitCode: 1, stdout: { toString: () => "{}" } });
136078
136096
  }
@@ -158917,7 +158935,11 @@ class LocalMessagesStorage {
158917
158935
  if (!await file.exists()) {
158918
158936
  return { assistants: {} };
158919
158937
  }
158920
- return await file.json();
158938
+ const data = await file.json();
158939
+ if (data.agents && !data.assistants) {
158940
+ return { assistants: data.agents };
158941
+ }
158942
+ return { assistants: data.assistants || {} };
158921
158943
  } catch {
158922
158944
  return { assistants: {} };
158923
158945
  }
@@ -190386,11 +190408,6 @@ function App2({ cwd: cwd2, version: version3 }) {
190386
190408
  setShowSchedulesPanel(true);
190387
190409
  });
190388
190410
  } else if (chunk.panel === "assistants") {
190389
- const assistantRegistry = getGlobalRegistry();
190390
- const assistants = assistantRegistry.list();
190391
- const stats = assistantRegistry.getStats();
190392
- setAssistantsList(assistants);
190393
- setRegistryStats(stats);
190394
190411
  setShowAssistantsPanel(true);
190395
190412
  } else if (chunk.panel === "hooks") {
190396
190413
  if (!hookStoreRef.current) {
@@ -192485,7 +192502,7 @@ Interactive Mode:
192485
192502
  // packages/terminal/src/index.tsx
192486
192503
  var jsx_dev_runtime30 = __toESM(require_jsx_dev_runtime(), 1);
192487
192504
  setRuntime(bunRuntime);
192488
- var VERSION4 = "1.0.6";
192505
+ var VERSION4 = "1.0.8";
192489
192506
  var SYNC_START = "\x1B[?2026h";
192490
192507
  var SYNC_END = "\x1B[?2026l";
192491
192508
  function enableSynchronizedOutput() {
@@ -192625,4 +192642,4 @@ export {
192625
192642
  main
192626
192643
  };
192627
192644
 
192628
- //# debugId=3780171890A86A4164756E2164756E21
192645
+ //# debugId=FB0979E4F4EC86DD64756E2164756E21