Skip to content

Add prepaid credits for image and clip generation - #148

Open
0thernet wants to merge 5 commits into
mainfrom
codex/credits-service
Open

0thernet wants to merge 5 commits into
mainfrom
codex/credits-service

Conversation

@0thernet

Copy link
Copy Markdown
Member

Adopt the shared Hraness Credits service for Slopcamera hosted operations: wallet token handling, cost hold and settle, 402 shortfall, and CLI skills.

0thernet and others added 5 commits September 17, 2026 14:50
apps/gateway is a separately deployable Vercel project (slopcamera-gateway)
with one route, POST /v1/generate. It authenticates a request by placing a
Hraness credits hold for the device token in x-hraness-credits-subject,
generates through the SDK's direct Vercel AI Gateway path with the operator's
key, settles from the reported or list-price cost, releases on failure, and
answers a shortfall with 402 credits_required carrying the service's payload.
Requests are bounded, only the CLI's model allowlist is admitted, and prompts
are never logged.

The SDK's generate module exports its prompt, image-byte, output-path and
atomic-write checks for the gateway and parses a Gateway-reported cost. The
route registers in costs.json, the workspace and CI gain a routed
check:gateway job (coverage contract re-reviewed), and the standalone
boundary enumerates the new package.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
slopcamera credits … delegates to @hraness/credits-foundation with the
Slopcamera product profile. slopcamera image generate --hosted (or
SLOPCAMERA_GENERATION_MODE=hosted) sends the direct lane's request to the
pinned Hraness gateway with the stored credits device token, reads no Gateway
credential, admits only the direct lane's models, and validates and writes
the returned image exactly as the direct lane does; the receipt gains a
credits block. On 402 the command prints one hraness-credits-required-v1
line (agent form under --json, plain lines otherwise) with the original
argv as resume, sets error credits_required in its JSON, and exits with the
existing authorization-required code 10. Without --hosted nothing changes.

Committed SDK and CLI outputs are rebuilt; the help.ts identity-inventory
row is re-reviewed for the completions line that now lists credits.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
README, the docs index, the generate-media how-to, a new credits reference,
and the Vercel runbook describe the opt-in --hosted route, the credits
commands, the payment handoff, and the slopcamera-gateway project settings
and environment. The agent skill gains a credits reference quoting the
envelope and the agent steps. AGENTS.md, CONTRIBUTING, PRIVACY and SECURITY
record the reviewed policy: hosted generation is opt-in, the gateway is a
separate app, the website keeps no account or commerce surface, credits are
dollars where one credit is one cent, and a shortfall exits 10.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
# Conflicts:
#	apps/desktop/dist/cli/main.js
#	dist/cli.js
#	dist/index-2n4v3450.js
#	dist/index-2sbvyv0f.js
#	dist/index-6zc37y62.js
#	dist/index-d6m7tcc2.js
#	dist/index-n4n19hs5.js
#	dist/index-rx5qv31d.js
#	dist/index-sg902fta.js
#	dist/index-xzdmyxhv.js
#	dist/index-z316ncct.js
#	dist/index.js
#	dist/operations.js
#	dist/workflow.js
#	scripts/legacy-identity.inventory.json
#	skills/slopcamera/SKILL.md
The merge from main and the credits-surface build changed the generated
distribution hashes and the help.ts identity lines. Repin the inventory so
check:standalone passes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
slopcamera Ready Ready Preview Sep 17, 2026 8:19pm UTC

Request Review

0thernet added a commit that referenced this pull request Sep 25, 2026
## Summary

Carries the canonical Hraness product-messaging record for Slopcamera
(reviewed 2026-09-24; jungle commit `a9988b903`) across the public
surfaces:

- **Homepage** (`apps/web/src/index.html`): title,
meta/OG/Twitter/JSON-LD descriptions now use the canonical meta; hero
heading is the canonical tagline, the summary is the canonical hero
summary, the secondary action is "See what agents made", and the
"Formerly Atet" boundary line is dropped. JSON-LD `featureList` gains
the true Blender/CadQuery/Manim and Hraness Credits features, and "a
record of each operation" becomes "records of important operations". The
last FAQ changes from "Who made Slopcamera?" to "Is Slopcamera the same
as Atet?" — the shared site footer remains the sole organization
attribution.
- **Agent surfaces** (`apps/web/src/agent-pages.ts`): `/index.md` lead
uses the canonical meta, `/llms.txt` uses canonical meta + long, and the
separate `## Built by Hraness` maker section is removed (the shared
footer owns attribution).
- **README, package, docs, help**: README lead is the canonical medium,
"What Slopcamera does" carries the meta, `package.json` description is
the canonical meta, `docs/README.md` and `apps/web/src/docs/index.md`
leads name the media studio, and CLI `slopcamera --help` prints
`slopcamera: a media studio for coding agents`.
- **Social card**: `og-source.svg` kicker is `MEDIA STUDIO FOR AGENTS`
and the SVG title is the canonical title; `og.png` regenerated with `bun
run generate:og`. The hash-pinned `og-serif-hero.png` raster (serif
"Direct scenes and films with your coding agent.") is unchanged — it is
a checked artwork asset, not a superseded authored line.
- **Blog**: index description, `blogSite.description`, post dek for
Introducing Slopcamera, and image alt text use the canonical
category/meta wording. Post bodies and the quarantined/indexable
lifecycle are untouched.
- **Support proposition** (`src/support.ts`, `site-content.ts`, skill
reference): "local visual tools" -> "local media tools", with the exact
anchor/footer digests updated.
- **Contracts**: copy-pinned tests (`site.test.ts`,
`site-copy-content.test.ts`), browser-contract labels, current-design
fixture islands (`site-refinement-fixtures.ts`,
`site-examples-profile.ts` — baselines untouched), `check-standalone`
expected description, support-fixture hashes, rebuilt `dist/` outputs,
and the reviewed `legacy-identity.inventory.json` rows all updated to
match.

Superseded authored lines replaced: "a visual studio for coding agents"
/ "local visual studio for coding agents" (title, descriptions, OG alt,
preview, docs, README, package, llms.txt), "Give your coding agent a
visual studio" (hero, /index.md), "Explore the examples" (secondary
CTA), "Formerly Atet" (hero boundary, README and index leads), "creative
scenes and non-destructive media editing for coding agents" (CLI help),
"LOCAL VISUAL STUDIO" (OG kicker), "Make and edit visual media with your
coding agent." (preview), "A local visual studio for coding agents."
(package/blog site description), and "local visual tools for agents"
(support proposition).

Historical Atet references are kept where they document releases,
redirects, or lineage (`alternateName`, release evidence,
install-from-source, blog rename note, capability table).

## Overlap

- #231 `design/portfolio-surfaces` — overlaps hero, site-content, and
homepage copy; this change applies the canonical record to the same
files.
- #148 `credits-service` — overlaps price/credits claims; no billing
language changed here beyond naming the existing Hraness Credits feature
in JSON-LD.
- #46 `seo-blog` — blog metadata/discovery descriptions updated here for
the canonical category; post bodies untouched.

## Validation

- `bun run check` — full gate green locally (cost surfaces, standalone
boundary + reviewed identity inventory, public-copy claims, SDK,
desktop, API, web build/tests, native preview verification,
packed-consumer smoke).
- `bun run check:copy` — 230 claims verified across 97 surfaces.
- `bun run generate:og` — regenerated `og.png`; new digest pinned in
`site.test.ts`.

Co-authored-by: 0thernet <894119+0thernet@users.noreply.github.com>
0thernet added a commit that referenced this pull request Sep 29, 2026
…e and Soundfish bundling (#278)

## Summary

Changes the visible product name from Slopcamera to SlopCamera on the
naming surfaces, fixes other Hraness product names where the site shows
them, and adds a blocked plan for bundling icon.place and Soundfish.

Part of the Hraness four-pack reorganization. Jungle syncs the GitHub
About text later, so this PR does not change it.

## Changes

- **Site metadata and wordmark.** `<title>`, `application-name`,
`og:site_name`, Open Graph and Twitter titles and descriptions, JSON-LD
names, the wordmark and footer `aria-label`s, the footer brand, the
status-page site name, the social-card name, the blog and feed titles,
the docs page titles in `docs-registry.ts`, and the `llms.txt` heading
and summary.
- **Canonical description.** "SlopCamera lets your coding agent make
images, …" in `package.json`, `scripts/check-standalone.ts`, the
homepage metadata, the home Markdown, `llms.txt`, and the README.
- **README.** The heading, intro and prose.
- **Package metadata, API and skill.** Both `package.json` descriptions,
the OpenAPI `info.title` and description, and the Agent Skill
`description` and H1.
- **Headings.** Doc headings in `docs/`, `apps/web/src/docs/`, the skill
references, and the `apps/web` and `apps/desktop` READMEs.
- **Blog posts.** Following the AGENTS.md rename rule, post bodies and
rendered source titles now use SlopCamera, aicharts and GhostGet.
- **Copy check.** `scripts/copy-facts.ts` recognizes the version claims
"SlopCamera vX.Y.Z" as well as "Slopcamera vX.Y.Z". Two
`check-copy.test.ts` cases now use the new casing, so both spellings are
covered.
- **Tests and inventory.** Tests that pin the changed copy are updated.
`scripts/legacy-identity.inventory.json` rows are refreshed for six
files. The changed lines only contain the word "studio" (as in "media
studio"), and the occurrence and line counts are unchanged.
- **New plan.** `kb/plans/bundle-icon-place-and-soundfish.md` (status
`blocked`) covers:
- exact-version `iconplace` and `@hraness/soundfish` (0.7.0 or later)
dependencies
- the closed operations `slopcamera.icon.compose|render` and
`slopcamera.soundtrack.compose|grid`
  - the matching MCP tools, CLI verbs and skill references
  - the required AGENTS.md and `customization.md` amendments

It stays blocked until both npm releases exist. The KB catalog is
refreshed.

## Not changed

- Identifiers, env vars, file names, package and binary names, operation
codes, and runtime or tool strings.
- CHANGELOG and KB history.
- Page body copy on the homepage (hero, FAQ, install and closing
sections) and the rest of the docs and skill prose. Browser-contract
fixtures in `apps/web/scripts/*-profile.ts` pin those sections, and #273
and #277 are rewriting them. A follow-up after those land can rename
that body copy.
- CLI help text (`apps/desktop/cli/help.ts`). It has no banner that
carries the product name, and editing it means rebuilding the committed
`apps/desktop/dist/cli/main.js`, which the release PR #276 is also
rebuilding.

## Overlaps

- **#276 (release 3.7.0):** `package.json` (the description line sits
next to the version line), `scripts/check-copy.test.ts`,
`scripts/legacy-identity.inventory.json` and
`skills/slopcamera/SKILL.md`. No version files are touched. Whichever PR
lands second needs a mechanical rebase.
- **#273 and #277:** `apps/web/src/index.html` (head and wordmark only)
and `apps/web/src/agent-pages.ts` (three lines).
- **#148 and #179:** these older PRs touch `package.json` and the
README.

## Verification

- `bun run check:copy`: pass
- `bun run check:standalone`: pass
- `bun run kb:check`: pass
- `bun run check` (local fallback): every step passes except as follows.
- `check:cost-surfaces`, `check:standalone`, `check:copy`, `check:sdk`,
`check:api` and `check:web` (including `verify:preview` and
`verify:current`, 46/46) pass.
- In `test:desktop`, 1,959 tests ran and one failed: the scheduler
deadline test "releases claims held by never-settling lifecycle ports"
timed out under load. Rerun alone, `apps/desktop/code/scheduler.test.ts`
passes 45/45. This change touches no desktop code.
- Review correction: the second `check:standalone` (after the site
build) did fail because of this change. The footer support link's
aria-label now reads "Support SlopCamera", which changed the anchor hash
pinned in `scripts/standalone-support-fixture.ts`. Review commit 136f204
updates that hash and its test fixture; `check:standalone` now passes
with `apps/web/dist` built.
- `bun run test:package`: pass (539 packed files)

- Review commit 401224c also names SlopCamera in the
`apps/api/README.md` intro.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: 0thernet <894119+0thernet@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0thernet added a commit that referenced this pull request Sep 29, 2026
## Summary

Slopcamera 3.7.0 adds a reusable, code-built product launch film for
Hraness marketing sites (plan section 1.3). Techniques are generalised
from Botfilter's `video/` and de-branded.

- `slopcamera html init <dir> --template launch-film [--aspect
16:9|1:1|9:16] [--json]` copies `examples/html/launch-film/` (film.html
with slots, film.css, film.js, film.json, timeline.ts, mockups.tsx,
build.ts, README). `build.ts` renders `{id, element}` mockup slots with
`renderToStaticMarkup`, inlines `@hraness/design-kit/mockups.css` when
installed plus product CSS and fonts, validates with
`HtmlSceneInputSchema`, and writes `out/scene.json`, `out/captions.vtt`
and `out/beats.json`. Acts: cold open, title, product walk (frame,
camera, cursor, highlight), proof, limits, end card.
- New export `@hraness/slopcamera/local/html-film`: `clamp`, `lerp`,
`prog`, `easings`, `spring`, `split`, `kin`, `show` (sets visibility and
display), `stepValue`, `crossfade`, `defineTimeline`, `camera`,
`drawMark`, `cursor`, `captionsFromTimeline` (WebVTT), plus overlay
frame types.
- `html still --input scene.json --at 3,12.5 --output <dir>` and `html
preview` draw selected frames through the real injected runtime
(renderer gains an optional ascending `frames` subset).
- `html deliver <export.json> --basename X --poster-at --social-at
[--cuts 1:1,9:16] [--per-beat-clips]`: faststart MP4, VP9 WebM, poster,
1200x630 social still, aspect cuts over blurred fill, 6 to 10 s per-beat
clips, receipt JSON; budgets MP4 12 MB, WebM 10 MB, JPEG 250 KB with
non-zero exit on overflow.
- Docs: `skills/slopcamera/references/launch-films.md` (with a
HyperFrames/Remotion mapping, no importer), SKILL.md routing row,
`docs/how-to/render-motion-graphics.md` and `apps/web/src/docs`
together, `htmlFilmTemplates` copy fact and rules.
- Version 3.7.0 across package, sentinels, CHANGELOG; release workflow
package file bound 550 to 570 for the template files.

## Checks

- `bun run check` stages: cost-surfaces, standalone, copy (232 claims
across 99 surfaces), sdk (970 tests across 95 files), release workflows
(30 across 2), schema, skill, desktop (1983 tests across 267 files), api
(39 across 7), web (726 across 28, verify:current 46/46), standalone,
test:package (552 packed files, 4.96 MB packed). One run hit a
known-flaky `worker-client.test.ts` PID guard; it passed on the previous
full run and on two isolated reruns, and the remaining stages were run
after it.
- Smoke: `html init` in a temp dir, draft build at half scale 15 fps,
stills at 1, 2.5, 6, 10.5, 14.5, 22 and 33 s, a 3 s render, and `html
deliver` with 1:1 and 9:16 cuts and per-beat clips (all within budget,
moov before mdat).

## Notes

- The first 3 s render attempt failed with `conflict: Browser runtime
filesystem changed through browser shutdown`; the immediate retry
passed. Not caused by this change as far as observed, worth watching.
- No overlap with open PRs (#148 credits, #273 marketing copy); README
positioning prose is untouched.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 8f7292db Deployed Sep 17, 2026 by vercel[bot]
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