Skip to content

feat(typescript-recipes): add vendor intelligence recipe#51

Merged
zhengchaol merged 13 commits into
parallel-web:mainfrom
georgeatparallel:feat/vendor-intelligence
Jul 14, 2026
Merged

feat(typescript-recipes): add vendor intelligence recipe#51
zhengchaol merged 13 commits into
parallel-web:mainfrom
georgeatparallel:feat/vendor-intelligence

Conversation

@georgeatparallel

@georgeatparallel georgeatparallel commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

What this adds

This PR adds a local TypeScript recipe for researching vendor risk and keeping the result current with Parallel.

It has three commands:

  • bootstrap researches each vendor, applies a deterministic risk policy, and starts a snapshot Monitor.
  • check-updates reads new Monitor events and runs focused follow-up research when a change crosses the review threshold.
  • cleanup cancels the Monitors recorded in local state.

The README explains what each command does, when it consumes credits, what a successful result looks like, and how to recover after an interrupted command. The implementation uses the current TypeScript SDK and V1 Monitor API.

Why it is local

The earlier version in #37 combined n8n workflows, a TypeScript layer, and a hosted Next.js/Supabase app. That gave readers several implementations of the same workflow and a lot of infrastructure to set up.

This version keeps one implementation and one local state file. A reader needs Node.js and a Parallel API key; there is no database, frontend, webhook, or deployment step. Because there is no hosted demo, the Cookbook now supports websiteUrl: null and hides the Demo button for verified local recipes.

This PR supersedes #37 and keeps Sahith's attribution in the Cookbook registry.

Try it

The normal checks do not call the Parallel API:

cd typescript-recipes/parallel-vendor-intelligence
npm ci
npm run validate
npm audit --audit-level=high

To use the recipe, copy .env.example to .env, add PARALLEL_API_KEY, and run:

npm run --silent bootstrap | jq
# Leave the Monitor active. Run this later to process new events:
npm run --silent check-updates | jq
# Run this when you are finished monitoring:
npm run --silent cleanup | jq

The opt-in live test consumes credits. It researches Cloudflare, creates a snapshot Monitor, checks for updates, cancels every Monitor it created, and confirms the remote status:

npm run test:live

Verified

  • A fresh Node.js 20 install passes the TypeScript check and all 106 deterministic tests.
  • The dependency audit reports no vulnerabilities.
  • Package, schema, secret, and repository pre-commit checks pass.
  • A production run completed a real core Task and lite Monitor lifecycle, including confirmed cancellation.

@georgeatparallel
georgeatparallel marked this pull request as ready for review July 10, 2026 21:27
@zhengchaol
zhengchaol merged commit 7cc2560 into parallel-web:main Jul 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants