@corca-org/ceal-host-darwin-arm64 1.0.17 → 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 CHANGED
Binary file
@@ -973,7 +973,7 @@ var OPTIONAL_FIELDS = CEAL_CLIENT_WIRE_CONTRACT.command_response.bare_document_o
973
973
  // packages/ceal-client-protocol/src/resource-row.ts
974
974
  var CEAL_RESOURCE_SEARCH_ORDERS = vocabulary(["relevance", "modified", "viewed", "created"]);
975
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"]);
976
+ 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"]);
977
977
  var CEAL_RESOURCE_TIME_BASES = vocabulary(["created", "modified", "viewed"]);
978
978
  var CEAL_REPOSITORY_VISIBILITIES = vocabulary(["public", "private", "internal"]);
979
979
  var CEAL_ACTIVITY_V3_KINDS = vocabulary(["authored", "edited", "messaged", "responded"]);
@@ -1052,6 +1052,7 @@ var RESOURCE_ROW_KEY_RULES = Object.freeze({
1052
1052
  ref: { required: true, timestamp: false },
1053
1053
  next: { required: true, timestamp: false },
1054
1054
  kind: { required: true, timestamp: false },
1055
+ matched_kinds: { required: false, timestamp: false },
1055
1056
  title: { required: true, timestamp: false },
1056
1057
  container_label: { required: true, timestamp: false },
1057
1058
  container_ref: { required: false, timestamp: false },
@@ -1446,12 +1447,22 @@ var CEAL_HOST_INVOCATION_AUTHENTICATION_RESULT_MAX_BYTES = new TextEncoder().enc
1446
1447
  expires_at: (/* @__PURE__ */ new Date("+010000-01-01T00:00:00.000Z")).toISOString()
1447
1448
  })}
1448
1449
  `).byteLength;
1450
+ var CEAL_HOST_MINT_REQUEST_CONTEXT_REFUSAL_REASONS = vocabulary([
1451
+ "request_authority_unavailable",
1452
+ "request_missing",
1453
+ "authority_mismatch",
1454
+ "host_source_mismatch",
1455
+ "host_session_mismatch",
1456
+ "host_turn_mismatch",
1457
+ "host_input_mismatch",
1458
+ "host_prompt_mismatch"
1459
+ ]);
1449
1460
 
1450
1461
  // packages/ceal-client-protocol/src/client-result-materialization.ts
1451
1462
  var CEAL_UNREAD_REASONS = vocabulary(["blocked", "unavailable", "too_large", "unsupported", "download_failed", "permission_denied"]);
1452
1463
  var CEAL_MODEL_VISIBLE_COMMAND_OUTPUT_MAX_BYTES = 32 * 1024;
1453
- var REQUIRED_FIELDS2 = Object.freeze(["schema_version", "operation_id"]);
1454
- var FIELDS = /* @__PURE__ */ new Set([...REQUIRED_FIELDS2, "read_argv", "local_result_root", "continue_argv", "model_disclosure", "item_read_argv"]);
1464
+ var REQUIRED_FIELDS2 = Object.freeze(["schema_version", "operation_id", "read_argv"]);
1465
+ var FIELDS = /* @__PURE__ */ new Set([...REQUIRED_FIELDS2, "local_result_root", "continue_argv", "model_disclosure"]);
1455
1466
 
1456
1467
  // packages/ceal-client-protocol/src/session-start-affordance.ts
1457
1468
  var CEAL_SESSION_ENTRY_INVOCATION = "ceal";
@@ -1928,7 +1939,15 @@ var HOST_RELAY_INVOCATION_MINT_REFUSAL_REASONS = vocabulary([
1928
1939
  "deadline",
1929
1940
  "cancelled",
1930
1941
  "mint_failed",
1931
- "relay_failed"
1942
+ "relay_failed",
1943
+ "request_authority_unavailable",
1944
+ "request_missing",
1945
+ "authority_mismatch",
1946
+ "host_source_mismatch",
1947
+ "host_session_mismatch",
1948
+ "host_turn_mismatch",
1949
+ "host_input_mismatch",
1950
+ "host_prompt_mismatch"
1932
1951
  ]);
1933
1952
  var HOST_RELAY_INVOCATION_MINT_OUTCOMES = vocabulary(["completed", "caller_cancelled", "deadline", "failed", "no_binding"]);
1934
1953
  var HOST_RELAY_EXCHANGE_FAILURES = vocabulary([
@@ -2302,10 +2321,7 @@ function validateBatch(value) {
2302
2321
  }
2303
2322
  }
2304
2323
  function validBatchHeader(value) {
2305
- return record5(value) && value.schema_version === CLAUDE_OUTBOX_SCHEMA && safeRef3(value.batch_ref) && claudeEvent(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;
2306
- }
2307
- function claudeEvent(value) {
2308
- return typeof value === "string" && ["SessionStart", "UserPromptSubmit", "Stop", "StopFailure"].includes(value);
2324
+ return record5(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;
2309
2325
  }
2310
2326
  function hostFrameKind(value) {
2311
2327
  return isHostProducerFrameKind(value);
@@ -952,7 +952,7 @@ var OPTIONAL_FIELDS = CEAL_CLIENT_WIRE_CONTRACT.command_response.bare_document_o
952
952
  // packages/ceal-client-protocol/src/resource-row.ts
953
953
  var CEAL_RESOURCE_SEARCH_ORDERS = vocabulary(["relevance", "modified", "viewed", "created"]);
954
954
  var CEAL_RESOURCE_SEARCH_DIRECTIONS = vocabulary(["ascending", "descending"]);
955
- 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"]);
955
+ 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"]);
956
956
  var CEAL_RESOURCE_TIME_BASES = vocabulary(["created", "modified", "viewed"]);
957
957
  var CEAL_REPOSITORY_VISIBILITIES = vocabulary(["public", "private", "internal"]);
958
958
  var CEAL_ACTIVITY_V3_KINDS = vocabulary(["authored", "edited", "messaged", "responded"]);
@@ -1031,6 +1031,7 @@ var RESOURCE_ROW_KEY_RULES = Object.freeze({
1031
1031
  ref: { required: true, timestamp: false },
1032
1032
  next: { required: true, timestamp: false },
1033
1033
  kind: { required: true, timestamp: false },
1034
+ matched_kinds: { required: false, timestamp: false },
1034
1035
  title: { required: true, timestamp: false },
1035
1036
  container_label: { required: true, timestamp: false },
1036
1037
  container_ref: { required: false, timestamp: false },
@@ -1416,6 +1417,16 @@ var CEAL_HOST_INVOCATION_AUTHENTICATION_RESULT_MAX_BYTES = new TextEncoder().enc
1416
1417
  expires_at: (/* @__PURE__ */ new Date("+010000-01-01T00:00:00.000Z")).toISOString()
1417
1418
  })}
1418
1419
  `).byteLength;
1420
+ var CEAL_HOST_MINT_REQUEST_CONTEXT_REFUSAL_REASONS = vocabulary([
1421
+ "request_authority_unavailable",
1422
+ "request_missing",
1423
+ "authority_mismatch",
1424
+ "host_source_mismatch",
1425
+ "host_session_mismatch",
1426
+ "host_turn_mismatch",
1427
+ "host_input_mismatch",
1428
+ "host_prompt_mismatch"
1429
+ ]);
1419
1430
  function decodeCealHostInvocationAuthenticationRequest(value) {
1420
1431
  if (!isCealJsonRecord(value) || !exactKeys(value, ["schema_version", "client_nonce"]) || value.schema_version !== CEAL_HOST_INVOCATION_AUTHENTICATION_REQUEST_SCHEMA || typeof value.client_nonce !== "string" || !CEAL_HOST_CLIENT_NONCE_PATTERN.test(value.client_nonce)) {
1421
1432
  throw new TypeError("The Host invocation authentication request is invalid.");
@@ -1440,8 +1451,8 @@ function exactKeys(value, expected) {
1440
1451
  // packages/ceal-client-protocol/src/client-result-materialization.ts
1441
1452
  var CEAL_UNREAD_REASONS = vocabulary(["blocked", "unavailable", "too_large", "unsupported", "download_failed", "permission_denied"]);
1442
1453
  var CEAL_MODEL_VISIBLE_COMMAND_OUTPUT_MAX_BYTES = 32 * 1024;
1443
- var REQUIRED_FIELDS2 = Object.freeze(["schema_version", "operation_id"]);
1444
- var FIELDS = /* @__PURE__ */ new Set([...REQUIRED_FIELDS2, "read_argv", "local_result_root", "continue_argv", "model_disclosure", "item_read_argv"]);
1454
+ var REQUIRED_FIELDS2 = Object.freeze(["schema_version", "operation_id", "read_argv"]);
1455
+ var FIELDS = /* @__PURE__ */ new Set([...REQUIRED_FIELDS2, "local_result_root", "continue_argv", "model_disclosure"]);
1445
1456
 
1446
1457
  // packages/ceal-client-protocol/src/gateway-cache-origin-validation.ts
1447
1458
  var CEAL_MAX_CACHE_ORIGIN_AGE_MS = 30 * 24 * 60 * 60 * 1e3;
@@ -1888,7 +1899,15 @@ var HOST_RELAY_INVOCATION_MINT_REFUSAL_REASONS = vocabulary([
1888
1899
  "deadline",
1889
1900
  "cancelled",
1890
1901
  "mint_failed",
1891
- "relay_failed"
1902
+ "relay_failed",
1903
+ "request_authority_unavailable",
1904
+ "request_missing",
1905
+ "authority_mismatch",
1906
+ "host_source_mismatch",
1907
+ "host_session_mismatch",
1908
+ "host_turn_mismatch",
1909
+ "host_input_mismatch",
1910
+ "host_prompt_mismatch"
1892
1911
  ]);
1893
1912
  var HOST_RELAY_INVOCATION_MINT_OUTCOMES = vocabulary(["completed", "caller_cancelled", "deadline", "failed", "no_binding"]);
1894
1913
  var HOST_RELAY_EXCHANGE_FAILURES = vocabulary([
@@ -2399,6 +2418,7 @@ function boundedMilliseconds(value) {
2399
2418
  import { createHash as createHash3 } from "node:crypto";
2400
2419
 
2401
2420
  // host/claude/src/claude-types.ts
2421
+ var CLAUDE_HOOK_EVENTS = ["SessionStart", "UserPromptSubmit", "Stop", "StopFailure"];
2402
2422
  var CLAUDE_SESSION_ID_ENVIRONMENT = "CLAUDE_CODE_SESSION_ID";
2403
2423
  var CLAUDE_HOST_ERROR_CODES = ["invalid_input", "storage", "configuration"];
2404
2424
  function isClaudeHostErrorCode(value) {
@@ -2415,6 +2435,9 @@ var ClaudeHostError = class extends Error {
2415
2435
  this.code = code3;
2416
2436
  }
2417
2437
  };
2438
+ function isClaudeHookEvent(value) {
2439
+ return typeof value === "string" && CLAUDE_HOOK_EVENTS.some((event) => event === value);
2440
+ }
2418
2441
 
2419
2442
  // host/claude/src/claude-decoder.ts
2420
2443
  var MAX_HOOK_BYTES = 256 * 1024;
@@ -2629,10 +2652,7 @@ function validateBatch(value) {
2629
2652
  }
2630
2653
  }
2631
2654
  function validBatchHeader(value) {
2632
- return record4(value) && value.schema_version === CLAUDE_OUTBOX_SCHEMA && safeRef4(value.batch_ref) && claudeEvent(value.hook_event) && safeRef4(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;
2633
- }
2634
- function claudeEvent(value) {
2635
- return typeof value === "string" && ["SessionStart", "UserPromptSubmit", "Stop", "StopFailure"].includes(value);
2655
+ return record4(value) && value.schema_version === CLAUDE_OUTBOX_SCHEMA && safeRef4(value.batch_ref) && isClaudeHookEvent(value.hook_event) && safeRef4(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;
2636
2656
  }
2637
2657
  function hostFrameKind(value) {
2638
2658
  return isHostProducerFrameKind(value);
@@ -993,7 +993,7 @@ var OPTIONAL_FIELDS = CEAL_CLIENT_WIRE_CONTRACT.command_response.bare_document_o
993
993
  // packages/ceal-client-protocol/src/resource-row.ts
994
994
  var CEAL_RESOURCE_SEARCH_ORDERS = vocabulary(["relevance", "modified", "viewed", "created"]);
995
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"]);
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
997
  var CEAL_RESOURCE_TIME_BASES = vocabulary(["created", "modified", "viewed"]);
998
998
  var CEAL_REPOSITORY_VISIBILITIES = vocabulary(["public", "private", "internal"]);
999
999
  var CEAL_ACTIVITY_V3_KINDS = vocabulary(["authored", "edited", "messaged", "responded"]);
@@ -1072,6 +1072,7 @@ var RESOURCE_ROW_KEY_RULES = Object.freeze({
1072
1072
  ref: { required: true, timestamp: false },
1073
1073
  next: { required: true, timestamp: false },
1074
1074
  kind: { required: true, timestamp: false },
1075
+ matched_kinds: { required: false, timestamp: false },
1075
1076
  title: { required: true, timestamp: false },
1076
1077
  container_label: { required: true, timestamp: false },
1077
1078
  container_ref: { required: false, timestamp: false },
@@ -1456,12 +1457,22 @@ var CEAL_HOST_INVOCATION_AUTHENTICATION_RESULT_MAX_BYTES = new TextEncoder().enc
1456
1457
  expires_at: (/* @__PURE__ */ new Date("+010000-01-01T00:00:00.000Z")).toISOString()
1457
1458
  })}
1458
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
+ ]);
1459
1470
 
1460
1471
  // packages/ceal-client-protocol/src/client-result-materialization.ts
1461
1472
  var CEAL_UNREAD_REASONS = vocabulary(["blocked", "unavailable", "too_large", "unsupported", "download_failed", "permission_denied"]);
1462
1473
  var CEAL_MODEL_VISIBLE_COMMAND_OUTPUT_MAX_BYTES = 32 * 1024;
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"]);
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"]);
1465
1476
 
1466
1477
  // packages/ceal-client-protocol/src/gateway-cache-origin-validation.ts
1467
1478
  var CEAL_MAX_CACHE_ORIGIN_AGE_MS = 30 * 24 * 60 * 60 * 1e3;
@@ -2017,7 +2028,15 @@ var HOST_RELAY_INVOCATION_MINT_REFUSAL_REASONS = vocabulary([
2017
2028
  "deadline",
2018
2029
  "cancelled",
2019
2030
  "mint_failed",
2020
- "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"
2021
2040
  ]);
2022
2041
  var HOST_RELAY_INVOCATION_MINT_OUTCOMES = vocabulary(["completed", "caller_cancelled", "deadline", "failed", "no_binding"]);
2023
2042
  var HOST_RELAY_EXCHANGE_FAILURES = vocabulary([
@@ -2157,6 +2176,7 @@ import { open as open3, mkdir as mkdir2, readdir, readFile, unlink as unlink2 }
2157
2176
  import { join as join2 } from "node:path";
2158
2177
 
2159
2178
  // host/claude/src/claude-types.ts
2179
+ var CLAUDE_HOOK_EVENTS = ["SessionStart", "UserPromptSubmit", "Stop", "StopFailure"];
2160
2180
  var CLAUDE_HOST_ERROR_CODES = ["invalid_input", "storage", "configuration"];
2161
2181
  function isClaudeHostErrorCode(value) {
2162
2182
  return typeof value === "string" && CLAUDE_HOST_ERROR_CODES.some((code3) => code3 === value);
@@ -2172,6 +2192,9 @@ var ClaudeHostError = class extends Error {
2172
2192
  this.code = code3;
2173
2193
  }
2174
2194
  };
2195
+ function isClaudeHookEvent(value) {
2196
+ return typeof value === "string" && CLAUDE_HOOK_EVENTS.some((event) => event === value);
2197
+ }
2175
2198
 
2176
2199
  // host/invocation-context.ts
2177
2200
  var HOST_INVOCATION_IDENTITY_KEYS = ["host_session_ref", "host_turn_ref", "host_source_ref"];
@@ -2372,10 +2395,7 @@ function validateBatch(value) {
2372
2395
  }
2373
2396
  }
2374
2397
  function validBatchHeader(value) {
2375
- return record4(value) && value.schema_version === CLAUDE_OUTBOX_SCHEMA && safeRef3(value.batch_ref) && claudeEvent(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;
2376
- }
2377
- function claudeEvent(value) {
2378
- 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;
2379
2399
  }
2380
2400
  function hostFrameKind(value) {
2381
2401
  return isHostProducerFrameKind(value);