@corca-org/ceal-host-linux-arm64 1.0.4 → 1.0.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.
package/bin/ceal-host CHANGED
Binary file
@@ -178,6 +178,7 @@ var CEAL_OPERATION_RECOVERY_KINDS = vocabulary(["none", "reconcile", "compensate
178
178
  var CEAL_OPERATION_RECOVERY_STATUSES = vocabulary(["not_started", "active", "completed"]);
179
179
  var CEAL_OPERATION_PROVIDER_READBACK_AVAILABILITY = vocabulary(["not_started", "not_applicable", "not_available", "pending", "available"]);
180
180
  var CEAL_OPERATION_OFFERED_HANDOFF_STATES = vocabulary(["accepted", "rejected", "unknown"]);
181
+ var CEAL_OPERATION_RECEIPT_AUTHORITY_KEYS = Object.freeze(["instance_ref", "profile_ref", "principal_ref", "execution_subject_ref", "authority_revision_ref"]);
181
182
  var CEAL_OPERATION_APPROVAL_DISPOSITIONS = vocabulary([
182
183
  "approval_not_required_by_policy",
183
184
  "interactive_pending",
@@ -434,7 +435,13 @@ var CEAL_OPERATION_JSON_SCHEMA_BUDGET = Object.freeze({
434
435
  max_string_length: OPERATION_SCHEMA_LITERAL_MAX_BYTES / 4,
435
436
  max_alternatives: 8,
436
437
  max_enum_values: 64,
437
- max_literal_bytes: OPERATION_SCHEMA_LITERAL_MAX_BYTES
438
+ max_literal_bytes: OPERATION_SCHEMA_LITERAL_MAX_BYTES,
439
+ /** @basis our_policy -- bounds explanatory schema prose carried in one catalog. */
440
+ max_description_characters: 1024,
441
+ /** @basis our_policy -- bounds regular-expression compilation input from one schema. */
442
+ max_pattern_characters: 256,
443
+ /** @basis our_policy -- bounds traversal work inside one already byte-bounded schema literal. */
444
+ max_literal_nodes: 512
438
445
  });
439
446
 
440
447
  // packages/ceal-client-protocol/src/operation-validation-primitives.ts
@@ -454,6 +461,9 @@ function requireIsoTimestamp(value, message) {
454
461
  if (typeof value !== "string" || !ISO_TIMESTAMP.test(value) || !Number.isFinite(Date.parse(value))) throw new TypeError(message);
455
462
  }
456
463
 
464
+ // packages/ceal-client-protocol/src/operation-json-schema.ts
465
+ var JSON_DESCRIPTION_CONTROL_CHARACTER = new RegExp("\\p{Cc}", "u");
466
+
457
467
  // packages/ceal-client-protocol/src/operation-contract-validation.ts
458
468
  var CEAL_OPERATION_AUTHORITY_POLICY_KEYS = Object.freeze(["profile", "instance_binding", "target", "admission_recheck"]);
459
469
  var MAX_OPERATION_INPUT_RESOLVER_BINDINGS = 96;
@@ -554,7 +564,6 @@ var CEAL_BOUNDED_SERIES_CATALOG = Object.freeze({
554
564
  control_commit: (root) => join(root, "control-auto-commit.jsonl"),
555
565
  engagement_signal: (root) => join(root, "runtime-state", "slack-feedback.jsonl"),
556
566
  runtime_error: (root) => join(root, "runtime-state", "runtime-errors.jsonl"),
557
- provider_retry: (root) => join(root, "observability", "provider-retry-queue", "queue.jsonl"),
558
567
  turn_bridge_request: (root) => join(root, ".ceal", "turn-bridge", "requests.jsonl"),
559
568
  channel_log: (root) => join(root, "log.jsonl"),
560
569
  thread_run_events: (root) => join(root, "run-events.jsonl"),
@@ -563,8 +572,6 @@ var CEAL_BOUNDED_SERIES_CATALOG = Object.freeze({
563
572
  gateway_capability_audit: (root) => join(root, "capability-audit.jsonl"),
564
573
  gateway_retrieval_waste_partition: (root) => `${root}.jsonl`,
565
574
  gateway_access_policy_publication: (root) => join(root, "access-policy-publications.jsonl"),
566
- gateway_event_lease_journal: (root) => `${root}.journal.jsonl`,
567
- gateway_control_audit: (root) => `${root}.control-audits.jsonl`,
568
575
  gateway_profile_connector_control_audit: (root) => `${root}.audit.jsonl`,
569
576
  gateway_profile_connector_scope_audit: (root) => join(root, "profile-connector-scope-audit.jsonl"),
570
577
  gateway_profile_connector_activity_scope_audit: (root) => join(root, "profile-connector-activity-scope-audit.jsonl"),
@@ -579,6 +586,11 @@ var CEAL_BOUNDED_SERIES_CATALOG = Object.freeze({
579
586
  gateway_admin_access_token: (root) => join(root, "access-tokens.jsonl")
580
587
  });
581
588
 
589
+ // packages/ceal-client-protocol/src/gateway-installation-activation.ts
590
+ var CEAL_GATEWAY_INSTALLATION_ACTIVATION_CODE_DATA_CHARACTERS = 32;
591
+ var CEAL_GATEWAY_INSTALLATION_ACTIVATION_CODE_CHECK_CHARACTERS = 8;
592
+ var CEAL_GATEWAY_INSTALLATION_ACTIVATION_CODE_COMPACT_CHARACTERS = CEAL_GATEWAY_INSTALLATION_ACTIVATION_CODE_DATA_CHARACTERS + CEAL_GATEWAY_INSTALLATION_ACTIVATION_CODE_CHECK_CHARACTERS;
593
+
582
594
  // packages/ceal-client-protocol/src/host-registration.ts
583
595
  var CEAL_HOST_REGISTRATION_RESULT_KEYS = Object.freeze(["credential_generation", "host_access_token", "host_installation_ref", "host_source_ref", "ok", "registration_attempt_ref", "schema_version", "status"]);
584
596
 
@@ -1153,7 +1165,7 @@ var CEAL_ACTOR_KINDS = vocabulary(["human", "bot", "app", "unknown"]);
1153
1165
  // packages/ceal-client-protocol/src/leased-consumer-vocabulary.ts
1154
1166
  var CEAL_TERMINAL_DISPOSITIONS = vocabulary(["completed", "failed", "cancelled"]);
1155
1167
  var CEAL_LEASE_DISPOSITIONS = vocabulary([...CEAL_TERMINAL_DISPOSITIONS, "deferred"]);
1156
- var CEAL_AUTOMATIC_FEEDBACK_INTENTS = vocabulary(["reaction", "progress_start", "progress_finish"]);
1168
+ var CEAL_AUTOMATIC_FEEDBACK_INTENTS = vocabulary(["initial"]);
1157
1169
  var CEAL_LEASED_MESSAGE_DELIVERY_CAPABILITY_IDS = vocabulary(["message.create", "message.update", "message.delete"]);
1158
1170
  var CEAL_REPOSITORY_VISIBILITIES = vocabulary(["public", "private", "internal"]);
1159
1171
  var CEAL_RESULT_DELIVERY_OFFERS = vocabulary(["pending", "offered", "transport_lost"]);
@@ -1382,6 +1394,7 @@ import { join as join2 } from "node:path";
1382
1394
  // host/relay/src/producer-frame.ts
1383
1395
  var HOST_PRODUCER_FRAME_SCHEMA = "ceal.host_producer_frame.v1";
1384
1396
  var HOST_PRODUCER_MAX_JSON_BYTES = 262144;
1397
+ var HOST_PRODUCER_FRAME_LENGTH_BYTES = Uint32Array.BYTES_PER_ELEMENT;
1385
1398
  var SAFE_REF2 = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/u;
1386
1399
  var DIGEST2 = /^[a-f0-9]{64}$/u;
1387
1400
  var PRODUCERS = /* @__PURE__ */ new Set(["codex", "claude"]);
@@ -1401,18 +1414,18 @@ function encodeHostProducerFrame(frame) {
1401
1414
  validateFrame(frame);
1402
1415
  const json = Buffer.from(JSON.stringify(frame), "utf8");
1403
1416
  if (json.byteLength > HOST_PRODUCER_MAX_JSON_BYTES) throw new HostProducerFrameError("frame_too_large", `frame_too_large: ${refusalFact("frame_bytes", json.byteLength, `at most ${HOST_PRODUCER_MAX_JSON_BYTES}`)}`);
1404
- const result = Buffer.allocUnsafe(json.byteLength + 4);
1417
+ const result = Buffer.allocUnsafe(json.byteLength + HOST_PRODUCER_FRAME_LENGTH_BYTES);
1405
1418
  result.writeUInt32BE(json.byteLength, 0);
1406
- json.copy(result, 4);
1419
+ json.copy(result, HOST_PRODUCER_FRAME_LENGTH_BYTES);
1407
1420
  return result;
1408
1421
  }
1409
1422
  function decodeHostProducerFrame(input) {
1410
- if (input.byteLength < 4) throw new HostProducerFrameError("frame_truncated", `frame_truncated: ${refusalFact("frame_bytes", input.byteLength, "at least 4")}`);
1423
+ if (input.byteLength < HOST_PRODUCER_FRAME_LENGTH_BYTES) throw new HostProducerFrameError("frame_truncated", `frame_truncated: ${refusalFact("frame_bytes", input.byteLength, `at least ${HOST_PRODUCER_FRAME_LENGTH_BYTES}`)}`);
1411
1424
  const length = input.readUInt32BE(0);
1412
1425
  if (length > HOST_PRODUCER_MAX_JSON_BYTES) throw new HostProducerFrameError("frame_too_large", `frame_too_large: ${refusalFact("declared_bytes", length, `at most ${HOST_PRODUCER_MAX_JSON_BYTES}`)}`);
1413
1426
  if (length === 0) throw new HostProducerFrameError("invalid_frame_length");
1414
- if (input.byteLength !== length + 4) throw new HostProducerFrameError(input.byteLength < length + 4 ? "frame_truncated" : "invalid_frame_length");
1415
- const bytes = input.subarray(4);
1427
+ if (input.byteLength !== length + HOST_PRODUCER_FRAME_LENGTH_BYTES) throw new HostProducerFrameError(input.byteLength < length + HOST_PRODUCER_FRAME_LENGTH_BYTES ? "frame_truncated" : "invalid_frame_length");
1428
+ const bytes = input.subarray(HOST_PRODUCER_FRAME_LENGTH_BYTES);
1416
1429
  const text = new TextDecoder("utf-8", { fatal: true });
1417
1430
  let value;
1418
1431
  try {
@@ -1630,6 +1643,8 @@ var HOST_RELAY_REQUEST_BINDING_KEYS = Object.freeze([
1630
1643
  "host_input_ref"
1631
1644
  ]);
1632
1645
  var HOST_RELAY_IPC_RESPONSE_SCHEMA = "ceal.host_relay_admission.v1";
1646
+ var HOST_RELAY_IPC_LENGTH_BYTES = Uint32Array.BYTES_PER_ELEMENT;
1647
+ var HOST_RELAY_ADMISSION_RESPONSE_MAX_BYTES = 4096;
1633
1648
  var HostRelayIpcError = class extends Error {
1634
1649
  code;
1635
1650
  constructor(code3, message = code3) {
@@ -1683,12 +1698,12 @@ function exchange(endpoint, encoded, timeoutMs, decode) {
1683
1698
  });
1684
1699
  }
1685
1700
  function decodeHostRelayIpcResponse(input) {
1686
- if (input.length < 4) throw new HostRelayIpcError("relay_unavailable", `Host Relay IPC response is truncated: ${refusalFact("response_bytes", input.byteLength, "at least 4")}.`);
1701
+ if (input.length < HOST_RELAY_IPC_LENGTH_BYTES) throw new HostRelayIpcError("relay_unavailable", `Host Relay IPC response is truncated: ${refusalFact("response_bytes", input.byteLength, `at least ${HOST_RELAY_IPC_LENGTH_BYTES}`)}.`);
1687
1702
  const length = input.readUInt32BE(0);
1688
- if (length === 0 || length > 4096 || input.length !== length + 4) throw new HostRelayIpcError("relay_unavailable", `Host Relay IPC response length is invalid: ${refusalFacts([{ name: "declared_bytes", value: length, expected: "between 1 and 4096" }, { name: "received_bytes", value: input.byteLength, expected: `exactly ${length + 4}` }])}.`);
1703
+ if (length === 0 || length > HOST_RELAY_ADMISSION_RESPONSE_MAX_BYTES || input.length !== length + HOST_RELAY_IPC_LENGTH_BYTES) throw new HostRelayIpcError("relay_unavailable", `Host Relay IPC response length is invalid: ${refusalFacts([{ name: "declared_bytes", value: length, expected: `between 1 and ${HOST_RELAY_ADMISSION_RESPONSE_MAX_BYTES}` }, { name: "received_bytes", value: input.byteLength, expected: `exactly ${length + HOST_RELAY_IPC_LENGTH_BYTES}` }])}.`);
1689
1704
  let value;
1690
1705
  try {
1691
- value = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(input.subarray(4)));
1706
+ value = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(input.subarray(HOST_RELAY_IPC_LENGTH_BYTES)));
1692
1707
  } catch {
1693
1708
  throw new HostRelayIpcError("relay_unavailable", "Host Relay IPC response is invalid.");
1694
1709
  }
@@ -1711,11 +1726,11 @@ function record3(value) {
1711
1726
  return value !== null && typeof value === "object" && !Array.isArray(value);
1712
1727
  }
1713
1728
  function decodeResponseBuffer(buffer) {
1714
- if (buffer.length < 4) return null;
1729
+ if (buffer.length < HOST_RELAY_IPC_LENGTH_BYTES) return null;
1715
1730
  const length = buffer.readUInt32BE(0);
1716
- if (length === 0 || length > 4096) throw new HostRelayIpcError("relay_unavailable", `Host Relay IPC response length is invalid: ${refusalFact("declared_bytes", length, "between 1 and 4096")}.`);
1717
- if (buffer.length < length + 4) return null;
1718
- if (buffer.length !== length + 4) throw new HostRelayIpcError("relay_unavailable", `Host Relay IPC returned trailing bytes: ${refusalFacts([{ name: "declared_bytes", value: length, expected: "the received message length minus 4" }, { name: "received_bytes", value: buffer.byteLength, expected: `exactly ${length + 4}` }])}.`);
1731
+ if (length === 0 || length > HOST_RELAY_ADMISSION_RESPONSE_MAX_BYTES) throw new HostRelayIpcError("relay_unavailable", `Host Relay IPC response length is invalid: ${refusalFact("declared_bytes", length, `between 1 and ${HOST_RELAY_ADMISSION_RESPONSE_MAX_BYTES}`)}.`);
1732
+ if (buffer.length < length + HOST_RELAY_IPC_LENGTH_BYTES) return null;
1733
+ if (buffer.length !== length + HOST_RELAY_IPC_LENGTH_BYTES) throw new HostRelayIpcError("relay_unavailable", `Host Relay IPC returned trailing bytes: ${refusalFacts([{ name: "declared_bytes", value: length, expected: `the received message length minus ${HOST_RELAY_IPC_LENGTH_BYTES}` }, { name: "received_bytes", value: buffer.byteLength, expected: `exactly ${length + HOST_RELAY_IPC_LENGTH_BYTES}` }])}.`);
1719
1734
  return decodeHostRelayIpcResponse(buffer);
1720
1735
  }
1721
1736