@heossihq/beecode 1.0.53 → 1.0.54

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 (3) hide show
  1. package/README.md +3 -2
  2. package/dist/cli.js +73 -9
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -22,8 +22,9 @@ worker shards and an independent verifier without starting one provider call
22
22
  per logical agent.
23
23
 
24
24
  Bee's API edge supports `X25519MLKEM768` hybrid key exchange, whose ML-KEM-768
25
- half is NIST FIPS 203. CLI negotiation depends on the installed Node runtime;
26
- edge support alone is not proof that every CLI connection selected that group.
25
+ half is NIST FIPS 203. CLI agent requests require that hybrid group, TLS 1.3,
26
+ AES-256-GCM and verified certificates; unsupported runtimes fail without sending
27
+ the request. Browser login and external tools are separate transport boundaries.
27
28
  Check the edge's hybrid-only handshake yourself:
28
29
 
29
30
  ```sh
package/dist/cli.js CHANGED
@@ -22351,9 +22351,9 @@ async function loginWithBrowser(store, signal) {
22351
22351
  };
22352
22352
  const cancel = () => finish(new DOMException("Login cancelled", "AbortError"));
22353
22353
  const timeout = setTimeout(() => finish(new Error("Bee Code login timed out")), MAX_LOGIN_MS);
22354
- const server = createServer((request, response) => {
22354
+ const server = createServer((request2, response) => {
22355
22355
  void (async () => {
22356
- const url2 = new URL(request.url ?? "/", "http://127.0.0.1");
22356
+ const url2 = new URL(request2.url ?? "/", "http://127.0.0.1");
22357
22357
  if (url2.pathname === "/complete" && pending) {
22358
22358
  const outcome = pending;
22359
22359
  pending = null;
@@ -22612,7 +22612,7 @@ var BeeCodeExecutor = class {
22612
22612
  // src/mcp.ts
22613
22613
  import { spawn as spawn4 } from "node:child_process";
22614
22614
  var PROTOCOL_VERSION = "2025-06-18";
22615
- var CLIENT_INFO = { name: "beecode", version: "1.0.53" };
22615
+ var CLIENT_INFO = { name: "beecode", version: "1.0.54" };
22616
22616
  var McpStdioClient = class {
22617
22617
  command;
22618
22618
  args;
@@ -22718,6 +22718,70 @@ function connectQnsiMcp(options) {
22718
22718
  return new McpStdioClient(parts[0], parts.slice(1), env);
22719
22719
  }
22720
22720
 
22721
+ // ../core/dist/hybrid-fetch.js
22722
+ import { request } from "node:https";
22723
+ import { Readable } from "node:stream";
22724
+ var HYBRID_TLS_POLICY = Object.freeze({
22725
+ minVersion: "TLSv1.3",
22726
+ maxVersion: "TLSv1.3",
22727
+ ecdhCurve: "X25519MLKEM768",
22728
+ ciphers: "TLS_AES_256_GCM_SHA384",
22729
+ rejectUnauthorized: true
22730
+ });
22731
+ var hybridFetch = async (input2, init = {}) => {
22732
+ if (input2 instanceof Request)
22733
+ throw new TypeError("Agent transport requires a URL");
22734
+ const url2 = new URL(String(input2));
22735
+ if (url2.protocol !== "https:" || url2.username || url2.password) {
22736
+ throw new TypeError("Agent transport requires HTTPS without URL credentials");
22737
+ }
22738
+ if (init.body != null && typeof init.body !== "string" && !(init.body instanceof FormData)) {
22739
+ throw new TypeError("Agent transport requires a string or multipart body");
22740
+ }
22741
+ init.signal?.throwIfAborted();
22742
+ const requestHeaders = new Headers(init.headers);
22743
+ let body = init.body;
22744
+ if (init.body instanceof FormData) {
22745
+ const encoded = new Request(url2, { method: "POST", body: init.body });
22746
+ requestHeaders.set("content-type", encoded.headers.get("content-type"));
22747
+ body = Buffer.from(await encoded.arrayBuffer());
22748
+ }
22749
+ if (body && Buffer.byteLength(body) > 32 * 1024 * 1024) {
22750
+ throw new RangeError("Agent transport request exceeds 32 MiB");
22751
+ }
22752
+ const headers = Object.fromEntries(requestHeaders.entries());
22753
+ return new Promise((resolve3, reject) => {
22754
+ const req = request(url2, {
22755
+ ...HYBRID_TLS_POLICY,
22756
+ method: init.method ?? "GET",
22757
+ headers,
22758
+ signal: init.signal ?? void 0,
22759
+ // Do not reuse a globally configured agent with a different TLS policy.
22760
+ agent: false
22761
+ }, (res) => {
22762
+ const responseHeaders = new Headers();
22763
+ for (const [key, value] of Object.entries(res.headers)) {
22764
+ if (Array.isArray(value)) {
22765
+ for (const item of value)
22766
+ responseHeaders.append(key, item);
22767
+ } else if (value !== void 0)
22768
+ responseHeaders.set(key, value);
22769
+ }
22770
+ const status = res.statusCode ?? 502;
22771
+ const noBody = init.method === "HEAD" || status === 204 || status === 205 || status === 304;
22772
+ if (noBody)
22773
+ res.resume();
22774
+ resolve3(new Response(noBody ? null : Readable.toWeb(res), {
22775
+ status,
22776
+ headers: responseHeaders
22777
+ }));
22778
+ });
22779
+ req.once("error", reject);
22780
+ req.setTimeout(18e4, () => req.destroy(new Error("Agent transport timed out")));
22781
+ req.end(body);
22782
+ });
22783
+ };
22784
+
22721
22785
  // src/transport.ts
22722
22786
  var BeeCodeHttpTransport = class {
22723
22787
  constructor(endpoint, token) {
@@ -22726,15 +22790,15 @@ var BeeCodeHttpTransport = class {
22726
22790
  }
22727
22791
  endpoint;
22728
22792
  token;
22729
- async *streamTurn(request, signal) {
22730
- const response = await fetch(this.endpoint, {
22793
+ async *streamTurn(request2, signal) {
22794
+ const response = await hybridFetch(this.endpoint, {
22731
22795
  method: "POST",
22732
22796
  headers: {
22733
22797
  "content-type": "application/json",
22734
22798
  accept: "application/x-ndjson",
22735
22799
  ...this.token ? { authorization: `Bearer ${this.token}` } : {}
22736
22800
  },
22737
- body: JSON.stringify(request),
22801
+ body: JSON.stringify(request2),
22738
22802
  signal
22739
22803
  });
22740
22804
  if (!response.ok || !response.body) {
@@ -22769,7 +22833,7 @@ function cliComputerUseReport() {
22769
22833
  protocol: "bee.computer.v1",
22770
22834
  host_id: "beecode-cli",
22771
22835
  host_type: "cli",
22772
- version: "1.0.53",
22836
+ version: "1.0.54",
22773
22837
  capabilities: {
22774
22838
  screen_observation: { state: "unsupported", reason },
22775
22839
  accessibility_tree: { state: "unsupported", reason },
@@ -22887,7 +22951,7 @@ async function main() {
22887
22951
  workspace,
22888
22952
  options.beeCoAuthor ? beeCodeCoAuthorTrailer(options.model) ?? void 0 : void 0
22889
22953
  );
22890
- const request = {
22954
+ const request2 = {
22891
22955
  protocol: BEE_CODE_RUNTIME_PROTOCOL,
22892
22956
  session_id: randomUUID4(),
22893
22957
  run_id: randomUUID4(),
@@ -22927,7 +22991,7 @@ async function main() {
22927
22991
  approvals: approvals(options),
22928
22992
  onEvent: render
22929
22993
  });
22930
- const result = await client.run(request, controller.signal);
22994
+ const result = await client.run(request2, controller.signal);
22931
22995
  if (result.content) console.log(result.content);
22932
22996
  }
22933
22997
  async function runQnsiMcp(argv) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heossihq/beecode",
3
- "version": "1.0.53",
3
+ "version": "1.0.54",
4
4
  "description": "Bee: Quantum Intelligence - Code. A governed coding assistant for your terminal, from HEOSSI.",
5
5
  "keywords": [
6
6
  "bee",