52 lines
1.3 KiB
C#
52 lines
1.3 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace Notify.Cli;
|
|
|
|
/// <summary>
|
|
/// 外部 hook 或 Codex notify 命令传入的 JSON
|
|
/// </summary>
|
|
public sealed class HookInput
|
|
{
|
|
[JsonPropertyName("session_id")]
|
|
public string? SessionId { get; set; }
|
|
|
|
[JsonPropertyName("prompt")]
|
|
public string? Prompt { get; set; }
|
|
|
|
[JsonPropertyName("notification_type")]
|
|
public string? NotificationType { get; set; }
|
|
|
|
[JsonPropertyName("message")]
|
|
public string? Message { get; set; }
|
|
|
|
[JsonPropertyName("tool_name")]
|
|
public string? ToolName { get; set; }
|
|
|
|
[JsonPropertyName("type")]
|
|
public string? Type { get; set; }
|
|
|
|
[JsonPropertyName("thread-id")]
|
|
public string? ThreadId { get; set; }
|
|
|
|
[JsonPropertyName("turn-id")]
|
|
public string? TurnId { get; set; }
|
|
|
|
[JsonPropertyName("cwd")]
|
|
public string? Cwd { get; set; }
|
|
|
|
[JsonPropertyName("input-messages")]
|
|
public string[]? InputMessages { get; set; }
|
|
|
|
[JsonPropertyName("last-assistant-message")]
|
|
public string? LastAssistantMessage { get; set; }
|
|
|
|
[JsonPropertyName("hook_event_name")]
|
|
public string? HookEventName { get; set; }
|
|
|
|
[JsonPropertyName("turn_id")]
|
|
public string? HookTurnId { get; set; }
|
|
|
|
[JsonPropertyName("last_assistant_message")]
|
|
public string? HookLastAssistantMessage { get; set; }
|
|
}
|