@corca-org/ceal-host-linux-arm64 1.0.15 → 1.0.17

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.
@@ -178,7 +178,7 @@ var client_wire_contract_default = {
178
178
  "prompt"
179
179
  ],
180
180
  discovery_command: "discovery",
181
- discovery_manifest_schema_version: "ceal.discovery_manifest.v2",
181
+ discovery_manifest_schema_version: "ceal.discovery_manifest.v1",
182
182
  discovery_manifest_document_fields: [
183
183
  "discovery_manifest"
184
184
  ],
@@ -252,10 +252,11 @@ var CEAL_AUDIT_OUTCOMES = vocabulary(["succeeded", "denied", "failed"]);
252
252
  var CEAL_GATEWAY_PROVIDER_STEP_OUTCOMES = vocabulary(["completed", "rejected", "throttled", "failed"]);
253
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"]);
254
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"]);
255
256
  var CEAL_POLICY_DECISIONS = vocabulary(["allowed", "denied", "not_evaluated"]);
256
257
  var CEAL_CONNECTOR_ROUTE_PHASES = vocabulary(["scope_observation", "target_selection", "route_resolution"]);
257
258
  var CEAL_CONNECTOR_ROUTE_CAUSES = vocabulary(["provider_throttled", "provider_unavailable", "binding_invalid", "scope_limit_exceeded"]);
258
- var CEAL_WRITE_SOURCE_KINDS = vocabulary(["authenticated_registered_client", "agent_lease_admission", "provider_authenticated_event"]);
259
+ var CEAL_WRITE_SOURCE_KINDS = vocabulary(["authenticated_registered_client", "provider_authenticated_event"]);
259
260
  var CEAL_REFRESH_DELIVERIES = vocabulary(["initial", "recovery", "replay", "terminal_failure", "recovery_unavailable"]);
260
261
  var CEAL_CLIENT_OPERATIONS = vocabulary(["handshake", "discover", "call", "readback"]);
261
262
  var CEAL_WRITE_IDEMPOTENCY_POSTURES = vocabulary(["required", "optional", "not_required"]);
@@ -265,6 +266,17 @@ var CEAL_WRITE_RECEIPT_PROVIDER_STATES = vocabulary(["outcome_unknown", "verifie
265
266
  var CEAL_WRITE_RECEIPT_PROVIDER_READBACKS = vocabulary(["outcome_unknown", "verified", "not_applied"]);
266
267
  var CEAL_PROTOCOL_VERSION = "1.4.0";
267
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
+ ]);
268
280
  var CEAL_CONNECTOR_ROUTE_FAILURE_KEYS = vocabulary(["connector_kind", "phase", "schema_version"]);
269
281
  var CEAL_CLASSIFIED_CONNECTOR_ROUTE_FAILURE_KEYS = vocabulary(["cause", ...CEAL_CONNECTOR_ROUTE_FAILURE_KEYS]);
270
282
  var CEAL_UNCLASSIFIED_CONNECTOR_ROUTE_FAILURE_KEYS = vocabulary(["connector_kind", "error_class", "phase", "schema_version"]);
@@ -274,10 +286,130 @@ var CEAL_GATEWAY_ORGANIZATION_ROUTE_FACT_CALL_KEYS = Object.freeze([
274
286
  "policy_decision_revision"
275
287
  ]);
276
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
+
277
409
  // packages/ceal-client-protocol/src/operation-contract-types.ts
278
410
  var CEAL_JSON_SCHEMA_2020_12 = "https://json-schema.org/draft/2020-12/schema";
279
411
  var CEAL_OPERATION_ERROR_SCHEMA_VERSION = "ceal.operation_error.v1";
280
- var CEAL_OPERATION_WITHHELD_CAUSES = vocabulary(["provider_permission", "access_level", "personal_authorization_required"]);
412
+ var CEAL_ARTIFACT_STAGE_TERMINALS = vocabulary(["chunk_accepted", "artifact_ready", "idempotency_replayed"]);
281
413
  var CEAL_RETRY_AFTER_MAX_MS = 60 * 60 * 1e3;
282
414
  var CEAL_JSON_SCHEMA_TYPES = vocabulary(["object", "array", "string", "integer", "number", "boolean", "null"]);
283
415
  var OBSERVATION_POSTURES = vocabulary(["direct_readback", "approved_no_readback", "operator_mediated", "excluded"]);
@@ -541,6 +673,8 @@ var CEAL_PROVIDER_BOUNDARY_KINDS = vocabulary([
541
673
  var CEAL_PROVIDER_BOUNDARY_EVIDENCE = vocabulary(["provider_readback", "operator_stated"]);
542
674
  var CEAL_ACCESS_LEVELS = vocabulary(["none", "read", "read_write"]);
543
675
  var CEAL_PERSONAL_ACCESS_CEILINGS = vocabulary(["disabled", "read", "read_write"]);
676
+ var CEAL_TARGET_REF_PATTERN = "^[^\\p{Cc}]+$";
677
+ var TARGET_REF = new RegExp(CEAL_TARGET_REF_PATTERN, "u");
544
678
  var CEAL_TARGET_VISIBILITIES = vocabulary(["public", "private"]);
545
679
  var CEAL_PRINCIPAL_KINDS = vocabulary(["human", "service", "runtime"]);
546
680
  var CEAL_ORGANIZATION_ROLES = vocabulary(["member", "admin"]);
@@ -649,8 +783,6 @@ var CEAL_OPERATION_AUTHORITY_POLICY_KEYS = Object.freeze(["access_group", "insta
649
783
  var MAX_OPERATION_INPUT_RESOLVER_BINDINGS = 96;
650
784
  var CEAL_OPERATION_DESCRIPTOR_REQUIRED_ENVELOPE_KEYS = Object.freeze(["schema_version", "id", "input_contract", "result_contract", "policy"]);
651
785
  var CEAL_OPERATION_DESCRIPTOR_OPTIONAL_ENVELOPE_KEYS = Object.freeze(["input_resolution", "summary"]);
652
- var CEAL_OPERATION_RESULT_KEYS = vocabulary(["ok", "operation_id", "operation_receipt", "schema_version", "value"]);
653
- var CEAL_OPERATION_COMPACT_RESULT_KEYS = vocabulary(["ok", "operation_evidence", "operation_id", "schema_version", "value"]);
654
786
 
655
787
  // packages/ceal-client-protocol/src/operation-catalog.ts
656
788
  var CEAL_OPERATION_CATALOG_SCHEMA_VERSION = "ceal.catalog.v3";
@@ -662,8 +794,8 @@ var CEAL_SCHEMA_LITERALS = [
662
794
  "ceal.activation_transport.v1",
663
795
  CEAL_OPERATION_ACCESS_SCHEMA_VERSION,
664
796
  CEAL_OPERATION_CATALOG_SCHEMA_VERSION,
665
- "ceal.client_refresh_request.v2",
666
- "ceal.client_refresh_result.v2",
797
+ "ceal.client_refresh_request.v1",
798
+ "ceal.client_refresh_result.v1",
667
799
  "ceal.client_revoke_request.v1",
668
800
  "ceal.client_revoke_result.v1",
669
801
  CEAL_COMMAND_REQUEST_SCHEMA_VERSION,
@@ -692,7 +824,7 @@ var CEAL_SCHEMA_LITERALS = [
692
824
  "ceal.gateway_call_result.v1",
693
825
  CEAL_GATEWAY_COMMAND_RESOLUTION_SCHEMA_VERSION,
694
826
  "ceal.gateway_connector_route_failure.v1",
695
- "ceal.gateway_discovery.v3",
827
+ "ceal.gateway_discovery.v1",
696
828
  "ceal.gateway_handshake.v1",
697
829
  "ceal.gateway_installation_activation_code_issue_request.v1",
698
830
  "ceal.gateway_installation_activation_code_issue_result.v1",
@@ -714,10 +846,6 @@ var CEAL_SCHEMA_LITERALS = [
714
846
  "ceal.host_observation.v1",
715
847
  "ceal.host_registration_request.v1",
716
848
  "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",
721
849
  "ceal.operation_descriptor.v1",
722
850
  "ceal.operation_error.v1",
723
851
  "ceal.operation_failure.v1",
@@ -725,7 +853,7 @@ var CEAL_SCHEMA_LITERALS = [
725
853
  "ceal.operation_receipt.v1",
726
854
  "ceal.operation_result.v1",
727
855
  "ceal.operation_result.compact.v1",
728
- "ceal.local_result_materialization.v2",
856
+ "ceal.local_result_materialization.v1",
729
857
  "ceal.local_result_root.v1",
730
858
  "ceal.owner_bootstrap_exchange_request.v1",
731
859
  "ceal.owner_bootstrap_exchange_result.v1",
@@ -743,12 +871,6 @@ var CEAL_SCHEMA_LITERAL_SET = new Set(CEAL_SCHEMA_LITERALS);
743
871
  // packages/ceal-client-protocol/src/bounded-series.ts
744
872
  import { join } from "node:path";
745
873
  var CEAL_BOUNDED_SERIES_CATALOG = Object.freeze({
746
- usage_record: (root) => join(root, "run-usage.jsonl"),
747
- control_commit: (root) => join(root, "control-auto-commit.jsonl"),
748
- engagement_signal: (root) => join(root, "runtime-state", "slack-feedback.jsonl"),
749
- runtime_error: (root) => join(root, "runtime-state", "runtime-errors.jsonl"),
750
- turn_bridge_request: (root) => join(root, ".ceal", "turn-bridge", "requests.jsonl"),
751
- thread_run_events: (root) => join(root, "run-events.jsonl"),
752
874
  bounded_store_sidecar: (root) => `${root}.jsonl`,
753
875
  gateway_audit_archive: (root) => `${root}.jsonl`,
754
876
  gateway_access_group_connector_control_audit: (root) => `${root}.audit.jsonl`,
@@ -781,146 +903,8 @@ var CEAL_HOST_REGISTRATION_ATTEMPT_REF_PATTERN = new RegExp(`^host-registration-
781
903
  var CEAL_HOST_INSTALLATION_REF_PATTERN = new RegExp(`^host-installation:${CEAL_LOWERCASE_UUID_PATTERN}$`, "u");
782
904
  var CEAL_HOST_SOURCE_REF_PATTERN = new RegExp(`^host-source:${CEAL_LOWERCASE_UUID_PATTERN}$`, "u");
783
905
 
784
- // packages/ceal-client-protocol/src/agent-session-handoff.ts
785
- var CEAL_AGENT_ADMISSION_PHASES = vocabulary([
786
- "incumbent_admitted",
787
- "incumbent_draining",
788
- "drained",
789
- "candidate_admitted",
790
- "candidate_draining",
791
- "rollback_admitted"
792
- ]);
793
- var CEAL_AGENT_SERVICE_SESSION_RECORD_KEYS = vocabulary([
794
- "admission_fence",
795
- "admission_state",
796
- "admission_state_generation",
797
- "bearer",
798
- "consumer_ref",
799
- "credential_generation",
800
- "expires_at",
801
- "gateway_instance",
802
- "gateway_origin",
803
- "gateway_serving_generation",
804
- "issued_at",
805
- "record_sha256",
806
- "renew_after",
807
- "renew_by",
808
- "schema_version",
809
- "session_revision"
810
- ]);
811
- var CEAL_AGENT_SESSION_COMMIT_KEYS = vocabulary(["attempt_ref", "expected_session_revision", "session_revision"]);
812
-
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: an
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
- });
906
+ // packages/ceal-client-protocol/src/operation-result-completeness.ts
907
+ var CEAL_READ_VALUE_CONTINUATION_KEYS = vocabulary(["continuation", "continuation_ref", "next_cursor"]);
924
908
 
925
909
  // packages/ceal-client-protocol/src/operation-contract-artifact.ts
926
910
  var CATALOG_REVISION = new RegExp(CEAL_VERIFIED_ARTIFACT_CATALOG_REVISION_PATTERN, "u");
@@ -929,7 +913,9 @@ var CEAL_OPERATION_INVOKE_COMMAND = "invoke";
929
913
  var CEAL_OPERATION_INPUT_FLAG = "--input";
930
914
  var CEAL_OPERATION_ID_PLACEHOLDER = "<operation-id>";
931
915
  var CEAL_OPERATION_INPUT_PLACEHOLDER = "<json-object>";
932
- var CEAL_MODEL_INVOCATION_ARGUMENTS = [CEAL_OPERATION_INVOKE_COMMAND, CEAL_OPERATION_ID_PLACEHOLDER, CEAL_OPERATION_INPUT_FLAG, shellSingleQuoted(CEAL_OPERATION_INPUT_PLACEHOLDER)].join(" ");
916
+ var MODEL_INVOCATION_BASE_ARGUMENTS = [CEAL_OPERATION_INVOKE_COMMAND, CEAL_OPERATION_ID_PLACEHOLDER].join(" ");
917
+ var CEAL_MODEL_INVOCATION_ARGUMENTS = [MODEL_INVOCATION_BASE_ARGUMENTS, CEAL_OPERATION_INPUT_FLAG, shellSingleQuoted(CEAL_OPERATION_INPUT_PLACEHOLDER)].join(" ");
918
+ var CEAL_MODEL_INPUT_SOURCE_GUIDANCE = `For caller-owned fields, add ${CEAL_OPERATION_INPUT_FLAG} ${shellSingleQuoted(CEAL_OPERATION_INPUT_PLACEHOLDER)}. Use inline JSON for short input; for longer or generated input, put exactly one JSON object in a caller-owned regular non-symlink UTF-8 JSON file and pass --input @path; relative paths resolve from the command working directory.`;
933
919
  function shellSingleQuoted(value) {
934
920
  return `'${value.replaceAll("'", "'\\''")}'`;
935
921
  }
@@ -961,76 +947,7 @@ var CEAL_VERIFIED_ARTIFACT_DESCRIPTOR_JSON_SCHEMA = Object.freeze({
961
947
  }
962
948
  });
963
949
 
964
- // packages/ceal-client-protocol/src/bare-document.ts
965
- var REQUIRED_FIELDS = CEAL_CLIENT_WIRE_CONTRACT.command_response.bare_document_fields;
966
- var OPTIONAL_FIELDS = CEAL_CLIENT_WIRE_CONTRACT.command_response.bare_document_optional_fields;
967
-
968
- // packages/ceal-client-protocol/src/leased-consumer-vocabulary.ts
969
- var CEAL_TERMINAL_DISPOSITIONS = vocabulary(["completed", "failed", "cancelled"]);
970
- var CEAL_LEASE_DISPOSITIONS = vocabulary([...CEAL_TERMINAL_DISPOSITIONS, "deferred"]);
971
- var CEAL_AUTOMATIC_FEEDBACK_INTENTS = vocabulary(["initial"]);
972
- var CEAL_LEASED_MESSAGE_DELIVERY_OPERATION_IDS = vocabulary(["message.send", "message.update", "message.delete"]);
973
- var CEAL_REPOSITORY_VISIBILITIES = vocabulary(["public", "private", "internal"]);
974
- var CEAL_RESULT_DELIVERY_OFFERS = vocabulary(["pending", "offered", "transport_lost"]);
975
- var CEAL_RESULT_DELIVERY_STATES = vocabulary(["unavailable", ...CEAL_RESULT_DELIVERY_OFFERS]);
976
- var CEAL_PROVIDER_OUTCOMES = vocabulary(["not_attempted", "outcome_unknown", "verified"]);
977
- var CEAL_ACTIVITY_GAP_CODES = vocabulary([
978
- "provider_page_budget",
979
- "call_deadline",
980
- "related_item_budget",
981
- "provider_cursor_unavailable",
982
- "malformed_provider_page",
983
- "visibility_incomplete",
984
- "unsupported_event_kind"
985
- ]);
986
- var CEAL_ACTIVITY_CONNECTOR_KINDS = vocabulary(["slack", "github", "google-calendar", "google-drive", "notion"]);
987
- var CEAL_ACTIVITY_COVERAGE_STATUSES = vocabulary(["complete_for_target", "continuation_required", "blocked"]);
988
- var CEAL_ACTIVITY_EVENT_KINDS = vocabulary([
989
- "slack.message",
990
- "slack.reply",
991
- "slack.direct_message",
992
- "github.commit.authored",
993
- "github.issue.opened",
994
- "github.pull_request.opened",
995
- "github.review.submitted",
996
- "github.issue_comment.created",
997
- "github.review_comment.created",
998
- "calendar.organized",
999
- "calendar.accepted_invite",
1000
- "calendar.recorded",
1001
- "drive.file.created",
1002
- "drive.file.modified",
1003
- "drive.file.viewed",
1004
- "notion.page.created",
1005
- "notion.page.edited"
1006
- ]);
1007
- var CEAL_ACTIVITY_TIMESTAMP_BASES = vocabulary([
1008
- "message_created",
1009
- "commit_authored",
1010
- "resource_created",
1011
- "review_submitted",
1012
- "comment_created",
1013
- "event_start",
1014
- "all_day_start",
1015
- "file_created",
1016
- "file_modified",
1017
- "file_modified_by_me",
1018
- "file_viewed_by_me",
1019
- "page_created",
1020
- "page_last_edited",
1021
- "resource_modified"
1022
- ]);
1023
- var CEAL_ACTIVITY_V3_KINDS = vocabulary(["authored", "edited", "messaged", "responded"]);
1024
- var CEAL_RESOURCE_TIME_BASES = vocabulary(["created", "modified", "viewed"]);
1025
- var CEAL_RESOURCE_SEARCH_ORDERS = vocabulary(["relevance", "modified", "viewed", "created"]);
1026
- 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", "container_names", "addressed_to_me", "unread"]);
1028
- var CEAL_ARTIFACT_STAGE_TERMINALS = vocabulary(["chunk_accepted", "artifact_ready", "idempotency_replayed"]);
1029
- var CEAL_READ_ITEM_KINDS = vocabulary(["conversation", "identity", "usergroup", "message", "file", "document"]);
1030
- var CEAL_LEASED_MESSAGE_SEARCH_COMPLETENESS = vocabulary(["complete", "continuation_available", "truncated"]);
1031
- var CEAL_OPAQUE_HANDLE_KINDS = vocabulary(["target", "message", "thread", "artifact", "document", "object"]);
1032
- var CEAL_WRITE_OBJECT_KINDS = vocabulary(["document", "comment", "cell_range"]);
1033
- var CEAL_CONVERSATION_KINDS = vocabulary(["channel", "dm", "group"]);
950
+ // packages/ceal-client-protocol/src/provider-operation-vocabulary.ts
1034
951
  var CEAL_FILE_TYPE_FAMILIES = vocabulary(["all", "image", "pdf"]);
1035
952
  var CEAL_GITHUB_ISSUE_STATES = vocabulary(["open", "closed", "all"]);
1036
953
  var CEAL_NOTION_UPDATABLE_BLOCK_TYPES = vocabulary([
@@ -1064,12 +981,92 @@ var CEAL_NOTION_IDENTITY_GAP_REASONS = vocabulary([
1064
981
  "identity_unlinked"
1065
982
  ]);
1066
983
  var CEAL_NOTION_STRING_VALUE_TYPES = vocabulary(["text", "select", "url", "email", "phone"]);
1067
- var CEAL_UNREAD_REASONS = vocabulary(["blocked", "unavailable", "too_large", "unsupported", "download_failed", "permission_denied"]);
1068
- var CEAL_PLAN_ITEM_STATUSES = vocabulary(["pending", "active", "completed"]);
1069
- var CEAL_FINAL_PRESENTATION_INTENTS = vocabulary(["final", "stop", "transient_notice"]);
1070
- var CEAL_PRESENTATION_INTENTS = vocabulary(["progress", ...CEAL_FINAL_PRESENTATION_INTENTS]);
984
+
985
+ // packages/ceal-client-protocol/src/opaque-reference.ts
986
+ var CEAL_OPAQUE_HANDLE_KINDS = vocabulary(["target", "message", "thread", "artifact", "document", "block", "object"]);
987
+ var CEAL_OPAQUE_REF_KINDS = vocabulary([...CEAL_OPAQUE_HANDLE_KINDS, "result", "operation-receipt", "reply-receipt", "field", "notion-data-source"]);
988
+
989
+ // packages/ceal-client-protocol/src/bare-document.ts
990
+ var REQUIRED_FIELDS = CEAL_CLIENT_WIRE_CONTRACT.command_response.bare_document_fields;
991
+ var OPTIONAL_FIELDS = CEAL_CLIENT_WIRE_CONTRACT.command_response.bare_document_optional_fields;
1071
992
 
1072
993
  // packages/ceal-client-protocol/src/resource-row.ts
994
+ var CEAL_RESOURCE_SEARCH_ORDERS = vocabulary(["relevance", "modified", "viewed", "created"]);
995
+ var CEAL_RESOURCE_SEARCH_DIRECTIONS = vocabulary(["ascending", "descending"]);
996
+ 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"]);
997
+ var CEAL_RESOURCE_TIME_BASES = vocabulary(["created", "modified", "viewed"]);
998
+ var CEAL_REPOSITORY_VISIBILITIES = vocabulary(["public", "private", "internal"]);
999
+ var CEAL_ACTIVITY_V3_KINDS = vocabulary(["authored", "edited", "messaged", "responded"]);
1000
+ var CEAL_ACTIVITY_TIMESTAMP_BASES = vocabulary([
1001
+ "message_created",
1002
+ "commit_authored",
1003
+ "resource_created",
1004
+ "review_submitted",
1005
+ "comment_created",
1006
+ "event_start",
1007
+ "all_day_start",
1008
+ "file_created",
1009
+ "file_modified",
1010
+ "file_modified_by_me",
1011
+ "file_viewed_by_me",
1012
+ "page_created",
1013
+ "page_last_edited",
1014
+ "resource_modified"
1015
+ ]);
1016
+ var CEAL_ACTIVITY_CONNECTOR_KINDS = vocabulary(["slack", "github", "google-calendar", "google-drive", "notion"]);
1017
+ var CEAL_ACTIVITY_GAP_CODES = vocabulary([
1018
+ "provider_page_budget",
1019
+ "call_deadline",
1020
+ "related_item_budget",
1021
+ "provider_cursor_unavailable",
1022
+ "malformed_provider_page",
1023
+ "visibility_incomplete",
1024
+ "unsupported_event_kind",
1025
+ "direct_messages_excluded"
1026
+ ]);
1027
+ var CEAL_ACTIVITY_EVENT_KINDS = vocabulary([
1028
+ "slack.message",
1029
+ "slack.reply",
1030
+ "slack.direct_message",
1031
+ "github.commit.authored",
1032
+ "github.issue.opened",
1033
+ "github.pull_request.opened",
1034
+ "github.issue.edited",
1035
+ "github.pull_request.edited",
1036
+ "github.review.submitted",
1037
+ "github.issue_comment.created",
1038
+ "github.review_comment.created",
1039
+ "calendar.organized",
1040
+ "calendar.accepted_invite",
1041
+ "calendar.recorded",
1042
+ "drive.file.created",
1043
+ "drive.file.modified",
1044
+ "drive.file.viewed",
1045
+ "notion.page.created",
1046
+ "notion.page.edited"
1047
+ ]);
1048
+ var CEAL_ACTIVITY_EVENT_TIMESTAMP_BASIS_MAP = Object.freeze({
1049
+ "slack.message": "message_created",
1050
+ "slack.reply": "message_created",
1051
+ "slack.direct_message": "message_created",
1052
+ "github.commit.authored": "commit_authored",
1053
+ "github.review.submitted": "review_submitted",
1054
+ "github.issue_comment.created": "comment_created",
1055
+ "github.review_comment.created": "comment_created",
1056
+ "github.issue.opened": "resource_created",
1057
+ "github.pull_request.opened": "resource_created",
1058
+ "github.issue.edited": "resource_modified",
1059
+ "github.pull_request.edited": "resource_modified",
1060
+ "calendar.organized": "resource_created",
1061
+ "drive.file.created": "file_created",
1062
+ "drive.file.modified": "file_modified_by_me",
1063
+ "drive.file.viewed": "file_viewed_by_me",
1064
+ "notion.page.created": "page_created",
1065
+ "notion.page.edited": "page_last_edited"
1066
+ });
1067
+ var CEAL_DATED_NOTE_BASES = vocabulary(["recording", "calendar_event", "created_time"]);
1068
+ var CEAL_DATED_NOTE_TRANSCRIPT_STATES = vocabulary(["present", "absent", "unestablished"]);
1069
+ var CEAL_READ_SEARCH_COST_CLASSES = vocabulary(["native_index", "scan"]);
1073
1070
  var RESOURCE_ROW_KEY_RULES = Object.freeze({
1074
1071
  schema_version: { required: true, timestamp: false },
1075
1072
  ref: { required: true, timestamp: false },
@@ -1082,6 +1079,7 @@ var RESOURCE_ROW_KEY_RULES = Object.freeze({
1082
1079
  source: { required: true, timestamp: false },
1083
1080
  owner: { required: false, timestamp: false },
1084
1081
  counterparts: { required: false, timestamp: false },
1082
+ attachments: { required: false, timestamp: false },
1085
1083
  created_at: { required: false, timestamp: true },
1086
1084
  created_at_local: { required: false, timestamp: true },
1087
1085
  modified_at: { required: false, timestamp: true },
@@ -1092,6 +1090,7 @@ var RESOURCE_ROW_KEY_RULES = Object.freeze({
1092
1090
  end: { required: false, timestamp: false },
1093
1091
  status: { required: false, timestamp: false },
1094
1092
  snippet: { required: false, timestamp: false },
1093
+ dated_notes: { required: false, timestamp: false },
1095
1094
  state: { required: true, timestamp: false },
1096
1095
  timestamp_basis: { required: true, timestamp: false }
1097
1096
  });
@@ -1128,16 +1127,26 @@ var CEAL_WRITE_SAFETY_UNCHECKED_REASONS = vocabulary(["authority_unavailable"]);
1128
1127
  // packages/ceal-client-protocol/src/operation-occurrence.ts
1129
1128
  var MAX_RECEIPT_REVISION = Number.MAX_SAFE_INTEGER - 1;
1130
1129
 
1131
- // packages/ceal-client-protocol/src/leased-artifact-contract.ts
1132
- var CEAL_LEASED_CONSUMER_ARTIFACT_CHUNK_MAX_BYTES = 12 * 1024;
1133
-
1134
- // packages/ceal-client-protocol/src/leased-resource-stream.ts
1135
- var CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_MAGIC = new Uint8Array([67, 69, 65, 76, 82, 83, 50, 0]);
1136
- var CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_RECORD_PREFIX_BYTES = 8;
1137
- var CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_MAX_HEADER_BYTES = 16 * 1024;
1138
- var CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_CHUNK_BYTES = 64 * 1024;
1139
- var CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_MAX_RECORD_BYTES = CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_RECORD_PREFIX_BYTES + CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_MAX_HEADER_BYTES + CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_CHUNK_BYTES;
1140
- var CEAL_ATTACHMENT_UNREAD_REASONS = vocabulary(["blocked", "unavailable", "too_large", "unsupported", "download_failed", "digest_mismatch"]);
1130
+ // packages/ceal-client-protocol/src/personal-client-vocabulary.ts
1131
+ var CEAL_PERSONAL_CLIENT_BINDING_KEYS = vocabulary([
1132
+ "access_group_ref",
1133
+ "membership_ref",
1134
+ "registration_ref",
1135
+ "client_ref",
1136
+ "subject_ref",
1137
+ "instance_ref"
1138
+ ]);
1139
+ var CEAL_ENROLLMENT_FAILURE_CODES = vocabulary(["enrollment_invalid", "enrollment_expired", "enrollment_used"]);
1140
+ var CEAL_REFRESH_FAILURE_CODES = vocabulary([
1141
+ "refresh_invalid",
1142
+ "refresh_expired",
1143
+ "refresh_inactive",
1144
+ "refresh_replayed",
1145
+ "refresh_revoked",
1146
+ "authority_replaced",
1147
+ "refresh_recovery_unavailable",
1148
+ "refresh_recovery_expired"
1149
+ ]);
1141
1150
 
1142
1151
  // packages/ceal-client-protocol/src/request-validation-primitives.ts
1143
1152
  import { createHash as createHash2 } from "node:crypto";
@@ -1223,7 +1232,7 @@ var CEAL_REQUEST_MAX_GRAPH_NODES = 128;
1223
1232
 
1224
1233
  // packages/ceal-client-protocol/src/request-run.ts
1225
1234
  var CEAL_REQUEST_NODE_STANDING_OCCURRENCE_SCHEMA_VERSION = "ceal.request_node_standing_occurrence.v1";
1226
- var CEAL_REQUEST_RUN_BATCH_SCHEMA_VERSION = "ceal.request_run_batch.v3";
1235
+ var CEAL_REQUEST_RUN_BATCH_SCHEMA_VERSION = "ceal.request_run_batch.v1";
1227
1236
  var REQUEST_ACTION_SAFE_REF_SCHEMA = { type: "string", minLength: 1, maxLength: 128, pattern: SAFE_REF.source };
1228
1237
  var REQUEST_ACTION_DIGEST_SCHEMA = { type: "string", minLength: 64, maxLength: 64, pattern: "^[a-f0-9]{64}$" };
1229
1238
  var REQUEST_NODE_STANDING_OCCURRENCE_SCHEMA = {
@@ -1305,6 +1314,10 @@ var CEAL_REQUEST_RUN_BATCH_JSON_SCHEMA = {
1305
1314
  };
1306
1315
 
1307
1316
  // packages/ceal-client-protocol/src/host-observation.ts
1317
+ var CEAL_HOST_INPUT_KINDS = vocabulary(["human", "host_automatic"]);
1318
+ function isCealHostInputKind(value) {
1319
+ return typeof value === "string" && CEAL_HOST_INPUT_KINDS.some((kind) => kind === value);
1320
+ }
1308
1321
  var CEAL_HOST_OBSERVATION_REF_PREFIX = "host-observation:";
1309
1322
  function validateCealHostObservationDraft(value) {
1310
1323
  const record6 = operationRecord(value, "Ceal Host observation draft is invalid.");
@@ -1357,12 +1370,6 @@ var OWNER_WRITE_STATES = Object.freeze(["attempt_started", "provider_acknowledge
1357
1370
  var OWNER_EFFECT_STATES = Object.freeze(["none", "applied", "failed", "unknown", "reconciled"]);
1358
1371
  var OWNER_RECEIPT_STATES = Object.freeze(["pending", "available", "failed", "unknown", "reconciled"]);
1359
1372
 
1360
- // packages/ceal-client-protocol/src/thread-excerpt.ts
1361
- var CEAL_THREAD_RECENT_WINDOW = 6;
1362
- var CEAL_THREAD_LAST_APP_MESSAGES_WINDOW = 3;
1363
- var CEAL_THREAD_OLDER_SUMMARY_WINDOW = 4;
1364
- var CEAL_FED_THREAD_MESSAGE_LIMIT = CEAL_THREAD_RECENT_WINDOW + CEAL_THREAD_OLDER_SUMMARY_WINDOW + CEAL_THREAD_LAST_APP_MESSAGES_WINDOW;
1365
-
1366
1373
  // packages/ceal-client-protocol/src/request-graph-readiness.ts
1367
1374
  var REQUEST_GRAPH_PRODUCER_TO_APPEND_SCHEMA = {
1368
1375
  type: "object",
@@ -1451,25 +1458,10 @@ var CEAL_HOST_INVOCATION_AUTHENTICATION_RESULT_MAX_BYTES = new TextEncoder().enc
1451
1458
  `).byteLength;
1452
1459
 
1453
1460
  // packages/ceal-client-protocol/src/client-result-materialization.ts
1461
+ var CEAL_UNREAD_REASONS = vocabulary(["blocked", "unavailable", "too_large", "unsupported", "download_failed", "permission_denied"]);
1454
1462
  var CEAL_MODEL_VISIBLE_COMMAND_OUTPUT_MAX_BYTES = 32 * 1024;
1455
- var REQUIRED_FIELDS2 = Object.freeze(["schema_version", "operation_id", "read_argv"]);
1456
- var FIELDS = /* @__PURE__ */ new Set([...REQUIRED_FIELDS2, "local_result_root", "continue_argv"]);
1457
-
1458
- // packages/ceal-client-protocol/src/session-start-affordance.ts
1459
- var CEAL_SESSION_ENTRY_INVOCATION = "ceal";
1460
- 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.`;
1461
-
1462
- // packages/ceal-client-protocol/src/conversation-contracts.ts
1463
- var CEAL_APPROVAL_POLICY_KINDS = vocabulary(["requester_only", "named_users", "role_based"]);
1464
- var CEAL_APPROVAL_TARGET_KINDS = vocabulary([
1465
- "repo_change",
1466
- "investigation",
1467
- "skill_creation",
1468
- "command_creation",
1469
- "connector_creation",
1470
- "generic"
1471
- ]);
1472
- var CEAL_PROGRESS_PHASES = vocabulary(["request_review", "information_gathering", "work_execution", "result_check"]);
1463
+ var REQUIRED_FIELDS2 = Object.freeze(["schema_version", "operation_id"]);
1464
+ var FIELDS = /* @__PURE__ */ new Set([...REQUIRED_FIELDS2, "read_argv", "local_result_root", "continue_argv", "model_disclosure", "item_read_argv"]);
1473
1465
 
1474
1466
  // packages/ceal-client-protocol/src/gateway-cache-origin-validation.ts
1475
1467
  var CEAL_MAX_CACHE_ORIGIN_AGE_MS = 30 * 24 * 60 * 60 * 1e3;
@@ -1553,27 +1545,6 @@ var ADMIN_LINEAGE_NODE_KINDS = vocabulary(["source_read", "synthesis_preview", "
1553
1545
  // packages/ceal-client-protocol/src/actor-kind.ts
1554
1546
  var CEAL_ACTOR_KINDS = vocabulary(["human", "bot", "app", "unknown"]);
1555
1547
 
1556
- // packages/ceal-client-protocol/src/personal-client-vocabulary.ts
1557
- var CEAL_PERSONAL_CLIENT_BINDING_KEYS = vocabulary([
1558
- "access_group_ref",
1559
- "membership_ref",
1560
- "registration_ref",
1561
- "client_ref",
1562
- "subject_ref",
1563
- "instance_ref"
1564
- ]);
1565
- var CEAL_ENROLLMENT_FAILURE_CODES = vocabulary(["enrollment_invalid", "enrollment_expired", "enrollment_used"]);
1566
- var CEAL_REFRESH_FAILURE_CODES = vocabulary([
1567
- "refresh_invalid",
1568
- "refresh_expired",
1569
- "refresh_inactive",
1570
- "refresh_replayed",
1571
- "refresh_revoked",
1572
- "authority_replaced",
1573
- "refresh_recovery_unavailable",
1574
- "refresh_recovery_expired"
1575
- ]);
1576
-
1577
1548
  // packages/ceal-client-protocol/src/device-enrollment.ts
1578
1549
  var CEAL_DEVICE_ENROLLMENT_POLL_FAILURE_CODES = Object.freeze(["unsupported_feature", "recovery_required", "expired", "denied"]);
1579
1550
  var POLL_RESULT_KEYS = Object.freeze(["retry_after_ms", "schema_version", "status"]);
@@ -1846,13 +1817,13 @@ function validTurn(value) {
1846
1817
  return exactOptional(value, ["local_session_ref", "local_turn_ref"], ["model", "observations"]) && safeRef(value.local_session_ref) && safeRef(value.local_turn_ref) && optionalText(value.model, 256) && validObservations(value.observations);
1847
1818
  }
1848
1819
  function validInput(value) {
1849
- return exactOptional(value, ["local_session_ref", "local_turn_ref", "local_input_ref", "origin_input", "observations"], ["decision", "local_turn_aliases", "context_expires_at"]) && safeRef(value.local_session_ref) && safeRef(value.local_turn_ref) && safeRef(value.local_input_ref) && validInputObservations(value.observations) && typeof value.origin_input === "boolean" && validInputOptionals(value);
1820
+ return exactOptional(value, ["local_session_ref", "local_turn_ref", "local_input_ref", "input_kind", "origin_input", "observations"], ["local_turn_aliases", "context_expires_at"]) && safeRef(value.local_session_ref) && safeRef(value.local_turn_ref) && safeRef(value.local_input_ref) && validInputObservations(value.observations) && isCealHostInputKind(value.input_kind) && typeof value.origin_input === "boolean" && validInputOptionals(value);
1850
1821
  }
1851
1822
  function validInputObservations(value) {
1852
1823
  return validObservations(value) && Array.isArray(value) && value.filter((item) => record(item) && item.observation_kind === "prompt").length === 1;
1853
1824
  }
1854
1825
  function validInputOptionals(value) {
1855
- return validDecision(value.decision) && optionalRefs(value.local_turn_aliases) && (value.context_expires_at === void 0 || timestamp(value.context_expires_at));
1826
+ return optionalRefs(value.local_turn_aliases) && (value.context_expires_at === void 0 || timestamp(value.context_expires_at));
1856
1827
  }
1857
1828
  function validTerminal(value) {
1858
1829
  return exactOptional(value, ["local_session_ref", "local_turn_ref", "terminal_state"], ["abort_reason", "duration_ms", "time_to_first_token_ms", "usage", "observations"]) && safeRef(value.local_session_ref) && safeRef(value.local_turn_ref) && validTerminalDisposition(value.terminal_state, value.abort_reason) && optionalNonNegative(value.duration_ms) && optionalNonNegative(value.time_to_first_token_ms) && (value.usage === void 0 || jsonValue(value.usage)) && validObservations(value.observations);
@@ -1863,9 +1834,6 @@ function validTerminalDisposition(state, reason) {
1863
1834
  function validStatus(value) {
1864
1835
  return exactOptional(value, ["status", "reason_code"], ["detail"]) && ["ready", "degraded", "stopping"].includes(String(value.status)) && safeRef(value.reason_code) && optionalText(value.detail, 4096);
1865
1836
  }
1866
- function validDecision(value) {
1867
- return value === void 0 || record(value) && exactKeys(value, ["decision", "approval_ref"]) && (value.decision === "approved" || value.decision === "denied") && safeRef(value.approval_ref);
1868
- }
1869
1837
  function optionalText(value, maxLength) {
1870
1838
  return value === void 0 || typeof value === "string" && value.length > 0 && value.length <= maxLength;
1871
1839
  }