@hasna/assistants 1.0.5 → 1.0.7
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 +31 -8
- package/dist/index.js.map +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
+
var __promiseAll = (arr) => Promise.all(arr);
|
|
2
3
|
// @bun
|
|
3
4
|
var __create = Object.create;
|
|
4
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -6977,13 +6978,30 @@ async function loadConfig(cwd = process.cwd()) {
|
|
|
6977
6978
|
const userConfigPath = getConfigPath("config.json");
|
|
6978
6979
|
const legacyUserConfigPath = getConfigPath("settings.json");
|
|
6979
6980
|
const userConfig = await loadJsonFile(userConfigPath) || await loadJsonFile(legacyUserConfigPath);
|
|
6980
|
-
config = mergeConfig(config, userConfig || undefined);
|
|
6981
|
+
config = mergeConfig(config, migrateConfigKeys(userConfig) || undefined);
|
|
6981
6982
|
const projectConfigPath = join(getProjectConfigDir(cwd), "config.json");
|
|
6982
6983
|
const projectConfig = await loadJsonFile(projectConfigPath);
|
|
6983
|
-
config = mergeConfig(config, projectConfig || undefined);
|
|
6984
|
+
config = mergeConfig(config, migrateConfigKeys(projectConfig) || undefined);
|
|
6984
6985
|
const localConfigPath = join(getProjectConfigDir(cwd), "config.local.json");
|
|
6985
6986
|
const localConfig = await loadJsonFile(localConfigPath);
|
|
6986
|
-
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
|
+
}
|
|
6987
7005
|
return config;
|
|
6988
7006
|
}
|
|
6989
7007
|
async function loadHooksConfig(cwd = process.cwd()) {
|
|
@@ -51256,7 +51274,8 @@ class BudgetTracker {
|
|
|
51256
51274
|
return;
|
|
51257
51275
|
this.sessionUsage = data.session;
|
|
51258
51276
|
this.swarmUsage = data.swarm;
|
|
51259
|
-
|
|
51277
|
+
const assistantData = data.assistants || data.agents || {};
|
|
51278
|
+
for (const [assistantId, usage] of Object.entries(assistantData)) {
|
|
51260
51279
|
this.assistantUsages.set(assistantId, usage);
|
|
51261
51280
|
}
|
|
51262
51281
|
} catch {}
|
|
@@ -136071,7 +136090,7 @@ async function cancelRecurringTask(cwd, id) {
|
|
|
136071
136090
|
return task;
|
|
136072
136091
|
}
|
|
136073
136092
|
// packages/core/src/commands/builtin.ts
|
|
136074
|
-
var VERSION = "1.0.
|
|
136093
|
+
var VERSION = "1.0.7";
|
|
136075
136094
|
function resolveAuthTimeout(resolve5) {
|
|
136076
136095
|
resolve5({ exitCode: 1, stdout: { toString: () => "{}" } });
|
|
136077
136096
|
}
|
|
@@ -158916,7 +158935,11 @@ class LocalMessagesStorage {
|
|
|
158916
158935
|
if (!await file.exists()) {
|
|
158917
158936
|
return { assistants: {} };
|
|
158918
158937
|
}
|
|
158919
|
-
|
|
158938
|
+
const data = await file.json();
|
|
158939
|
+
if (data.agents && !data.assistants) {
|
|
158940
|
+
return { assistants: data.agents };
|
|
158941
|
+
}
|
|
158942
|
+
return { assistants: data.assistants || {} };
|
|
158920
158943
|
} catch {
|
|
158921
158944
|
return { assistants: {} };
|
|
158922
158945
|
}
|
|
@@ -192484,7 +192507,7 @@ Interactive Mode:
|
|
|
192484
192507
|
// packages/terminal/src/index.tsx
|
|
192485
192508
|
var jsx_dev_runtime30 = __toESM(require_jsx_dev_runtime(), 1);
|
|
192486
192509
|
setRuntime(bunRuntime);
|
|
192487
|
-
var VERSION4 = "1.0.
|
|
192510
|
+
var VERSION4 = "1.0.7";
|
|
192488
192511
|
var SYNC_START = "\x1B[?2026h";
|
|
192489
192512
|
var SYNC_END = "\x1B[?2026l";
|
|
192490
192513
|
function enableSynchronizedOutput() {
|
|
@@ -192624,4 +192647,4 @@ export {
|
|
|
192624
192647
|
main
|
|
192625
192648
|
};
|
|
192626
192649
|
|
|
192627
|
-
//# debugId=
|
|
192650
|
+
//# debugId=D5A3B4DDF64180F864756E2164756E21
|