@sesamespace/hivemind 0.8.6 → 0.8.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/{chunk-WIJHKLB3.js → chunk-EJDVSTQU.js} +3 -3
- package/dist/{chunk-LSLF7AGW.js → chunk-FWXELKMS.js} +2 -2
- package/dist/{chunk-AYHCHIM2.js → chunk-HY4VNB7P.js} +2 -2
- package/dist/{chunk-CJ4Y2BCE.js → chunk-ISMZKQVP.js} +2 -2
- package/dist/{chunk-S4QRR3ZJ.js → chunk-KYNTNQXV.js} +15 -6
- package/dist/chunk-KYNTNQXV.js.map +1 -0
- package/dist/{chunk-K7YQY253.js → chunk-SIVKWEBG.js} +2 -2
- package/dist/commands/fleet.js +3 -3
- package/dist/commands/init.js +3 -3
- package/dist/commands/start.js +3 -3
- package/dist/commands/watchdog.js +3 -3
- package/dist/index.js +2 -2
- package/dist/main.js +6 -6
- package/dist/start.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-S4QRR3ZJ.js.map +0 -1
- /package/dist/{chunk-WIJHKLB3.js.map → chunk-EJDVSTQU.js.map} +0 -0
- /package/dist/{chunk-LSLF7AGW.js.map → chunk-FWXELKMS.js.map} +0 -0
- /package/dist/{chunk-AYHCHIM2.js.map → chunk-HY4VNB7P.js.map} +0 -0
- /package/dist/{chunk-CJ4Y2BCE.js.map → chunk-ISMZKQVP.js.map} +0 -0
- /package/dist/{chunk-K7YQY253.js.map → chunk-SIVKWEBG.js.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Watchdog
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SIVKWEBG.js";
|
|
4
4
|
import {
|
|
5
5
|
defaultSentinelConfig,
|
|
6
6
|
loadConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KYNTNQXV.js";
|
|
8
8
|
|
|
9
9
|
// packages/cli/src/commands/watchdog.ts
|
|
10
10
|
import { resolve } from "path";
|
|
@@ -76,4 +76,4 @@ Options:
|
|
|
76
76
|
export {
|
|
77
77
|
runWatchdogCommand
|
|
78
78
|
};
|
|
79
|
-
//# sourceMappingURL=chunk-
|
|
79
|
+
//# sourceMappingURL=chunk-EJDVSTQU.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SesameClient,
|
|
3
3
|
getClaudeCodeOAuthToken
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KYNTNQXV.js";
|
|
5
5
|
|
|
6
6
|
// packages/cli/src/commands/init.ts
|
|
7
7
|
import { resolve, dirname } from "path";
|
|
@@ -359,4 +359,4 @@ Options:
|
|
|
359
359
|
export {
|
|
360
360
|
runInitCommand
|
|
361
361
|
};
|
|
362
|
-
//# sourceMappingURL=chunk-
|
|
362
|
+
//# sourceMappingURL=chunk-FWXELKMS.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FleetManager
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SIVKWEBG.js";
|
|
4
4
|
|
|
5
5
|
// packages/cli/src/commands/fleet.ts
|
|
6
6
|
function formatUptime(seconds) {
|
|
@@ -183,4 +183,4 @@ Commands:
|
|
|
183
183
|
export {
|
|
184
184
|
runFleetCommand
|
|
185
185
|
};
|
|
186
|
-
//# sourceMappingURL=chunk-
|
|
186
|
+
//# sourceMappingURL=chunk-HY4VNB7P.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
startPipeline
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KYNTNQXV.js";
|
|
4
4
|
|
|
5
5
|
// packages/cli/src/commands/start.ts
|
|
6
6
|
import { resolve } from "path";
|
|
@@ -66,4 +66,4 @@ Options:
|
|
|
66
66
|
export {
|
|
67
67
|
runStartCommand
|
|
68
68
|
};
|
|
69
|
-
//# sourceMappingURL=chunk-
|
|
69
|
+
//# sourceMappingURL=chunk-ISMZKQVP.js.map
|
|
@@ -97,6 +97,7 @@ var LLMClient = class {
|
|
|
97
97
|
temperature;
|
|
98
98
|
apiKey;
|
|
99
99
|
provider;
|
|
100
|
+
isOAuth;
|
|
100
101
|
constructor(config) {
|
|
101
102
|
this.baseUrl = config.base_url;
|
|
102
103
|
this.model = config.model;
|
|
@@ -104,10 +105,12 @@ var LLMClient = class {
|
|
|
104
105
|
this.temperature = config.temperature;
|
|
105
106
|
this.apiKey = config.api_key ?? "";
|
|
106
107
|
this.provider = config.provider ?? "openai";
|
|
108
|
+
this.isOAuth = false;
|
|
107
109
|
if (this.provider === "anthropic" && !this.apiKey) {
|
|
108
110
|
const token = getClaudeCodeOAuthToken();
|
|
109
111
|
if (token) {
|
|
110
112
|
this.apiKey = token;
|
|
113
|
+
this.isOAuth = true;
|
|
111
114
|
if (!this.baseUrl || this.baseUrl.includes("openrouter")) {
|
|
112
115
|
this.baseUrl = "https://api.anthropic.com";
|
|
113
116
|
}
|
|
@@ -210,13 +213,19 @@ var LLMClient = class {
|
|
|
210
213
|
console.log(`[llm] Retry ${attempt}/${MAX_RETRIES} after ${delayMs}ms...`);
|
|
211
214
|
await new Promise((r) => setTimeout(r, delayMs));
|
|
212
215
|
}
|
|
216
|
+
const headers = {
|
|
217
|
+
"Content-Type": "application/json",
|
|
218
|
+
"anthropic-version": "2023-06-01"
|
|
219
|
+
};
|
|
220
|
+
if (this.isOAuth) {
|
|
221
|
+
headers["Authorization"] = `Bearer ${this.apiKey}`;
|
|
222
|
+
headers["anthropic-beta"] = "oauth-2025-04-20";
|
|
223
|
+
} else {
|
|
224
|
+
headers["x-api-key"] = this.apiKey;
|
|
225
|
+
}
|
|
213
226
|
const resp = await fetch(`${this.baseUrl}/v1/messages`, {
|
|
214
227
|
method: "POST",
|
|
215
|
-
headers
|
|
216
|
-
"Content-Type": "application/json",
|
|
217
|
-
"x-api-key": this.apiKey,
|
|
218
|
-
"anthropic-version": "2023-06-01"
|
|
219
|
-
},
|
|
228
|
+
headers,
|
|
220
229
|
body: JSON.stringify(body)
|
|
221
230
|
});
|
|
222
231
|
if (!resp.ok) {
|
|
@@ -7384,4 +7393,4 @@ smol-toml/dist/index.js:
|
|
|
7384
7393
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
7385
7394
|
*)
|
|
7386
7395
|
*/
|
|
7387
|
-
//# sourceMappingURL=chunk-
|
|
7396
|
+
//# sourceMappingURL=chunk-KYNTNQXV.js.map
|