@corca-org/ceal-host-linux-arm64 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/ceal-host +0 -0
- package/libexec/ceal-host/claude-hook.mjs +98 -164
- package/libexec/ceal-host/claude-invocation-authentication.mjs +101 -166
- package/libexec/ceal-host/claude-producer.mjs +101 -166
- package/libexec/ceal-host/codex-hook.mjs +122 -644
- package/libexec/ceal-host/codex-invocation-authentication.mjs +115 -531
- package/libexec/ceal-host/codex-producer.mjs +115 -531
- package/libexec/ceal-host/control.mjs +138 -551
- package/libexec/ceal-host/relay.mjs +471 -220
- package/package.json +1 -1
- package/share/ceal-host/bundle-manifest.json +12 -12
- package/share/ceal-host/bundle-manifest.sigstore.json +1 -1
|
@@ -256,7 +256,7 @@ var CEAL_GATEWAY_DERIVED_STORE_FAILURE_CLASSES = vocabulary(["storage_unavailabl
|
|
|
256
256
|
var CEAL_POLICY_DECISIONS = vocabulary(["allowed", "denied", "not_evaluated"]);
|
|
257
257
|
var CEAL_CONNECTOR_ROUTE_PHASES = vocabulary(["scope_observation", "target_selection", "route_resolution"]);
|
|
258
258
|
var CEAL_CONNECTOR_ROUTE_CAUSES = vocabulary(["provider_throttled", "provider_unavailable", "binding_invalid", "scope_limit_exceeded"]);
|
|
259
|
-
var CEAL_WRITE_SOURCE_KINDS = vocabulary(["authenticated_registered_client", "
|
|
259
|
+
var CEAL_WRITE_SOURCE_KINDS = vocabulary(["authenticated_registered_client", "provider_authenticated_event"]);
|
|
260
260
|
var CEAL_REFRESH_DELIVERIES = vocabulary(["initial", "recovery", "replay", "terminal_failure", "recovery_unavailable"]);
|
|
261
261
|
var CEAL_CLIENT_OPERATIONS = vocabulary(["handshake", "discover", "call", "readback"]);
|
|
262
262
|
var CEAL_WRITE_IDEMPOTENCY_POSTURES = vocabulary(["required", "optional", "not_required"]);
|
|
@@ -409,6 +409,7 @@ var CEAL_OPERATION_WITHHELD_CAUSES = vocabulary(["provider_permission", "access_
|
|
|
409
409
|
// packages/ceal-client-protocol/src/operation-contract-types.ts
|
|
410
410
|
var CEAL_JSON_SCHEMA_2020_12 = "https://json-schema.org/draft/2020-12/schema";
|
|
411
411
|
var CEAL_OPERATION_ERROR_SCHEMA_VERSION = "ceal.operation_error.v1";
|
|
412
|
+
var CEAL_ARTIFACT_STAGE_TERMINALS = vocabulary(["chunk_accepted", "artifact_ready", "idempotency_replayed"]);
|
|
412
413
|
var CEAL_RETRY_AFTER_MAX_MS = 60 * 60 * 1e3;
|
|
413
414
|
var CEAL_JSON_SCHEMA_TYPES = vocabulary(["object", "array", "string", "integer", "number", "boolean", "null"]);
|
|
414
415
|
var OBSERVATION_POSTURES = vocabulary(["direct_readback", "approved_no_readback", "operator_mediated", "excluded"]);
|
|
@@ -782,9 +783,6 @@ var CEAL_OPERATION_AUTHORITY_POLICY_KEYS = Object.freeze(["access_group", "insta
|
|
|
782
783
|
var MAX_OPERATION_INPUT_RESOLVER_BINDINGS = 96;
|
|
783
784
|
var CEAL_OPERATION_DESCRIPTOR_REQUIRED_ENVELOPE_KEYS = Object.freeze(["schema_version", "id", "input_contract", "result_contract", "policy"]);
|
|
784
785
|
var CEAL_OPERATION_DESCRIPTOR_OPTIONAL_ENVELOPE_KEYS = Object.freeze(["input_resolution", "summary"]);
|
|
785
|
-
var CEAL_OPERATION_RESULT_KEYS = vocabulary(["ok", "operation_id", "operation_receipt", "schema_version", "value"]);
|
|
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"]);
|
|
788
786
|
|
|
789
787
|
// packages/ceal-client-protocol/src/operation-catalog.ts
|
|
790
788
|
var CEAL_OPERATION_CATALOG_SCHEMA_VERSION = "ceal.catalog.v3";
|
|
@@ -848,10 +846,6 @@ var CEAL_SCHEMA_LITERALS = [
|
|
|
848
846
|
"ceal.host_observation.v1",
|
|
849
847
|
"ceal.host_registration_request.v1",
|
|
850
848
|
"ceal.host_registration_result.v1",
|
|
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",
|
|
855
849
|
"ceal.operation_descriptor.v1",
|
|
856
850
|
"ceal.operation_error.v1",
|
|
857
851
|
"ceal.operation_failure.v1",
|
|
@@ -877,12 +871,6 @@ var CEAL_SCHEMA_LITERAL_SET = new Set(CEAL_SCHEMA_LITERALS);
|
|
|
877
871
|
// packages/ceal-client-protocol/src/bounded-series.ts
|
|
878
872
|
import { join } from "node:path";
|
|
879
873
|
var CEAL_BOUNDED_SERIES_CATALOG = Object.freeze({
|
|
880
|
-
usage_record: (root) => join(root, "run-usage.jsonl"),
|
|
881
|
-
control_commit: (root) => join(root, "control-auto-commit.jsonl"),
|
|
882
|
-
engagement_signal: (root) => join(root, "runtime-state", "slack-feedback.jsonl"),
|
|
883
|
-
runtime_error: (root) => join(root, "runtime-state", "runtime-errors.jsonl"),
|
|
884
|
-
turn_bridge_request: (root) => join(root, ".ceal", "turn-bridge", "requests.jsonl"),
|
|
885
|
-
thread_run_events: (root) => join(root, "run-events.jsonl"),
|
|
886
874
|
bounded_store_sidecar: (root) => `${root}.jsonl`,
|
|
887
875
|
gateway_audit_archive: (root) => `${root}.jsonl`,
|
|
888
876
|
gateway_access_group_connector_control_audit: (root) => `${root}.audit.jsonl`,
|
|
@@ -915,35 +903,6 @@ var CEAL_HOST_REGISTRATION_ATTEMPT_REF_PATTERN = new RegExp(`^host-registration-
|
|
|
915
903
|
var CEAL_HOST_INSTALLATION_REF_PATTERN = new RegExp(`^host-installation:${CEAL_LOWERCASE_UUID_PATTERN}$`, "u");
|
|
916
904
|
var CEAL_HOST_SOURCE_REF_PATTERN = new RegExp(`^host-source:${CEAL_LOWERCASE_UUID_PATTERN}$`, "u");
|
|
917
905
|
|
|
918
|
-
// packages/ceal-client-protocol/src/agent-session-handoff.ts
|
|
919
|
-
var CEAL_AGENT_ADMISSION_PHASES = vocabulary([
|
|
920
|
-
"incumbent_admitted",
|
|
921
|
-
"incumbent_draining",
|
|
922
|
-
"drained",
|
|
923
|
-
"candidate_admitted",
|
|
924
|
-
"candidate_draining",
|
|
925
|
-
"rollback_admitted"
|
|
926
|
-
]);
|
|
927
|
-
var CEAL_AGENT_SERVICE_SESSION_RECORD_KEYS = vocabulary([
|
|
928
|
-
"admission_fence",
|
|
929
|
-
"admission_state",
|
|
930
|
-
"admission_state_generation",
|
|
931
|
-
"bearer",
|
|
932
|
-
"consumer_ref",
|
|
933
|
-
"credential_generation",
|
|
934
|
-
"expires_at",
|
|
935
|
-
"gateway_instance",
|
|
936
|
-
"gateway_origin",
|
|
937
|
-
"gateway_serving_generation",
|
|
938
|
-
"issued_at",
|
|
939
|
-
"record_sha256",
|
|
940
|
-
"renew_after",
|
|
941
|
-
"renew_by",
|
|
942
|
-
"schema_version",
|
|
943
|
-
"session_revision"
|
|
944
|
-
]);
|
|
945
|
-
var CEAL_AGENT_SESSION_COMMIT_KEYS = vocabulary(["attempt_ref", "expected_session_revision", "session_revision"]);
|
|
946
|
-
|
|
947
906
|
// packages/ceal-client-protocol/src/operation-result-completeness.ts
|
|
948
907
|
var CEAL_READ_VALUE_CONTINUATION_KEYS = vocabulary(["continuation", "continuation_ref", "next_cursor"]);
|
|
949
908
|
|
|
@@ -954,7 +913,9 @@ var CEAL_OPERATION_INVOKE_COMMAND = "invoke";
|
|
|
954
913
|
var CEAL_OPERATION_INPUT_FLAG = "--input";
|
|
955
914
|
var CEAL_OPERATION_ID_PLACEHOLDER = "<operation-id>";
|
|
956
915
|
var CEAL_OPERATION_INPUT_PLACEHOLDER = "<json-object>";
|
|
957
|
-
var
|
|
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.`;
|
|
958
919
|
function shellSingleQuoted(value) {
|
|
959
920
|
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
960
921
|
}
|
|
@@ -986,19 +947,73 @@ var CEAL_VERIFIED_ARTIFACT_DESCRIPTOR_JSON_SCHEMA = Object.freeze({
|
|
|
986
947
|
}
|
|
987
948
|
});
|
|
988
949
|
|
|
950
|
+
// packages/ceal-client-protocol/src/provider-operation-vocabulary.ts
|
|
951
|
+
var CEAL_FILE_TYPE_FAMILIES = vocabulary(["all", "image", "pdf"]);
|
|
952
|
+
var CEAL_GITHUB_ISSUE_STATES = vocabulary(["open", "closed", "all"]);
|
|
953
|
+
var CEAL_NOTION_UPDATABLE_BLOCK_TYPES = vocabulary([
|
|
954
|
+
"paragraph",
|
|
955
|
+
"heading_1",
|
|
956
|
+
"heading_2",
|
|
957
|
+
"heading_3",
|
|
958
|
+
"bulleted_list_item",
|
|
959
|
+
"numbered_list_item",
|
|
960
|
+
"to_do",
|
|
961
|
+
"code"
|
|
962
|
+
]);
|
|
963
|
+
var CEAL_NOTION_NEUTRAL_TYPES = vocabulary([
|
|
964
|
+
"text",
|
|
965
|
+
"number",
|
|
966
|
+
"boolean",
|
|
967
|
+
"date",
|
|
968
|
+
"select",
|
|
969
|
+
"multi_select",
|
|
970
|
+
"people",
|
|
971
|
+
"url",
|
|
972
|
+
"email",
|
|
973
|
+
"phone",
|
|
974
|
+
"unsupported"
|
|
975
|
+
]);
|
|
976
|
+
var CEAL_NOTION_IDENTITY_GAP_REASONS = vocabulary([
|
|
977
|
+
"identity_unavailable",
|
|
978
|
+
"identity_stale",
|
|
979
|
+
"identity_ambiguous",
|
|
980
|
+
"identity_revoked",
|
|
981
|
+
"identity_unlinked"
|
|
982
|
+
]);
|
|
983
|
+
var CEAL_NOTION_STRING_VALUE_TYPES = vocabulary(["text", "select", "url", "email", "phone"]);
|
|
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
989
|
// packages/ceal-client-protocol/src/bare-document.ts
|
|
990
990
|
var REQUIRED_FIELDS = CEAL_CLIENT_WIRE_CONTRACT.command_response.bare_document_fields;
|
|
991
991
|
var OPTIONAL_FIELDS = CEAL_CLIENT_WIRE_CONTRACT.command_response.bare_document_optional_fields;
|
|
992
992
|
|
|
993
|
-
// packages/ceal-client-protocol/src/
|
|
994
|
-
var
|
|
995
|
-
var
|
|
996
|
-
var
|
|
997
|
-
var
|
|
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", "authored_by", "include_replies", "kinds", "container_ref", "container_refs", "container_names", "addressed_to_me", "unread"]);
|
|
997
|
+
var CEAL_RESOURCE_TIME_BASES = vocabulary(["created", "modified", "viewed"]);
|
|
998
998
|
var CEAL_REPOSITORY_VISIBILITIES = vocabulary(["public", "private", "internal"]);
|
|
999
|
-
var
|
|
1000
|
-
var
|
|
1001
|
-
|
|
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"]);
|
|
1002
1017
|
var CEAL_ACTIVITY_GAP_CODES = vocabulary([
|
|
1003
1018
|
"provider_page_budget",
|
|
1004
1019
|
"call_deadline",
|
|
@@ -1009,8 +1024,6 @@ var CEAL_ACTIVITY_GAP_CODES = vocabulary([
|
|
|
1009
1024
|
"unsupported_event_kind",
|
|
1010
1025
|
"direct_messages_excluded"
|
|
1011
1026
|
]);
|
|
1012
|
-
var CEAL_ACTIVITY_CONNECTOR_KINDS = vocabulary(["slack", "github", "google-calendar", "google-drive", "notion"]);
|
|
1013
|
-
var CEAL_ACTIVITY_COVERAGE_STATUSES = vocabulary(["complete_for_target", "continuation_required", "blocked"]);
|
|
1014
1027
|
var CEAL_ACTIVITY_EVENT_KINDS = vocabulary([
|
|
1015
1028
|
"slack.message",
|
|
1016
1029
|
"slack.reply",
|
|
@@ -1051,73 +1064,6 @@ var CEAL_ACTIVITY_EVENT_TIMESTAMP_BASIS_MAP = Object.freeze({
|
|
|
1051
1064
|
"notion.page.created": "page_created",
|
|
1052
1065
|
"notion.page.edited": "page_last_edited"
|
|
1053
1066
|
});
|
|
1054
|
-
var CEAL_ACTIVITY_TIMESTAMP_BASES = vocabulary([
|
|
1055
|
-
"message_created",
|
|
1056
|
-
"commit_authored",
|
|
1057
|
-
"resource_created",
|
|
1058
|
-
"review_submitted",
|
|
1059
|
-
"comment_created",
|
|
1060
|
-
"event_start",
|
|
1061
|
-
"all_day_start",
|
|
1062
|
-
"file_created",
|
|
1063
|
-
"file_modified",
|
|
1064
|
-
"file_modified_by_me",
|
|
1065
|
-
"file_viewed_by_me",
|
|
1066
|
-
"page_created",
|
|
1067
|
-
"page_last_edited",
|
|
1068
|
-
"resource_modified"
|
|
1069
|
-
]);
|
|
1070
|
-
var CEAL_ACTIVITY_V3_KINDS = vocabulary(["authored", "edited", "messaged", "responded"]);
|
|
1071
|
-
var CEAL_RESOURCE_TIME_BASES = vocabulary(["created", "modified", "viewed"]);
|
|
1072
|
-
var CEAL_RESOURCE_SEARCH_ORDERS = vocabulary(["relevance", "modified", "viewed", "created"]);
|
|
1073
|
-
var CEAL_RESOURCE_SEARCH_DIRECTIONS = vocabulary(["ascending", "descending"]);
|
|
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"]);
|
|
1075
|
-
var CEAL_ARTIFACT_STAGE_TERMINALS = vocabulary(["chunk_accepted", "artifact_ready", "idempotency_replayed"]);
|
|
1076
|
-
var CEAL_READ_ITEM_KINDS = vocabulary(["conversation", "identity", "usergroup", "message", "file", "document"]);
|
|
1077
|
-
var CEAL_LEASED_MESSAGE_SEARCH_COMPLETENESS = vocabulary(["complete", "continuation_available", "truncated"]);
|
|
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"]);
|
|
1080
|
-
var CEAL_WRITE_OBJECT_KINDS = vocabulary(["document", "comment", "cell_range"]);
|
|
1081
|
-
var CEAL_CONVERSATION_KINDS = vocabulary(["channel", "dm", "group"]);
|
|
1082
|
-
var CEAL_FILE_TYPE_FAMILIES = vocabulary(["all", "image", "pdf"]);
|
|
1083
|
-
var CEAL_GITHUB_ISSUE_STATES = vocabulary(["open", "closed", "all"]);
|
|
1084
|
-
var CEAL_NOTION_UPDATABLE_BLOCK_TYPES = vocabulary([
|
|
1085
|
-
"paragraph",
|
|
1086
|
-
"heading_1",
|
|
1087
|
-
"heading_2",
|
|
1088
|
-
"heading_3",
|
|
1089
|
-
"bulleted_list_item",
|
|
1090
|
-
"numbered_list_item",
|
|
1091
|
-
"to_do",
|
|
1092
|
-
"code"
|
|
1093
|
-
]);
|
|
1094
|
-
var CEAL_NOTION_NEUTRAL_TYPES = vocabulary([
|
|
1095
|
-
"text",
|
|
1096
|
-
"number",
|
|
1097
|
-
"boolean",
|
|
1098
|
-
"date",
|
|
1099
|
-
"select",
|
|
1100
|
-
"multi_select",
|
|
1101
|
-
"people",
|
|
1102
|
-
"url",
|
|
1103
|
-
"email",
|
|
1104
|
-
"phone",
|
|
1105
|
-
"unsupported"
|
|
1106
|
-
]);
|
|
1107
|
-
var CEAL_NOTION_IDENTITY_GAP_REASONS = vocabulary([
|
|
1108
|
-
"identity_unavailable",
|
|
1109
|
-
"identity_stale",
|
|
1110
|
-
"identity_ambiguous",
|
|
1111
|
-
"identity_revoked",
|
|
1112
|
-
"identity_unlinked"
|
|
1113
|
-
]);
|
|
1114
|
-
var CEAL_NOTION_STRING_VALUE_TYPES = vocabulary(["text", "select", "url", "email", "phone"]);
|
|
1115
|
-
var CEAL_UNREAD_REASONS = vocabulary(["blocked", "unavailable", "too_large", "unsupported", "download_failed", "permission_denied"]);
|
|
1116
|
-
var CEAL_PLAN_ITEM_STATUSES = vocabulary(["pending", "active", "completed"]);
|
|
1117
|
-
var CEAL_FINAL_PRESENTATION_INTENTS = vocabulary(["final", "stop", "transient_notice"]);
|
|
1118
|
-
var CEAL_PRESENTATION_INTENTS = vocabulary(["progress", ...CEAL_FINAL_PRESENTATION_INTENTS]);
|
|
1119
|
-
|
|
1120
|
-
// packages/ceal-client-protocol/src/resource-row.ts
|
|
1121
1067
|
var CEAL_DATED_NOTE_BASES = vocabulary(["recording", "calendar_event", "created_time"]);
|
|
1122
1068
|
var CEAL_DATED_NOTE_TRANSCRIPT_STATES = vocabulary(["present", "absent", "unestablished"]);
|
|
1123
1069
|
var CEAL_READ_SEARCH_COST_CLASSES = vocabulary(["native_index", "scan"]);
|
|
@@ -1126,6 +1072,7 @@ var RESOURCE_ROW_KEY_RULES = Object.freeze({
|
|
|
1126
1072
|
ref: { required: true, timestamp: false },
|
|
1127
1073
|
next: { required: true, timestamp: false },
|
|
1128
1074
|
kind: { required: true, timestamp: false },
|
|
1075
|
+
matched_kinds: { required: false, timestamp: false },
|
|
1129
1076
|
title: { required: true, timestamp: false },
|
|
1130
1077
|
container_label: { required: true, timestamp: false },
|
|
1131
1078
|
container_ref: { required: false, timestamp: false },
|
|
@@ -1202,17 +1149,6 @@ var CEAL_REFRESH_FAILURE_CODES = vocabulary([
|
|
|
1202
1149
|
"refresh_recovery_expired"
|
|
1203
1150
|
]);
|
|
1204
1151
|
|
|
1205
|
-
// packages/ceal-client-protocol/src/leased-artifact-contract.ts
|
|
1206
|
-
var CEAL_LEASED_CONSUMER_ARTIFACT_CHUNK_MAX_BYTES = 12 * 1024;
|
|
1207
|
-
|
|
1208
|
-
// packages/ceal-client-protocol/src/leased-resource-stream.ts
|
|
1209
|
-
var CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_MAGIC = new Uint8Array([67, 69, 65, 76, 82, 83, 50, 0]);
|
|
1210
|
-
var CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_RECORD_PREFIX_BYTES = 8;
|
|
1211
|
-
var CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_MAX_HEADER_BYTES = 16 * 1024;
|
|
1212
|
-
var CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_CHUNK_BYTES = 64 * 1024;
|
|
1213
|
-
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;
|
|
1214
|
-
var CEAL_ATTACHMENT_UNREAD_REASONS = vocabulary(["blocked", "unavailable", "too_large", "unsupported", "download_failed", "digest_mismatch"]);
|
|
1215
|
-
|
|
1216
1152
|
// packages/ceal-client-protocol/src/request-validation-primitives.ts
|
|
1217
1153
|
import { createHash as createHash2 } from "node:crypto";
|
|
1218
1154
|
var DIGEST = /^[a-f0-9]{64}$/u;
|
|
@@ -1379,6 +1315,10 @@ var CEAL_REQUEST_RUN_BATCH_JSON_SCHEMA = {
|
|
|
1379
1315
|
};
|
|
1380
1316
|
|
|
1381
1317
|
// packages/ceal-client-protocol/src/host-observation.ts
|
|
1318
|
+
var CEAL_HOST_INPUT_KINDS = vocabulary(["human", "host_automatic"]);
|
|
1319
|
+
function isCealHostInputKind(value) {
|
|
1320
|
+
return typeof value === "string" && CEAL_HOST_INPUT_KINDS.some((kind) => kind === value);
|
|
1321
|
+
}
|
|
1382
1322
|
var CEAL_HOST_OBSERVATION_REF_PREFIX = "host-observation:";
|
|
1383
1323
|
function validateCealHostObservationDraft(value) {
|
|
1384
1324
|
const record6 = operationRecord(value, "Ceal Host observation draft is invalid.");
|
|
@@ -1431,12 +1371,6 @@ var OWNER_WRITE_STATES = Object.freeze(["attempt_started", "provider_acknowledge
|
|
|
1431
1371
|
var OWNER_EFFECT_STATES = Object.freeze(["none", "applied", "failed", "unknown", "reconciled"]);
|
|
1432
1372
|
var OWNER_RECEIPT_STATES = Object.freeze(["pending", "available", "failed", "unknown", "reconciled"]);
|
|
1433
1373
|
|
|
1434
|
-
// packages/ceal-client-protocol/src/thread-excerpt.ts
|
|
1435
|
-
var CEAL_THREAD_RECENT_WINDOW = 6;
|
|
1436
|
-
var CEAL_THREAD_LAST_APP_MESSAGES_WINDOW = 3;
|
|
1437
|
-
var CEAL_THREAD_OLDER_SUMMARY_WINDOW = 4;
|
|
1438
|
-
var CEAL_FED_THREAD_MESSAGE_LIMIT = CEAL_THREAD_RECENT_WINDOW + CEAL_THREAD_OLDER_SUMMARY_WINDOW + CEAL_THREAD_LAST_APP_MESSAGES_WINDOW;
|
|
1439
|
-
|
|
1440
1374
|
// packages/ceal-client-protocol/src/request-graph-readiness.ts
|
|
1441
1375
|
var REQUEST_GRAPH_PRODUCER_TO_APPEND_SCHEMA = {
|
|
1442
1376
|
type: "object",
|
|
@@ -1523,27 +1457,22 @@ var CEAL_HOST_INVOCATION_AUTHENTICATION_RESULT_MAX_BYTES = new TextEncoder().enc
|
|
|
1523
1457
|
expires_at: (/* @__PURE__ */ new Date("+010000-01-01T00:00:00.000Z")).toISOString()
|
|
1524
1458
|
})}
|
|
1525
1459
|
`).byteLength;
|
|
1460
|
+
var CEAL_HOST_MINT_REQUEST_CONTEXT_REFUSAL_REASONS = vocabulary([
|
|
1461
|
+
"request_authority_unavailable",
|
|
1462
|
+
"request_missing",
|
|
1463
|
+
"authority_mismatch",
|
|
1464
|
+
"host_source_mismatch",
|
|
1465
|
+
"host_session_mismatch",
|
|
1466
|
+
"host_turn_mismatch",
|
|
1467
|
+
"host_input_mismatch",
|
|
1468
|
+
"host_prompt_mismatch"
|
|
1469
|
+
]);
|
|
1526
1470
|
|
|
1527
1471
|
// packages/ceal-client-protocol/src/client-result-materialization.ts
|
|
1472
|
+
var CEAL_UNREAD_REASONS = vocabulary(["blocked", "unavailable", "too_large", "unsupported", "download_failed", "permission_denied"]);
|
|
1528
1473
|
var CEAL_MODEL_VISIBLE_COMMAND_OUTPUT_MAX_BYTES = 32 * 1024;
|
|
1529
|
-
var REQUIRED_FIELDS2 = Object.freeze(["schema_version", "operation_id"]);
|
|
1530
|
-
var FIELDS = /* @__PURE__ */ new Set([...REQUIRED_FIELDS2, "
|
|
1531
|
-
|
|
1532
|
-
// packages/ceal-client-protocol/src/session-start-affordance.ts
|
|
1533
|
-
var CEAL_SESSION_ENTRY_INVOCATION = "ceal";
|
|
1534
|
-
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.`;
|
|
1535
|
-
|
|
1536
|
-
// packages/ceal-client-protocol/src/conversation-contracts.ts
|
|
1537
|
-
var CEAL_APPROVAL_POLICY_KINDS = vocabulary(["requester_only", "named_users", "role_based"]);
|
|
1538
|
-
var CEAL_APPROVAL_TARGET_KINDS = vocabulary([
|
|
1539
|
-
"repo_change",
|
|
1540
|
-
"investigation",
|
|
1541
|
-
"skill_creation",
|
|
1542
|
-
"command_creation",
|
|
1543
|
-
"connector_creation",
|
|
1544
|
-
"generic"
|
|
1545
|
-
]);
|
|
1546
|
-
var CEAL_PROGRESS_PHASES = vocabulary(["request_review", "information_gathering", "work_execution", "result_check"]);
|
|
1474
|
+
var REQUIRED_FIELDS2 = Object.freeze(["schema_version", "operation_id", "read_argv"]);
|
|
1475
|
+
var FIELDS = /* @__PURE__ */ new Set([...REQUIRED_FIELDS2, "local_result_root", "continue_argv", "model_disclosure"]);
|
|
1547
1476
|
|
|
1548
1477
|
// packages/ceal-client-protocol/src/gateway-cache-origin-validation.ts
|
|
1549
1478
|
var CEAL_MAX_CACHE_ORIGIN_AGE_MS = 30 * 24 * 60 * 60 * 1e3;
|
|
@@ -1899,13 +1828,13 @@ function validTurn(value) {
|
|
|
1899
1828
|
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);
|
|
1900
1829
|
}
|
|
1901
1830
|
function validInput(value) {
|
|
1902
|
-
return exactOptional(value, ["local_session_ref", "local_turn_ref", "local_input_ref", "origin_input", "observations"], ["
|
|
1831
|
+
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);
|
|
1903
1832
|
}
|
|
1904
1833
|
function validInputObservations(value) {
|
|
1905
1834
|
return validObservations(value) && Array.isArray(value) && value.filter((item) => record(item) && item.observation_kind === "prompt").length === 1;
|
|
1906
1835
|
}
|
|
1907
1836
|
function validInputOptionals(value) {
|
|
1908
|
-
return
|
|
1837
|
+
return optionalRefs(value.local_turn_aliases) && (value.context_expires_at === void 0 || timestamp(value.context_expires_at));
|
|
1909
1838
|
}
|
|
1910
1839
|
function validTerminal(value) {
|
|
1911
1840
|
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);
|
|
@@ -1916,9 +1845,6 @@ function validTerminalDisposition(state, reason) {
|
|
|
1916
1845
|
function validStatus(value) {
|
|
1917
1846
|
return exactOptional(value, ["status", "reason_code"], ["detail"]) && ["ready", "degraded", "stopping"].includes(String(value.status)) && safeRef(value.reason_code) && optionalText(value.detail, 4096);
|
|
1918
1847
|
}
|
|
1919
|
-
function validDecision(value) {
|
|
1920
|
-
return value === void 0 || record(value) && exactKeys(value, ["decision", "approval_ref"]) && (value.decision === "approved" || value.decision === "denied") && safeRef(value.approval_ref);
|
|
1921
|
-
}
|
|
1922
1848
|
function optionalText(value, maxLength) {
|
|
1923
1849
|
return value === void 0 || typeof value === "string" && value.length > 0 && value.length <= maxLength;
|
|
1924
1850
|
}
|
|
@@ -2102,7 +2028,15 @@ var HOST_RELAY_INVOCATION_MINT_REFUSAL_REASONS = vocabulary([
|
|
|
2102
2028
|
"deadline",
|
|
2103
2029
|
"cancelled",
|
|
2104
2030
|
"mint_failed",
|
|
2105
|
-
"relay_failed"
|
|
2031
|
+
"relay_failed",
|
|
2032
|
+
"request_authority_unavailable",
|
|
2033
|
+
"request_missing",
|
|
2034
|
+
"authority_mismatch",
|
|
2035
|
+
"host_source_mismatch",
|
|
2036
|
+
"host_session_mismatch",
|
|
2037
|
+
"host_turn_mismatch",
|
|
2038
|
+
"host_input_mismatch",
|
|
2039
|
+
"host_prompt_mismatch"
|
|
2106
2040
|
]);
|
|
2107
2041
|
var HOST_RELAY_INVOCATION_MINT_OUTCOMES = vocabulary(["completed", "caller_cancelled", "deadline", "failed", "no_binding"]);
|
|
2108
2042
|
var HOST_RELAY_EXCHANGE_FAILURES = vocabulary([
|
|
@@ -2242,6 +2176,7 @@ import { open as open3, mkdir as mkdir2, readdir, readFile, unlink as unlink2 }
|
|
|
2242
2176
|
import { join as join2 } from "node:path";
|
|
2243
2177
|
|
|
2244
2178
|
// host/claude/src/claude-types.ts
|
|
2179
|
+
var CLAUDE_HOOK_EVENTS = ["SessionStart", "UserPromptSubmit", "Stop", "StopFailure"];
|
|
2245
2180
|
var CLAUDE_HOST_ERROR_CODES = ["invalid_input", "storage", "configuration"];
|
|
2246
2181
|
function isClaudeHostErrorCode(value) {
|
|
2247
2182
|
return typeof value === "string" && CLAUDE_HOST_ERROR_CODES.some((code3) => code3 === value);
|
|
@@ -2257,6 +2192,9 @@ var ClaudeHostError = class extends Error {
|
|
|
2257
2192
|
this.code = code3;
|
|
2258
2193
|
}
|
|
2259
2194
|
};
|
|
2195
|
+
function isClaudeHookEvent(value) {
|
|
2196
|
+
return typeof value === "string" && CLAUDE_HOOK_EVENTS.some((event) => event === value);
|
|
2197
|
+
}
|
|
2260
2198
|
|
|
2261
2199
|
// host/invocation-context.ts
|
|
2262
2200
|
var HOST_INVOCATION_IDENTITY_KEYS = ["host_session_ref", "host_turn_ref", "host_source_ref"];
|
|
@@ -2457,10 +2395,7 @@ function validateBatch(value) {
|
|
|
2457
2395
|
}
|
|
2458
2396
|
}
|
|
2459
2397
|
function validBatchHeader(value) {
|
|
2460
|
-
return record4(value) && value.schema_version === CLAUDE_OUTBOX_SCHEMA && safeRef3(value.batch_ref) &&
|
|
2461
|
-
}
|
|
2462
|
-
function claudeEvent(value) {
|
|
2463
|
-
return typeof value === "string" && ["SessionStart", "UserPromptSubmit", "Stop", "StopFailure"].includes(value);
|
|
2398
|
+
return record4(value) && value.schema_version === CLAUDE_OUTBOX_SCHEMA && safeRef3(value.batch_ref) && isClaudeHookEvent(value.hook_event) && safeRef3(value.local_session_ref) && optionalRef(value.local_turn_ref) && timestamp3(value.occurred_at) && Array.isArray(value.frames) && value.frames.length > 0 && value.frames.length <= 3;
|
|
2464
2399
|
}
|
|
2465
2400
|
function hostFrameKind(value) {
|
|
2466
2401
|
return isHostProducerFrameKind(value);
|