@senticor/hive 1.56.2 → 1.56.6

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/chive.cjs +34 -12
  2. package/hive.cjs +5 -5
  3. package/package.json +1 -1
package/chive.cjs CHANGED
@@ -32,8 +32,8 @@ var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${_
32
32
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
33
33
 
34
34
  // src/chive.mts
35
- var import_node_fs = __toESM(require("fs"), 1);
36
- var import_node_path = __toESM(require("path"), 1);
35
+ var import_node_fs2 = __toESM(require("fs"), 1);
36
+ var import_node_path2 = __toESM(require("path"), 1);
37
37
 
38
38
  // ../hive-kernel-code-context/src/index.ts
39
39
  var src_exports = {};
@@ -362,7 +362,7 @@ __export(graph_builder_exports, {
362
362
  var path4 = __toESM(require("path"), 1);
363
363
 
364
364
  // ../hive-utils/dist/index.js
365
- var import_node_crypto2 = require("crypto");
365
+ var import_node_crypto3 = require("crypto");
366
366
 
367
367
  // ../hive-utils/dist/pagination.js
368
368
  var import_node_crypto = require("crypto");
@@ -391,6 +391,20 @@ var INGEST_LIMIT_SPEC = {
391
391
  manifestMaxApplicationIds: { env: "HIVE_MANIFEST_MAX_APPLICATION_IDS", default: 1e5, ceiling: 1e5 },
392
392
  /** Max attached documents per application. */
393
393
  maxDocsPerApplication: { env: "HIVE_MAX_DOCS_PER_APPLICATION", default: 50 },
394
+ /**
395
+ * Max decoded bytes for one REST application submit (#242) — the whole
396
+ * dossier travels as one base64 JSON body on
397
+ * POST /api/missions/:missionId/applications, so this is a heap/DoS bound:
398
+ * a ~35 MiB body (25 MiB of PDFs) costs ~65-70 MiB peak heap per request.
399
+ * The submit route sizes its own bodyLimit from this cap (base64 + JSON
400
+ * envelope), the decoded total is enforced on the door (413
401
+ * APPLICATION_TOO_LARGE — L4, an advertised cap is never unenforced), and an
402
+ * env override is clamped to `ceiling` so a typo cannot turn the door into an
403
+ * unbounded body sink (L3). Default 26 MiB: the realistic upper end is 25 MiB
404
+ * of PDFs (same figure as maxIngestFileBytes) plus headroom for the
405
+ * application form and file names.
406
+ */
407
+ maxApplicationBytes: { env: "HIVE_MAX_APPLICATION_BYTES", default: 26 * 1024 * 1024, ceiling: 100 * 1024 * 1024 },
394
408
  // NOTE: a per-jobposting application ceiling is intentionally NOT advertised
395
409
  // here yet — enforcing it needs a durable per-jobposting counter at ingest,
396
410
  // deferred to a follow-up. Advertising an unenforced limit would mislead
@@ -424,9 +438,17 @@ var INGEST_LIMIT_SPEC = {
424
438
  maxKafkaTlsCaPemBytes: { env: "HIVE_MAX_KAFKA_TLS_CA_PEM_BYTES", default: 64 * 1024, ceiling: 64 * 1024 }
425
439
  };
426
440
 
441
+ // ../hive-utils/dist/metrics-auth.js
442
+ var import_node_fs = require("fs");
443
+ var import_node_crypto2 = require("crypto");
444
+
445
+ // ../hive-utils/dist/cgroup-metrics.js
446
+ var import_promises = require("fs/promises");
447
+ var import_node_path = require("path");
448
+
427
449
  // ../hive-utils/dist/index.js
428
450
  function sha256Hex(input) {
429
- const h = (0, import_node_crypto2.createHash)("sha256");
451
+ const h = (0, import_node_crypto3.createHash)("sha256");
430
452
  h.update(input);
431
453
  return h.digest("hex");
432
454
  }
@@ -1142,9 +1164,9 @@ function stringListFlag(name) {
1142
1164
  return splitList(stringFlag(name));
1143
1165
  }
1144
1166
  function readJsonFile(p, label) {
1145
- if (!import_node_fs.default.existsSync(p)) dieUsage(`${label} not found at ${p}`);
1167
+ if (!import_node_fs2.default.existsSync(p)) dieUsage(`${label} not found at ${p}`);
1146
1168
  try {
1147
- return JSON.parse(import_node_fs.default.readFileSync(p, "utf8"));
1169
+ return JSON.parse(import_node_fs2.default.readFileSync(p, "utf8"));
1148
1170
  } catch (error) {
1149
1171
  dieRuntime(new Error(`${label} is not valid JSON: ${errorMessage2(error)}`));
1150
1172
  }
@@ -1153,8 +1175,8 @@ function writeResult(obj) {
1153
1175
  const json = JSON.stringify(obj, null, 2);
1154
1176
  const out = stringFlag("out");
1155
1177
  if (out) {
1156
- import_node_fs.default.writeFileSync(out, json + "\n");
1157
- console.error(`chive: wrote ${import_node_path.default.resolve(out)}`);
1178
+ import_node_fs2.default.writeFileSync(out, json + "\n");
1179
+ console.error(`chive: wrote ${import_node_path2.default.resolve(out)}`);
1158
1180
  } else {
1159
1181
  process.stdout.write(json + "\n");
1160
1182
  }
@@ -1198,9 +1220,9 @@ async function patchRecord(recordId, patch) {
1198
1220
  function readPacketIfSet() {
1199
1221
  const packetPath = stringFlag("packet");
1200
1222
  if (!packetPath) return null;
1201
- if (!import_node_fs.default.existsSync(packetPath)) dieUsage(`packet file not found at ${packetPath}`);
1223
+ if (!import_node_fs2.default.existsSync(packetPath)) dieUsage(`packet file not found at ${packetPath}`);
1202
1224
  try {
1203
- return JSON.parse(import_node_fs.default.readFileSync(packetPath, "utf8"));
1225
+ return JSON.parse(import_node_fs2.default.readFileSync(packetPath, "utf8"));
1204
1226
  } catch (error) {
1205
1227
  dieRuntime(new Error(`packet is not valid JSON: ${errorMessage2(error)}`));
1206
1228
  }
@@ -1210,8 +1232,8 @@ function readBodyIfSet() {
1210
1232
  if (body) return body;
1211
1233
  const bodyFile = stringFlag("body-file");
1212
1234
  if (bodyFile) {
1213
- if (!import_node_fs.default.existsSync(bodyFile)) dieUsage(`body-file not found at ${bodyFile}`);
1214
- return import_node_fs.default.readFileSync(bodyFile, "utf8");
1235
+ if (!import_node_fs2.default.existsSync(bodyFile)) dieUsage(`body-file not found at ${bodyFile}`);
1236
+ return import_node_fs2.default.readFileSync(bodyFile, "utf8");
1215
1237
  }
1216
1238
  return null;
1217
1239
  }
package/hive.cjs CHANGED
@@ -10376,22 +10376,22 @@ var artifactName = injectedString(
10376
10376
  true ? "hive-cli" : void 0
10377
10377
  ) || String(process.env.HIVE_CLI_ARTIFACT_NAME || "hive-cli").trim() || "hive-cli";
10378
10378
  var packageVersion = injectedString(
10379
- true ? "1.56.2" : void 0
10379
+ true ? "1.56.6" : void 0
10380
10380
  ) || String(process.env.HIVE_CLI_PACKAGE_VERSION || "").trim() || readPackageVersion();
10381
10381
  var releaseVersion = injectedString(
10382
- true ? "1.56.2" : void 0
10382
+ true ? "1.56.6" : void 0
10383
10383
  ) || String(process.env.HIVE_CLI_RELEASE_VERSION || "").trim() || packageVersion || "dev";
10384
10384
  var releaseChannel = injectedString(
10385
10385
  true ? "final" : void 0
10386
10386
  ) || String(process.env.HIVE_CLI_RELEASE_CHANNEL || "").trim() || (releaseVersion.includes("-rc.") ? "rc" : releaseVersion === "dev" ? "dev" : "final");
10387
10387
  var buildCommit = injectedString(
10388
- true ? "407c8e75d7df35ee0507938070ba9e60e415fd14" : void 0
10388
+ true ? "073497b4b00ea31b2afe6c121da4a60ad4e2f6c5" : void 0
10389
10389
  ) || String(process.env.HIVE_CLI_BUILD_COMMIT || "").trim() || "unknown";
10390
10390
  var buildTimestamp = injectedString(
10391
- true ? "2026-10-08T13:48:26Z" : void 0
10391
+ true ? "2026-10-09T12:26:32Z" : void 0
10392
10392
  ) || String(process.env.HIVE_CLI_BUILD_TIMESTAMP || "").trim() || "unknown";
10393
10393
  var ociRef = injectedString(
10394
- true ? "registry.onstackit.cloud/senticor/hive-cli:1.56.2" : void 0
10394
+ true ? "registry.onstackit.cloud/senticor/hive-cli:1.56.6" : void 0
10395
10395
  ) || String(process.env.HIVE_CLI_OCI_REF || "").trim() || `registry.onstackit.cloud/senticor/${artifactName}:${releaseVersion}`;
10396
10396
  var RELEASE_INFO = Object.freeze({
10397
10397
  packageVersion,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@senticor/hive",
3
- "version": "1.56.2",
3
+ "version": "1.56.6",
4
4
  "description": "Cognitive Hive OS — unified CLI",
5
5
  "type": "commonjs",
6
6
  "bin": {