api-config.json 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. {
  2. "name": "voc-data-normalizer",
  3. "displayName": "VOC 数据归一化",
  4. "description": "将小红书、抖音、Amazon、TikTok、Instagram 等平台的原始 VOC 文件归一化为 _merged.json、comments-flat.jsonl 和 normalizer-audit.json,供报告生成链路复用。",
  5. "category": "voc",
  6. "version": "1.0.0",
  7. "type": "local-script",
  8. "execution": {
  9. "kind": "command",
  10. "command": "node",
  11. "args": [
  12. "scripts/tools/openclaw-tool-runner.js",
  13. "--tool",
  14. "voc-data-normalizer.js",
  15. "--result-prefix",
  16. "NORMALIZER_RESULT",
  17. "--",
  18. "--input",
  19. "{{input}}",
  20. "--output",
  21. "{{output}}",
  22. "--project",
  23. "{{project}}",
  24. "--category",
  25. "{{category}}"
  26. ],
  27. "cwd": "{{workspaceRoot}}",
  28. "outputParser": {
  29. "type": "stdout-prefix-json",
  30. "prefix": "NORMALIZER_RESULT=",
  31. "description": "解析 stdout 中以 NORMALIZER_RESULT= 开头的最后一行,去掉前缀后即为归一化结果 JSON。"
  32. },
  33. "exitCodes": {
  34. "0": "ok",
  35. "1": "error"
  36. }
  37. },
  38. "parameters": {
  39. "type": "object",
  40. "required": [
  41. "input",
  42. "output"
  43. ],
  44. "properties": {
  45. "input": {
  46. "type": "string",
  47. "description": "原始平台数据目录,目录内可包含 json/jsonl 文件。"
  48. },
  49. "output": {
  50. "type": "string",
  51. "description": "归一化输出目录。"
  52. },
  53. "project": {
  54. "type": "string",
  55. "default": "openclaw-voc-course",
  56. "description": "项目名称,写入 _merged.json.metadata.project。"
  57. },
  58. "category": {
  59. "type": "string",
  60. "default": "",
  61. "description": "品类、产品或品牌方向。"
  62. }
  63. }
  64. },
  65. "output": {
  66. "type": "object",
  67. "properties": {
  68. "outputDir": {
  69. "type": "string"
  70. },
  71. "files": {
  72. "type": "array",
  73. "items": {
  74. "type": "string"
  75. }
  76. },
  77. "itemCount": {
  78. "type": "integer"
  79. },
  80. "validVocCount": {
  81. "type": "integer"
  82. },
  83. "duplicateItemCount": {
  84. "type": "integer"
  85. },
  86. "duplicateVocCount": {
  87. "type": "integer"
  88. },
  89. "errors": {
  90. "type": "integer"
  91. }
  92. }
  93. },
  94. "deployment": {
  95. "skillInstallDir": "~/.openclaw/skills/voc-data-normalizer",
  96. "toolInstallPaths": [
  97. "~/.openclaw/tools/voc-data-normalizer.js",
  98. "~/.openclaw/workspace/scripts/tools/voc-data-normalizer.js",
  99. "~/.openclaw/workspace/scripts/tools/openclaw-tool-runner.js"
  100. ]
  101. },
  102. "relatedFiles": {
  103. "executor": "scripts/tools/voc-data-normalizer.js",
  104. "runner": "scripts/tools/openclaw-tool-runner.js",
  105. "courseUsage": "docs/voc-skills-course-plan/07-openclaw-single-platform-course.md"
  106. }
  107. }