Skip to content

feat(integrations): add HttpClawHubClient for CG-010#4

Merged
ysqander merged 1 commit intomainfrom
codex/implement-ticket-cg-010
Mar 13, 2026
Merged

feat(integrations): add HttpClawHubClient for CG-010#4
ysqander merged 1 commit intomainfrom
codex/implement-ticket-cg-010

Conversation

@ysqander
Copy link
Copy Markdown
Owner

Motivation

  • Implement the ClawHub integration required by ticket CG-010 so scans can be enriched with marketplace metadata and remote SKILL.md retrieval.
  • Ensure provider verdicts are normalized to the shared ThreatIntelVerdict contract and degrade to a neutral unknown verdict when fields are missing.

Description

  • Add HttpClawHubClient in packages/integrations/src/clawhub-client.ts with getSkill, getSkillMarkdown, and listSkills implementations against the ClawHub endpoints.
  • Introduce IntegrationHttpError in packages/integrations/src/errors.ts and re-export the new surface via packages/integrations/src/index.ts.
  • Add unit tests in packages/integrations/src/clawhub-client.test.ts covering neutral degradation, explicit provider verdict parsing, markdown retrieval, and listing behavior, and add a test script to packages/integrations/package.json.
  • Normalize provider verdict fields into ThreatIntelVerdict while safely handling optional numeric and string fields to satisfy exactOptionalPropertyTypes.

Testing

  • Ran pnpm build and the workspace build completed successfully including the new integrations code.
  • Ran pnpm typecheck and full workspace typecheck passed.
  • Ran pnpm test where @clawguard/integrations tests passed but the overall workspace run failed due to an existing failing test in @clawguard/discovery that is unrelated to this change.

Codex Task

@ysqander ysqander merged commit e229df5 into main Mar 13, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant