@corca-org/ceal-host-win32-x64 1.0.16 → 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.
- package/bin/ceal-host.exe +0 -0
- package/libexec/ceal-host/claude-hook.mjs +75 -157
- package/libexec/ceal-host/claude-invocation-authentication.mjs +74 -159
- package/libexec/ceal-host/claude-producer.mjs +74 -159
- package/libexec/ceal-host/codex-hook.mjs +94 -277
- package/libexec/ceal-host/codex-invocation-authentication.mjs +87 -166
- package/libexec/ceal-host/codex-producer.mjs +87 -166
- package/libexec/ceal-host/control.mjs +102 -181
- package/libexec/ceal-host/relay.mjs +103 -172
- package/package.json +1 -1
- package/share/ceal-host/bundle-manifest.json +12 -12
- package/share/ceal-host/bundle-manifest.sigstore.json +1 -1
package/bin/ceal-host.exe
CHANGED
|
Binary file
|
|
@@ -236,7 +236,7 @@ var CEAL_GATEWAY_DERIVED_STORE_FAILURE_CLASSES = vocabulary(["storage_unavailabl
|
|
|
236
236
|
var CEAL_POLICY_DECISIONS = vocabulary(["allowed", "denied", "not_evaluated"]);
|
|
237
237
|
var CEAL_CONNECTOR_ROUTE_PHASES = vocabulary(["scope_observation", "target_selection", "route_resolution"]);
|
|
238
238
|
var CEAL_CONNECTOR_ROUTE_CAUSES = vocabulary(["provider_throttled", "provider_unavailable", "binding_invalid", "scope_limit_exceeded"]);
|
|
239
|
-
var CEAL_WRITE_SOURCE_KINDS = vocabulary(["authenticated_registered_client", "
|
|
239
|
+
var CEAL_WRITE_SOURCE_KINDS = vocabulary(["authenticated_registered_client", "provider_authenticated_event"]);
|
|
240
240
|
var CEAL_REFRESH_DELIVERIES = vocabulary(["initial", "recovery", "replay", "terminal_failure", "recovery_unavailable"]);
|
|
241
241
|
var CEAL_CLIENT_OPERATIONS = vocabulary(["handshake", "discover", "call", "readback"]);
|
|
242
242
|
var CEAL_WRITE_IDEMPOTENCY_POSTURES = vocabulary(["required", "optional", "not_required"]);
|
|
@@ -389,6 +389,7 @@ var CEAL_OPERATION_WITHHELD_CAUSES = vocabulary(["provider_permission", "access_
|
|
|
389
389
|
// packages/ceal-client-protocol/src/operation-contract-types.ts
|
|
390
390
|
var CEAL_JSON_SCHEMA_2020_12 = "https://json-schema.org/draft/2020-12/schema";
|
|
391
391
|
var CEAL_OPERATION_ERROR_SCHEMA_VERSION = "ceal.operation_error.v1";
|
|
392
|
+
var CEAL_ARTIFACT_STAGE_TERMINALS = vocabulary(["chunk_accepted", "artifact_ready", "idempotency_replayed"]);
|
|
392
393
|
var CEAL_RETRY_AFTER_MAX_MS = 60 * 60 * 1e3;
|
|
393
394
|
var CEAL_JSON_SCHEMA_TYPES = vocabulary(["object", "array", "string", "integer", "number", "boolean", "null"]);
|
|
394
395
|
var OBSERVATION_POSTURES = vocabulary(["direct_readback", "approved_no_readback", "operator_mediated", "excluded"]);
|
|
@@ -762,9 +763,6 @@ var CEAL_OPERATION_AUTHORITY_POLICY_KEYS = Object.freeze(["access_group", "insta
|
|
|
762
763
|
var MAX_OPERATION_INPUT_RESOLVER_BINDINGS = 96;
|
|
763
764
|
var CEAL_OPERATION_DESCRIPTOR_REQUIRED_ENVELOPE_KEYS = Object.freeze(["schema_version", "id", "input_contract", "result_contract", "policy"]);
|
|
764
765
|
var CEAL_OPERATION_DESCRIPTOR_OPTIONAL_ENVELOPE_KEYS = Object.freeze(["input_resolution", "summary"]);
|
|
765
|
-
var CEAL_OPERATION_RESULT_KEYS = vocabulary(["ok", "operation_id", "operation_receipt", "schema_version", "value"]);
|
|
766
|
-
var CEAL_OPERATION_COMPACT_RESULT_KEYS = vocabulary(["ok", "operation_evidence", "operation_id", "schema_version", "value"]);
|
|
767
|
-
var CEAL_OPERATION_RESULT_OPTIONAL_KEYS = vocabulary(["model_disclosure", "result_complete", "resume"]);
|
|
768
766
|
|
|
769
767
|
// packages/ceal-client-protocol/src/operation-catalog.ts
|
|
770
768
|
var CEAL_OPERATION_CATALOG_SCHEMA_VERSION = "ceal.catalog.v3";
|
|
@@ -828,10 +826,6 @@ var CEAL_SCHEMA_LITERALS = [
|
|
|
828
826
|
"ceal.host_observation.v1",
|
|
829
827
|
"ceal.host_registration_request.v1",
|
|
830
828
|
"ceal.host_registration_result.v1",
|
|
831
|
-
"ceal.leased-resource-stream.v1",
|
|
832
|
-
"ceal.leased_consumer_attachment_stream_frame.v1",
|
|
833
|
-
"ceal.leased_consumer_attachment_stream_request.v1",
|
|
834
|
-
"ceal.leased_consumer_attachment_stream_transport.v1",
|
|
835
829
|
"ceal.operation_descriptor.v1",
|
|
836
830
|
"ceal.operation_error.v1",
|
|
837
831
|
"ceal.operation_failure.v1",
|
|
@@ -857,12 +851,6 @@ var CEAL_SCHEMA_LITERAL_SET = new Set(CEAL_SCHEMA_LITERALS);
|
|
|
857
851
|
// packages/ceal-client-protocol/src/bounded-series.ts
|
|
858
852
|
import { join } from "node:path";
|
|
859
853
|
var CEAL_BOUNDED_SERIES_CATALOG = Object.freeze({
|
|
860
|
-
usage_record: (root) => join(root, "run-usage.jsonl"),
|
|
861
|
-
control_commit: (root) => join(root, "control-auto-commit.jsonl"),
|
|
862
|
-
engagement_signal: (root) => join(root, "runtime-state", "slack-feedback.jsonl"),
|
|
863
|
-
runtime_error: (root) => join(root, "runtime-state", "runtime-errors.jsonl"),
|
|
864
|
-
turn_bridge_request: (root) => join(root, ".ceal", "turn-bridge", "requests.jsonl"),
|
|
865
|
-
thread_run_events: (root) => join(root, "run-events.jsonl"),
|
|
866
854
|
bounded_store_sidecar: (root) => `${root}.jsonl`,
|
|
867
855
|
gateway_audit_archive: (root) => `${root}.jsonl`,
|
|
868
856
|
gateway_access_group_connector_control_audit: (root) => `${root}.audit.jsonl`,
|
|
@@ -895,35 +883,6 @@ var CEAL_HOST_REGISTRATION_ATTEMPT_REF_PATTERN = new RegExp(`^host-registration-
|
|
|
895
883
|
var CEAL_HOST_INSTALLATION_REF_PATTERN = new RegExp(`^host-installation:${CEAL_LOWERCASE_UUID_PATTERN}$`, "u");
|
|
896
884
|
var CEAL_HOST_SOURCE_REF_PATTERN = new RegExp(`^host-source:${CEAL_LOWERCASE_UUID_PATTERN}$`, "u");
|
|
897
885
|
|
|
898
|
-
// packages/ceal-client-protocol/src/agent-session-handoff.ts
|
|
899
|
-
var CEAL_AGENT_ADMISSION_PHASES = vocabulary([
|
|
900
|
-
"incumbent_admitted",
|
|
901
|
-
"incumbent_draining",
|
|
902
|
-
"drained",
|
|
903
|
-
"candidate_admitted",
|
|
904
|
-
"candidate_draining",
|
|
905
|
-
"rollback_admitted"
|
|
906
|
-
]);
|
|
907
|
-
var CEAL_AGENT_SERVICE_SESSION_RECORD_KEYS = vocabulary([
|
|
908
|
-
"admission_fence",
|
|
909
|
-
"admission_state",
|
|
910
|
-
"admission_state_generation",
|
|
911
|
-
"bearer",
|
|
912
|
-
"consumer_ref",
|
|
913
|
-
"credential_generation",
|
|
914
|
-
"expires_at",
|
|
915
|
-
"gateway_instance",
|
|
916
|
-
"gateway_origin",
|
|
917
|
-
"gateway_serving_generation",
|
|
918
|
-
"issued_at",
|
|
919
|
-
"record_sha256",
|
|
920
|
-
"renew_after",
|
|
921
|
-
"renew_by",
|
|
922
|
-
"schema_version",
|
|
923
|
-
"session_revision"
|
|
924
|
-
]);
|
|
925
|
-
var CEAL_AGENT_SESSION_COMMIT_KEYS = vocabulary(["attempt_ref", "expected_session_revision", "session_revision"]);
|
|
926
|
-
|
|
927
886
|
// packages/ceal-client-protocol/src/operation-result-completeness.ts
|
|
928
887
|
var CEAL_READ_VALUE_CONTINUATION_KEYS = vocabulary(["continuation", "continuation_ref", "next_cursor"]);
|
|
929
888
|
|
|
@@ -934,7 +893,9 @@ var CEAL_OPERATION_INVOKE_COMMAND = "invoke";
|
|
|
934
893
|
var CEAL_OPERATION_INPUT_FLAG = "--input";
|
|
935
894
|
var CEAL_OPERATION_ID_PLACEHOLDER = "<operation-id>";
|
|
936
895
|
var CEAL_OPERATION_INPUT_PLACEHOLDER = "<json-object>";
|
|
937
|
-
var
|
|
896
|
+
var MODEL_INVOCATION_BASE_ARGUMENTS = [CEAL_OPERATION_INVOKE_COMMAND, CEAL_OPERATION_ID_PLACEHOLDER].join(" ");
|
|
897
|
+
var CEAL_MODEL_INVOCATION_ARGUMENTS = [MODEL_INVOCATION_BASE_ARGUMENTS, CEAL_OPERATION_INPUT_FLAG, shellSingleQuoted(CEAL_OPERATION_INPUT_PLACEHOLDER)].join(" ");
|
|
898
|
+
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.`;
|
|
938
899
|
function shellSingleQuoted(value) {
|
|
939
900
|
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
940
901
|
}
|
|
@@ -966,19 +927,73 @@ var CEAL_VERIFIED_ARTIFACT_DESCRIPTOR_JSON_SCHEMA = Object.freeze({
|
|
|
966
927
|
}
|
|
967
928
|
});
|
|
968
929
|
|
|
930
|
+
// packages/ceal-client-protocol/src/provider-operation-vocabulary.ts
|
|
931
|
+
var CEAL_FILE_TYPE_FAMILIES = vocabulary(["all", "image", "pdf"]);
|
|
932
|
+
var CEAL_GITHUB_ISSUE_STATES = vocabulary(["open", "closed", "all"]);
|
|
933
|
+
var CEAL_NOTION_UPDATABLE_BLOCK_TYPES = vocabulary([
|
|
934
|
+
"paragraph",
|
|
935
|
+
"heading_1",
|
|
936
|
+
"heading_2",
|
|
937
|
+
"heading_3",
|
|
938
|
+
"bulleted_list_item",
|
|
939
|
+
"numbered_list_item",
|
|
940
|
+
"to_do",
|
|
941
|
+
"code"
|
|
942
|
+
]);
|
|
943
|
+
var CEAL_NOTION_NEUTRAL_TYPES = vocabulary([
|
|
944
|
+
"text",
|
|
945
|
+
"number",
|
|
946
|
+
"boolean",
|
|
947
|
+
"date",
|
|
948
|
+
"select",
|
|
949
|
+
"multi_select",
|
|
950
|
+
"people",
|
|
951
|
+
"url",
|
|
952
|
+
"email",
|
|
953
|
+
"phone",
|
|
954
|
+
"unsupported"
|
|
955
|
+
]);
|
|
956
|
+
var CEAL_NOTION_IDENTITY_GAP_REASONS = vocabulary([
|
|
957
|
+
"identity_unavailable",
|
|
958
|
+
"identity_stale",
|
|
959
|
+
"identity_ambiguous",
|
|
960
|
+
"identity_revoked",
|
|
961
|
+
"identity_unlinked"
|
|
962
|
+
]);
|
|
963
|
+
var CEAL_NOTION_STRING_VALUE_TYPES = vocabulary(["text", "select", "url", "email", "phone"]);
|
|
964
|
+
|
|
965
|
+
// packages/ceal-client-protocol/src/opaque-reference.ts
|
|
966
|
+
var CEAL_OPAQUE_HANDLE_KINDS = vocabulary(["target", "message", "thread", "artifact", "document", "block", "object"]);
|
|
967
|
+
var CEAL_OPAQUE_REF_KINDS = vocabulary([...CEAL_OPAQUE_HANDLE_KINDS, "result", "operation-receipt", "reply-receipt", "field", "notion-data-source"]);
|
|
968
|
+
|
|
969
969
|
// packages/ceal-client-protocol/src/bare-document.ts
|
|
970
970
|
var REQUIRED_FIELDS = CEAL_CLIENT_WIRE_CONTRACT.command_response.bare_document_fields;
|
|
971
971
|
var OPTIONAL_FIELDS = CEAL_CLIENT_WIRE_CONTRACT.command_response.bare_document_optional_fields;
|
|
972
972
|
|
|
973
|
-
// packages/ceal-client-protocol/src/
|
|
974
|
-
var
|
|
975
|
-
var
|
|
976
|
-
var
|
|
977
|
-
var
|
|
973
|
+
// packages/ceal-client-protocol/src/resource-row.ts
|
|
974
|
+
var CEAL_RESOURCE_SEARCH_ORDERS = vocabulary(["relevance", "modified", "viewed", "created"]);
|
|
975
|
+
var CEAL_RESOURCE_SEARCH_DIRECTIONS = vocabulary(["ascending", "descending"]);
|
|
976
|
+
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"]);
|
|
977
|
+
var CEAL_RESOURCE_TIME_BASES = vocabulary(["created", "modified", "viewed"]);
|
|
978
978
|
var CEAL_REPOSITORY_VISIBILITIES = vocabulary(["public", "private", "internal"]);
|
|
979
|
-
var
|
|
980
|
-
var
|
|
981
|
-
|
|
979
|
+
var CEAL_ACTIVITY_V3_KINDS = vocabulary(["authored", "edited", "messaged", "responded"]);
|
|
980
|
+
var CEAL_ACTIVITY_TIMESTAMP_BASES = vocabulary([
|
|
981
|
+
"message_created",
|
|
982
|
+
"commit_authored",
|
|
983
|
+
"resource_created",
|
|
984
|
+
"review_submitted",
|
|
985
|
+
"comment_created",
|
|
986
|
+
"event_start",
|
|
987
|
+
"all_day_start",
|
|
988
|
+
"file_created",
|
|
989
|
+
"file_modified",
|
|
990
|
+
"file_modified_by_me",
|
|
991
|
+
"file_viewed_by_me",
|
|
992
|
+
"page_created",
|
|
993
|
+
"page_last_edited",
|
|
994
|
+
"resource_modified"
|
|
995
|
+
]);
|
|
996
|
+
var CEAL_ACTIVITY_CONNECTOR_KINDS = vocabulary(["slack", "github", "google-calendar", "google-drive", "notion"]);
|
|
982
997
|
var CEAL_ACTIVITY_GAP_CODES = vocabulary([
|
|
983
998
|
"provider_page_budget",
|
|
984
999
|
"call_deadline",
|
|
@@ -989,8 +1004,6 @@ var CEAL_ACTIVITY_GAP_CODES = vocabulary([
|
|
|
989
1004
|
"unsupported_event_kind",
|
|
990
1005
|
"direct_messages_excluded"
|
|
991
1006
|
]);
|
|
992
|
-
var CEAL_ACTIVITY_CONNECTOR_KINDS = vocabulary(["slack", "github", "google-calendar", "google-drive", "notion"]);
|
|
993
|
-
var CEAL_ACTIVITY_COVERAGE_STATUSES = vocabulary(["complete_for_target", "continuation_required", "blocked"]);
|
|
994
1007
|
var CEAL_ACTIVITY_EVENT_KINDS = vocabulary([
|
|
995
1008
|
"slack.message",
|
|
996
1009
|
"slack.reply",
|
|
@@ -1031,73 +1044,6 @@ var CEAL_ACTIVITY_EVENT_TIMESTAMP_BASIS_MAP = Object.freeze({
|
|
|
1031
1044
|
"notion.page.created": "page_created",
|
|
1032
1045
|
"notion.page.edited": "page_last_edited"
|
|
1033
1046
|
});
|
|
1034
|
-
var CEAL_ACTIVITY_TIMESTAMP_BASES = vocabulary([
|
|
1035
|
-
"message_created",
|
|
1036
|
-
"commit_authored",
|
|
1037
|
-
"resource_created",
|
|
1038
|
-
"review_submitted",
|
|
1039
|
-
"comment_created",
|
|
1040
|
-
"event_start",
|
|
1041
|
-
"all_day_start",
|
|
1042
|
-
"file_created",
|
|
1043
|
-
"file_modified",
|
|
1044
|
-
"file_modified_by_me",
|
|
1045
|
-
"file_viewed_by_me",
|
|
1046
|
-
"page_created",
|
|
1047
|
-
"page_last_edited",
|
|
1048
|
-
"resource_modified"
|
|
1049
|
-
]);
|
|
1050
|
-
var CEAL_ACTIVITY_V3_KINDS = vocabulary(["authored", "edited", "messaged", "responded"]);
|
|
1051
|
-
var CEAL_RESOURCE_TIME_BASES = vocabulary(["created", "modified", "viewed"]);
|
|
1052
|
-
var CEAL_RESOURCE_SEARCH_ORDERS = vocabulary(["relevance", "modified", "viewed", "created"]);
|
|
1053
|
-
var CEAL_RESOURCE_SEARCH_DIRECTIONS = vocabulary(["ascending", "descending"]);
|
|
1054
|
-
var CEAL_RESOURCE_SEARCH_FILTERS = vocabulary(["query", "modified_since", "since", "until", "authored_by_me", "include_replies", "kinds", "container_ref", "container_refs", "container_names", "addressed_to_me", "unread"]);
|
|
1055
|
-
var CEAL_ARTIFACT_STAGE_TERMINALS = vocabulary(["chunk_accepted", "artifact_ready", "idempotency_replayed"]);
|
|
1056
|
-
var CEAL_READ_ITEM_KINDS = vocabulary(["conversation", "identity", "usergroup", "message", "file", "document"]);
|
|
1057
|
-
var CEAL_LEASED_MESSAGE_SEARCH_COMPLETENESS = vocabulary(["complete", "continuation_available", "truncated"]);
|
|
1058
|
-
var CEAL_OPAQUE_HANDLE_KINDS = vocabulary(["target", "message", "thread", "artifact", "document", "block", "object"]);
|
|
1059
|
-
var CEAL_OPAQUE_REF_KINDS = vocabulary([...CEAL_OPAQUE_HANDLE_KINDS, "result", "operation-receipt", "reply-receipt", "field", "notion-data-source"]);
|
|
1060
|
-
var CEAL_WRITE_OBJECT_KINDS = vocabulary(["document", "comment", "cell_range"]);
|
|
1061
|
-
var CEAL_CONVERSATION_KINDS = vocabulary(["channel", "dm", "group"]);
|
|
1062
|
-
var CEAL_FILE_TYPE_FAMILIES = vocabulary(["all", "image", "pdf"]);
|
|
1063
|
-
var CEAL_GITHUB_ISSUE_STATES = vocabulary(["open", "closed", "all"]);
|
|
1064
|
-
var CEAL_NOTION_UPDATABLE_BLOCK_TYPES = vocabulary([
|
|
1065
|
-
"paragraph",
|
|
1066
|
-
"heading_1",
|
|
1067
|
-
"heading_2",
|
|
1068
|
-
"heading_3",
|
|
1069
|
-
"bulleted_list_item",
|
|
1070
|
-
"numbered_list_item",
|
|
1071
|
-
"to_do",
|
|
1072
|
-
"code"
|
|
1073
|
-
]);
|
|
1074
|
-
var CEAL_NOTION_NEUTRAL_TYPES = vocabulary([
|
|
1075
|
-
"text",
|
|
1076
|
-
"number",
|
|
1077
|
-
"boolean",
|
|
1078
|
-
"date",
|
|
1079
|
-
"select",
|
|
1080
|
-
"multi_select",
|
|
1081
|
-
"people",
|
|
1082
|
-
"url",
|
|
1083
|
-
"email",
|
|
1084
|
-
"phone",
|
|
1085
|
-
"unsupported"
|
|
1086
|
-
]);
|
|
1087
|
-
var CEAL_NOTION_IDENTITY_GAP_REASONS = vocabulary([
|
|
1088
|
-
"identity_unavailable",
|
|
1089
|
-
"identity_stale",
|
|
1090
|
-
"identity_ambiguous",
|
|
1091
|
-
"identity_revoked",
|
|
1092
|
-
"identity_unlinked"
|
|
1093
|
-
]);
|
|
1094
|
-
var CEAL_NOTION_STRING_VALUE_TYPES = vocabulary(["text", "select", "url", "email", "phone"]);
|
|
1095
|
-
var CEAL_UNREAD_REASONS = vocabulary(["blocked", "unavailable", "too_large", "unsupported", "download_failed", "permission_denied"]);
|
|
1096
|
-
var CEAL_PLAN_ITEM_STATUSES = vocabulary(["pending", "active", "completed"]);
|
|
1097
|
-
var CEAL_FINAL_PRESENTATION_INTENTS = vocabulary(["final", "stop", "transient_notice"]);
|
|
1098
|
-
var CEAL_PRESENTATION_INTENTS = vocabulary(["progress", ...CEAL_FINAL_PRESENTATION_INTENTS]);
|
|
1099
|
-
|
|
1100
|
-
// packages/ceal-client-protocol/src/resource-row.ts
|
|
1101
1047
|
var CEAL_DATED_NOTE_BASES = vocabulary(["recording", "calendar_event", "created_time"]);
|
|
1102
1048
|
var CEAL_DATED_NOTE_TRANSCRIPT_STATES = vocabulary(["present", "absent", "unestablished"]);
|
|
1103
1049
|
var CEAL_READ_SEARCH_COST_CLASSES = vocabulary(["native_index", "scan"]);
|
|
@@ -1182,17 +1128,6 @@ var CEAL_REFRESH_FAILURE_CODES = vocabulary([
|
|
|
1182
1128
|
"refresh_recovery_expired"
|
|
1183
1129
|
]);
|
|
1184
1130
|
|
|
1185
|
-
// packages/ceal-client-protocol/src/leased-artifact-contract.ts
|
|
1186
|
-
var CEAL_LEASED_CONSUMER_ARTIFACT_CHUNK_MAX_BYTES = 12 * 1024;
|
|
1187
|
-
|
|
1188
|
-
// packages/ceal-client-protocol/src/leased-resource-stream.ts
|
|
1189
|
-
var CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_MAGIC = new Uint8Array([67, 69, 65, 76, 82, 83, 50, 0]);
|
|
1190
|
-
var CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_RECORD_PREFIX_BYTES = 8;
|
|
1191
|
-
var CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_MAX_HEADER_BYTES = 16 * 1024;
|
|
1192
|
-
var CEAL_LEASED_CONSUMER_ATTACHMENT_STREAM_CHUNK_BYTES = 64 * 1024;
|
|
1193
|
-
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;
|
|
1194
|
-
var CEAL_ATTACHMENT_UNREAD_REASONS = vocabulary(["blocked", "unavailable", "too_large", "unsupported", "download_failed", "digest_mismatch"]);
|
|
1195
|
-
|
|
1196
1131
|
// packages/ceal-client-protocol/src/request-validation-primitives.ts
|
|
1197
1132
|
import { createHash } from "node:crypto";
|
|
1198
1133
|
var DIGEST = /^[a-f0-9]{64}$/u;
|
|
@@ -1359,6 +1294,10 @@ var CEAL_REQUEST_RUN_BATCH_JSON_SCHEMA = {
|
|
|
1359
1294
|
};
|
|
1360
1295
|
|
|
1361
1296
|
// packages/ceal-client-protocol/src/host-observation.ts
|
|
1297
|
+
var CEAL_HOST_INPUT_KINDS = vocabulary(["human", "host_automatic"]);
|
|
1298
|
+
function isCealHostInputKind(value) {
|
|
1299
|
+
return typeof value === "string" && CEAL_HOST_INPUT_KINDS.some((kind) => kind === value);
|
|
1300
|
+
}
|
|
1362
1301
|
var CEAL_HOST_OBSERVATION_REF_PREFIX = "host-observation:";
|
|
1363
1302
|
var HOST_OBSERVATION_PRODUCER = /^[a-z][a-z0-9]{0,31}$/u;
|
|
1364
1303
|
var HOST_OBSERVATION_DIGEST = /^[a-f0-9]{8,64}$/u;
|
|
@@ -1421,12 +1360,6 @@ var OWNER_WRITE_STATES = Object.freeze(["attempt_started", "provider_acknowledge
|
|
|
1421
1360
|
var OWNER_EFFECT_STATES = Object.freeze(["none", "applied", "failed", "unknown", "reconciled"]);
|
|
1422
1361
|
var OWNER_RECEIPT_STATES = Object.freeze(["pending", "available", "failed", "unknown", "reconciled"]);
|
|
1423
1362
|
|
|
1424
|
-
// packages/ceal-client-protocol/src/thread-excerpt.ts
|
|
1425
|
-
var CEAL_THREAD_RECENT_WINDOW = 6;
|
|
1426
|
-
var CEAL_THREAD_LAST_APP_MESSAGES_WINDOW = 3;
|
|
1427
|
-
var CEAL_THREAD_OLDER_SUMMARY_WINDOW = 4;
|
|
1428
|
-
var CEAL_FED_THREAD_MESSAGE_LIMIT = CEAL_THREAD_RECENT_WINDOW + CEAL_THREAD_OLDER_SUMMARY_WINDOW + CEAL_THREAD_LAST_APP_MESSAGES_WINDOW;
|
|
1429
|
-
|
|
1430
1363
|
// packages/ceal-client-protocol/src/request-graph-readiness.ts
|
|
1431
1364
|
var REQUEST_GRAPH_PRODUCER_TO_APPEND_SCHEMA = {
|
|
1432
1365
|
type: "object",
|
|
@@ -1515,25 +1448,13 @@ var CEAL_HOST_INVOCATION_AUTHENTICATION_RESULT_MAX_BYTES = new TextEncoder().enc
|
|
|
1515
1448
|
`).byteLength;
|
|
1516
1449
|
|
|
1517
1450
|
// packages/ceal-client-protocol/src/client-result-materialization.ts
|
|
1451
|
+
var CEAL_UNREAD_REASONS = vocabulary(["blocked", "unavailable", "too_large", "unsupported", "download_failed", "permission_denied"]);
|
|
1518
1452
|
var CEAL_MODEL_VISIBLE_COMMAND_OUTPUT_MAX_BYTES = 32 * 1024;
|
|
1519
1453
|
var REQUIRED_FIELDS2 = Object.freeze(["schema_version", "operation_id"]);
|
|
1520
1454
|
var FIELDS = /* @__PURE__ */ new Set([...REQUIRED_FIELDS2, "read_argv", "local_result_root", "continue_argv", "model_disclosure", "item_read_argv"]);
|
|
1521
1455
|
|
|
1522
1456
|
// packages/ceal-client-protocol/src/session-start-affordance.ts
|
|
1523
1457
|
var CEAL_SESSION_ENTRY_INVOCATION = "ceal";
|
|
1524
|
-
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.`;
|
|
1525
|
-
|
|
1526
|
-
// packages/ceal-client-protocol/src/conversation-contracts.ts
|
|
1527
|
-
var CEAL_APPROVAL_POLICY_KINDS = vocabulary(["requester_only", "named_users", "role_based"]);
|
|
1528
|
-
var CEAL_APPROVAL_TARGET_KINDS = vocabulary([
|
|
1529
|
-
"repo_change",
|
|
1530
|
-
"investigation",
|
|
1531
|
-
"skill_creation",
|
|
1532
|
-
"command_creation",
|
|
1533
|
-
"connector_creation",
|
|
1534
|
-
"generic"
|
|
1535
|
-
]);
|
|
1536
|
-
var CEAL_PROGRESS_PHASES = vocabulary(["request_review", "information_gathering", "work_execution", "result_check"]);
|
|
1537
1458
|
|
|
1538
1459
|
// packages/ceal-client-protocol/src/gateway-cache-origin-validation.ts
|
|
1539
1460
|
var CEAL_MAX_CACHE_ORIGIN_AGE_MS = 30 * 24 * 60 * 60 * 1e3;
|
|
@@ -1805,13 +1726,13 @@ function validTurn(value) {
|
|
|
1805
1726
|
return exactOptional(value, ["local_session_ref", "local_turn_ref"], ["model", "observations"]) && safeRef(value.local_session_ref) && safeRef(value.local_turn_ref) && optionalText2(value.model, 256) && validObservations(value.observations);
|
|
1806
1727
|
}
|
|
1807
1728
|
function validInput(value) {
|
|
1808
|
-
return exactOptional(value, ["local_session_ref", "local_turn_ref", "local_input_ref", "origin_input", "observations"], ["
|
|
1729
|
+
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);
|
|
1809
1730
|
}
|
|
1810
1731
|
function validInputObservations(value) {
|
|
1811
1732
|
return validObservations(value) && Array.isArray(value) && value.filter((item) => record2(item) && item.observation_kind === "prompt").length === 1;
|
|
1812
1733
|
}
|
|
1813
1734
|
function validInputOptionals(value) {
|
|
1814
|
-
return
|
|
1735
|
+
return optionalRefs(value.local_turn_aliases) && (value.context_expires_at === void 0 || timestamp(value.context_expires_at));
|
|
1815
1736
|
}
|
|
1816
1737
|
function validTerminal(value) {
|
|
1817
1738
|
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);
|
|
@@ -1822,9 +1743,6 @@ function validTerminalDisposition(state, reason) {
|
|
|
1822
1743
|
function validStatus(value) {
|
|
1823
1744
|
return exactOptional(value, ["status", "reason_code"], ["detail"]) && ["ready", "degraded", "stopping"].includes(String(value.status)) && safeRef(value.reason_code) && optionalText2(value.detail, 4096);
|
|
1824
1745
|
}
|
|
1825
|
-
function validDecision(value) {
|
|
1826
|
-
return value === void 0 || record2(value) && exactKeys(value, ["decision", "approval_ref"]) && (value.decision === "approved" || value.decision === "denied") && safeRef(value.approval_ref);
|
|
1827
|
-
}
|
|
1828
1746
|
function optionalText2(value, maxLength) {
|
|
1829
1747
|
return value === void 0 || typeof value === "string" && value.length > 0 && value.length <= maxLength;
|
|
1830
1748
|
}
|
|
@@ -2474,7 +2392,7 @@ function inputFrames(input, at) {
|
|
|
2474
2392
|
const promptDigest = createHash3("sha256").update(input.prompt, "utf8").digest("hex");
|
|
2475
2393
|
const turn = obs("turn", turnRef, at, { status: "started", prompt_id_sha256: createHash3("sha256").update(input.prompt_id, "utf8").digest("hex"), effort: input.effort?.level ?? "unavailable" });
|
|
2476
2394
|
const prompt = obs("prompt", claudeLocalInputRef(input.session_id, input.prompt_id), at, { body_sha256: promptDigest });
|
|
2477
|
-
return [{ frame_kind: "turn_started", payload: { local_session_ref: sessionRef, local_turn_ref: turnRef, observations: [turn] } }, { frame_kind: "user_input", payload: compact({ local_session_ref: sessionRef, local_turn_ref: turnRef, local_input_ref: claudeLocalInputRef(input.session_id, input.prompt_id), origin_input: true, local_turn_aliases: [safeAlias(input.prompt_id)], context_expires_at: new Date(Date.parse(at) + 24 * 60 * 60 * 1e3).toISOString(), observations: [prompt] }) }];
|
|
2395
|
+
return [{ frame_kind: "turn_started", payload: { local_session_ref: sessionRef, local_turn_ref: turnRef, observations: [turn] } }, { frame_kind: "user_input", payload: compact({ local_session_ref: sessionRef, local_turn_ref: turnRef, local_input_ref: claudeLocalInputRef(input.session_id, input.prompt_id), input_kind: "human", origin_input: true, local_turn_aliases: [safeAlias(input.prompt_id)], context_expires_at: new Date(Date.parse(at) + 24 * 60 * 60 * 1e3).toISOString(), observations: [prompt] }) }];
|
|
2478
2396
|
}
|
|
2479
2397
|
function terminalFrames(input, at) {
|
|
2480
2398
|
const sessionRef = claudeLocalSessionRef(input.session_id);
|