pextacy
71e89bdfd8
feat(lepton): attribution package (RFB 6.01) + creator-dashboard
...
Adds @settlekit/attribution — reuse-detection, weighted provenance lineage,
and HMAC-signed proofs-of-citation — wired live into the rsshub-citation-toll
sidecar (POST /attribution/{detect,proof,verify}) and persisted via
PgLineageStore/PgProofStore over new lepton_lineage_edges + lepton_citation_proofs
tables.
Adds apps/creator-dashboard — a Next.js earnings view in the Statement
greenbar-ledger design system, driven by real domain logic (createSource +
computeRoyaltyDistribution + detectReuse, not mocks). Statement / Sources /
Payouts / Reuse & proofs (interactive) / Wallet. next build green.
Also bundles in-progress settlement hardening: settlement-core idempotency
concurrency, api env validation, bundles + contracts/worker tweaks.
Verified: 943 vitest tests, 27 Foundry tests, next build all green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 01:19:22 +03:00
pextacy
5b74d2c805
feat(oss-fund): live maintainer resolution + source usage scanning
...
Make the tool real on actual projects, not just the seed:
- NpmRegistryResolver: resolve package → npm registry metadata → GitHub owner,
refined by .github/FUNDING.yml (sponsor handle + funding/claim URL). Wallet
comes from the payee registry (claimed) or escrow. Never throws — any network
or parse failure degrades to escrow; results cached; fetch injectable.
- scanUsageCounts: walk the source tree and count files importing each package
(JS/TS + Python), feeding the real `usage` signal. Pure filesystem, offline.
- Thread an optional fundingUrl through candidates → allocations → API so an
unclaimed maintainer can see where they're being funded / how to claim.
- CLI: on a real manifest, resolve live (OSS_FUND_OFFLINE=1 to skip) and scan
usage automatically; the zero-arg seed demo stays offline + deterministic.
Tests: +4 (usage scan over a temp tree, resolver with injected fetch incl.
FUNDING.yml override, escrow fallback, and caching). Full suite 901 passing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 13:31:26 +03:00
pextacy
1d9c55d131
feat(oss-fund): fund maintainers your dependency tree leans on
...
Add @settlekit/oss-fund: read package.json / requirements.txt (+ optional
lockfile), map the (transitive) dependency graph to maintainer wallets, and
split a small monthly budget across them — settled over the existing
nanopayment spine (payee-registry, x402 Settler, RecursiveSplitDistributor).
The allocation is the core: an engine weighs four signals per package —
directness, reach (criticality), usage, and maintainer underfunding — and the
capability layer converts a proposed weighting into a conserved integer
allocation (legs sum to the budget exactly, only resolvable wallets paid,
unregistered maintainers earmarked to escrow). Two engines, mirroring the paying
agent: a deterministic heuristic (default/CI) and a Claude (claude-opus-4-8)
tool-use brain that proposes weights under the same enforced policy.
- packages/oss-fund: manifest/lockfile parsing, graph + reach, signals,
resolver, conserved allocation, heuristic + Claude engines, settlement +
on-chain distributor calldata, realistic seed, CLI, tests (12 passing).
- apps/api: public PUBLIC routes GET /v1/fund/demo and POST /v1/fund/plan.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 13:11:38 +03:00
ff11f7754e
feat(lepton): nanopayment modules + production settlement spine
...
Lepton Agents Hackathon (Canteen × Circle × Arc): agent-native nanopayments
on Arc, built on the existing SettleKit platform.
Hackathon modules (demo-ready, RFB-aligned):
- @settlekit/agent: autonomous paying agent (Claude tool-use loop) — RFB 1/3
- @settlekit/citation-toll: per-access content + recursive royalty splits — RFB 6
- @settlekit/streaming: per-second continuous-authorization settlement — RFB 4
- @settlekit/x402-client: x402 pay-and-retry + pluggable settler (local/Circle)
- @settlekit/agent-economy: closed-loop traction harness + CLI
- apps/api /v1/lepton: public live demo surface
Production settlement spine (Phase 1):
- @settlekit/settlement-core: configurable Gateway/Circle/local providers,
idempotency, batch accumulator, on-chain reconciliation, nonce + receipt stores
- @settlekit/wallet-fleet: registry, spending caps + kill-switch, balances,
Circle provisioning
- x402-client: provider-settler adapter + Arc-indexer on-chain verifier
- lepton DB schema (12 tables) + persistence Pg stores (settlements, nonces,
sources, royalty legs, wallets, streams, payees)
- apps/worker jobs: lepton-settlement-reconcile, lepton-payout-sweep,
lepton-stream-refund (no-op until the settlement spine is wired)
First real-world traction sidecar (Phase 2):
- @settlekit/payee-registry: identity→wallet payout rule (in-memory + Pg)
- services/sidecars/rsshub-citation-toll: ingest RSS items as priced citeable
sources, x402-gated, settle per-citation royalties via settlement-core
- shared sweepPendingRoyalties used by the worker job and the sidecar
- services/sidecars/* wired as a TS workspace area (pnpm + vitest)
Docs: LEPTON.md, LEPTON_PRODUCTION_PLAN.md. All green: full typecheck + 870 tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 14:37:38 +03:00
3a52b61096
adas
2026-06-17 03:02:36 +03:00
a8d10c0916
asado
2026-06-17 02:31:22 +03:00
3853551433
asad
2026-06-17 02:09:36 +03:00
32b89f0515
firstof
2026-06-16 02:51:34 +03:00
bd3c2a85e5
feat: full-product round 3 — commerce engines wired + worker comms
...
- apps/api: /v1/refunds, /v1/dunning, /v1/disputes, /v1/payouts routes + context
services + mounts (refunds/dunning/disputes/payouts engines).
- apps/dashboard: refunds/dunning/disputes/payouts pages + nav + api client + types.
- apps/worker: 9 scheduled jobs incl. receipt, renewal-reminder, dunning, and
access-granted email jobs via @settlekit/notifications (idempotent, injectable transport).
Full build 0 TS errors; dashboard typecheck clean; 591 tests pass.
2026-06-15 17:25:34 +03:00
5cb0f48db7
feat: full-product round 2 — auth end-to-end + commerce engines
...
- apps/api: public /v1/auth routes (register/login/magic-link/session/logout) via
@settlekit/auth, AuthService in context, signed sk_session cookie; existing
api-key guard untouched (14 api tests intact).
- apps/dashboard + apps/portal: real login/signup UIs (password + magic-link),
httpOnly session cookie via route handlers, server session helpers, sign-out.
- packages: fleshed refunds, dunning (retry schedules), disputes (state machine),
payouts (settlement + available-balance) into real engines with stores+services.
Verified: full build 0 TS errors; 591 tests pass; live auth flow
(register->login->session->magic-link->bad-login 401) confirmed end-to-end.
2026-06-15 17:06:29 +03:00
decf3ff96c
feat: full-product round 1 — auth, ui design system, closed persistence gaps
...
- packages/auth: real storage-agnostic auth (scrypt passwords, opaque sessions,
magic links, HMAC signed cookies, AuthStore + AuthService) on node:crypto.
- packages/ui: shared React 18 design system — theme.css tokens + Button/Card/
Table/Badge/StatCard/Nav/EmptyState/CopyButton/Money/etc + format helpers.
- persistence gaps closed: download_grants + agent_reputations tables, relaxed
saas_seats/agent_usage_events FKs (migration 0002, 52 tables); PgSeatStore,
PgAgentUsageStore, PgGrantStore, PgAgentReputationStore wired into context.
Verified: full build 0 TS errors; 591 tests pass; live Postgres boot + full
purchase->entitlement flow with the new context wiring.
2026-06-15 16:43:50 +03:00
3220b85c57
feat: product expansion — marketing site, customer portal, coupons + invoices
...
- apps/web: public marketing site (Next.js) — hero/§34, what-you-can-sell grid,
how-it-works, dev tools, marketplace teaser, /pricing (§32 tiers), /use-cases (§29).
- apps/portal: customer portal (Next.js, §31) — per-customer overview, purchases/
receipts, license keys, api keys, github/discord access (+re-check), subscriptions,
downloads; anchored on the universal entitlements layer.
- packages/coupons: real discount engine (percent/amount/free-trial, window, expiry,
max + per-customer redemptions, min-subtotal, product scoping), bigint USDC math,
CouponStore + service.
- packages/invoices: real invoicing (line items, discount, @settlekit/tax, statuses,
HTML/text render), fixed float bug, InvoiceStore + service.
- apps/api: /v1/coupons + /v1/invoices routes wired into context + app.
- apps/dashboard: Coupons + Invoices pages + nav + client methods.
All package + backend builds 0 TS errors; web/portal/dashboard typecheck clean;
590 tests pass (two redesigned coupon/invoice tests updated to the new API).
2026-06-15 12:25:58 +03:00
f7c9cd735d
feat(escrow): Postgres persistence for the full escrow lifecycle
...
- add missing escrow_refunds + escrow_reviews tables (schema + migration 0001)
- seed a default customer (DEFAULT_CUSTOMER_ID) to satisfy buyer_customer_id FK
- PgEscrowStore: document-projection over all 7 escrow tables; deterministic
per-task ids for idempotent sub-record upserts; listTasks filters docs by org
- wire escrow to Postgres in context (in-memory fallback retained)
Verified live: create->fund->assign->submit->approve->release persists rows in
escrow_tasks/fundings/submissions/reviews/releases; documents round-trip (real
buyerCustomerId in __doc, FK-safe default projected). 50 tables; 590 tests pass.
Remaining in-memory in Postgres mode (deep FK chains / no clean table fit):
saas seats (subscription FK), agent usage (agent_buyers FK), file-download
grants + agent reputation (no backing table).
2026-06-15 12:04:32 +03:00
286b1d4adc
feat(api): Postgres persistence + real integration/secrets wiring
...
Persistence (selected by DATABASE_URL; in-memory fallback otherwise):
- document-projection pattern (codec): canonical entity in metadata.__doc,
typed columns projected for querying — lossless round-trip despite schema drift.
- async EntityStore<T> (in-memory + Postgres) for products/prices/customers/
delivery-runs/webhooks/github+discord records.
- Pg adapters for packaged stores: checkout/payment/subscription repositories,
entitlements, license keys, api keys, saas plans, bundles, agent services.
- seedDefaults() upserts the default org+merchant to satisfy merchant_id FKs.
- context.ts selects Pg vs in-memory; routes awaited end-to-end.
- drizzle migration 0000_init.sql (48 tables) + db:generate/migrate scripts.
Integrations (config/env.ts + config/integrations.ts + wiring/delivery-clients.ts):
- env-driven secrets for Arc/Circle/GitHub/Discord/Resend/S3, partial-group
validation via ConfigError.
- real delivery clients + Arc x402 verifier when configured; in-memory fallback.
Verified: full purchase->entitlement flow run against a live Postgres 16
(rows persisted + documents round-trip); 590 in-memory tests still pass; 0 TS errors.
x402: pinned-nonce support already added earlier enables stateless verify.
2026-06-15 11:50:50 +03:00
e84506c61d
feat: distribution layer — SDK, React, migrations, deploy infra (no CI/CD)
...
- @settlekit/sdk: typed fetch HTTP client over the REST API; one resource
client per /v1 resource (products, checkout, payments, entitlements,
licenseKeys, apiKeys, bundles, github, discord, saas, escrow, agentServices…),
AbortController timeouts, idempotency keys, SettleKitApiError envelope mapping.
- @settlekit/react: SettleKitProvider, useEntitlement/useCheckout/useCredits
hooks, <Paywall> + <UpgradeButton> (React 18, plan §4).
- database: drizzle.config.ts + generated drizzle/0000_init.sql (48 tables,
indexes, FKs) + db:generate/migrate/push/studio scripts.
- infra: README, ARCHITECTURE, CONTRIBUTING, .env.example, .dockerignore,
docker-compose.yml, per-app Dockerfiles + Dockerfile.next, Makefile.
No tests. No CI/CD pipelines.
2026-06-15 11:02:39 +03:00
598cd03f05
feat: implement all 8 SettleKit apps + fix x402 nonce round-trip
...
apps:
- api: Hono REST server, all §26 endpoints, 14 tests
- worker: delivery runner + payment-confirm + access-sync + renewal + webhook-retry jobs wired to real package clients
- dashboard: Next.js merchant dashboard, full §16/§27 sections + §28 product builder
- checkout: Next.js hosted USDC checkout with real delivery materialization
- marketplace: Next.js public marketplace + agent metadata.json route
- admin: Next.js risk/ops console wired to @settlekit/risk + database
- docs: Next.js docs site (9 static routes)
- examples: 5 runnable end-to-end examples
fix(x402): support pinned config.nonce so a stateless verifier can confirm
the challenge nonce round-trips (default stays random; package tests intact).
Full workspace: 590 tests passing (122 files), tsc green for all packages +
api/worker/examples, all 5 Next apps typecheck clean, docs next build green.
2026-06-15 10:49:14 +03:00
3fe0c88942
feat: implement all 77 SettleKit packages with real code
...
Core engine: entitlements (§14), delivery action runner (§21).
Payment rails: arc (viem USDC verify), circle (REST), x402 middleware, payments, webhooks (HMAC), notifications (Resend).
Integrations: github (Octokit App), discord (REST v10).
Commerce: saas billing, bundles, license-keys, api-keys, file-delivery (signed URLs + SigV4), usage/credits, agent-services, escrow, marketplace-core, risk.
Persistence: database (Drizzle/Postgres, 48 tables §25).
Plus supporting domain packages.
561 tests passing across 117 files; tsc -b green for every package.
2026-06-15 03:24:19 +03:00
4afda54455
feat: monorepo scaffold + @settlekit/common contract package
...
- pnpm workspace, shared tsconfig, vitest
- common: ids, money (USDC base-unit math), Result/SettleKitError, time
- domain types: product, customer, payment, entitlement, delivery, integration
- 13 passing contract tests
2026-06-15 02:55:22 +03:00