MCPcopy Create free account
hub / github.com/apache/maka / stringArray

Function stringArray

packages/runtime-host/src/protocol/skill-catalog.ts:1049–1054  ·  view source on GitHub ↗
(value: unknown, label: string)

Source from the content-addressed store, hash-verified

1047}
1048
1049function stringArray(value: unknown, label: string): readonly string[] {
1050 if (!Array.isArray(value) || value.length > SKILL_CATALOG_STRING_ARRAY_MAX_ITEMS) {
1051 throw invalidProtocolFrame(`Invalid ${label}`);
1052 }
1053 return value.map((item) => utf8String(item, label, SKILL_CATALOG_STRING_ARRAY_ITEM_MAX_BYTES));
1054}
1055
1056function validationCodes(value: unknown): readonly SkillCatalogValidationCode[] {
1057 return stringArray(value, 'skill validation codes').map(validationCode);

Callers 3

governanceItemFunction · 0.70
bundledItemFunction · 0.70
validationCodesFunction · 0.70

Calls 2

invalidProtocolFrameFunction · 0.85
utf8StringFunction · 0.85

Tested by

no test coverage detected