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

Function agentSoulMutationBundle

internal/cli/authored_context.go:909–946  ·  view source on GitHub ↗
(record *AgentSoulMutationRecord)

Source from the content-addressed store, hash-verified

907}
908
909func 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
948func agentSoulHistoryBundle(record AgentSoulHistoryRecord) outputBundle {
949 return listBundle(

Callers 3

newAgentSoulWriteCommandFunction · 0.85

Calls 6

renderHumanSectionFunction · 0.85
stringOrDashFunction · 0.85
formatTimeFunction · 0.85
agentSoulBundleFunction · 0.85
renderHumanBlocksFunction · 0.85
renderToonObjectFunction · 0.85

Tested by

no test coverage detected