Skip to content

Core pipeline step library — map/filter/dedupe_upsert/fan_out/http_reachable/geocode (#96) - #107

Merged
serge-ivo merged 1 commit into
mainfrom
feat/96-step-library
Aug 1, 2026
Merged

Core pipeline step library — map/filter/dedupe_upsert/fan_out/http_reachable/geocode (#96)#107
serge-ivo merged 1 commit into
mainfrom
feat/96-step-library

Conversation

@serge-ivo

Copy link
Copy Markdown
Contributor

Closes #96. Part of #94. Builds on #95 (http connector) + composes under #97 (pipeline runner).

Six reusable first-party steps (tier:"standard", no connector), in workers/api/src/lib/steps.ts, spread into FIRST_PARTY_TOOLS → dispatchable via runRegistryTool (the #97 runner) and at POST /v1/instances/:id/tools/:name:

  • map — rename/extract(nested)/derive/keep; pure. filter — where[{field,op,value}], any/keep|drop; pure.
  • dedupe_upsert — writes the instance's own collection via the AgentDO records path, looks up by key first (update-in-place or skip) so it never trips the unique constraint.
  • fan_out — grid mode ((2n+1)² cos-lat-corrected cell centres) or pages mode (threads [connectors] Generic HTTP/REST connector — call any API as configuration #95's nextCursor until exhausted, cap ≤50).
  • http_reachablesafeFetch probe → {ok,code}; 4xx=live, 5xx/timeout/blocked=dead. Metadata IP rejected pre-network.
  • geocode — delegates to the http_request tool (vault key + SSRF + responseMap all from [connectors] Generic HTTP/REST connector — call any API as configuration #95) → {lat,lng,country,state,locality}.

geocode/http_reachable reuse #95 (no re-implemented fetch/SSRF); getPath exported from http.ts for shared dotted-path grammar.

Verify: tsc clean · 842 api tests pass (+24, 0 regressions) · lead-finder composition test drives map→filter→dedupe_upsert through the registry and asserts the right 2 leads survive+insert.

Note: dedupe_upsert is scope read (writes its own instance collection, no external connector → no write-consent gate, which keys off tool.connector).

🤖 Generated with Claude Code

…/http_reachable/geocode (#96)

First-party catalog of reusable pipeline steps, each a standard-tier ToolDef
registered in FIRST_PARTY_TOOLS so the #97 runner composes them via
runRegistryTool and they're callable at POST /v1/instances/:id/tools/:name.

- map/filter/fan_out(grid) are pure; dedupe_upsert writes the instance's own
  collection via the AgentDO records path (respects the unique-key constraint by
  looking up before insert-or-update).
- http_reachable + geocode reuse #95: reachable goes through safeFetch (SSRF
  guard), geocode delegates to the http_request tool so the vault api-key and
  fetch/SSRF handling are not re-implemented.
- Proves the lead-finder's transform/filter/dedupe/reachability/geocode are all
  expressible from the catalog (composition test).

Child of #94.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

[pipelines] Core step library — map / filter / dedupe·upsert / paginate / reachability / geocode

2 participants