@kingsoftcloud/agentkit-harness-core 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -53,7 +53,9 @@ export function publicFailureContent(content) {
|
|
|
53
53
|
keys.add(key);
|
|
54
54
|
return Object.fromEntries([...keys].map(key => {
|
|
55
55
|
const item = value[key];
|
|
56
|
-
|
|
56
|
+
// Empty optional diagnostic codes mean "absent" in typed Skill events.
|
|
57
|
+
// They carry no secret and must remain stable execution evidence.
|
|
58
|
+
return [key, codeFields.has(key) && typeof item === 'string' && item !== ''
|
|
57
59
|
? publicErrorCode({ code: item }, 'TOOL_OPERATION_FAILED')
|
|
58
60
|
: project(item, diagnostic || diagnosticFields.has(key), depth + 1)];
|
|
59
61
|
}));
|
package/package.json
CHANGED
|
@@ -49,7 +49,9 @@ export function publicFailureContent<T extends Record<string, unknown>>(content:
|
|
|
49
49
|
if (Object.hasOwn(value, key)) keys.add(key);
|
|
50
50
|
return Object.fromEntries([...keys].map(key => {
|
|
51
51
|
const item = (value as Record<string, unknown>)[key];
|
|
52
|
-
|
|
52
|
+
// Empty optional diagnostic codes mean "absent" in typed Skill events.
|
|
53
|
+
// They carry no secret and must remain stable execution evidence.
|
|
54
|
+
return [key, codeFields.has(key) && typeof item === 'string' && item !== ''
|
|
53
55
|
? publicErrorCode({ code: item }, 'TOOL_OPERATION_FAILED')
|
|
54
56
|
: project(item, diagnostic || diagnosticFields.has(key), depth + 1)];
|
|
55
57
|
}));
|