@lark-codem/codem-cli 0.1.268 → 0.1.269-artifact-upgrade.100103568388.0.g9d24ba9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-codem/codem-cli",
3
- "version": "0.1.268",
3
+ "version": "0.1.269-artifact-upgrade.100103568388.0.g9d24ba9",
4
4
  "codemServiceManagementProtocol": 3,
5
5
  "codemProfileProtocol": 1,
6
6
  "type": "module",
@@ -29,17 +29,12 @@
29
29
  "access": "public"
30
30
  },
31
31
  "dependencies": {
32
- "@lark-codem/codem-core": "0.8.85",
32
+ "@lark-codem/codem-core": "0.8.86-meego-ai-integration.100103565819.0.g22ae368",
33
33
  "zod": "3.25.76",
34
34
  "@lark-codem/lark-cli": "0.1.1"
35
35
  },
36
36
  "optionalDependencies": {
37
- "@lark-codem/codem-cli-darwin-arm64": "0.1.268",
38
- "@lark-codem/codem-cli-darwin-x64": "0.1.268",
39
- "@lark-codem/codem-cli-linux-arm64": "0.1.268",
40
- "@lark-codem/codem-cli-linux-x64": "0.1.268",
41
- "@lark-codem/codem-cli-win32-arm64": "0.1.268",
42
- "@lark-codem/codem-cli-win32-x64": "0.1.268"
37
+ "@lark-codem/codem-cli-darwin-arm64": "0.1.269-artifact-upgrade.100103568388.0.g9d24ba9"
43
38
  },
44
39
  "engines": {
45
40
  "node": ">=18"
@@ -10,15 +10,7 @@ const CAPACITY = 256;
10
10
  const BATCH_SIZE = 32;
11
11
  const INTERVAL_MS = 10_000;
12
12
  const REQUEST_TIMEOUT_MS = 3_000;
13
- const TRUSTED_DEVICE_EVENTS = new Set(["host_identity_collection", "host_identity_command", "host_session_attempt", "host_session_expired", "trusted_device_admission_blocked", "trusted_device_admission_recovered"]);
14
- const TRUSTED_DEVICE_PHASES = ["auth", "identity", "provider", "host_key", "activation_state", "activation_apply", "activation_sign", "activation_complete", "credential_resolve", "session_apply", "session_sign", "session_complete", "trusted_device"];
15
- const TRUSTED_DEVICE_DIMENSIONS = {
16
- phase: TRUSTED_DEVICE_PHASES,
17
- operation: ["create", "renew", "recovery", "platform_identity", "network_interfaces", "network_ports"],
18
- outcome: ["success", "partial", "failed", "ready", "not_registered", "no_auth", "reset", "blocked", "invalid", "verified", "not_required", "absent", "expired"],
19
- failure_kind: ["none", "timeout", "exec_failed", "invalid_json", "empty_identity", "read_failed", "authorization", "unknown"]
20
- };
21
- const OBSERVATION_EVENTS = new Set(["command_delivery_observed", "command_admission", "runtime_capability_probe", "command_ack", "command_observation_closed", "diagnostic_reporter_health", ...TRUSTED_DEVICE_EVENTS]);
13
+ const OBSERVATION_EVENTS = new Set(["command_delivery_observed", "command_admission", "runtime_capability_probe", "command_ack", "command_observation_closed", "diagnostic_reporter_health"]);
22
14
  const OBSERVATION_DIMENSIONS = {
23
15
  phase: ["resolve_binary", "build_env", "host_capabilities", "parse_capabilities", "strict_resume", "verify_binding", "prepare", "persist_state", "trusted_device", "request", "validate_response", "apply_response"],
24
16
  reason: ["runtime_unavailable", "runtime_environment_failed", "capability_probe_failed", "runtime_binary_changed", "strict_resume_unsupported", "turn_context_unsupported", "active_run_protocol_mismatch", "trusted_device_blocked", "shutting_down_handoff", "handoff_target_not_active", "duplicate_inflight", "handler_inflight", "prepare_exception_unknown", "capacity", "stopped", "replaced", "scope_changed", "queue_removed", "local_rejected"],
@@ -30,12 +22,6 @@ const OBSERVATION_DIMENSIONS = {
30
22
  timing_origin: ["observed", "restored_unknown"]
31
23
  };
32
24
  const OBSERVATION_METRICS = {
33
- host_identity_collection: ["duration_ms", "field_error_count"],
34
- host_identity_command: ["duration_ms", "timeout_ms"],
35
- host_session_attempt: ["elapsed_ms", "next_retry_ms", "consecutive_failures", "session_remaining_ms", ...TRUSTED_DEVICE_PHASES.map(phase => `${phase}_duration_ms`)],
36
- host_session_expired: ["expired_for_ms", "consecutive_failures", "next_retry_ms"],
37
- trusted_device_admission_blocked: ["elapsed_ms", "blocked_response_count"],
38
- trusted_device_admission_recovered: ["elapsed_ms", "blocked_response_count"],
39
25
  command_delivery_observed: ["attempt_delta", "suppressed_count"],
40
26
  command_admission: ["attempt_delta", "suppressed_count", "deferred_age_ms", "deferred_duration_ms"],
41
27
  runtime_capability_probe: ["probe_duration_ms"],
@@ -43,7 +29,7 @@ const OBSERVATION_METRICS = {
43
29
  command_observation_closed: ["omitted_detail_count", "pending_command_ack_count", "deferred_count"],
44
30
  diagnostic_reporter_health: ["dropped_delta", "upload_failure_delta", "pending_event_count"]
45
31
  };
46
- const EXTRA_FIELDS = ["observation_id", "runtime_client_instance_id", "command_id", "delivery_id", "probe_id", "sync_id", "transport_request_id", "attempt_id"];
32
+ const EXTRA_FIELDS = ["observation_id", "runtime_client_instance_id", "command_id", "delivery_id", "probe_id", "sync_id", "transport_request_id"];
47
33
  const STRING_FIELDS = new Set([
48
34
  ...EXTRA_FIELDS, "command_type", "ack_status", "ack_outcome", "readback_scope", "timing_origin", "required_capability",
49
35
  "request_id", "command_id", "session_id", "task_id", "dispatch_id", "event_id", "sync_id",
@@ -51,18 +37,16 @@ const STRING_FIELDS = new Set([
51
37
  "error_class", "error_code", "error_kind", "error_type", "code", "signal", "stop_reason",
52
38
  "terminal_event", "event_type", "actor_type", "source", "trigger", "hook_id", "hook_event",
53
39
  "target_version", "cli_version", "core_version", "version", "previous_state", "state",
54
- "failure_kind", "failure_impact", "failure_type", "failure_subtype", "failure_code", "failure_status", "delay_source", "mode", "provider", "name", "termination", "interaction_id", "interaction_kind", "owner_state", "artifact_id", "resource_type", "delivery_mode", "host", "scheme", "tool_call_id", "tool_name", "background_task_id", "model", "artifact_kind", "codem_user_id", "device_id", "operation", "foreground_error_code",
55
- "operation_id", "entrypoint"
40
+ "failure_kind", "failure_impact", "failure_type", "failure_subtype", "failure_code", "failure_status", "delay_source", "mode", "provider", "name", "termination", "interaction_id", "interaction_kind", "owner_state", "artifact_id", "resource_type", "delivery_mode", "host", "scheme", "tool_call_id", "tool_name", "background_task_id", "model", "artifact_kind", "codem_user_id", "device_id", "operation", "foreground_error_code"
56
41
  ]);
57
42
  const VALUE_FIELDS = new Set([
58
- "session_retained",
59
43
  ...new Set(Object.values(OBSERVATION_METRICS).flat()),
60
44
  "pid", "exit_code", "duration_ms", "elapsed_ms", "wait_ms", "run_ms", "total_ms", "took_ms",
61
45
  "attempt", "attempts", "attempt_count", "retryable", "http_status", "active_task_count",
62
46
  "pending_event_count", "pending_command_ack_count", "next_retry_ms", "consecutive_failures",
63
47
  "outage_duration_ms", "startup_duration_ms", "failed_attempts", "active_runs", "completed",
64
48
  "delivered", "result_delivered", "queued_behind_existing", "expected", "timed_out",
65
- "force_exit_ms", "teardown_ceiling_ms", "recovered", "count", "ms_since_process_start", "owner_pid", "consumed", "delivery_attempt", "ack_deadline_ms", "command_to_bridge_ms", "size_bytes", "source_size_bytes", "processed_bytes", "before", "after", "omitted_detail_count", "opened", "selected", "foreground"
49
+ "force_exit_ms", "teardown_ceiling_ms", "recovered", "count", "ms_since_process_start", "owner_pid", "consumed", "delivery_attempt", "ack_deadline_ms", "command_to_bridge_ms", "size_bytes", "before", "after", "omitted_detail_count", "opened", "selected", "foreground"
66
50
  ]);
67
51
 
68
52
  function token(value) {
@@ -243,10 +227,7 @@ export class RuntimeLogReporter {
243
227
  ...Object.fromEntries(["stage", "error_class", "error_code", "error_kind", "outcome"].filter((key) => safeFields[key]).map((key) => [key, safeFields[key]]))
244
228
  };
245
229
  if (OBSERVATION_EVENTS.has(category.event)) {
246
- const trustedDevice = TRUSTED_DEVICE_EVENTS.has(category.event);
247
- // Keep arbitrary upstream error codes in logs, not metric dimensions.
248
- if (trustedDevice) for (const key of ["stage", "error_class", "error_code", "error_kind", "outcome"]) delete category[key];
249
- for (const [key, values] of Object.entries(trustedDevice ? TRUSTED_DEVICE_DIMENSIONS : OBSERVATION_DIMENSIONS)) {
230
+ for (const [key, values] of Object.entries(OBSERVATION_DIMENSIONS)) {
250
231
  if (safeFields[key]) category[key] = values.includes(safeFields[key]) ? safeFields[key] : "unknown";
251
232
  }
252
233
  }