package com.agent.management.engine;

import java.time.LocalDateTime;
import java.util.Collections;
import java.util.Map;

/**
 * 单个节点的输出记录
 * 记录每个节点的输出变量和时间戳，用于上下文传递和追溯
 */
public class NodeOutput {

    private final String nodeId;
    private final Map<String, Object> output;
    private final LocalDateTime timestamp;

    public NodeOutput(String nodeId, Map<String, Object> output) {
        this.nodeId = nodeId;
        this.output = output != null ? Collections.unmodifiableMap(output) : Collections.emptyMap();
        this.timestamp = LocalDateTime.now();
    }

    public String getNodeId() { return nodeId; }
    public Map<String, Object> getOutput() { return output; }
    public LocalDateTime getTimestamp() { return timestamp; }
}
