@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.
@@ -98,7 +98,6 @@ var client_wire_contract_default = {
98
98
  length: 72,
99
99
  pattern: "^catalog:[a-f0-9]{64}$"
100
100
  },
101
- max_bytes: 4194304,
102
101
  envelope_max_bytes: 389
103
102
  },
104
103
  command_request: {
@@ -179,14 +178,13 @@ var client_wire_contract_default = {
179
178
  "prompt"
180
179
  ],
181
180
  discovery_command: "discovery",
182
- discovery_manifest_schema_version: "ceal.discovery_manifest.v2",
181
+ discovery_manifest_schema_version: "ceal.discovery_manifest.v1",
183
182
  discovery_manifest_document_fields: [
184
183
  "discovery_manifest"
185
184
  ],
186
185
  exit_code_max: 125,
187
186
  bare_document_max_bytes: 65536,
188
- complete_max_bytes: 66019,
189
- absolute_transport_max_bytes: 4194304
187
+ complete_max_bytes: 66019
190
188
  },
191
189
  resource_stream: {
192
190
  path: "/api/ceal/v2/resources",
@@ -201,6 +199,9 @@ var client_wire_contract_default = {
201
199
  "fetch"
202
200
  ],
203
201
  ref_flag: "--ref"
202
+ },
203
+ encoded_json_document: {
204
+ max_bytes: 4194304
204
205
  }
205
206
  };
206
207
 
@@ -210,6 +211,7 @@ var commandResolution = CEAL_CLIENT_WIRE_CONTRACT.command_resolution;
210
211
  var commandResolutionAuthority = commandResolution.authority;
211
212
  var commandResolutionSemanticOptions = commandResolution.semantic_options;
212
213
  var CEAL_GATEWAY_COMMAND_RESOLUTION_SCHEMA_VERSION = commandResolution.schema_version;
214
+ var CEAL_ENCODED_JSON_DOCUMENT_MAX_BYTES = CEAL_CLIENT_WIRE_CONTRACT.encoded_json_document.max_bytes;
213
215
  var artifact = CEAL_CLIENT_WIRE_CONTRACT.artifact_descriptor;
214
216
  var request = CEAL_CLIENT_WIRE_CONTRACT.command_request;
215
217
  var response = CEAL_CLIENT_WIRE_CONTRACT.command_response;
@@ -223,7 +225,7 @@ var CEAL_VERIFIED_ARTIFACT_DIGEST_LENGTH = artifact.digest.length;
223
225
  var CEAL_VERIFIED_ARTIFACT_DIGEST_PATTERN = artifact.digest.pattern;
224
226
  var CEAL_VERIFIED_ARTIFACT_CATALOG_REVISION_LENGTH = artifact.catalog_revision.length;
225
227
  var CEAL_VERIFIED_ARTIFACT_CATALOG_REVISION_PATTERN = artifact.catalog_revision.pattern;
226
- var CEAL_VERIFIED_ARTIFACT_MAX_BYTES = artifact.max_bytes;
228
+ var CEAL_VERIFIED_ARTIFACT_MAX_BYTES = CEAL_ENCODED_JSON_DOCUMENT_MAX_BYTES;
227
229
  var CEAL_VERIFIED_ARTIFACT_DESCRIPTOR_MAX_BYTES = artifact.envelope_max_bytes;
228
230
  var CEAL_COMMAND_REQUEST_SCHEMA_VERSION = request.schema_version;
229
231
  var CEAL_COMMAND_REQUEST_MAX_BYTES = request.absolute_transport_max_bytes;
@@ -237,7 +239,6 @@ var CEAL_COMMAND_RESPONSE_FOCUSED_PROMPT_CONTINUATION_DOCUMENT_FIELDS = Object.f
237
239
  var CEAL_COMMAND_RESPONSE_DISCOVERY_COMMAND = response.discovery_command;
238
240
  var CEAL_COMMAND_RESPONSE_DISCOVERY_MANIFEST_SCHEMA_VERSION = response.discovery_manifest_schema_version;
239
241
  var CEAL_COMMAND_RESPONSE_DISCOVERY_MANIFEST_DOCUMENT_FIELDS = Object.freeze([...response.discovery_manifest_document_fields]);
240
- var CEAL_COMMAND_RESPONSE_MAX_BYTES = response.absolute_transport_max_bytes;
241
242
 
242
243
  // packages/ceal-client-protocol/src/vocabulary.ts
243
244
  function vocabulary(words) {
@@ -251,6 +252,7 @@ var CEAL_AUDIT_OUTCOMES = vocabulary(["succeeded", "denied", "failed"]);
251
252
  var CEAL_GATEWAY_PROVIDER_STEP_OUTCOMES = vocabulary(["completed", "rejected", "throttled", "failed"]);
252
253
  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"]);
253
254
  var CEAL_GATEWAY_READ_REUSE_UNAVAILABLE_REASONS = vocabulary(["not_reported", "storage_unavailable", "coverage_incomplete", "freshness_refresh_required", "not_reusable", "bypassed"]);
255
+ var CEAL_GATEWAY_DERIVED_STORE_FAILURE_CLASSES = vocabulary(["storage_unavailable", "decode_mismatch", "write_conflict", "quota", "store_error"]);
254
256
  var CEAL_POLICY_DECISIONS = vocabulary(["allowed", "denied", "not_evaluated"]);
255
257
  var CEAL_CONNECTOR_ROUTE_PHASES = vocabulary(["scope_observation", "target_selection", "route_resolution"]);
256
258
  var CEAL_CONNECTOR_ROUTE_CAUSES = vocabulary(["provider_throttled", "provider_unavailable", "binding_invalid", "scope_limit_exceeded"]);
@@ -264,6 +266,17 @@ var CEAL_WRITE_RECEIPT_PROVIDER_STATES = vocabulary(["outcome_unknown", "verifie
264
266
  var CEAL_WRITE_RECEIPT_PROVIDER_READBACKS = vocabulary(["outcome_unknown", "verified", "not_applied"]);
265
267
  var CEAL_PROTOCOL_VERSION = "1.4.0";
266
268
  var CEAL_OPERATION_ACCESS_SCHEMA_VERSION = "ceal.operation_access.v1";
269
+ var CEAL_GATEWAY_ACTIVE_CALL_PHASES = vocabulary([
270
+ "audited_call_pending",
271
+ "continuation_read_pending",
272
+ "continuation_write_pending",
273
+ "provider_pacing_pending",
274
+ "corpus_replay_pending",
275
+ "corpus_append_pending",
276
+ "corpus_fence_pending",
277
+ "corpus_content_pending",
278
+ "corpus_transaction_pending"
279
+ ]);
267
280
  var CEAL_CONNECTOR_ROUTE_FAILURE_KEYS = vocabulary(["connector_kind", "phase", "schema_version"]);
268
281
  var CEAL_CLASSIFIED_CONNECTOR_ROUTE_FAILURE_KEYS = vocabulary(["cause", ...CEAL_CONNECTOR_ROUTE_FAILURE_KEYS]);
269
282
  var CEAL_UNCLASSIFIED_CONNECTOR_ROUTE_FAILURE_KEYS = vocabulary(["connector_kind", "error_class", "phase", "schema_version"]);
@@ -273,10 +286,129 @@ var CEAL_GATEWAY_ORGANIZATION_ROUTE_FACT_CALL_KEYS = Object.freeze([
273
286
  "policy_decision_revision"
274
287
  ]);
275
288
 
289
+ // packages/ceal-client-protocol/src/operation-next-actions.ts
290
+ var CEAL_REPEAT_REQUEST_NEXT_ACTION = "repeat_request";
291
+ var CEAL_INSPECT_RECEIPT_NEXT_ACTION = "inspect_receipt";
292
+ var CALLER_RECOVERABLE_NEXT_ACTION_VALUES = [
293
+ "select_did_you_mean",
294
+ "choose_new_output_path",
295
+ "choose_new_idempotency_key",
296
+ "restart_search",
297
+ "repeat_original_arguments",
298
+ // The occurrence this call addressed is settled and cannot move again -- a
299
+ // denied effect approval, an expired continuation -- so the caller runs the
300
+ // same call again as a new request. The refusal names the re-request; this
301
+ // word is the re-request.
302
+ CEAL_REPEAT_REQUEST_NEXT_ACTION,
303
+ "choose_new_request_identity",
304
+ // A refusal that names the argument (invalid_argument with `property`) tells the caller exactly what to change.
305
+ "correct_argument",
306
+ // A resolver-owned input must move from caller operands into the declared
307
+ // resolver selection field.
308
+ "supply_resolver_selections",
309
+ // The graph names an upstream node whose Operation produces the resolver's
310
+ // occurrence, and it has not produced one yet. The caller runs that node
311
+ // first; the refusal used to share a code with a malformed resolver result,
312
+ // which is not fixable, so neither could carry a remedy.
313
+ "run_resolver_dependency",
314
+ // A replay carries the input the occurrence durably admitted, and this one
315
+ // carries a different one. The caller fixes it by presenting the original
316
+ // invocation, so it is a remedy; the coordinator minted the word at the
317
+ // replay guard and never declared it, which read as unguided to the scorer.
318
+ "use_original_input",
319
+ // The same mismatch on the Request binding rather than the input: the
320
+ // occurrence was admitted under one binding and the replay presents another.
321
+ "use_original_request_binding",
322
+ // The client's own filesystem write was refused -- EACCES, EPERM, or a
323
+ // read-only mount -- which is how an agent sandbox fences writes outside its
324
+ // workspace. The caller reruns the same command with unsandboxed or escalated
325
+ // execution; re-adopting the session cannot help, because the sandbox refuses
326
+ // that write too.
327
+ "rerun_outside_agent_sandbox",
328
+ // The refusal names the one Operation to read next in `describe_command`:
329
+ // an absent Operation id with a sole catalog-ranked candidate, or a known
330
+ // Operation invoked without its input. Describing only reads the verified
331
+ // contract and dispatches nothing, and the caller then retries with the
332
+ // named Operation or input, so it is guidance the scorer counts.
333
+ "describe_operation",
334
+ // The refusal names the caller's own personal connect Operation in
335
+ // `required_action_sequence`: the Operation asked for, or the credential
336
+ // the call ran on, needs a personal connection the caller does not hold
337
+ // (never connected, revoked, or expired). The caller runs that exact
338
+ // Operation, completes the consent it hands back, and retries the same call.
339
+ "connect_personal_account",
340
+ // The provider or Gateway named a bounded wait; the caller waits that long
341
+ // and submits the same read again.
342
+ "retry_after",
343
+ // The ref names a container of rows (a Notion database or data source), which
344
+ // has no body of its own; the caller searches its rows instead of reading it.
345
+ "search_container_rows"
346
+ ];
347
+ var CEAL_CALLER_RECOVERABLE_NEXT_ACTIONS = Object.freeze(CALLER_RECOVERABLE_NEXT_ACTION_VALUES);
348
+ var NON_REMEDY_NEXT_ACTION_VALUES = [
349
+ // Only an administrator can take the named step -- approving a place for an
350
+ // Operation, granting a withheld capability -- so a non-administrator asks
351
+ // one. The refusal names the administrator step; this word is the ask.
352
+ "ask_admin",
353
+ "await_pending_approval",
354
+ "check_gateway",
355
+ "inspect_context_store",
356
+ "inspect_gateway",
357
+ "inspect_local_cache",
358
+ // The thin client prints these on its own behalf, before or after the wire.
359
+ // They were declared only as `CealClientLocalRemedy` keys and, for two of
360
+ // them, only as Go string literals -- a second and third vocabulary for one
361
+ // thing. `CealClientLocalRemedy` derives from this list now, so the client's
362
+ // remedies cannot drift from the words the protocol knows.
363
+ "inspect_local_client",
364
+ "inspect_local_command",
365
+ "inspect_local_output",
366
+ "inspect_local_route",
367
+ CEAL_INSPECT_RECEIPT_NEXT_ACTION,
368
+ "inspect_request",
369
+ "none",
370
+ // The provider refused because of its own configuration -- an API not
371
+ // enabled, an app scope missing -- which an operator changes in that
372
+ // provider's console. No caller edit and no retry fixes it.
373
+ "operator_action",
374
+ "recover",
375
+ "reconcile",
376
+ // Reconciliation of one named occurrence, not of the deployment: an
377
+ // occurrence with no admitted input commitment cannot be replayed safely and
378
+ // no edit to the call changes that. `reconcile` is the deployment-wide word.
379
+ "reconcile_occurrence",
380
+ "reduce_request_size",
381
+ // The Host's invocation context for this turn is stale or expired at the
382
+ // Gateway. The Host's next turn rebinds it and the same call then succeeds;
383
+ // nothing in the call changes, so it is not a remedy the scorer may count.
384
+ "refresh_host_invocation_context",
385
+ "repair_or_adopt_session",
386
+ "retry",
387
+ // The owner -- a correlation hook, an approval hook -- is not serving right
388
+ // now. The caller changes nothing and the same call succeeds once the owner
389
+ // is back, so this is not a remedy the scorer may count as guidance.
390
+ "retry_after_owner_recovery",
391
+ "retry_same_receipt_read",
392
+ "run_file_search_again",
393
+ "select_exact_approval"
394
+ ];
395
+ var CEAL_NON_REMEDY_NEXT_ACTIONS = Object.freeze(NON_REMEDY_NEXT_ACTION_VALUES);
396
+ var DECLARED = /* @__PURE__ */ new Set([...CEAL_CALLER_RECOVERABLE_NEXT_ACTIONS, ...CEAL_NON_REMEDY_NEXT_ACTIONS]);
397
+ var RETRY_PROMISE_NEXT_ACTIONS = ["retry", "retry_after"];
398
+ var RETRY_PROMISE = new Set(RETRY_PROMISE_NEXT_ACTIONS);
399
+ var RECOVERABLE = new Set(CEAL_CALLER_RECOVERABLE_NEXT_ACTIONS);
400
+ var CEAL_OPERATION_WITHHELD_NEXT_ACTIONS = Object.freeze({
401
+ provider_permission: "ask_admin",
402
+ access_level: "ask_admin",
403
+ personal_authorization_required: "connect_personal_account"
404
+ });
405
+
406
+ // packages/ceal-client-protocol/src/operation-withheld-cause.ts
407
+ var CEAL_OPERATION_WITHHELD_CAUSES = vocabulary(["provider_permission", "access_level", "personal_authorization_required"]);
408
+
276
409
  // packages/ceal-client-protocol/src/operation-contract-types.ts
277
410
  var CEAL_JSON_SCHEMA_2020_12 = "https://json-schema.org/draft/2020-12/schema";
278
411
  var CEAL_OPERATION_ERROR_SCHEMA_VERSION = "ceal.operation_error.v1";
279
- var CEAL_OPERATION_WITHHELD_CAUSES = vocabulary(["provider_permission", "access_level", "personal_authorization_required"]);
280
412
  var CEAL_RETRY_AFTER_MAX_MS = 60 * 60 * 1e3;
281
413
  var CEAL_JSON_SCHEMA_TYPES = vocabulary(["object", "array", "string", "integer", "number", "boolean", "null"]);
282
414
  var OBSERVATION_POSTURES = vocabulary(["direct_readback", "approved_no_readback", "operator_mediated", "excluded"]);
@@ -528,7 +660,6 @@ function cut(text) {
528
660
  var CEAL_OPERATION_ACCESS_CLASSES = vocabulary(["read", "write"]);
529
661
 
530
662
  // packages/ceal-client-protocol/src/domain-vocabulary.ts
531
- var CEAL_INTEGRATION_KINDS = vocabulary(["github", "google-workspace", "notion", "slack"]);
532
663
  var CEAL_CONNECTOR_STATUSES = vocabulary(["active", "disabled", "disconnected"]);
533
664
  var CEAL_CONNECTOR_CUSTODIES = vocabulary(["organization", "personal"]);
534
665
  var CEAL_PROVIDER_BOUNDARY_KINDS = vocabulary([
@@ -541,6 +672,8 @@ var CEAL_PROVIDER_BOUNDARY_KINDS = vocabulary([
541
672
  var CEAL_PROVIDER_BOUNDARY_EVIDENCE = vocabulary(["provider_readback", "operator_stated"]);
542
673
  var CEAL_ACCESS_LEVELS = vocabulary(["none", "read", "read_write"]);
543
674
  var CEAL_PERSONAL_ACCESS_CEILINGS = vocabulary(["disabled", "read", "read_write"]);
675
+ var CEAL_TARGET_REF_PATTERN = "^[^\\p{Cc}]+$";
676
+ var TARGET_REF = new RegExp(CEAL_TARGET_REF_PATTERN, "u");
544
677
  var CEAL_TARGET_VISIBILITIES = vocabulary(["public", "private"]);
545
678
  var CEAL_PRINCIPAL_KINDS = vocabulary(["human", "service", "runtime"]);
546
679
  var CEAL_ORGANIZATION_ROLES = vocabulary(["member", "admin"]);
@@ -651,6 +784,7 @@ var CEAL_OPERATION_DESCRIPTOR_REQUIRED_ENVELOPE_KEYS = Object.freeze(["schema_ve
651
784
  var CEAL_OPERATION_DESCRIPTOR_OPTIONAL_ENVELOPE_KEYS = Object.freeze(["input_resolution", "summary"]);
652
785
  var CEAL_OPERATION_RESULT_KEYS = vocabulary(["ok", "operation_id", "operation_receipt", "schema_version", "value"]);
653
786
  var CEAL_OPERATION_COMPACT_RESULT_KEYS = vocabulary(["ok", "operation_evidence", "operation_id", "schema_version", "value"]);
787
+ var CEAL_OPERATION_RESULT_OPTIONAL_KEYS = vocabulary(["model_disclosure", "result_complete", "resume"]);
654
788
 
655
789
  // packages/ceal-client-protocol/src/operation-catalog.ts
656
790
  var CEAL_OPERATION_CATALOG_SCHEMA_VERSION = "ceal.catalog.v3";
@@ -662,8 +796,8 @@ var CEAL_SCHEMA_LITERALS = [
662
796
  "ceal.activation_transport.v1",
663
797
  CEAL_OPERATION_ACCESS_SCHEMA_VERSION,
664
798
  CEAL_OPERATION_CATALOG_SCHEMA_VERSION,
665
- "ceal.client_refresh_request.v2",
666
- "ceal.client_refresh_result.v2",
799
+ "ceal.client_refresh_request.v1",
800
+ "ceal.client_refresh_result.v1",
667
801
  "ceal.client_revoke_request.v1",
668
802
  "ceal.client_revoke_result.v1",
669
803
  CEAL_COMMAND_REQUEST_SCHEMA_VERSION,
@@ -692,7 +826,7 @@ var CEAL_SCHEMA_LITERALS = [
692
826
  "ceal.gateway_call_result.v1",
693
827
  CEAL_GATEWAY_COMMAND_RESOLUTION_SCHEMA_VERSION,
694
828
  "ceal.gateway_connector_route_failure.v1",
695
- "ceal.gateway_discovery.v3",
829
+ "ceal.gateway_discovery.v1",
696
830
  "ceal.gateway_handshake.v1",
697
831
  "ceal.gateway_installation_activation_code_issue_request.v1",
698
832
  "ceal.gateway_installation_activation_code_issue_result.v1",
@@ -714,10 +848,10 @@ var CEAL_SCHEMA_LITERALS = [
714
848
  "ceal.host_observation.v1",
715
849
  "ceal.host_registration_request.v1",
716
850
  "ceal.host_registration_result.v1",
717
- "ceal.leased-resource-stream.v2",
718
- "ceal.leased_consumer_attachment_stream_frame.v2",
719
- "ceal.leased_consumer_attachment_stream_request.v2",
720
- "ceal.leased_consumer_attachment_stream_transport.v2",
851
+ "ceal.leased-resource-stream.v1",
852
+ "ceal.leased_consumer_attachment_stream_frame.v1",
853
+ "ceal.leased_consumer_attachment_stream_request.v1",
854
+ "ceal.leased_consumer_attachment_stream_transport.v1",
721
855
  "ceal.operation_descriptor.v1",
722
856
  "ceal.operation_error.v1",
723
857
  "ceal.operation_failure.v1",
@@ -725,7 +859,7 @@ var CEAL_SCHEMA_LITERALS = [
725
859
  "ceal.operation_receipt.v1",
726
860
  "ceal.operation_result.v1",
727
861
  "ceal.operation_result.compact.v1",
728
- "ceal.local_result_materialization.v2",
862
+ "ceal.local_result_materialization.v1",
729
863
  "ceal.local_result_root.v1",
730
864
  "ceal.owner_bootstrap_exchange_request.v1",
731
865
  "ceal.owner_bootstrap_exchange_result.v1",
@@ -810,117 +944,8 @@ var CEAL_AGENT_SERVICE_SESSION_RECORD_KEYS = vocabulary([
810
944
  ]);
811
945
  var CEAL_AGENT_SESSION_COMMIT_KEYS = vocabulary(["attempt_ref", "expected_session_revision", "session_revision"]);
812
946
 
813
- // packages/ceal-client-protocol/src/operation-next-actions.ts
814
- var CEAL_REPEAT_REQUEST_NEXT_ACTION = "repeat_request";
815
- var CEAL_INSPECT_RECEIPT_NEXT_ACTION = "inspect_receipt";
816
- var CALLER_RECOVERABLE_NEXT_ACTION_VALUES = [
817
- "select_did_you_mean",
818
- "choose_new_output_path",
819
- "choose_new_idempotency_key",
820
- "restart_search",
821
- "repeat_original_arguments",
822
- // The occurrence this call addressed is settled and cannot move again -- a
823
- // denied effect approval, an expired continuation -- so the caller runs the
824
- // same call again as a new request. The refusal names the re-request; this
825
- // word is the re-request.
826
- CEAL_REPEAT_REQUEST_NEXT_ACTION,
827
- "choose_new_request_identity",
828
- // A refusal that names the argument (invalid_argument with `property`) tells the caller exactly what to change.
829
- "correct_argument",
830
- // A resolver-owned input must move from caller operands into the declared
831
- // resolver selection field.
832
- "supply_resolver_selections",
833
- // The graph names an upstream node whose Operation produces the resolver's
834
- // occurrence, and it has not produced one yet. The caller runs that node
835
- // first; the refusal used to share a code with a malformed resolver result,
836
- // which is not fixable, so neither could carry a remedy.
837
- "run_resolver_dependency",
838
- // A replay carries the input the occurrence durably admitted, and this one
839
- // carries a different one. The caller fixes it by presenting the original
840
- // invocation, so it is a remedy; the coordinator minted the word at the
841
- // replay guard and never declared it, which read as unguided to the scorer.
842
- "use_original_input",
843
- // The same mismatch on the Request binding rather than the input: the
844
- // occurrence was admitted under one binding and the replay presents another.
845
- "use_original_request_binding",
846
- // The client's own filesystem write was refused -- EACCES, EPERM, or a
847
- // read-only mount -- which is how an agent sandbox fences writes outside its
848
- // workspace. The caller reruns the same command with unsandboxed or escalated
849
- // execution; re-adopting the session cannot help, because the sandbox refuses
850
- // that write too.
851
- "rerun_outside_agent_sandbox",
852
- // The refusal names the one Operation to read next in `describe_command`:
853
- // an absent Operation id with a sole catalog-ranked candidate, or a known
854
- // Operation invoked without its input. Describing only reads the verified
855
- // contract and dispatches nothing, and the caller then retries with the
856
- // named Operation or input, so it is guidance the scorer counts.
857
- "describe_operation",
858
- // The refusal names the caller's own personal connect Operation in
859
- // `required_action_sequence`: the Operation asked for, or the credential
860
- // the call ran on, needs a personal connection the caller does not hold
861
- // (never connected, revoked, or expired). The caller runs that exact
862
- // Operation, completes the consent it hands back, and retries the same call.
863
- "connect_personal_account",
864
- // The provider or Gateway named a bounded wait; the caller waits that long
865
- // and submits the same read again.
866
- "retry_after"
867
- ];
868
- var CEAL_CALLER_RECOVERABLE_NEXT_ACTIONS = Object.freeze(CALLER_RECOVERABLE_NEXT_ACTION_VALUES);
869
- var NON_REMEDY_NEXT_ACTION_VALUES = [
870
- // Only an administrator can take the named step -- approving a place for an
871
- // Operation, granting a withheld capability -- so a non-administrator asks
872
- // one. The refusal names the administrator step; this word is the ask.
873
- "ask_admin",
874
- "await_pending_approval",
875
- "check_gateway",
876
- "inspect_context_store",
877
- "inspect_gateway",
878
- "inspect_local_cache",
879
- // The thin client prints these on its own behalf, before or after the wire.
880
- // They were declared only as `CealClientLocalRemedy` keys and, for two of
881
- // them, only as Go string literals -- a second and third vocabulary for one
882
- // thing. `CealClientLocalRemedy` derives from this list now, so the client's
883
- // remedies cannot drift from the words the protocol knows.
884
- "inspect_local_client",
885
- "inspect_local_command",
886
- "inspect_local_output",
887
- "inspect_local_route",
888
- CEAL_INSPECT_RECEIPT_NEXT_ACTION,
889
- "inspect_request",
890
- "none",
891
- // The provider refused because of its own configuration -- an API not
892
- // enabled, an app scope missing -- which an operator changes in that
893
- // provider's console. No caller edit and no retry fixes it.
894
- "operator_action",
895
- "recover",
896
- "reconcile",
897
- // Reconciliation of one named occurrence, not of the deployment: a legacy
898
- // occurrence with no admitted input commitment cannot be replayed safely and
899
- // no edit to the call changes that. `reconcile` is the deployment-wide word.
900
- "reconcile_occurrence",
901
- "reduce_request_size",
902
- // The Host's invocation context for this turn is stale or expired at the
903
- // Gateway. The Host's next turn rebinds it and the same call then succeeds;
904
- // nothing in the call changes, so it is not a remedy the scorer may count.
905
- "refresh_host_invocation_context",
906
- "repair_or_adopt_session",
907
- "retry",
908
- // The owner -- a correlation hook, an approval hook -- is not serving right
909
- // now. The caller changes nothing and the same call succeeds once the owner
910
- // is back, so this is not a remedy the scorer may count as guidance.
911
- "retry_after_owner_recovery",
912
- "retry_same_receipt_read",
913
- "run_file_search_again",
914
- "select_exact_approval"
915
- ];
916
- var CEAL_NON_REMEDY_NEXT_ACTIONS = Object.freeze(NON_REMEDY_NEXT_ACTION_VALUES);
917
- var DECLARED = /* @__PURE__ */ new Set([...CEAL_CALLER_RECOVERABLE_NEXT_ACTIONS, ...CEAL_NON_REMEDY_NEXT_ACTIONS]);
918
- var RECOVERABLE = new Set(CEAL_CALLER_RECOVERABLE_NEXT_ACTIONS);
919
- var CEAL_OPERATION_WITHHELD_NEXT_ACTIONS = Object.freeze({
920
- provider_permission: "ask_admin",
921
- access_level: "ask_admin",
922
- personal_authorization_required: "connect_personal_account"
923
- });
947
+ // packages/ceal-client-protocol/src/operation-result-completeness.ts
948
+ var CEAL_READ_VALUE_CONTINUATION_KEYS = vocabulary(["continuation", "continuation_ref", "next_cursor"]);
924
949
 
925
950
  // packages/ceal-client-protocol/src/operation-contract-artifact.ts
926
951
  var CATALOG_REVISION = new RegExp(CEAL_VERIFIED_ARTIFACT_CATALOG_REVISION_PATTERN, "u");
@@ -981,7 +1006,8 @@ var CEAL_ACTIVITY_GAP_CODES = vocabulary([
981
1006
  "provider_cursor_unavailable",
982
1007
  "malformed_provider_page",
983
1008
  "visibility_incomplete",
984
- "unsupported_event_kind"
1009
+ "unsupported_event_kind",
1010
+ "direct_messages_excluded"
985
1011
  ]);
986
1012
  var CEAL_ACTIVITY_CONNECTOR_KINDS = vocabulary(["slack", "github", "google-calendar", "google-drive", "notion"]);
987
1013
  var CEAL_ACTIVITY_COVERAGE_STATUSES = vocabulary(["complete_for_target", "continuation_required", "blocked"]);
@@ -992,6 +1018,8 @@ var CEAL_ACTIVITY_EVENT_KINDS = vocabulary([
992
1018
  "github.commit.authored",
993
1019
  "github.issue.opened",
994
1020
  "github.pull_request.opened",
1021
+ "github.issue.edited",
1022
+ "github.pull_request.edited",
995
1023
  "github.review.submitted",
996
1024
  "github.issue_comment.created",
997
1025
  "github.review_comment.created",
@@ -1004,6 +1032,25 @@ var CEAL_ACTIVITY_EVENT_KINDS = vocabulary([
1004
1032
  "notion.page.created",
1005
1033
  "notion.page.edited"
1006
1034
  ]);
1035
+ var CEAL_ACTIVITY_EVENT_TIMESTAMP_BASIS_MAP = Object.freeze({
1036
+ "slack.message": "message_created",
1037
+ "slack.reply": "message_created",
1038
+ "slack.direct_message": "message_created",
1039
+ "github.commit.authored": "commit_authored",
1040
+ "github.review.submitted": "review_submitted",
1041
+ "github.issue_comment.created": "comment_created",
1042
+ "github.review_comment.created": "comment_created",
1043
+ "github.issue.opened": "resource_created",
1044
+ "github.pull_request.opened": "resource_created",
1045
+ "github.issue.edited": "resource_modified",
1046
+ "github.pull_request.edited": "resource_modified",
1047
+ "calendar.organized": "resource_created",
1048
+ "drive.file.created": "file_created",
1049
+ "drive.file.modified": "file_modified_by_me",
1050
+ "drive.file.viewed": "file_viewed_by_me",
1051
+ "notion.page.created": "page_created",
1052
+ "notion.page.edited": "page_last_edited"
1053
+ });
1007
1054
  var CEAL_ACTIVITY_TIMESTAMP_BASES = vocabulary([
1008
1055
  "message_created",
1009
1056
  "commit_authored",
@@ -1024,11 +1071,12 @@ var CEAL_ACTIVITY_V3_KINDS = vocabulary(["authored", "edited", "messaged", "resp
1024
1071
  var CEAL_RESOURCE_TIME_BASES = vocabulary(["created", "modified", "viewed"]);
1025
1072
  var CEAL_RESOURCE_SEARCH_ORDERS = vocabulary(["relevance", "modified", "viewed", "created"]);
1026
1073
  var CEAL_RESOURCE_SEARCH_DIRECTIONS = vocabulary(["ascending", "descending"]);
1027
- 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"]);
1074
+ 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"]);
1028
1075
  var CEAL_ARTIFACT_STAGE_TERMINALS = vocabulary(["chunk_accepted", "artifact_ready", "idempotency_replayed"]);
1029
1076
  var CEAL_READ_ITEM_KINDS = vocabulary(["conversation", "identity", "usergroup", "message", "file", "document"]);
1030
1077
  var CEAL_LEASED_MESSAGE_SEARCH_COMPLETENESS = vocabulary(["complete", "continuation_available", "truncated"]);
1031
- var CEAL_OPAQUE_HANDLE_KINDS = vocabulary(["target", "message", "thread", "artifact", "document", "object"]);
1078
+ var CEAL_OPAQUE_HANDLE_KINDS = vocabulary(["target", "message", "thread", "artifact", "document", "block", "object"]);
1079
+ var CEAL_OPAQUE_REF_KINDS = vocabulary([...CEAL_OPAQUE_HANDLE_KINDS, "result", "operation-receipt", "reply-receipt", "field", "notion-data-source"]);
1032
1080
  var CEAL_WRITE_OBJECT_KINDS = vocabulary(["document", "comment", "cell_range"]);
1033
1081
  var CEAL_CONVERSATION_KINDS = vocabulary(["channel", "dm", "group"]);
1034
1082
  var CEAL_FILE_TYPE_FAMILIES = vocabulary(["all", "image", "pdf"]);
@@ -1070,6 +1118,9 @@ var CEAL_FINAL_PRESENTATION_INTENTS = vocabulary(["final", "stop", "transient_no
1070
1118
  var CEAL_PRESENTATION_INTENTS = vocabulary(["progress", ...CEAL_FINAL_PRESENTATION_INTENTS]);
1071
1119
 
1072
1120
  // packages/ceal-client-protocol/src/resource-row.ts
1121
+ var CEAL_DATED_NOTE_BASES = vocabulary(["recording", "calendar_event", "created_time"]);
1122
+ var CEAL_DATED_NOTE_TRANSCRIPT_STATES = vocabulary(["present", "absent", "unestablished"]);
1123
+ var CEAL_READ_SEARCH_COST_CLASSES = vocabulary(["native_index", "scan"]);
1073
1124
  var RESOURCE_ROW_KEY_RULES = Object.freeze({
1074
1125
  schema_version: { required: true, timestamp: false },
1075
1126
  ref: { required: true, timestamp: false },
@@ -1078,9 +1129,11 @@ var RESOURCE_ROW_KEY_RULES = Object.freeze({
1078
1129
  title: { required: true, timestamp: false },
1079
1130
  container_label: { required: true, timestamp: false },
1080
1131
  container_ref: { required: false, timestamp: false },
1132
+ source_url: { required: false, timestamp: false },
1081
1133
  source: { required: true, timestamp: false },
1082
1134
  owner: { required: false, timestamp: false },
1083
1135
  counterparts: { required: false, timestamp: false },
1136
+ attachments: { required: false, timestamp: false },
1084
1137
  created_at: { required: false, timestamp: true },
1085
1138
  created_at_local: { required: false, timestamp: true },
1086
1139
  modified_at: { required: false, timestamp: true },
@@ -1091,6 +1144,7 @@ var RESOURCE_ROW_KEY_RULES = Object.freeze({
1091
1144
  end: { required: false, timestamp: false },
1092
1145
  status: { required: false, timestamp: false },
1093
1146
  snippet: { required: false, timestamp: false },
1147
+ dated_notes: { required: false, timestamp: false },
1094
1148
  state: { required: true, timestamp: false },
1095
1149
  timestamp_basis: { required: true, timestamp: false }
1096
1150
  });
@@ -1127,6 +1181,27 @@ var CEAL_WRITE_SAFETY_UNCHECKED_REASONS = vocabulary(["authority_unavailable"]);
1127
1181
  // packages/ceal-client-protocol/src/operation-occurrence.ts
1128
1182
  var MAX_RECEIPT_REVISION = Number.MAX_SAFE_INTEGER - 1;
1129
1183
 
1184
+ // packages/ceal-client-protocol/src/personal-client-vocabulary.ts
1185
+ var CEAL_PERSONAL_CLIENT_BINDING_KEYS = vocabulary([
1186
+ "access_group_ref",
1187
+ "membership_ref",
1188
+ "registration_ref",
1189
+ "client_ref",
1190
+ "subject_ref",
1191
+ "instance_ref"
1192
+ ]);
1193
+ var CEAL_ENROLLMENT_FAILURE_CODES = vocabulary(["enrollment_invalid", "enrollment_expired", "enrollment_used"]);
1194
+ var CEAL_REFRESH_FAILURE_CODES = vocabulary([
1195
+ "refresh_invalid",
1196
+ "refresh_expired",
1197
+ "refresh_inactive",
1198
+ "refresh_replayed",
1199
+ "refresh_revoked",
1200
+ "authority_replaced",
1201
+ "refresh_recovery_unavailable",
1202
+ "refresh_recovery_expired"
1203
+ ]);
1204
+
1130
1205
  // packages/ceal-client-protocol/src/leased-artifact-contract.ts
1131
1206
  var CEAL_LEASED_CONSUMER_ARTIFACT_CHUNK_MAX_BYTES = 12 * 1024;
1132
1207
 
@@ -1222,7 +1297,7 @@ var CEAL_REQUEST_MAX_GRAPH_NODES = 128;
1222
1297
 
1223
1298
  // packages/ceal-client-protocol/src/request-run.ts
1224
1299
  var CEAL_REQUEST_NODE_STANDING_OCCURRENCE_SCHEMA_VERSION = "ceal.request_node_standing_occurrence.v1";
1225
- var CEAL_REQUEST_RUN_BATCH_SCHEMA_VERSION = "ceal.request_run_batch.v3";
1300
+ var CEAL_REQUEST_RUN_BATCH_SCHEMA_VERSION = "ceal.request_run_batch.v1";
1226
1301
  var REQUEST_ACTION_SAFE_REF_SCHEMA = { type: "string", minLength: 1, maxLength: 128, pattern: SAFE_REF.source };
1227
1302
  var REQUEST_ACTION_DIGEST_SCHEMA = { type: "string", minLength: 64, maxLength: 64, pattern: "^[a-f0-9]{64}$" };
1228
1303
  var REQUEST_NODE_STANDING_OCCURRENCE_SCHEMA = {
@@ -1437,10 +1512,22 @@ var CEAL_REQUEST_GRAPH_NODE_PREPARE_READINESS_JSON_SCHEMA = {
1437
1512
  required: ["node_ref", "operation_id", "resolver_owned", "gateway_derived"]
1438
1513
  };
1439
1514
 
1515
+ // packages/ceal-client-protocol/src/host-invocation-authentication.ts
1516
+ var CEAL_HOST_INVOCATION_AUTHENTICATION_RESULT_SCHEMA = "ceal.host_invocation_authentication_result.v1";
1517
+ var CEAL_HOST_NONCE_ENCODED_CHARACTERS = 43;
1518
+ var CEAL_HOST_CLIENT_NONCE_PATTERN = new RegExp(`^[A-Za-z0-9_-]{${CEAL_HOST_NONCE_ENCODED_CHARACTERS}}$`, "u");
1519
+ var CEAL_HOST_CONTEXT_TOKEN_PATTERN = new RegExp(`^ceal_context_[A-Za-z0-9_-]{${CEAL_HOST_NONCE_ENCODED_CHARACTERS}}$`, "u");
1520
+ var CEAL_HOST_INVOCATION_AUTHENTICATION_RESULT_MAX_BYTES = new TextEncoder().encode(`${JSON.stringify({
1521
+ schema_version: CEAL_HOST_INVOCATION_AUTHENTICATION_RESULT_SCHEMA,
1522
+ context_token: `ceal_context_${"A".repeat(CEAL_HOST_NONCE_ENCODED_CHARACTERS)}`,
1523
+ expires_at: (/* @__PURE__ */ new Date("+010000-01-01T00:00:00.000Z")).toISOString()
1524
+ })}
1525
+ `).byteLength;
1526
+
1440
1527
  // packages/ceal-client-protocol/src/client-result-materialization.ts
1441
1528
  var CEAL_MODEL_VISIBLE_COMMAND_OUTPUT_MAX_BYTES = 32 * 1024;
1442
- var REQUIRED_FIELDS2 = Object.freeze(["schema_version", "operation_id", "read_argv"]);
1443
- var FIELDS = /* @__PURE__ */ new Set([...REQUIRED_FIELDS2, "local_result_root", "continue_argv"]);
1529
+ var REQUIRED_FIELDS2 = Object.freeze(["schema_version", "operation_id"]);
1530
+ var FIELDS = /* @__PURE__ */ new Set([...REQUIRED_FIELDS2, "read_argv", "local_result_root", "continue_argv", "model_disclosure", "item_read_argv"]);
1444
1531
 
1445
1532
  // packages/ceal-client-protocol/src/session-start-affordance.ts
1446
1533
  var CEAL_SESSION_ENTRY_INVOCATION = "ceal";
@@ -1540,27 +1627,6 @@ var ADMIN_LINEAGE_NODE_KINDS = vocabulary(["source_read", "synthesis_preview", "
1540
1627
  // packages/ceal-client-protocol/src/actor-kind.ts
1541
1628
  var CEAL_ACTOR_KINDS = vocabulary(["human", "bot", "app", "unknown"]);
1542
1629
 
1543
- // packages/ceal-client-protocol/src/personal-client-vocabulary.ts
1544
- var CEAL_PERSONAL_CLIENT_BINDING_KEYS = vocabulary([
1545
- "access_group_ref",
1546
- "membership_ref",
1547
- "registration_ref",
1548
- "client_ref",
1549
- "subject_ref",
1550
- "instance_ref"
1551
- ]);
1552
- var CEAL_ENROLLMENT_FAILURE_CODES = vocabulary(["enrollment_invalid", "enrollment_expired", "enrollment_used"]);
1553
- var CEAL_REFRESH_FAILURE_CODES = vocabulary([
1554
- "refresh_invalid",
1555
- "refresh_expired",
1556
- "refresh_inactive",
1557
- "refresh_replayed",
1558
- "refresh_revoked",
1559
- "authority_replaced",
1560
- "refresh_recovery_unavailable",
1561
- "refresh_recovery_expired"
1562
- ]);
1563
-
1564
1630
  // packages/ceal-client-protocol/src/device-enrollment.ts
1565
1631
  var CEAL_DEVICE_ENROLLMENT_POLL_FAILURE_CODES = Object.freeze(["unsupported_feature", "recovery_required", "expired", "denied"]);
1566
1632
  var POLL_RESULT_KEYS = Object.freeze(["retry_after_ms", "schema_version", "status"]);
@@ -1590,7 +1656,6 @@ function waitForAbort(signal, milliseconds) {
1590
1656
  }
1591
1657
 
1592
1658
  // host/producer-service.ts
1593
- var MAX_CONFIG_BYTES = 32 * 1024;
1594
1659
  var SAFE_REF2 = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/u;
1595
1660
  var HOST_PRODUCER_SERVE_COMMAND_PREFIX = ["serve", "--config"];
1596
1661
  var HostProducerServiceError = class extends Error {
@@ -1601,7 +1666,8 @@ var HostProducerServiceError = class extends Error {
1601
1666
  this.code = code3;
1602
1667
  }
1603
1668
  };
1604
- 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"];
1669
+ var HOST_PRODUCER_CONFIG_KEYS = ["schema_version", "host_source_ref", "producer_installation_ref", "producer_epoch", "outbox_dir", "relay_endpoint"];
1670
+ var HOST_PRODUCER_TIMING_DEFAULTS = Object.freeze({ reconcile_interval_ms: 250, retry_backoff_ms: 1e3, ipc_timeout_ms: 5e3 });
1605
1671
  function parseHostProducerServeArgs(args, platform = process.platform) {
1606
1672
  return parseProducerServeArgs(args, platform, hostProducerError);
1607
1673
  }
@@ -1643,15 +1709,17 @@ async function readProducerConfigText(configPath, platform, error) {
1643
1709
  const noFollow = typeof constants.O_NOFOLLOW === "number" ? constants.O_NOFOLLOW : 0;
1644
1710
  const handle = await openConfigFile(configPath, constants.O_RDONLY | noFollow, error);
1645
1711
  try {
1646
- validateOpenedFile(await handle.stat(), pathStat, platform, error);
1647
- return await readBoundedConfig(handle, error);
1712
+ const opened = await handle.stat();
1713
+ validateConfigFile(opened, platform, error);
1714
+ validateOpenedFile(opened, pathStat, platform, error);
1715
+ return await readBoundedConfig(handle, opened.size, error);
1648
1716
  } finally {
1649
1717
  await handle.close();
1650
1718
  }
1651
1719
  }
1652
1720
  function decodeProducerConfigCore(text, options) {
1653
1721
  const value = parseCanonicalJson(text, options.error);
1654
- if (!isRecord(value) || !hasExactKeys2(value, options.keys) || value.schema_version !== options.schema) throw options.error("invalid_config");
1722
+ if (!isRecord(value) || !hasConfigKeys(value, options.keys) || value.schema_version !== options.schema) throw options.error("invalid_config");
1655
1723
  const hostSourceRef = typeof value.host_source_ref === "string" ? value.host_source_ref : "";
1656
1724
  const installationRef = typeof value.producer_installation_ref === "string" ? value.producer_installation_ref : "";
1657
1725
  const producerEpoch = validateIdentity(hostSourceRef, installationRef, value.producer_epoch, options.error);
@@ -1662,7 +1730,7 @@ function decodeProducerConfigCore(text, options) {
1662
1730
  assertProducerAbsolutePath(value[key], options.platform, "runtime", options.error);
1663
1731
  extraPaths[key] = value[key];
1664
1732
  }
1665
- const intervals = validateIntervals(value.reconcile_interval_ms, value.retry_backoff_ms, value.ipc_timeout_ms, options.error);
1733
+ 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);
1666
1734
  return {
1667
1735
  extra_paths: Object.freeze(extraPaths),
1668
1736
  host_source_ref: hostSourceRef,
@@ -1702,7 +1770,7 @@ async function configPathStat(configPath, error) {
1702
1770
  }
1703
1771
  function validateConfigFile(value, platform, error) {
1704
1772
  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" }]));
1705
- if (value.size <= 0 || value.size > MAX_CONFIG_BYTES) throw error("invalid_config", refusalFact("config_bytes", value.size, `between 1 and ${MAX_CONFIG_BYTES}`));
1773
+ 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}`));
1706
1774
  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" }]));
1707
1775
  }
1708
1776
  async function openConfigFile(configPath, flags, error) {
@@ -1716,12 +1784,17 @@ function validateOpenedFile(opened, pathStat, platform, error) {
1716
1784
  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" }]));
1717
1785
  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) }]));
1718
1786
  }
1719
- async function readBoundedConfig(handle, error) {
1720
- const buffer = Buffer.allocUnsafe(MAX_CONFIG_BYTES + 1);
1721
- const { bytesRead } = await handle.read(buffer, 0, buffer.byteLength, 0);
1722
- if (bytesRead === 0 || bytesRead > MAX_CONFIG_BYTES) throw error("invalid_config", refusalFact("bytes_read", bytesRead, `between 1 and ${MAX_CONFIG_BYTES}`));
1787
+ async function readBoundedConfig(handle, expectedBytes, error) {
1788
+ const buffer = Buffer.allocUnsafe(expectedBytes + 1);
1789
+ let offset = 0;
1790
+ while (offset < buffer.byteLength) {
1791
+ const { bytesRead } = await handle.read(buffer, offset, buffer.byteLength - offset, offset);
1792
+ if (bytesRead === 0) break;
1793
+ offset += bytesRead;
1794
+ }
1795
+ if (offset !== expectedBytes) throw error("invalid_config", refusalFact("bytes_read", offset, `the opened file's ${expectedBytes} bytes without growth or truncation`));
1723
1796
  try {
1724
- return new TextDecoder("utf-8", { fatal: true }).decode(buffer.subarray(0, bytesRead));
1797
+ return new TextDecoder("utf-8", { fatal: true }).decode(buffer.subarray(0, offset));
1725
1798
  } catch {
1726
1799
  throw error("invalid_config");
1727
1800
  }
@@ -1749,9 +1822,8 @@ function validateIntervals(reconcile, retry, timeout, error) {
1749
1822
  if (!boundedMilliseconds(reconcile) || !boundedMilliseconds(retry) || !boundedMilliseconds(timeout)) throw error("invalid_config");
1750
1823
  return [reconcile, retry, timeout];
1751
1824
  }
1752
- function hasExactKeys2(value, keys) {
1753
- const observed = Object.keys(value);
1754
- return observed.length === keys.length && keys.every((key) => Object.hasOwn(value, key));
1825
+ function hasConfigKeys(value, required) {
1826
+ return required.every((key) => Object.hasOwn(value, key)) && Object.keys(value).every((key) => required.includes(key) || Object.hasOwn(HOST_PRODUCER_TIMING_DEFAULTS, key));
1755
1827
  }
1756
1828
  function isRecord(value) {
1757
1829
  return value !== null && typeof value === "object" && !Array.isArray(value);