(record AgentSoulRecord)
| 865 | } |
| 866 | |
| 867 | func agentSoulBundle(record AgentSoulRecord) outputBundle { |
| 868 | return outputBundle{ |
| 869 | jsonValue: record, |
| 870 | human: func() (string, error) { |
| 871 | summary := renderHumanSection("Agent Soul", []keyValue{ |
| 872 | {Label: authoredContextAgentValue, Value: stringOrDash(record.AgentName)}, |
| 873 | {Label: authoredContextEnabledValue, Value: boolString(record.Enabled)}, |
| 874 | {Label: authoredContextPresentValue, Value: boolString(record.Present)}, |
| 875 | {Label: authoredContextActiveValue, Value: boolString(record.Active)}, |
| 876 | {Label: authoredContextValidValue, Value: boolString(record.Valid)}, |
| 877 | {Label: "Validation", Value: stringOrDash(string(record.ValidationStatus))}, |
| 878 | {Label: authoredContextDigestValue, Value: stringOrDash(record.Digest)}, |
| 879 | {Label: authoredContextSnapshotValue, Value: stringOrDash(record.SnapshotID)}, |
| 880 | {Label: "Revision", Value: stringOrDash(record.RevisionID)}, |
| 881 | {Label: authoredContextSourceValue, Value: stringOrDash(record.SourcePath)}, |
| 882 | }) |
| 883 | return renderHumanBlocks(summary, diagnosticsTable(record.Diagnostics)), nil |
| 884 | }, |
| 885 | toon: func() (string, error) { |
| 886 | return renderToonObject("agent_soul", []string{ |
| 887 | agentAgentKey, |
| 888 | automationEnabledKey, |
| 889 | providerAuthStatePresent, |
| 890 | authoredContextActiveKey, |
| 891 | configValidKey, |
| 892 | "validation_status", |
| 893 | authoredContextDigestKey, |
| 894 | "source_path", |
| 895 | }, []string{ |
| 896 | record.AgentName, |
| 897 | boolString(record.Enabled), |
| 898 | boolString(record.Present), |
| 899 | boolString(record.Active), |
| 900 | boolString(record.Valid), |
| 901 | string(record.ValidationStatus), |
| 902 | record.Digest, |
| 903 | record.SourcePath, |
| 904 | }), nil |
| 905 | }, |
| 906 | } |
| 907 | } |
| 908 | |
| 909 | func agentSoulMutationBundle(record *AgentSoulMutationRecord) outputBundle { |
| 910 | if record == nil { |
no test coverage detected