|
3 | 3 |
|
4 | 4 | Generated from: @github/copilot/session-events.schema.json |
5 | 5 | Generated by: scripts/generate-session-types.ts |
6 | | -Generated at: 2026-01-15T19:22:26.227Z |
| 6 | +Generated at: 2026-01-16T00:52:51.909Z |
7 | 7 |
|
8 | 8 | To update these types: |
9 | 9 | 1. Update the schema in copilot-agent-runtime |
@@ -314,6 +314,8 @@ class Data: |
314 | 314 | pre_truncation_tokens_in_messages: Optional[float] = None |
315 | 315 | token_limit: Optional[float] = None |
316 | 316 | tokens_removed_during_truncation: Optional[float] = None |
| 317 | + current_tokens: Optional[float] = None |
| 318 | + messages_length: Optional[float] = None |
317 | 319 | compaction_tokens_used: Optional[CompactionTokensUsed] = None |
318 | 320 | error: Optional[Union[ErrorClass, str]] = None |
319 | 321 | messages_removed: Optional[float] = None |
@@ -397,6 +399,8 @@ def from_dict(obj: Any) -> 'Data': |
397 | 399 | pre_truncation_tokens_in_messages = from_union([from_float, from_none], obj.get("preTruncationTokensInMessages")) |
398 | 400 | token_limit = from_union([from_float, from_none], obj.get("tokenLimit")) |
399 | 401 | tokens_removed_during_truncation = from_union([from_float, from_none], obj.get("tokensRemovedDuringTruncation")) |
| 402 | + current_tokens = from_union([from_float, from_none], obj.get("currentTokens")) |
| 403 | + messages_length = from_union([from_float, from_none], obj.get("messagesLength")) |
400 | 404 | compaction_tokens_used = from_union([CompactionTokensUsed.from_dict, from_none], obj.get("compactionTokensUsed")) |
401 | 405 | error = from_union([ErrorClass.from_dict, from_str, from_none], obj.get("error")) |
402 | 406 | messages_removed = from_union([from_float, from_none], obj.get("messagesRemoved")) |
@@ -448,7 +452,7 @@ def from_dict(obj: Any) -> 'Data': |
448 | 452 | metadata = from_union([Metadata.from_dict, from_none], obj.get("metadata")) |
449 | 453 | name = from_union([from_str, from_none], obj.get("name")) |
450 | 454 | role = from_union([Role, from_none], obj.get("role")) |
451 | | - return Data(copilot_version, producer, selected_model, session_id, start_time, version, event_count, resume_time, error_type, message, stack, info_type, new_model, previous_model, context, handoff_time, remote_session_id, repository, source_type, summary, messages_removed_during_truncation, performed_by, post_truncation_messages_length, post_truncation_tokens_in_messages, pre_truncation_messages_length, pre_truncation_tokens_in_messages, token_limit, tokens_removed_during_truncation, compaction_tokens_used, error, messages_removed, post_compaction_tokens, pre_compaction_messages_length, pre_compaction_tokens, success, summary_content, tokens_removed, attachments, content, source, transformed_content, turn_id, intent, reasoning_id, delta_content, message_id, parent_tool_call_id, tool_requests, total_response_size_bytes, api_call_id, cache_read_tokens, cache_write_tokens, cost, duration, initiator, input_tokens, model, output_tokens, provider_call_id, quota_snapshots, reason, arguments, tool_call_id, tool_name, partial_output, is_user_requested, result, tool_telemetry, agent_description, agent_display_name, agent_name, tools, hook_invocation_id, hook_type, input, output, metadata, name, role) |
| 455 | + return Data(copilot_version, producer, selected_model, session_id, start_time, version, event_count, resume_time, error_type, message, stack, info_type, new_model, previous_model, context, handoff_time, remote_session_id, repository, source_type, summary, messages_removed_during_truncation, performed_by, post_truncation_messages_length, post_truncation_tokens_in_messages, pre_truncation_messages_length, pre_truncation_tokens_in_messages, token_limit, tokens_removed_during_truncation, current_tokens, messages_length, compaction_tokens_used, error, messages_removed, post_compaction_tokens, pre_compaction_messages_length, pre_compaction_tokens, success, summary_content, tokens_removed, attachments, content, source, transformed_content, turn_id, intent, reasoning_id, delta_content, message_id, parent_tool_call_id, tool_requests, total_response_size_bytes, api_call_id, cache_read_tokens, cache_write_tokens, cost, duration, initiator, input_tokens, model, output_tokens, provider_call_id, quota_snapshots, reason, arguments, tool_call_id, tool_name, partial_output, is_user_requested, result, tool_telemetry, agent_description, agent_display_name, agent_name, tools, hook_invocation_id, hook_type, input, output, metadata, name, role) |
452 | 456 |
|
453 | 457 | def to_dict(self) -> dict: |
454 | 458 | result: dict = {} |
@@ -508,6 +512,10 @@ def to_dict(self) -> dict: |
508 | 512 | result["tokenLimit"] = from_union([to_float, from_none], self.token_limit) |
509 | 513 | if self.tokens_removed_during_truncation is not None: |
510 | 514 | result["tokensRemovedDuringTruncation"] = from_union([to_float, from_none], self.tokens_removed_during_truncation) |
| 515 | + if self.current_tokens is not None: |
| 516 | + result["currentTokens"] = from_union([to_float, from_none], self.current_tokens) |
| 517 | + if self.messages_length is not None: |
| 518 | + result["messagesLength"] = from_union([to_float, from_none], self.messages_length) |
511 | 519 | if self.compaction_tokens_used is not None: |
512 | 520 | result["compactionTokensUsed"] = from_union([lambda x: to_class(CompactionTokensUsed, x), from_none], self.compaction_tokens_used) |
513 | 521 | if self.error is not None: |
@@ -636,6 +644,7 @@ class SessionEventType(Enum): |
636 | 644 | SESSION_RESUME = "session.resume" |
637 | 645 | SESSION_START = "session.start" |
638 | 646 | SESSION_TRUNCATION = "session.truncation" |
| 647 | + SESSION_USAGE_INFO = "session.usage_info" |
639 | 648 | SUBAGENT_COMPLETED = "subagent.completed" |
640 | 649 | SUBAGENT_FAILED = "subagent.failed" |
641 | 650 | SUBAGENT_SELECTED = "subagent.selected" |
|
0 commit comments