(record *AgentSoulMutationRecord)
| 907 | } |
| 908 | |
| 909 | func agentSoulMutationBundle(record *AgentSoulMutationRecord) outputBundle { |
| 910 | if record == nil { |
| 911 | empty := AgentSoulMutationRecord{} |
| 912 | record = &empty |
| 913 | } |
| 914 | return outputBundle{ |
| 915 | jsonValue: record, |
| 916 | human: func() (string, error) { |
| 917 | revision := renderHumanSection("Soul Revision", []keyValue{ |
| 918 | {Label: "ID", Value: stringOrDash(record.Revision.ID)}, |
| 919 | {Label: authoredContextActionValue, Value: stringOrDash(string(record.Revision.Action))}, |
| 920 | {Label: authoredContextPreviousDigestValue, Value: stringOrDash(record.Revision.PreviousDigest)}, |
| 921 | {Label: authoredContextNewDigestValue, Value: stringOrDash(record.Revision.NewDigest)}, |
| 922 | {Label: authoredContextCreatedValue, Value: stringOrDash(formatTime(record.Revision.CreatedAt))}, |
| 923 | }) |
| 924 | soul, err := agentSoulBundle(record.Soul).human() |
| 925 | if err != nil { |
| 926 | return "", err |
| 927 | } |
| 928 | return renderHumanBlocks(soul, revision), nil |
| 929 | }, |
| 930 | toon: func() (string, error) { |
| 931 | return renderToonObject("agent_soul_revision", []string{ |
| 932 | "id", |
| 933 | authoredContextActionKey, |
| 934 | authoredContextPreviousDigestKey, |
| 935 | authoredContextNewDigestKey, |
| 936 | automationCreatedAtKey, |
| 937 | }, []string{ |
| 938 | record.Revision.ID, |
| 939 | string(record.Revision.Action), |
| 940 | record.Revision.PreviousDigest, |
| 941 | record.Revision.NewDigest, |
| 942 | formatTime(record.Revision.CreatedAt), |
| 943 | }), nil |
| 944 | }, |
| 945 | } |
| 946 | } |
| 947 | |
| 948 | func agentSoulHistoryBundle(record AgentSoulHistoryRecord) outputBundle { |
| 949 | return listBundle( |
no test coverage detected