37fc06e274
- 子命令 save/notify/input/cleanup:纯互操作 IPC,不加载 Avalonia
- 命名管道:瘦客户端投递请求,Host 未运行时自动拉起并重试
- 每会话状态文件 %TEMP%\claude-notify-{id}.json,保存前台窗口与 prompt
- Host 单例互斥量 + 管道监听,收到请求切回 UI 线程弹窗
- stdin 改为 UTF-8 原始字节读取,修复中文乱码与读不到的问题
- 符合 Claude Code 插件规范的 .claude-plugin 与 hooks 结构
25 lines
576 B
C#
25 lines
576 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace Notify.Cli;
|
|
|
|
/// <summary>
|
|
/// Claude Code 钩子经 stdin 传入的 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; }
|
|
}
|