@corca-org/ceal-host-linux-arm64 1.0.8 → 1.0.10

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.
@@ -78,11 +78,28 @@ var client_wire_contract_default = {
78
78
  ],
79
79
  bare_document_fields: [
80
80
  "invocation",
81
- "next",
81
+ "required_action_sequence",
82
+ "entrypoints",
82
83
  "common_concepts",
83
84
  "operations",
84
85
  "catalog_revision"
85
86
  ],
87
+ prompt_field: "prompt",
88
+ prompt_schema_version: "ceal.prompt.v1",
89
+ focused_prompt_document_fields: [
90
+ "catalog_revision",
91
+ "prompt"
92
+ ],
93
+ focused_prompt_continuation_document_fields: [
94
+ "catalog_revision",
95
+ "remaining_work",
96
+ "prompt"
97
+ ],
98
+ discovery_command: "discovery",
99
+ discovery_manifest_schema_version: "ceal.discovery_manifest.v1",
100
+ discovery_manifest_document_fields: [
101
+ "discovery_manifest"
102
+ ],
86
103
  exit_code_max: 125,
87
104
  bare_document_max_bytes: 65536,
88
105
  complete_max_bytes: 66019,
@@ -109,8 +126,15 @@ var CEAL_VERIFIED_ARTIFACT_MAX_BYTES = artifact.max_bytes;
109
126
  var CEAL_VERIFIED_ARTIFACT_DESCRIPTOR_MAX_BYTES = artifact.envelope_max_bytes;
110
127
  var CEAL_COMMAND_REQUEST_SCHEMA_VERSION = request.schema_version;
111
128
  var CEAL_COMMAND_REQUEST_MAX_BYTES = request.absolute_transport_max_bytes;
112
- var CEAL_COMMAND_RESPONSE_BARE_DOCUMENT_FIELDS = response.bare_document_fields;
113
129
  var CEAL_COMMAND_RESPONSE_BARE_DOCUMENT_MAX_BYTES = response.bare_document_max_bytes;
130
+ var CEAL_COMMAND_RESPONSE_PROMPT_FIELD = response.prompt_field;
131
+ var CEAL_COMMAND_RESPONSE_PROMPT_SCHEMA_VERSION = response.prompt_schema_version;
132
+ var CEAL_COMMAND_RESPONSE_PROMPT_DOCUMENT_FIELDS = Object.freeze([...response.bare_document_fields, response.prompt_field]);
133
+ var CEAL_COMMAND_RESPONSE_FOCUSED_PROMPT_DOCUMENT_FIELDS = Object.freeze([...response.focused_prompt_document_fields]);
134
+ var CEAL_COMMAND_RESPONSE_FOCUSED_PROMPT_CONTINUATION_DOCUMENT_FIELDS = Object.freeze([...response.focused_prompt_continuation_document_fields]);
135
+ var CEAL_COMMAND_RESPONSE_DISCOVERY_COMMAND = response.discovery_command;
136
+ var CEAL_COMMAND_RESPONSE_DISCOVERY_MANIFEST_SCHEMA_VERSION = response.discovery_manifest_schema_version;
137
+ var CEAL_COMMAND_RESPONSE_DISCOVERY_MANIFEST_DOCUMENT_FIELDS = Object.freeze([...response.discovery_manifest_document_fields]);
114
138
  var CEAL_COMMAND_RESPONSE_MAX_BYTES = response.absolute_transport_max_bytes;
115
139
 
116
140
  // packages/ceal-client-protocol/src/vocabulary.ts
@@ -146,7 +170,7 @@ var CEAL_OPERATION_RECOVERY_KINDS = vocabulary(["none", "reconcile", "compensate
146
170
  var CEAL_OPERATION_RECOVERY_STATUSES = vocabulary(["not_started", "active", "completed"]);
147
171
  var CEAL_OPERATION_PROVIDER_READBACK_AVAILABILITY = vocabulary(["not_started", "not_applicable", "not_available", "pending", "available"]);
148
172
  var CEAL_OPERATION_OFFERED_HANDOFF_STATES = vocabulary(["accepted", "rejected", "unknown"]);
149
- var CEAL_OPERATION_RECEIPT_AUTHORITY_KEYS = Object.freeze(["instance_ref", "profile_ref", "principal_ref", "execution_subject_ref", "authority_revision_ref"]);
173
+ var CEAL_OPERATION_RECEIPT_AUTHORITY_KEYS = Object.freeze(["instance_ref", "access_group_ref", "principal_ref", "execution_subject_ref", "authority_revision_ref"]);
150
174
  var CEAL_OPERATION_APPROVAL_DISPOSITIONS = vocabulary([
151
175
  "approval_not_required_by_policy",
152
176
  "interactive_pending",
@@ -161,6 +185,8 @@ var CEAL_CAPABILITY_READINESS_VALUES = vocabulary(["ready", "degraded", "unavail
161
185
  var CEAL_TARGET_REQUIREMENTS = vocabulary(["required", "optional", "none"]);
162
186
  var CEAL_AUDIT_OUTCOMES = vocabulary(["succeeded", "denied", "failed"]);
163
187
  var CEAL_GATEWAY_PROVIDER_STEP_OUTCOMES = vocabulary(["completed", "rejected", "throttled", "failed"]);
188
+ var CEAL_GATEWAY_READ_REUSE_DISPOSITIONS = vocabulary(["response_cache_hit", "corpus_hit", "corpus_hit_after_revalidation", "corpus_partial_provider_supplement", "provider_direct", "provider_continuation", "reuse_unavailable"]);
189
+ var CEAL_GATEWAY_READ_REUSE_UNAVAILABLE_REASONS = vocabulary(["not_reported", "storage_unavailable", "coverage_incomplete", "freshness_refresh_required", "not_reusable", "bypassed"]);
164
190
  var CEAL_POLICY_DECISIONS = vocabulary(["allowed", "denied", "not_evaluated"]);
165
191
  var CEAL_CONNECTOR_ROUTE_PHASES = vocabulary(["scope_observation", "target_selection", "route_resolution"]);
166
192
  var CEAL_CONNECTOR_ROUTE_CAUSES = vocabulary(["provider_throttled", "provider_unavailable", "binding_invalid", "scope_limit_exceeded"]);
@@ -433,8 +459,10 @@ function requireIsoTimestamp(value, message) {
433
459
  var JSON_DESCRIPTION_CONTROL_CHARACTER = new RegExp("\\p{Cc}", "u");
434
460
 
435
461
  // packages/ceal-client-protocol/src/operation-contract-validation.ts
436
- var CEAL_OPERATION_AUTHORITY_POLICY_KEYS = Object.freeze(["profile", "instance_binding", "target", "admission_recheck"]);
462
+ var CEAL_OPERATION_AUTHORITY_POLICY_KEYS = Object.freeze(["access_group", "instance_binding", "target", "admission_recheck"]);
437
463
  var MAX_OPERATION_INPUT_RESOLVER_BINDINGS = 96;
464
+ var CEAL_OPERATION_DESCRIPTOR_REQUIRED_ENVELOPE_KEYS = Object.freeze(["schema_version", "id", "input_contract", "result_contract", "policy"]);
465
+ var CEAL_OPERATION_DESCRIPTOR_OPTIONAL_ENVELOPE_KEYS = Object.freeze(["input_resolution", "summary"]);
438
466
  var CEAL_OPERATION_RESULT_KEYS = vocabulary(["ok", "operation_id", "operation_receipt", "schema_version", "value"]);
439
467
  var CEAL_OPERATION_COMPACT_RESULT_KEYS = vocabulary(["ok", "operation_evidence", "operation_id", "schema_version", "value"]);
440
468
 
@@ -508,6 +536,7 @@ var CEAL_SCHEMA_LITERALS = [
508
536
  "ceal.operation_descriptor.v1",
509
537
  "ceal.operation_error.v1",
510
538
  "ceal.operation_failure.v1",
539
+ "ceal.operation_failure.compact.v1",
511
540
  "ceal.operation_receipt.v1",
512
541
  "ceal.operation_result.v1",
513
542
  "ceal.operation_result.compact.v1",
@@ -533,17 +562,16 @@ var CEAL_BOUNDED_SERIES_CATALOG = Object.freeze({
533
562
  engagement_signal: (root) => join(root, "runtime-state", "slack-feedback.jsonl"),
534
563
  runtime_error: (root) => join(root, "runtime-state", "runtime-errors.jsonl"),
535
564
  turn_bridge_request: (root) => join(root, ".ceal", "turn-bridge", "requests.jsonl"),
536
- channel_log: (root) => join(root, "log.jsonl"),
537
565
  thread_run_events: (root) => join(root, "run-events.jsonl"),
538
566
  bounded_store_sidecar: (root) => `${root}.jsonl`,
539
567
  gateway_audit_archive: (root) => `${root}.jsonl`,
540
568
  gateway_capability_audit: (root) => join(root, "capability-audit.jsonl"),
541
569
  gateway_retrieval_waste_partition: (root) => `${root}.jsonl`,
542
570
  gateway_access_policy_publication: (root) => join(root, "access-policy-publications.jsonl"),
543
- gateway_profile_connector_control_audit: (root) => `${root}.audit.jsonl`,
544
- gateway_profile_connector_scope_audit: (root) => join(root, "profile-connector-scope-audit.jsonl"),
545
- gateway_profile_connector_activity_scope_audit: (root) => join(root, "profile-connector-activity-scope-audit.jsonl"),
546
- gateway_profile_connector_readiness_audit: (root) => join(root, "profile-connector-readiness.audit.jsonl"),
571
+ gateway_access_group_connector_control_audit: (root) => `${root}.audit.jsonl`,
572
+ gateway_access_group_connector_scope_audit: (root) => join(root, "profile-connector-scope-audit.jsonl"),
573
+ gateway_access_group_connector_activity_scope_audit: (root) => join(root, "profile-connector-activity-scope-audit.jsonl"),
574
+ gateway_access_group_connector_readiness_audit: (root) => join(root, "profile-connector-readiness.audit.jsonl"),
547
575
  gateway_organization_audit_ledger: (root) => join(root, "organization-ledger.jsonl"),
548
576
  gateway_personal_client_audit: (root) => join(root, "audit.jsonl"),
549
577
  gateway_personal_client_access_audit: (root) => join(root, "access-audit.jsonl"),
@@ -594,12 +622,6 @@ var CEAL_AGENT_SESSION_COMMIT_KEYS = vocabulary(["attempt_ref", "expected_sessio
594
622
  // packages/ceal-client-protocol/src/operation-next-actions.ts
595
623
  var CALLER_RECOVERABLE_NEXT_ACTION_VALUES = [
596
624
  "select_did_you_mean",
597
- // The graph, not the argument list, is what the caller must change: the
598
- // resolver that owns this input has no producing node upstream, and no edit
599
- // to the invocation can conjure one. `resolver_dependency_absent` carried no
600
- // remedy at all rather than borrow a word that means something else, so the
601
- // scorer read a fully-diagnosed, caller-fixable refusal as a failed run.
602
- "request.graph.append",
603
625
  "choose_new_output_path",
604
626
  "choose_new_idempotency_key",
605
627
  "restart_search",
@@ -651,8 +673,6 @@ var NON_REMEDY_NEXT_ACTION_VALUES = [
651
673
  "reconcile_occurrence",
652
674
  "reduce_request_size",
653
675
  "repair_or_adopt_session",
654
- "request.effect_approval.read",
655
- "request.run",
656
676
  "retry",
657
677
  // The owner -- a correlation hook, an approval hook -- is not serving right
658
678
  // now. The caller changes nothing and the same call succeeds once the owner
@@ -749,12 +769,12 @@ var CEAL_REQUEST_JSON_SCHEMA = {
749
769
  additionalProperties: false,
750
770
  properties: {
751
771
  instance_ref: { type: "string", minLength: 1, maxLength: 128, pattern: SAFE_REF.source },
752
- profile_ref: { type: "string", minLength: 1, maxLength: 128, pattern: SAFE_REF.source },
772
+ access_group_ref: { type: "string", minLength: 1, maxLength: 128, pattern: SAFE_REF.source },
753
773
  principal_ref: { type: "string", minLength: 1, maxLength: 128, pattern: SAFE_REF.source },
754
774
  execution_subject_ref: { type: "string", minLength: 1, maxLength: 128, pattern: SAFE_REF.source },
755
775
  authority_revision_ref: { type: "string", minLength: 1, maxLength: 128, pattern: SAFE_REF.source }
756
776
  },
757
- required: ["instance_ref", "profile_ref", "principal_ref", "execution_subject_ref", "authority_revision_ref"]
777
+ required: ["instance_ref", "access_group_ref", "principal_ref", "execution_subject_ref", "authority_revision_ref"]
758
778
  },
759
779
  prompt_ref: { type: "string", minLength: 1, maxLength: 128, pattern: SAFE_REF.source },
760
780
  host_session_ref: { type: "string", minLength: 1, maxLength: 128, pattern: SAFE_REF.source },
@@ -880,7 +900,7 @@ var CEAL_HOST_OBSERVATION_KINDS = vocabulary(["prompt", "session", "turn", "mode
880
900
  function isCealHostPromptObservationValue(value) {
881
901
  return isOperationRecord(value) && Object.keys(value).length === 1 && isCealDigest(value.body_sha256);
882
902
  }
883
- var HOST_RESERVED_KEY = /^(?:admission|approval|audit|authorization|cancellation|capability|effect|grant|occurrence|operation|policy|profile|provider_readback|receipt|reconciliation|replay|target|write_request)(?:_|$)/iu;
903
+ var HOST_RESERVED_KEY = /^(?:access_group|admission|approval|audit|authorization|cancellation|capability|effect|grant|occurrence|operation|policy|profile|provider_readback|receipt|reconciliation|replay|target|write_request)(?:_|$)/iu;
884
904
  function assertHostObservationValue(value, kind) {
885
905
  if (value === void 0) invalid("Ceal Host observation value is invalid.");
886
906
  if (kind === "prompt" && !isCealHostPromptObservationValue(value)) invalid("Ceal Host prompt observation must contain only its body digest.");
@@ -900,6 +920,10 @@ function inspectHostKeys(value) {
900
920
  }
901
921
  }
902
922
 
923
+ // packages/ceal-client-protocol/src/host-prompt-ref.ts
924
+ var CEAL_HOST_PROMPT_DIGEST_PATTERN = "^[a-f0-9]{64}$";
925
+ var PROMPT_DIGEST = new RegExp(CEAL_HOST_PROMPT_DIGEST_PATTERN, "u");
926
+
903
927
  // packages/ceal-client-protocol/src/request-effect-approval.ts
904
928
  var CEAL_EFFECT_APPROVAL_DECISION_CHECK_PHRASES = Object.freeze([
905
929
  "observed after this approval was raised and before it expires",
@@ -915,6 +939,12 @@ var OWNER_WRITE_STATES = Object.freeze(["attempt_started", "provider_acknowledge
915
939
  var OWNER_EFFECT_STATES = Object.freeze(["none", "applied", "failed", "unknown", "reconciled"]);
916
940
  var OWNER_RECEIPT_STATES = Object.freeze(["pending", "available", "failed", "unknown", "reconciled"]);
917
941
 
942
+ // packages/ceal-client-protocol/src/thread-excerpt.ts
943
+ var CEAL_THREAD_RECENT_WINDOW = 6;
944
+ var CEAL_THREAD_LAST_APP_MESSAGES_WINDOW = 3;
945
+ var CEAL_THREAD_OLDER_SUMMARY_WINDOW = 4;
946
+ var CEAL_FED_THREAD_MESSAGE_LIMIT = CEAL_THREAD_RECENT_WINDOW + CEAL_THREAD_OLDER_SUMMARY_WINDOW + CEAL_THREAD_LAST_APP_MESSAGES_WINDOW;
947
+
918
948
  // packages/ceal-client-protocol/src/request-graph-readiness.ts
919
949
  var REQUEST_GRAPH_PRODUCER_TO_APPEND_SCHEMA = {
920
950
  type: "object",
@@ -994,6 +1024,13 @@ var CEAL_REQUEST_GRAPH_NODE_PREPARE_READINESS_JSON_SCHEMA = {
994
1024
  var REQUIRED_FIELDS = Object.freeze(["schema_version", "operation_id", "local_path", "content_json_pointer", "size_bytes", "sha256", "read_argv"]);
995
1025
  var FIELDS = /* @__PURE__ */ new Set([...REQUIRED_FIELDS, "local_result_root", "model_disclosure"]);
996
1026
 
1027
+ // packages/ceal-client-protocol/src/session-start-affordance.ts
1028
+ var CEAL_SESSION_ENTRY_INVOCATION = "ceal";
1029
+ var CEAL_LINK_RESOURCE_PRECEDENCE = `When the user asks to use Ceal or provides a link to information that may be available through installed organizational capabilities, run bare \`${CEAL_SESSION_ENTRY_INVOCATION}\`. The Host supplies the current user prompt without exposing it to the client command, and the Gateway returns the applicable entry in that one response. Treat a supplied link as a candidate Ceal resource rather than a public web-search target. Reach for a generic web fetch or web search only when the Gateway offered nothing.`;
1030
+
1031
+ // packages/ceal-client-protocol/src/discovery-manifest.ts
1032
+ var CEAL_DISCOVERY_MANIFEST_CONNECTOR_KINDS = vocabulary(["github", "google-workspace", "notion", "slack"]);
1033
+
997
1034
  // packages/ceal-client-protocol/src/conversation-contracts.ts
998
1035
  var CEAL_APPROVAL_POLICY_KINDS = vocabulary(["requester_only", "named_users", "role_based"]);
999
1036
  var CEAL_APPROVAL_TARGET_KINDS = vocabulary([
@@ -1210,7 +1247,7 @@ var CEAL_PRESENTATION_INTENTS = vocabulary(["progress", ...CEAL_FINAL_PRESENTATI
1210
1247
 
1211
1248
  // packages/ceal-client-protocol/src/personal-client-vocabulary.ts
1212
1249
  var CEAL_PERSONAL_CLIENT_BINDING_KEYS = vocabulary([
1213
- "profile_ref",
1250
+ "access_group_ref",
1214
1251
  "membership_ref",
1215
1252
  "registration_ref",
1216
1253
  "client_ref",
@@ -1225,7 +1262,8 @@ var CEAL_REFRESH_FAILURE_CODES = vocabulary([
1225
1262
  "refresh_replayed",
1226
1263
  "refresh_revoked",
1227
1264
  "authority_replaced",
1228
- "refresh_recovery_unavailable"
1265
+ "refresh_recovery_unavailable",
1266
+ "refresh_recovery_expired"
1229
1267
  ]);
1230
1268
 
1231
1269
  // packages/ceal-client-protocol/src/device-enrollment.ts
@@ -1655,12 +1693,19 @@ var RELAY_QUARANTINE_MAX_BYTES = 16 * 1024 * 1024;
1655
1693
 
1656
1694
  // host/relay/src/relay-admission-store.ts
1657
1695
  var DEFAULT_LIMITS = { global_count: 8192, global_bytes: 64 * 1024 * 1024, producer_count: 4096, producer_bytes: 32 * 1024 * 1024 };
1696
+ var RETRY_SECONDS = [1, 2, 4, 8, 16, 32, 60];
1697
+ var MAX_RETRYABLE_ATTEMPTS = RETRY_SECONDS.length + 10;
1658
1698
 
1659
1699
  // host/relay/src/relay-request-binding-store.ts
1660
1700
  var MAX_STATE_BYTES = 8 * 1024 * 1024;
1661
1701
 
1662
1702
  // host/relay/src/relay-ipc.ts
1663
1703
  import { createConnection, createServer } from "node:net";
1704
+
1705
+ // host/relay/src/current-prompt-custody.ts
1706
+ var HOST_CURRENT_PROMPT_MAX_BYTES = 256 * 1024;
1707
+
1708
+ // host/relay/src/relay-ipc.ts
1664
1709
  var HOST_RELAY_REQUEST_BINDING_KEYS = Object.freeze([
1665
1710
  "schema_version",
1666
1711
  "producer_id",
@@ -1702,19 +1747,26 @@ var HostRelayIpcAdmissionPort = class {
1702
1747
  function submitHostProducerFrame(endpoint, frame, timeoutMs = 5e3) {
1703
1748
  return exchange(endpoint, encodeHostProducerFrame(frame), timeoutMs, decodeResponseBuffer);
1704
1749
  }
1705
- function exchange(endpoint, encoded, timeoutMs, decode) {
1750
+ function exchange(endpoint, encoded, timeoutMs, decode, signal) {
1706
1751
  return new Promise((resolve, reject) => {
1707
1752
  const socket = createConnection(endpoint);
1708
1753
  let buffer = Buffer.alloc(0);
1709
1754
  let settled = false;
1755
+ const aborted = () => finish(new HostRelayIpcError("relay_unavailable", "Host Relay IPC was cancelled."));
1710
1756
  const finish = (error, response2) => {
1711
1757
  if (settled) return;
1712
1758
  settled = true;
1759
+ signal?.removeEventListener("abort", aborted);
1713
1760
  socket.destroy();
1714
1761
  if (error !== null) reject(error);
1715
1762
  else if (response2 !== void 0) resolve(response2);
1716
1763
  };
1717
- socket.setTimeout(timeoutMs, () => finish(new HostRelayIpcError("relay_unavailable", "Host Relay IPC timed out.")));
1764
+ if (timeoutMs !== void 0) socket.setTimeout(timeoutMs, () => finish(new HostRelayIpcError("relay_unavailable", "Host Relay IPC timed out.")));
1765
+ if (signal?.aborted === true) {
1766
+ aborted();
1767
+ return;
1768
+ }
1769
+ signal?.addEventListener("abort", aborted, { once: true });
1718
1770
  socket.once("error", () => finish(new HostRelayIpcError("relay_unavailable", "Host Relay IPC is unavailable.")));
1719
1771
  socket.once("connect", () => socket.write(encoded));
1720
1772
  socket.on("data", (chunk) => {