@corca-org/ceal-host-linux-arm64 1.0.14 → 1.0.16

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,7 +78,6 @@ var client_wire_contract_default = {
78
78
  length: 72,
79
79
  pattern: "^catalog:[a-f0-9]{64}$"
80
80
  },
81
- max_bytes: 4194304,
82
81
  envelope_max_bytes: 389
83
82
  },
84
83
  command_request: {
@@ -159,14 +158,13 @@ var client_wire_contract_default = {
159
158
  "prompt"
160
159
  ],
161
160
  discovery_command: "discovery",
162
- discovery_manifest_schema_version: "ceal.discovery_manifest.v2",
161
+ discovery_manifest_schema_version: "ceal.discovery_manifest.v1",
163
162
  discovery_manifest_document_fields: [
164
163
  "discovery_manifest"
165
164
  ],
166
165
  exit_code_max: 125,
167
166
  bare_document_max_bytes: 65536,
168
- complete_max_bytes: 66019,
169
- absolute_transport_max_bytes: 4194304
167
+ complete_max_bytes: 66019
170
168
  },
171
169
  resource_stream: {
172
170
  path: "/api/ceal/v2/resources",
@@ -181,6 +179,9 @@ var client_wire_contract_default = {
181
179
  "fetch"
182
180
  ],
183
181
  ref_flag: "--ref"
182
+ },
183
+ encoded_json_document: {
184
+ max_bytes: 4194304
184
185
  }
185
186
  };
186
187
 
@@ -190,6 +191,7 @@ var commandResolution = CEAL_CLIENT_WIRE_CONTRACT.command_resolution;
190
191
  var commandResolutionAuthority = commandResolution.authority;
191
192
  var commandResolutionSemanticOptions = commandResolution.semantic_options;
192
193
  var CEAL_GATEWAY_COMMAND_RESOLUTION_SCHEMA_VERSION = commandResolution.schema_version;
194
+ var CEAL_ENCODED_JSON_DOCUMENT_MAX_BYTES = CEAL_CLIENT_WIRE_CONTRACT.encoded_json_document.max_bytes;
193
195
  var artifact = CEAL_CLIENT_WIRE_CONTRACT.artifact_descriptor;
194
196
  var request = CEAL_CLIENT_WIRE_CONTRACT.command_request;
195
197
  var response = CEAL_CLIENT_WIRE_CONTRACT.command_response;
@@ -203,7 +205,7 @@ var CEAL_VERIFIED_ARTIFACT_DIGEST_LENGTH = artifact.digest.length;
203
205
  var CEAL_VERIFIED_ARTIFACT_DIGEST_PATTERN = artifact.digest.pattern;
204
206
  var CEAL_VERIFIED_ARTIFACT_CATALOG_REVISION_LENGTH = artifact.catalog_revision.length;
205
207
  var CEAL_VERIFIED_ARTIFACT_CATALOG_REVISION_PATTERN = artifact.catalog_revision.pattern;
206
- var CEAL_VERIFIED_ARTIFACT_MAX_BYTES = artifact.max_bytes;
208
+ var CEAL_VERIFIED_ARTIFACT_MAX_BYTES = CEAL_ENCODED_JSON_DOCUMENT_MAX_BYTES;
207
209
  var CEAL_VERIFIED_ARTIFACT_DESCRIPTOR_MAX_BYTES = artifact.envelope_max_bytes;
208
210
  var CEAL_COMMAND_REQUEST_SCHEMA_VERSION = request.schema_version;
209
211
  var CEAL_COMMAND_REQUEST_MAX_BYTES = request.absolute_transport_max_bytes;
@@ -217,7 +219,6 @@ var CEAL_COMMAND_RESPONSE_FOCUSED_PROMPT_CONTINUATION_DOCUMENT_FIELDS = Object.f
217
219
  var CEAL_COMMAND_RESPONSE_DISCOVERY_COMMAND = response.discovery_command;
218
220
  var CEAL_COMMAND_RESPONSE_DISCOVERY_MANIFEST_SCHEMA_VERSION = response.discovery_manifest_schema_version;
219
221
  var CEAL_COMMAND_RESPONSE_DISCOVERY_MANIFEST_DOCUMENT_FIELDS = Object.freeze([...response.discovery_manifest_document_fields]);
220
- var CEAL_COMMAND_RESPONSE_MAX_BYTES = response.absolute_transport_max_bytes;
221
222
 
222
223
  // packages/ceal-client-protocol/src/vocabulary.ts
223
224
  function vocabulary(words) {
@@ -231,6 +232,7 @@ var CEAL_AUDIT_OUTCOMES = vocabulary(["succeeded", "denied", "failed"]);
231
232
  var CEAL_GATEWAY_PROVIDER_STEP_OUTCOMES = vocabulary(["completed", "rejected", "throttled", "failed"]);
232
233
  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"]);
233
234
  var CEAL_GATEWAY_READ_REUSE_UNAVAILABLE_REASONS = vocabulary(["not_reported", "storage_unavailable", "coverage_incomplete", "freshness_refresh_required", "not_reusable", "bypassed"]);
235
+ var CEAL_GATEWAY_DERIVED_STORE_FAILURE_CLASSES = vocabulary(["storage_unavailable", "decode_mismatch", "write_conflict", "quota", "store_error"]);
234
236
  var CEAL_POLICY_DECISIONS = vocabulary(["allowed", "denied", "not_evaluated"]);
235
237
  var CEAL_CONNECTOR_ROUTE_PHASES = vocabulary(["scope_observation", "target_selection", "route_resolution"]);
236
238
  var CEAL_CONNECTOR_ROUTE_CAUSES = vocabulary(["provider_throttled", "provider_unavailable", "binding_invalid", "scope_limit_exceeded"]);
@@ -244,6 +246,17 @@ var CEAL_WRITE_RECEIPT_PROVIDER_STATES = vocabulary(["outcome_unknown", "verifie
244
246
  var CEAL_WRITE_RECEIPT_PROVIDER_READBACKS = vocabulary(["outcome_unknown", "verified", "not_applied"]);
245
247
  var CEAL_PROTOCOL_VERSION = "1.4.0";
246
248
  var CEAL_OPERATION_ACCESS_SCHEMA_VERSION = "ceal.operation_access.v1";
249
+ var CEAL_GATEWAY_ACTIVE_CALL_PHASES = vocabulary([
250
+ "audited_call_pending",
251
+ "continuation_read_pending",
252
+ "continuation_write_pending",
253
+ "provider_pacing_pending",
254
+ "corpus_replay_pending",
255
+ "corpus_append_pending",
256
+ "corpus_fence_pending",
257
+ "corpus_content_pending",
258
+ "corpus_transaction_pending"
259
+ ]);
247
260
  var CEAL_CONNECTOR_ROUTE_FAILURE_KEYS = vocabulary(["connector_kind", "phase", "schema_version"]);
248
261
  var CEAL_CLASSIFIED_CONNECTOR_ROUTE_FAILURE_KEYS = vocabulary(["cause", ...CEAL_CONNECTOR_ROUTE_FAILURE_KEYS]);
249
262
  var CEAL_UNCLASSIFIED_CONNECTOR_ROUTE_FAILURE_KEYS = vocabulary(["connector_kind", "error_class", "phase", "schema_version"]);
@@ -253,10 +266,129 @@ var CEAL_GATEWAY_ORGANIZATION_ROUTE_FACT_CALL_KEYS = Object.freeze([
253
266
  "policy_decision_revision"
254
267
  ]);
255
268
 
269
+ // packages/ceal-client-protocol/src/operation-next-actions.ts
270
+ var CEAL_REPEAT_REQUEST_NEXT_ACTION = "repeat_request";
271
+ var CEAL_INSPECT_RECEIPT_NEXT_ACTION = "inspect_receipt";
272
+ var CALLER_RECOVERABLE_NEXT_ACTION_VALUES = [
273
+ "select_did_you_mean",
274
+ "choose_new_output_path",
275
+ "choose_new_idempotency_key",
276
+ "restart_search",
277
+ "repeat_original_arguments",
278
+ // The occurrence this call addressed is settled and cannot move again -- a
279
+ // denied effect approval, an expired continuation -- so the caller runs the
280
+ // same call again as a new request. The refusal names the re-request; this
281
+ // word is the re-request.
282
+ CEAL_REPEAT_REQUEST_NEXT_ACTION,
283
+ "choose_new_request_identity",
284
+ // A refusal that names the argument (invalid_argument with `property`) tells the caller exactly what to change.
285
+ "correct_argument",
286
+ // A resolver-owned input must move from caller operands into the declared
287
+ // resolver selection field.
288
+ "supply_resolver_selections",
289
+ // The graph names an upstream node whose Operation produces the resolver's
290
+ // occurrence, and it has not produced one yet. The caller runs that node
291
+ // first; the refusal used to share a code with a malformed resolver result,
292
+ // which is not fixable, so neither could carry a remedy.
293
+ "run_resolver_dependency",
294
+ // A replay carries the input the occurrence durably admitted, and this one
295
+ // carries a different one. The caller fixes it by presenting the original
296
+ // invocation, so it is a remedy; the coordinator minted the word at the
297
+ // replay guard and never declared it, which read as unguided to the scorer.
298
+ "use_original_input",
299
+ // The same mismatch on the Request binding rather than the input: the
300
+ // occurrence was admitted under one binding and the replay presents another.
301
+ "use_original_request_binding",
302
+ // The client's own filesystem write was refused -- EACCES, EPERM, or a
303
+ // read-only mount -- which is how an agent sandbox fences writes outside its
304
+ // workspace. The caller reruns the same command with unsandboxed or escalated
305
+ // execution; re-adopting the session cannot help, because the sandbox refuses
306
+ // that write too.
307
+ "rerun_outside_agent_sandbox",
308
+ // The refusal names the one Operation to read next in `describe_command`:
309
+ // an absent Operation id with a sole catalog-ranked candidate, or a known
310
+ // Operation invoked without its input. Describing only reads the verified
311
+ // contract and dispatches nothing, and the caller then retries with the
312
+ // named Operation or input, so it is guidance the scorer counts.
313
+ "describe_operation",
314
+ // The refusal names the caller's own personal connect Operation in
315
+ // `required_action_sequence`: the Operation asked for, or the credential
316
+ // the call ran on, needs a personal connection the caller does not hold
317
+ // (never connected, revoked, or expired). The caller runs that exact
318
+ // Operation, completes the consent it hands back, and retries the same call.
319
+ "connect_personal_account",
320
+ // The provider or Gateway named a bounded wait; the caller waits that long
321
+ // and submits the same read again.
322
+ "retry_after",
323
+ // The ref names a container of rows (a Notion database or data source), which
324
+ // has no body of its own; the caller searches its rows instead of reading it.
325
+ "search_container_rows"
326
+ ];
327
+ var CEAL_CALLER_RECOVERABLE_NEXT_ACTIONS = Object.freeze(CALLER_RECOVERABLE_NEXT_ACTION_VALUES);
328
+ var NON_REMEDY_NEXT_ACTION_VALUES = [
329
+ // Only an administrator can take the named step -- approving a place for an
330
+ // Operation, granting a withheld capability -- so a non-administrator asks
331
+ // one. The refusal names the administrator step; this word is the ask.
332
+ "ask_admin",
333
+ "await_pending_approval",
334
+ "check_gateway",
335
+ "inspect_context_store",
336
+ "inspect_gateway",
337
+ "inspect_local_cache",
338
+ // The thin client prints these on its own behalf, before or after the wire.
339
+ // They were declared only as `CealClientLocalRemedy` keys and, for two of
340
+ // them, only as Go string literals -- a second and third vocabulary for one
341
+ // thing. `CealClientLocalRemedy` derives from this list now, so the client's
342
+ // remedies cannot drift from the words the protocol knows.
343
+ "inspect_local_client",
344
+ "inspect_local_command",
345
+ "inspect_local_output",
346
+ "inspect_local_route",
347
+ CEAL_INSPECT_RECEIPT_NEXT_ACTION,
348
+ "inspect_request",
349
+ "none",
350
+ // The provider refused because of its own configuration -- an API not
351
+ // enabled, an app scope missing -- which an operator changes in that
352
+ // provider's console. No caller edit and no retry fixes it.
353
+ "operator_action",
354
+ "recover",
355
+ "reconcile",
356
+ // Reconciliation of one named occurrence, not of the deployment: an
357
+ // occurrence with no admitted input commitment cannot be replayed safely and
358
+ // no edit to the call changes that. `reconcile` is the deployment-wide word.
359
+ "reconcile_occurrence",
360
+ "reduce_request_size",
361
+ // The Host's invocation context for this turn is stale or expired at the
362
+ // Gateway. The Host's next turn rebinds it and the same call then succeeds;
363
+ // nothing in the call changes, so it is not a remedy the scorer may count.
364
+ "refresh_host_invocation_context",
365
+ "repair_or_adopt_session",
366
+ "retry",
367
+ // The owner -- a correlation hook, an approval hook -- is not serving right
368
+ // now. The caller changes nothing and the same call succeeds once the owner
369
+ // is back, so this is not a remedy the scorer may count as guidance.
370
+ "retry_after_owner_recovery",
371
+ "retry_same_receipt_read",
372
+ "run_file_search_again",
373
+ "select_exact_approval"
374
+ ];
375
+ var CEAL_NON_REMEDY_NEXT_ACTIONS = Object.freeze(NON_REMEDY_NEXT_ACTION_VALUES);
376
+ var DECLARED = /* @__PURE__ */ new Set([...CEAL_CALLER_RECOVERABLE_NEXT_ACTIONS, ...CEAL_NON_REMEDY_NEXT_ACTIONS]);
377
+ var RETRY_PROMISE_NEXT_ACTIONS = ["retry", "retry_after"];
378
+ var RETRY_PROMISE = new Set(RETRY_PROMISE_NEXT_ACTIONS);
379
+ var RECOVERABLE = new Set(CEAL_CALLER_RECOVERABLE_NEXT_ACTIONS);
380
+ var CEAL_OPERATION_WITHHELD_NEXT_ACTIONS = Object.freeze({
381
+ provider_permission: "ask_admin",
382
+ access_level: "ask_admin",
383
+ personal_authorization_required: "connect_personal_account"
384
+ });
385
+
386
+ // packages/ceal-client-protocol/src/operation-withheld-cause.ts
387
+ var CEAL_OPERATION_WITHHELD_CAUSES = vocabulary(["provider_permission", "access_level", "personal_authorization_required"]);
388
+
256
389
  // packages/ceal-client-protocol/src/operation-contract-types.ts
257
390
  var CEAL_JSON_SCHEMA_2020_12 = "https://json-schema.org/draft/2020-12/schema";
258
391
  var CEAL_OPERATION_ERROR_SCHEMA_VERSION = "ceal.operation_error.v1";
259
- var CEAL_OPERATION_WITHHELD_CAUSES = vocabulary(["provider_permission", "access_level", "personal_authorization_required"]);
260
392
  var CEAL_RETRY_AFTER_MAX_MS = 60 * 60 * 1e3;
261
393
  var CEAL_JSON_SCHEMA_TYPES = vocabulary(["object", "array", "string", "integer", "number", "boolean", "null"]);
262
394
  var OBSERVATION_POSTURES = vocabulary(["direct_readback", "approved_no_readback", "operator_mediated", "excluded"]);
@@ -508,7 +640,6 @@ function cut(text) {
508
640
  var CEAL_OPERATION_ACCESS_CLASSES = vocabulary(["read", "write"]);
509
641
 
510
642
  // packages/ceal-client-protocol/src/domain-vocabulary.ts
511
- var CEAL_INTEGRATION_KINDS = vocabulary(["github", "google-workspace", "notion", "slack"]);
512
643
  var CEAL_CONNECTOR_STATUSES = vocabulary(["active", "disabled", "disconnected"]);
513
644
  var CEAL_CONNECTOR_CUSTODIES = vocabulary(["organization", "personal"]);
514
645
  var CEAL_PROVIDER_BOUNDARY_KINDS = vocabulary([
@@ -521,6 +652,8 @@ var CEAL_PROVIDER_BOUNDARY_KINDS = vocabulary([
521
652
  var CEAL_PROVIDER_BOUNDARY_EVIDENCE = vocabulary(["provider_readback", "operator_stated"]);
522
653
  var CEAL_ACCESS_LEVELS = vocabulary(["none", "read", "read_write"]);
523
654
  var CEAL_PERSONAL_ACCESS_CEILINGS = vocabulary(["disabled", "read", "read_write"]);
655
+ var CEAL_TARGET_REF_PATTERN = "^[^\\p{Cc}]+$";
656
+ var TARGET_REF = new RegExp(CEAL_TARGET_REF_PATTERN, "u");
524
657
  var CEAL_TARGET_VISIBILITIES = vocabulary(["public", "private"]);
525
658
  var CEAL_PRINCIPAL_KINDS = vocabulary(["human", "service", "runtime"]);
526
659
  var CEAL_ORGANIZATION_ROLES = vocabulary(["member", "admin"]);
@@ -631,6 +764,7 @@ var CEAL_OPERATION_DESCRIPTOR_REQUIRED_ENVELOPE_KEYS = Object.freeze(["schema_ve
631
764
  var CEAL_OPERATION_DESCRIPTOR_OPTIONAL_ENVELOPE_KEYS = Object.freeze(["input_resolution", "summary"]);
632
765
  var CEAL_OPERATION_RESULT_KEYS = vocabulary(["ok", "operation_id", "operation_receipt", "schema_version", "value"]);
633
766
  var CEAL_OPERATION_COMPACT_RESULT_KEYS = vocabulary(["ok", "operation_evidence", "operation_id", "schema_version", "value"]);
767
+ var CEAL_OPERATION_RESULT_OPTIONAL_KEYS = vocabulary(["model_disclosure", "result_complete", "resume"]);
634
768
 
635
769
  // packages/ceal-client-protocol/src/operation-catalog.ts
636
770
  var CEAL_OPERATION_CATALOG_SCHEMA_VERSION = "ceal.catalog.v3";
@@ -642,8 +776,8 @@ var CEAL_SCHEMA_LITERALS = [
642
776
  "ceal.activation_transport.v1",
643
777
  CEAL_OPERATION_ACCESS_SCHEMA_VERSION,
644
778
  CEAL_OPERATION_CATALOG_SCHEMA_VERSION,
645
- "ceal.client_refresh_request.v2",
646
- "ceal.client_refresh_result.v2",
779
+ "ceal.client_refresh_request.v1",
780
+ "ceal.client_refresh_result.v1",
647
781
  "ceal.client_revoke_request.v1",
648
782
  "ceal.client_revoke_result.v1",
649
783
  CEAL_COMMAND_REQUEST_SCHEMA_VERSION,
@@ -672,7 +806,7 @@ var CEAL_SCHEMA_LITERALS = [
672
806
  "ceal.gateway_call_result.v1",
673
807
  CEAL_GATEWAY_COMMAND_RESOLUTION_SCHEMA_VERSION,
674
808
  "ceal.gateway_connector_route_failure.v1",
675
- "ceal.gateway_discovery.v3",
809
+ "ceal.gateway_discovery.v1",
676
810
  "ceal.gateway_handshake.v1",
677
811
  "ceal.gateway_installation_activation_code_issue_request.v1",
678
812
  "ceal.gateway_installation_activation_code_issue_result.v1",
@@ -694,10 +828,10 @@ var CEAL_SCHEMA_LITERALS = [
694
828
  "ceal.host_observation.v1",
695
829
  "ceal.host_registration_request.v1",
696
830
  "ceal.host_registration_result.v1",
697
- "ceal.leased-resource-stream.v2",
698
- "ceal.leased_consumer_attachment_stream_frame.v2",
699
- "ceal.leased_consumer_attachment_stream_request.v2",
700
- "ceal.leased_consumer_attachment_stream_transport.v2",
831
+ "ceal.leased-resource-stream.v1",
832
+ "ceal.leased_consumer_attachment_stream_frame.v1",
833
+ "ceal.leased_consumer_attachment_stream_request.v1",
834
+ "ceal.leased_consumer_attachment_stream_transport.v1",
701
835
  "ceal.operation_descriptor.v1",
702
836
  "ceal.operation_error.v1",
703
837
  "ceal.operation_failure.v1",
@@ -705,7 +839,7 @@ var CEAL_SCHEMA_LITERALS = [
705
839
  "ceal.operation_receipt.v1",
706
840
  "ceal.operation_result.v1",
707
841
  "ceal.operation_result.compact.v1",
708
- "ceal.local_result_materialization.v2",
842
+ "ceal.local_result_materialization.v1",
709
843
  "ceal.local_result_root.v1",
710
844
  "ceal.owner_bootstrap_exchange_request.v1",
711
845
  "ceal.owner_bootstrap_exchange_result.v1",
@@ -790,117 +924,8 @@ var CEAL_AGENT_SERVICE_SESSION_RECORD_KEYS = vocabulary([
790
924
  ]);
791
925
  var CEAL_AGENT_SESSION_COMMIT_KEYS = vocabulary(["attempt_ref", "expected_session_revision", "session_revision"]);
792
926
 
793
- // packages/ceal-client-protocol/src/operation-next-actions.ts
794
- var CEAL_REPEAT_REQUEST_NEXT_ACTION = "repeat_request";
795
- var CEAL_INSPECT_RECEIPT_NEXT_ACTION = "inspect_receipt";
796
- var CALLER_RECOVERABLE_NEXT_ACTION_VALUES = [
797
- "select_did_you_mean",
798
- "choose_new_output_path",
799
- "choose_new_idempotency_key",
800
- "restart_search",
801
- "repeat_original_arguments",
802
- // The occurrence this call addressed is settled and cannot move again -- a
803
- // denied effect approval, an expired continuation -- so the caller runs the
804
- // same call again as a new request. The refusal names the re-request; this
805
- // word is the re-request.
806
- CEAL_REPEAT_REQUEST_NEXT_ACTION,
807
- "choose_new_request_identity",
808
- // A refusal that names the argument (invalid_argument with `property`) tells the caller exactly what to change.
809
- "correct_argument",
810
- // A resolver-owned input must move from caller operands into the declared
811
- // resolver selection field.
812
- "supply_resolver_selections",
813
- // The graph names an upstream node whose Operation produces the resolver's
814
- // occurrence, and it has not produced one yet. The caller runs that node
815
- // first; the refusal used to share a code with a malformed resolver result,
816
- // which is not fixable, so neither could carry a remedy.
817
- "run_resolver_dependency",
818
- // A replay carries the input the occurrence durably admitted, and this one
819
- // carries a different one. The caller fixes it by presenting the original
820
- // invocation, so it is a remedy; the coordinator minted the word at the
821
- // replay guard and never declared it, which read as unguided to the scorer.
822
- "use_original_input",
823
- // The same mismatch on the Request binding rather than the input: the
824
- // occurrence was admitted under one binding and the replay presents another.
825
- "use_original_request_binding",
826
- // The client's own filesystem write was refused -- EACCES, EPERM, or a
827
- // read-only mount -- which is how an agent sandbox fences writes outside its
828
- // workspace. The caller reruns the same command with unsandboxed or escalated
829
- // execution; re-adopting the session cannot help, because the sandbox refuses
830
- // that write too.
831
- "rerun_outside_agent_sandbox",
832
- // The refusal names the one Operation to read next in `describe_command`:
833
- // an absent Operation id with a sole catalog-ranked candidate, or a known
834
- // Operation invoked without its input. Describing only reads the verified
835
- // contract and dispatches nothing, and the caller then retries with the
836
- // named Operation or input, so it is guidance the scorer counts.
837
- "describe_operation",
838
- // The refusal names the caller's own personal connect Operation in
839
- // `required_action_sequence`: the Operation asked for, or the credential
840
- // the call ran on, needs a personal connection the caller does not hold
841
- // (never connected, revoked, or expired). The caller runs that exact
842
- // Operation, completes the consent it hands back, and retries the same call.
843
- "connect_personal_account",
844
- // The provider or Gateway named a bounded wait; the caller waits that long
845
- // and submits the same read again.
846
- "retry_after"
847
- ];
848
- var CEAL_CALLER_RECOVERABLE_NEXT_ACTIONS = Object.freeze(CALLER_RECOVERABLE_NEXT_ACTION_VALUES);
849
- var NON_REMEDY_NEXT_ACTION_VALUES = [
850
- // Only an administrator can take the named step -- approving a place for an
851
- // Operation, granting a withheld capability -- so a non-administrator asks
852
- // one. The refusal names the administrator step; this word is the ask.
853
- "ask_admin",
854
- "await_pending_approval",
855
- "check_gateway",
856
- "inspect_context_store",
857
- "inspect_gateway",
858
- "inspect_local_cache",
859
- // The thin client prints these on its own behalf, before or after the wire.
860
- // They were declared only as `CealClientLocalRemedy` keys and, for two of
861
- // them, only as Go string literals -- a second and third vocabulary for one
862
- // thing. `CealClientLocalRemedy` derives from this list now, so the client's
863
- // remedies cannot drift from the words the protocol knows.
864
- "inspect_local_client",
865
- "inspect_local_command",
866
- "inspect_local_output",
867
- "inspect_local_route",
868
- CEAL_INSPECT_RECEIPT_NEXT_ACTION,
869
- "inspect_request",
870
- "none",
871
- // The provider refused because of its own configuration -- an API not
872
- // enabled, an app scope missing -- which an operator changes in that
873
- // provider's console. No caller edit and no retry fixes it.
874
- "operator_action",
875
- "recover",
876
- "reconcile",
877
- // Reconciliation of one named occurrence, not of the deployment: a legacy
878
- // occurrence with no admitted input commitment cannot be replayed safely and
879
- // no edit to the call changes that. `reconcile` is the deployment-wide word.
880
- "reconcile_occurrence",
881
- "reduce_request_size",
882
- // The Host's invocation context for this turn is stale or expired at the
883
- // Gateway. The Host's next turn rebinds it and the same call then succeeds;
884
- // nothing in the call changes, so it is not a remedy the scorer may count.
885
- "refresh_host_invocation_context",
886
- "repair_or_adopt_session",
887
- "retry",
888
- // The owner -- a correlation hook, an approval hook -- is not serving right
889
- // now. The caller changes nothing and the same call succeeds once the owner
890
- // is back, so this is not a remedy the scorer may count as guidance.
891
- "retry_after_owner_recovery",
892
- "retry_same_receipt_read",
893
- "run_file_search_again",
894
- "select_exact_approval"
895
- ];
896
- var CEAL_NON_REMEDY_NEXT_ACTIONS = Object.freeze(NON_REMEDY_NEXT_ACTION_VALUES);
897
- var DECLARED = /* @__PURE__ */ new Set([...CEAL_CALLER_RECOVERABLE_NEXT_ACTIONS, ...CEAL_NON_REMEDY_NEXT_ACTIONS]);
898
- var RECOVERABLE = new Set(CEAL_CALLER_RECOVERABLE_NEXT_ACTIONS);
899
- var CEAL_OPERATION_WITHHELD_NEXT_ACTIONS = Object.freeze({
900
- provider_permission: "ask_admin",
901
- access_level: "ask_admin",
902
- personal_authorization_required: "connect_personal_account"
903
- });
927
+ // packages/ceal-client-protocol/src/operation-result-completeness.ts
928
+ var CEAL_READ_VALUE_CONTINUATION_KEYS = vocabulary(["continuation", "continuation_ref", "next_cursor"]);
904
929
 
905
930
  // packages/ceal-client-protocol/src/operation-contract-artifact.ts
906
931
  var CATALOG_REVISION = new RegExp(CEAL_VERIFIED_ARTIFACT_CATALOG_REVISION_PATTERN, "u");
@@ -961,7 +986,8 @@ var CEAL_ACTIVITY_GAP_CODES = vocabulary([
961
986
  "provider_cursor_unavailable",
962
987
  "malformed_provider_page",
963
988
  "visibility_incomplete",
964
- "unsupported_event_kind"
989
+ "unsupported_event_kind",
990
+ "direct_messages_excluded"
965
991
  ]);
966
992
  var CEAL_ACTIVITY_CONNECTOR_KINDS = vocabulary(["slack", "github", "google-calendar", "google-drive", "notion"]);
967
993
  var CEAL_ACTIVITY_COVERAGE_STATUSES = vocabulary(["complete_for_target", "continuation_required", "blocked"]);
@@ -972,6 +998,8 @@ var CEAL_ACTIVITY_EVENT_KINDS = vocabulary([
972
998
  "github.commit.authored",
973
999
  "github.issue.opened",
974
1000
  "github.pull_request.opened",
1001
+ "github.issue.edited",
1002
+ "github.pull_request.edited",
975
1003
  "github.review.submitted",
976
1004
  "github.issue_comment.created",
977
1005
  "github.review_comment.created",
@@ -984,6 +1012,25 @@ var CEAL_ACTIVITY_EVENT_KINDS = vocabulary([
984
1012
  "notion.page.created",
985
1013
  "notion.page.edited"
986
1014
  ]);
1015
+ var CEAL_ACTIVITY_EVENT_TIMESTAMP_BASIS_MAP = Object.freeze({
1016
+ "slack.message": "message_created",
1017
+ "slack.reply": "message_created",
1018
+ "slack.direct_message": "message_created",
1019
+ "github.commit.authored": "commit_authored",
1020
+ "github.review.submitted": "review_submitted",
1021
+ "github.issue_comment.created": "comment_created",
1022
+ "github.review_comment.created": "comment_created",
1023
+ "github.issue.opened": "resource_created",
1024
+ "github.pull_request.opened": "resource_created",
1025
+ "github.issue.edited": "resource_modified",
1026
+ "github.pull_request.edited": "resource_modified",
1027
+ "calendar.organized": "resource_created",
1028
+ "drive.file.created": "file_created",
1029
+ "drive.file.modified": "file_modified_by_me",
1030
+ "drive.file.viewed": "file_viewed_by_me",
1031
+ "notion.page.created": "page_created",
1032
+ "notion.page.edited": "page_last_edited"
1033
+ });
987
1034
  var CEAL_ACTIVITY_TIMESTAMP_BASES = vocabulary([
988
1035
  "message_created",
989
1036
  "commit_authored",
@@ -1004,11 +1051,12 @@ var CEAL_ACTIVITY_V3_KINDS = vocabulary(["authored", "edited", "messaged", "resp
1004
1051
  var CEAL_RESOURCE_TIME_BASES = vocabulary(["created", "modified", "viewed"]);
1005
1052
  var CEAL_RESOURCE_SEARCH_ORDERS = vocabulary(["relevance", "modified", "viewed", "created"]);
1006
1053
  var CEAL_RESOURCE_SEARCH_DIRECTIONS = vocabulary(["ascending", "descending"]);
1007
- var CEAL_RESOURCE_SEARCH_FILTERS = vocabulary(["query", "modified_since", "since", "until", "authored_by_me", "include_replies", "kinds", "container_ref", "container_refs", "addressed_to_me", "unread"]);
1054
+ var CEAL_RESOURCE_SEARCH_FILTERS = vocabulary(["query", "modified_since", "since", "until", "authored_by_me", "include_replies", "kinds", "container_ref", "container_refs", "container_names", "addressed_to_me", "unread"]);
1008
1055
  var CEAL_ARTIFACT_STAGE_TERMINALS = vocabulary(["chunk_accepted", "artifact_ready", "idempotency_replayed"]);
1009
1056
  var CEAL_READ_ITEM_KINDS = vocabulary(["conversation", "identity", "usergroup", "message", "file", "document"]);
1010
1057
  var CEAL_LEASED_MESSAGE_SEARCH_COMPLETENESS = vocabulary(["complete", "continuation_available", "truncated"]);
1011
- var CEAL_OPAQUE_HANDLE_KINDS = vocabulary(["target", "message", "thread", "artifact", "document", "object"]);
1058
+ var CEAL_OPAQUE_HANDLE_KINDS = vocabulary(["target", "message", "thread", "artifact", "document", "block", "object"]);
1059
+ var CEAL_OPAQUE_REF_KINDS = vocabulary([...CEAL_OPAQUE_HANDLE_KINDS, "result", "operation-receipt", "reply-receipt", "field", "notion-data-source"]);
1012
1060
  var CEAL_WRITE_OBJECT_KINDS = vocabulary(["document", "comment", "cell_range"]);
1013
1061
  var CEAL_CONVERSATION_KINDS = vocabulary(["channel", "dm", "group"]);
1014
1062
  var CEAL_FILE_TYPE_FAMILIES = vocabulary(["all", "image", "pdf"]);
@@ -1050,6 +1098,9 @@ var CEAL_FINAL_PRESENTATION_INTENTS = vocabulary(["final", "stop", "transient_no
1050
1098
  var CEAL_PRESENTATION_INTENTS = vocabulary(["progress", ...CEAL_FINAL_PRESENTATION_INTENTS]);
1051
1099
 
1052
1100
  // packages/ceal-client-protocol/src/resource-row.ts
1101
+ var CEAL_DATED_NOTE_BASES = vocabulary(["recording", "calendar_event", "created_time"]);
1102
+ var CEAL_DATED_NOTE_TRANSCRIPT_STATES = vocabulary(["present", "absent", "unestablished"]);
1103
+ var CEAL_READ_SEARCH_COST_CLASSES = vocabulary(["native_index", "scan"]);
1053
1104
  var RESOURCE_ROW_KEY_RULES = Object.freeze({
1054
1105
  schema_version: { required: true, timestamp: false },
1055
1106
  ref: { required: true, timestamp: false },
@@ -1058,9 +1109,11 @@ var RESOURCE_ROW_KEY_RULES = Object.freeze({
1058
1109
  title: { required: true, timestamp: false },
1059
1110
  container_label: { required: true, timestamp: false },
1060
1111
  container_ref: { required: false, timestamp: false },
1112
+ source_url: { required: false, timestamp: false },
1061
1113
  source: { required: true, timestamp: false },
1062
1114
  owner: { required: false, timestamp: false },
1063
1115
  counterparts: { required: false, timestamp: false },
1116
+ attachments: { required: false, timestamp: false },
1064
1117
  created_at: { required: false, timestamp: true },
1065
1118
  created_at_local: { required: false, timestamp: true },
1066
1119
  modified_at: { required: false, timestamp: true },
@@ -1071,6 +1124,7 @@ var RESOURCE_ROW_KEY_RULES = Object.freeze({
1071
1124
  end: { required: false, timestamp: false },
1072
1125
  status: { required: false, timestamp: false },
1073
1126
  snippet: { required: false, timestamp: false },
1127
+ dated_notes: { required: false, timestamp: false },
1074
1128
  state: { required: true, timestamp: false },
1075
1129
  timestamp_basis: { required: true, timestamp: false }
1076
1130
  });
@@ -1107,6 +1161,27 @@ var CEAL_WRITE_SAFETY_UNCHECKED_REASONS = vocabulary(["authority_unavailable"]);
1107
1161
  // packages/ceal-client-protocol/src/operation-occurrence.ts
1108
1162
  var MAX_RECEIPT_REVISION = Number.MAX_SAFE_INTEGER - 1;
1109
1163
 
1164
+ // packages/ceal-client-protocol/src/personal-client-vocabulary.ts
1165
+ var CEAL_PERSONAL_CLIENT_BINDING_KEYS = vocabulary([
1166
+ "access_group_ref",
1167
+ "membership_ref",
1168
+ "registration_ref",
1169
+ "client_ref",
1170
+ "subject_ref",
1171
+ "instance_ref"
1172
+ ]);
1173
+ var CEAL_ENROLLMENT_FAILURE_CODES = vocabulary(["enrollment_invalid", "enrollment_expired", "enrollment_used"]);
1174
+ var CEAL_REFRESH_FAILURE_CODES = vocabulary([
1175
+ "refresh_invalid",
1176
+ "refresh_expired",
1177
+ "refresh_inactive",
1178
+ "refresh_replayed",
1179
+ "refresh_revoked",
1180
+ "authority_replaced",
1181
+ "refresh_recovery_unavailable",
1182
+ "refresh_recovery_expired"
1183
+ ]);
1184
+
1110
1185
  // packages/ceal-client-protocol/src/leased-artifact-contract.ts
1111
1186
  var CEAL_LEASED_CONSUMER_ARTIFACT_CHUNK_MAX_BYTES = 12 * 1024;
1112
1187
 
@@ -1202,7 +1277,7 @@ var CEAL_REQUEST_MAX_GRAPH_NODES = 128;
1202
1277
 
1203
1278
  // packages/ceal-client-protocol/src/request-run.ts
1204
1279
  var CEAL_REQUEST_NODE_STANDING_OCCURRENCE_SCHEMA_VERSION = "ceal.request_node_standing_occurrence.v1";
1205
- var CEAL_REQUEST_RUN_BATCH_SCHEMA_VERSION = "ceal.request_run_batch.v3";
1280
+ var CEAL_REQUEST_RUN_BATCH_SCHEMA_VERSION = "ceal.request_run_batch.v1";
1206
1281
  var REQUEST_ACTION_SAFE_REF_SCHEMA = { type: "string", minLength: 1, maxLength: 128, pattern: SAFE_REF.source };
1207
1282
  var REQUEST_ACTION_DIGEST_SCHEMA = { type: "string", minLength: 64, maxLength: 64, pattern: "^[a-f0-9]{64}$" };
1208
1283
  var REQUEST_NODE_STANDING_OCCURRENCE_SCHEMA = {
@@ -1427,10 +1502,22 @@ var CEAL_REQUEST_GRAPH_NODE_PREPARE_READINESS_JSON_SCHEMA = {
1427
1502
  required: ["node_ref", "operation_id", "resolver_owned", "gateway_derived"]
1428
1503
  };
1429
1504
 
1505
+ // packages/ceal-client-protocol/src/host-invocation-authentication.ts
1506
+ var CEAL_HOST_INVOCATION_AUTHENTICATION_RESULT_SCHEMA = "ceal.host_invocation_authentication_result.v1";
1507
+ var CEAL_HOST_NONCE_ENCODED_CHARACTERS = 43;
1508
+ var CEAL_HOST_CLIENT_NONCE_PATTERN = new RegExp(`^[A-Za-z0-9_-]{${CEAL_HOST_NONCE_ENCODED_CHARACTERS}}$`, "u");
1509
+ var CEAL_HOST_CONTEXT_TOKEN_PATTERN = new RegExp(`^ceal_context_[A-Za-z0-9_-]{${CEAL_HOST_NONCE_ENCODED_CHARACTERS}}$`, "u");
1510
+ var CEAL_HOST_INVOCATION_AUTHENTICATION_RESULT_MAX_BYTES = new TextEncoder().encode(`${JSON.stringify({
1511
+ schema_version: CEAL_HOST_INVOCATION_AUTHENTICATION_RESULT_SCHEMA,
1512
+ context_token: `ceal_context_${"A".repeat(CEAL_HOST_NONCE_ENCODED_CHARACTERS)}`,
1513
+ expires_at: (/* @__PURE__ */ new Date("+010000-01-01T00:00:00.000Z")).toISOString()
1514
+ })}
1515
+ `).byteLength;
1516
+
1430
1517
  // packages/ceal-client-protocol/src/client-result-materialization.ts
1431
1518
  var CEAL_MODEL_VISIBLE_COMMAND_OUTPUT_MAX_BYTES = 32 * 1024;
1432
- var REQUIRED_FIELDS2 = Object.freeze(["schema_version", "operation_id", "read_argv"]);
1433
- var FIELDS = /* @__PURE__ */ new Set([...REQUIRED_FIELDS2, "local_result_root", "continue_argv"]);
1519
+ var REQUIRED_FIELDS2 = Object.freeze(["schema_version", "operation_id"]);
1520
+ var FIELDS = /* @__PURE__ */ new Set([...REQUIRED_FIELDS2, "read_argv", "local_result_root", "continue_argv", "model_disclosure", "item_read_argv"]);
1434
1521
 
1435
1522
  // packages/ceal-client-protocol/src/session-start-affordance.ts
1436
1523
  var CEAL_SESSION_ENTRY_INVOCATION = "ceal";
@@ -1530,27 +1617,6 @@ var ADMIN_LINEAGE_NODE_KINDS = vocabulary(["source_read", "synthesis_preview", "
1530
1617
  // packages/ceal-client-protocol/src/actor-kind.ts
1531
1618
  var CEAL_ACTOR_KINDS = vocabulary(["human", "bot", "app", "unknown"]);
1532
1619
 
1533
- // packages/ceal-client-protocol/src/personal-client-vocabulary.ts
1534
- var CEAL_PERSONAL_CLIENT_BINDING_KEYS = vocabulary([
1535
- "access_group_ref",
1536
- "membership_ref",
1537
- "registration_ref",
1538
- "client_ref",
1539
- "subject_ref",
1540
- "instance_ref"
1541
- ]);
1542
- var CEAL_ENROLLMENT_FAILURE_CODES = vocabulary(["enrollment_invalid", "enrollment_expired", "enrollment_used"]);
1543
- var CEAL_REFRESH_FAILURE_CODES = vocabulary([
1544
- "refresh_invalid",
1545
- "refresh_expired",
1546
- "refresh_inactive",
1547
- "refresh_replayed",
1548
- "refresh_revoked",
1549
- "authority_replaced",
1550
- "refresh_recovery_unavailable",
1551
- "refresh_recovery_expired"
1552
- ]);
1553
-
1554
1620
  // packages/ceal-client-protocol/src/device-enrollment.ts
1555
1621
  var CEAL_DEVICE_ENROLLMENT_POLL_FAILURE_CODES = Object.freeze(["unsupported_feature", "recovery_required", "expired", "denied"]);
1556
1622
  var POLL_RESULT_KEYS = Object.freeze(["retry_after_ms", "schema_version", "status"]);
@@ -2604,7 +2670,6 @@ function assertHostProducerSourcePaths(stateRoot, config, producer, platform = p
2604
2670
  // host/producer-service.ts
2605
2671
  import { constants } from "node:fs";
2606
2672
  import { lstat as lstat2, open as open3 } from "node:fs/promises";
2607
- var MAX_CONFIG_BYTES = 32 * 1024;
2608
2673
  var SAFE_REF5 = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/u;
2609
2674
  var HOST_PRODUCER_CONFIG_FLAG = "--ceal-host-config";
2610
2675
  var HostProducerServiceError = class extends Error {
@@ -2615,7 +2680,8 @@ var HostProducerServiceError = class extends Error {
2615
2680
  this.code = code3;
2616
2681
  }
2617
2682
  };
2618
- var HOST_PRODUCER_CONFIG_KEYS = ["schema_version", "host_source_ref", "producer_installation_ref", "producer_epoch", "outbox_dir", "relay_endpoint", "reconcile_interval_ms", "retry_backoff_ms", "ipc_timeout_ms"];
2683
+ var HOST_PRODUCER_CONFIG_KEYS = ["schema_version", "host_source_ref", "producer_installation_ref", "producer_epoch", "outbox_dir", "relay_endpoint"];
2684
+ var HOST_PRODUCER_TIMING_DEFAULTS = Object.freeze({ reconcile_interval_ms: 250, retry_backoff_ms: 1e3, ipc_timeout_ms: 5e3 });
2619
2685
  function parseHostProducerConfigFlag(args, platform = process.platform) {
2620
2686
  return parseProducerHostConfigFlag(args, HOST_PRODUCER_CONFIG_FLAG, platform, hostProducerError);
2621
2687
  }
@@ -2654,15 +2720,17 @@ async function readProducerConfigText(configPath, platform, error) {
2654
2720
  const noFollow = typeof constants.O_NOFOLLOW === "number" ? constants.O_NOFOLLOW : 0;
2655
2721
  const handle = await openConfigFile(configPath, constants.O_RDONLY | noFollow, error);
2656
2722
  try {
2657
- validateOpenedFile(await handle.stat(), pathStat, platform, error);
2658
- return await readBoundedConfig(handle, error);
2723
+ const opened = await handle.stat();
2724
+ validateConfigFile(opened, platform, error);
2725
+ validateOpenedFile(opened, pathStat, platform, error);
2726
+ return await readBoundedConfig(handle, opened.size, error);
2659
2727
  } finally {
2660
2728
  await handle.close();
2661
2729
  }
2662
2730
  }
2663
2731
  function decodeProducerConfigCore(text, options) {
2664
2732
  const value = parseCanonicalJson(text, options.error);
2665
- if (!isRecord2(value) || !hasExactKeys2(value, options.keys) || value.schema_version !== options.schema) throw options.error("invalid_config");
2733
+ if (!isRecord2(value) || !hasConfigKeys(value, options.keys) || value.schema_version !== options.schema) throw options.error("invalid_config");
2666
2734
  const hostSourceRef = typeof value.host_source_ref === "string" ? value.host_source_ref : "";
2667
2735
  const installationRef = typeof value.producer_installation_ref === "string" ? value.producer_installation_ref : "";
2668
2736
  const producerEpoch = validateIdentity2(hostSourceRef, installationRef, value.producer_epoch, options.error);
@@ -2673,7 +2741,7 @@ function decodeProducerConfigCore(text, options) {
2673
2741
  assertProducerAbsolutePath(value[key], options.platform, "runtime", options.error);
2674
2742
  extraPaths[key] = value[key];
2675
2743
  }
2676
- const intervals = validateIntervals(value.reconcile_interval_ms, value.retry_backoff_ms, value.ipc_timeout_ms, options.error);
2744
+ const intervals = validateIntervals(value.reconcile_interval_ms === void 0 ? HOST_PRODUCER_TIMING_DEFAULTS.reconcile_interval_ms : value.reconcile_interval_ms, value.retry_backoff_ms === void 0 ? HOST_PRODUCER_TIMING_DEFAULTS.retry_backoff_ms : value.retry_backoff_ms, value.ipc_timeout_ms === void 0 ? HOST_PRODUCER_TIMING_DEFAULTS.ipc_timeout_ms : value.ipc_timeout_ms, options.error);
2677
2745
  return {
2678
2746
  extra_paths: Object.freeze(extraPaths),
2679
2747
  host_source_ref: hostSourceRef,
@@ -2702,7 +2770,7 @@ async function configPathStat(configPath, error) {
2702
2770
  }
2703
2771
  function validateConfigFile(value, platform, error) {
2704
2772
  if (!value.isFile() || value.isSymbolicLink()) throw error("invalid_config", refusalFacts([{ name: "config_is_file", value: value.isFile(), expected: "true" }, { name: "config_is_symlink", value: value.isSymbolicLink(), expected: "false" }]));
2705
- if (value.size <= 0 || value.size > MAX_CONFIG_BYTES) throw error("invalid_config", refusalFact("config_bytes", value.size, `between 1 and ${MAX_CONFIG_BYTES}`));
2773
+ if (value.size <= 0 || value.size > CEAL_ENCODED_JSON_DOCUMENT_MAX_BYTES) throw error("invalid_config", refusalFact("config_bytes", value.size, `between 1 and ${CEAL_ENCODED_JSON_DOCUMENT_MAX_BYTES}`));
2706
2774
  if (platform !== "win32" && (value.uid !== process.getuid?.() || (value.mode & 63) !== 0)) throw error("config_not_private", refusalFacts([{ name: "platform", value: platform, expected: "win32 or owner-private" }, { name: "config_uid", value: value.uid, expected: "the current user" }, { name: "config_mode", value: value.mode, expected: "owner-private" }]));
2707
2775
  }
2708
2776
  async function openConfigFile(configPath, flags, error) {
@@ -2716,12 +2784,17 @@ function validateOpenedFile(opened, pathStat, platform, error) {
2716
2784
  if (!opened.isFile()) throw error("config_unavailable", refusalFacts([{ name: "opened_is_file", value: opened.isFile(), expected: "true" }, { name: "opened_mode", value: opened.mode.toString(8), expected: "a regular file mode" }]));
2717
2785
  if (platform !== "win32" && (opened.dev !== pathStat.dev || opened.ino !== pathStat.ino)) throw error("config_unavailable", refusalFacts([{ name: "platform", value: platform, expected: "win32, or the same file the path named" }, { name: "opened_device", value: opened.dev, expected: String(pathStat.dev) }, { name: "opened_inode", value: opened.ino, expected: String(pathStat.ino) }]));
2718
2786
  }
2719
- async function readBoundedConfig(handle, error) {
2720
- const buffer = Buffer.allocUnsafe(MAX_CONFIG_BYTES + 1);
2721
- const { bytesRead } = await handle.read(buffer, 0, buffer.byteLength, 0);
2722
- if (bytesRead === 0 || bytesRead > MAX_CONFIG_BYTES) throw error("invalid_config", refusalFact("bytes_read", bytesRead, `between 1 and ${MAX_CONFIG_BYTES}`));
2787
+ async function readBoundedConfig(handle, expectedBytes, error) {
2788
+ const buffer = Buffer.allocUnsafe(expectedBytes + 1);
2789
+ let offset = 0;
2790
+ while (offset < buffer.byteLength) {
2791
+ const { bytesRead } = await handle.read(buffer, offset, buffer.byteLength - offset, offset);
2792
+ if (bytesRead === 0) break;
2793
+ offset += bytesRead;
2794
+ }
2795
+ if (offset !== expectedBytes) throw error("invalid_config", refusalFact("bytes_read", offset, `the opened file's ${expectedBytes} bytes without growth or truncation`));
2723
2796
  try {
2724
- return new TextDecoder("utf-8", { fatal: true }).decode(buffer.subarray(0, bytesRead));
2797
+ return new TextDecoder("utf-8", { fatal: true }).decode(buffer.subarray(0, offset));
2725
2798
  } catch {
2726
2799
  throw error("invalid_config");
2727
2800
  }
@@ -2749,9 +2822,8 @@ function validateIntervals(reconcile, retry, timeout, error) {
2749
2822
  if (!boundedMilliseconds(reconcile) || !boundedMilliseconds(retry) || !boundedMilliseconds(timeout)) throw error("invalid_config");
2750
2823
  return [reconcile, retry, timeout];
2751
2824
  }
2752
- function hasExactKeys2(value, keys) {
2753
- const observed = Object.keys(value);
2754
- return observed.length === keys.length && keys.every((key) => Object.hasOwn(value, key));
2825
+ function hasConfigKeys(value, required) {
2826
+ return required.every((key) => Object.hasOwn(value, key)) && Object.keys(value).every((key) => required.includes(key) || Object.hasOwn(HOST_PRODUCER_TIMING_DEFAULTS, key));
2755
2827
  }
2756
2828
  function isRecord2(value) {
2757
2829
  return value !== null && typeof value === "object" && !Array.isArray(value);