Skip to content

feat(extract): promote batch offer behind EXTRACT_BATCH_ENABLED - #27

Open
epistemedeus wants to merge 1 commit into
masterfrom
codex/batch-extract-offer-20260907
Open

feat(extract): promote batch offer behind EXTRACT_BATCH_ENABLED#27
epistemedeus wants to merge 1 commit into
masterfrom
codex/batch-extract-offer-20260907

Conversation

@epistemedeus

Copy link
Copy Markdown
Owner

Summary

  • Promote accepted C14/C1 POST /extract/batch into a discoverable constructible offer at introductory 0.01 USDC flat per bounded 1–5 URL attempt when EXTRACT_BATCH_ENABLED=1|true|yes.
  • Default remains off: preserves current 25 paid HTTP / 22 MCP inventory; enabled adds only the batch route/tool across RESOURCES, catalog, OpenAPI, MPP OpenAPI, x402 manifest, paid-action effects, purchase evidence, A2A, llms, and MCP.
  • Reuses shared x402/MPP rails, body-bound replay, C1 core bytes, C15 attribution, and C16 distributions. Keeps package version 1.23.42. No production enablement, wallet work, or service-deployment re-sign in this PR.

Test plan

  • node --test extract-batch.test.mjs extract-batch.http.test.mjs (flag off/on, malformed/oversized, both rails, partial/success, replay/concurrency)
  • Focused discovery/regression suite (construction, machine-surface parity HTTP, discovery probe, idempotency, MPP, paid-action effects, bazaar metadata, startup smoke, etc.)
  • umask 022 npm test574 tests / 573 pass / 1 skip / 0 fail
  • umask 022 npm pack --dry-run (version 1.23.42, extract-batch files included)

Flag enable / rollback

# enable (controller-owned deploy config only)
EXTRACT_BATCH_ENABLED=1

# rollback
unset EXTRACT_BATCH_ENABLED
# or EXTRACT_BATCH_ENABLED=0

Never auto-enable from NODE_ENV / Railway environment name guesses.

Unpaid live acceptance (no payment)

# flag off inventory
curl -sS "$ORIGIN/api/actions" | jq '.actions|length'   # 22
curl -sS -X POST "$ORIGIN/mcp" -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"c19","version":"0"}}}'

# flag on unpaid challenge only
curl -si -X POST "$ORIGIN/extract/batch" -H 'content-type: application/json' \
  -d '{"urls":["https://example.com/"],"fields":["title","description","headings"]}'
# expect HTTP 402, amount 10000, Bazaar input/output schemas present; no source work

Remaining externally owned checks

  • Service-deployment statement still pins the prior 24 routes; controller re-sign before treating batch as deployment-bound.
  • External Bazaar/indexing materialization and any live paid facilitator settle remain controller-owned.
  • No claimed live customer, revenue, or guaranteed margin.

Made with Cursor

Expose POST /extract/batch as an introductory 0.01 USDC constructible offer when the explicit production flag is on, reusing the accepted C1 core and existing x402/MPP rails without changing default inventories or version.

Co-authored-by: Cursor <cursoragent@cursor.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.

1 participant