MCPcopy Create free account
hub / github.com/compozy/agh / agentSoulBundle

Function agentSoulBundle

internal/cli/authored_context.go:867–907  ·  view source on GitHub ↗
(record AgentSoulRecord)

Source from the content-addressed store, hash-verified

865}
866
867func 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
909func agentSoulMutationBundle(record *AgentSoulMutationRecord) outputBundle {
910 if record == nil {

Callers 4

agentSoulMutationBundleFunction · 0.85

Calls 6

renderHumanSectionFunction · 0.85
stringOrDashFunction · 0.85
renderHumanBlocksFunction · 0.85
diagnosticsTableFunction · 0.85
renderToonObjectFunction · 0.85
boolStringFunction · 0.70

Tested by

no test coverage detected