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

Function memoryProviderListBundle

internal/cli/memory.go:1844–1875  ·  view source on GitHub ↗
(response MemoryProviderListRecord)

Source from the content-addressed store, hash-verified

1842}
1843
1844func memoryProviderListBundle(response MemoryProviderListRecord) outputBundle {
1845 bundle := listBundle(
1846 response,
1847 response.Providers,
1848 "Memory Providers",
1849 []string{automationNameValue, memoryStatusValue, memoryActiveValue, "Builtin", "Failure Count"},
1850 "providers",
1851 []string{automationNameKey, memoryStatusKey, memoryActiveKey, "builtin", "failure_count"},
1852 func(item contract.MemoryProviderPayload) []string {
1853 return []string{
1854 stringOrDash(item.Name),
1855 stringOrDash(string(item.Status)),
1856 boolStatus(item.Active),
1857 boolStatus(item.Builtin),
1858 fmt.Sprintf("%d", item.FailureCount),
1859 }
1860 },
1861 func(item contract.MemoryProviderPayload) []string {
1862 return []string{
1863 item.Name,
1864 string(item.Status),
1865 boolStatus(item.Active),
1866 boolStatus(item.Builtin),
1867 fmt.Sprintf("%d", item.FailureCount),
1868 }
1869 },
1870 )
1871 bundle.jsonl = func(cmd *cobra.Command) error {
1872 return writeJSONLines(cmd, response.Providers)
1873 }
1874 return bundle
1875}
1876
1877func memoryObjectBundle(title string, value any) outputBundle {
1878 return outputBundle{

Callers 1

Calls 4

listBundleFunction · 0.85
stringOrDashFunction · 0.85
boolStatusFunction · 0.85
writeJSONLinesFunction · 0.85

Tested by

no test coverage detected