refactor(ship): extract shared cap publisher (vit/cap.js)
- move org.v-it.cap record assembly + putRecord out of shipCap into new pure src/lib/cap.js (publishCap)
- expose it publicly via package.json exports as `vit/cap.js`; supports optional reply strong refs, app.bsky.embed.external, and caller-supplied rkey/swapCid for idempotent refreshes
- shipCap now builds+writes through publishCap; CLI contract (flags, help, output, caps.jsonl, verbose dump, error guidance) unchanged
- add unit tests (fake agent, exact-write + failure paths), an offline tarball resolve test, and a traversal invariant test
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
refactor(ship): extract shared cap publisher (vit/cap.js)
- move org.v-it.cap record assembly + putRecord out of shipCap into new pure src/lib/cap.js (publishCap)
- expose it publicly via package.json exports as `vit/cap.js`; supports optional reply strong refs, app.bsky.embed.external, and caller-supplied rkey/swapCid for idempotent refreshes
- shipCap now builds+writes through publishCap; CLI contract (flags, help, output, caps.jsonl, verbose dump, error guidance) unchanged
- add unit tests (fake agent, exact-write + failure paths), an offline tarball resolve test, and a traversal invariant test
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat: unify CLI error surface with cause-unwrapping helper
Add a shared error formatter that unwraps cause chains for both text and
JSON output, route the CLI command catches through it, tighten the login
failure path with a SIGINT cancel helper and common-issues footer, make
network errors name the exact URL they failed against, replace the
approved hidden catches with warnings, and document login troubleshooting
in the getting-started guide.
Files touched:
- helpers: src/lib/error-format.js, src/lib/json-output.js
- commands: src/cmd/adopt.js, src/cmd/beacon.js, src/cmd/config.js,
src/cmd/doctor.js, src/cmd/explore.js, src/cmd/firehose.js,
src/cmd/follow.js, src/cmd/hack.js, src/cmd/inbox.js,
src/cmd/init.js, src/cmd/learn.js, src/cmd/link.js,
src/cmd/login.js, src/cmd/remix.js, src/cmd/scan.js,
src/cmd/ship.js, src/cmd/skim.js, src/cmd/vet.js,
src/cmd/vouch.js
- libs: src/lib/config.js, src/lib/oauth.js, src/lib/pds.js,
src/lib/vit-dir.js
- docs/tests: docs/start/index.html, test/error-format.test.js,
test/explore.test.js, test/json-output.test.js,
test/login.test.js, test/pds.test.js
Silent-catch ledger:
- src/lib/config.js: warn on unreadable vit.json; warn on unreadable
local .vit/login.json.
- src/lib/vit-dir.js: warn on unreadable .vit/config.json; warn on
malformed JSONL lines; warn on unreadable JSONL logs; warn on
unreadable following.json.
- src/lib/oauth.js: warn on unreadable session.json in the session
store, checkSession, and restoreAgent paths; warn on unreadable local
app-password sessions in checkSession and restoreAgent.
- src/lib/pds.js: warn when DID-document handle resolution fails, then
fall back to the DID.
- src/cmd/doctor.js: warn on unreadable SKILL.md files, unreadable
skill directories, install-path inspect failure, unreadable
local/global session files, and unexpected Bluesky session validation
failures.
- src/cmd/beacon.js: warn on invalid target .vit/config.json content.
- src/cmd/hack.js: warn when git remote add upstream fails.
- src/cmd/learn.js: warn when temp-dir cleanup fails.
- src/cmd/login.js: keep the .gitignore probe silent; warn on
unreadable local/global session files during login probes.
- src/cmd/firehose.js: warn and skip malformed JSON messages.
- src/cmd/scan.js: warn and skip malformed Jetstream events.
- src/cmd/init.js: keep the git work-tree probe and optional remote URL
probe chain silent; warn on git remote failure and unreadable remote
URLs.
- src/lib/compat.js: keep the executable lookup probe silent.
Test changes:
- added test/error-format.test.js for flat errors, nested causes,
non-Error throwables, non-Error causes, circular causes, the 10-level
cap, and verbose stack indentation
- added login coverage for cancelLogin() and printLoginFailure()
- added json-output throwable-input coverage for nested and flat errors
- updated explore and pds expectations for URL-specific error messages
Not done / founder steps:
- make ship BUMP=patch (-> 0.4.3): founder's step.
- make deploy-site: founder's step. Required because
docs/start/index.html changed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
feat: unify CLI error surface with cause-unwrapping helper
Add a shared error formatter that unwraps cause chains for both text and
JSON output, route the CLI command catches through it, tighten the login
failure path with a SIGINT cancel helper and common-issues footer, make
network errors name the exact URL they failed against, replace the
approved hidden catches with warnings, and document login troubleshooting
in the getting-started guide.
Files touched:
- helpers: src/lib/error-format.js, src/lib/json-output.js
- commands: src/cmd/adopt.js, src/cmd/beacon.js, src/cmd/config.js,
src/cmd/doctor.js, src/cmd/explore.js, src/cmd/firehose.js,
src/cmd/follow.js, src/cmd/hack.js, src/cmd/inbox.js,
src/cmd/init.js, src/cmd/learn.js, src/cmd/link.js,
src/cmd/login.js, src/cmd/remix.js, src/cmd/scan.js,
src/cmd/ship.js, src/cmd/skim.js, src/cmd/vet.js,
src/cmd/vouch.js
- libs: src/lib/config.js, src/lib/oauth.js, src/lib/pds.js,
src/lib/vit-dir.js
- docs/tests: docs/start/index.html, test/error-format.test.js,
test/explore.test.js, test/json-output.test.js,
test/login.test.js, test/pds.test.js
Silent-catch ledger:
- src/lib/config.js: warn on unreadable vit.json; warn on unreadable
local .vit/login.json.
- src/lib/vit-dir.js: warn on unreadable .vit/config.json; warn on
malformed JSONL lines; warn on unreadable JSONL logs; warn on
unreadable following.json.
- src/lib/oauth.js: warn on unreadable session.json in the session
store, checkSession, and restoreAgent paths; warn on unreadable local
app-password sessions in checkSession and restoreAgent.
- src/lib/pds.js: warn when DID-document handle resolution fails, then
fall back to the DID.
- src/cmd/doctor.js: warn on unreadable SKILL.md files, unreadable
skill directories, install-path inspect failure, unreadable
local/global session files, and unexpected Bluesky session validation
failures.
- src/cmd/beacon.js: warn on invalid target .vit/config.json content.
- src/cmd/hack.js: warn when git remote add upstream fails.
- src/cmd/learn.js: warn when temp-dir cleanup fails.
- src/cmd/login.js: keep the .gitignore probe silent; warn on
unreadable local/global session files during login probes.
- src/cmd/firehose.js: warn and skip malformed JSON messages.
- src/cmd/scan.js: warn and skip malformed Jetstream events.
- src/cmd/init.js: keep the git work-tree probe and optional remote URL
probe chain silent; warn on git remote failure and unreadable remote
URLs.
- src/lib/compat.js: keep the executable lookup probe silent.
Test changes:
- added test/error-format.test.js for flat errors, nested causes,
non-Error throwables, non-Error causes, circular causes, the 10-level
cap, and verbose stack indentation
- added login coverage for cancelLogin() and printLoginFailure()
- added json-output throwable-input coverage for nested and flat errors
- updated explore and pds expectations for URL-specific error messages
Not done / founder steps:
- make ship BUMP=patch (-> 0.4.3): founder's step.
- make deploy-site: founder's step. Required because
docs/start/index.html changed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
feat: cap requests — kind:request, vit inbox, vouch --kind want/endorse
Adds the inbound contribution channel for vit:
CLI:
- vit ship --kind request: beacon required (--beacon flag or project config),
text optional, ref auto-generated from title via slugify+hash fallback,
outputs "anyone can implement this. share the ref to build demand."
- vit vouch --kind want/endorse: want-vouches skip trusted gate and beacon
requirement; endorse keeps existing behavior; kind field written to record
- vit skim --kind <kind>: client-side filter on cap kind after beacon filter
- vit explore caps --kind <kind>: passes ?kind= to explore API
- vit inbox: new command — reads readBeaconSet(), queries explore API for
caps addressed to project beacon(s), renders with want-vouch count and age;
supports --kind, --sort want-vouches, --json; graceful degradation
Lexicons:
- org.v-it.cap: adds "request" to kind.knownValues
- org.v-it.vouch: adds optional kind field (endorse|want); omitted = endorse
Explore API:
- /api/caps: adds ?kind= filter and want_vouch_count per cap
- /api/caps: adds ?sort=want-vouches (by want_vouch_count DESC)
- jetstream: stores kind column for caps and vouches
- schema: adds kind column + index to caps and vouches tables
- migrate-cap-requests.sql: migration for existing deployed DB
Vet:
- vit vet <request-ref>: suppresses --trust for kind:request caps,
shows note to vouch --kind want instead
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
refactor(ship): extract shared cap publisher (vit/cap.js)
- move org.v-it.cap record assembly + putRecord out of shipCap into new pure src/lib/cap.js (publishCap)
- expose it publicly via package.json exports as `vit/cap.js`; supports optional reply strong refs, app.bsky.embed.external, and caller-supplied rkey/swapCid for idempotent refreshes
- shipCap now builds+writes through publishCap; CLI contract (flags, help, output, caps.jsonl, verbose dump, error guidance) unchanged
- add unit tests (fake agent, exact-write + failure paths), an offline tarball resolve test, and a traversal invariant test
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat: unify CLI error surface with cause-unwrapping helper
Add a shared error formatter that unwraps cause chains for both text and
JSON output, route the CLI command catches through it, tighten the login
failure path with a SIGINT cancel helper and common-issues footer, make
network errors name the exact URL they failed against, replace the
approved hidden catches with warnings, and document login troubleshooting
in the getting-started guide.
Files touched:
- helpers: src/lib/error-format.js, src/lib/json-output.js
- commands: src/cmd/adopt.js, src/cmd/beacon.js, src/cmd/config.js,
src/cmd/doctor.js, src/cmd/explore.js, src/cmd/firehose.js,
src/cmd/follow.js, src/cmd/hack.js, src/cmd/inbox.js,
src/cmd/init.js, src/cmd/learn.js, src/cmd/link.js,
src/cmd/login.js, src/cmd/remix.js, src/cmd/scan.js,
src/cmd/ship.js, src/cmd/skim.js, src/cmd/vet.js,
src/cmd/vouch.js
- libs: src/lib/config.js, src/lib/oauth.js, src/lib/pds.js,
src/lib/vit-dir.js
- docs/tests: docs/start/index.html, test/error-format.test.js,
test/explore.test.js, test/json-output.test.js,
test/login.test.js, test/pds.test.js
Silent-catch ledger:
- src/lib/config.js: warn on unreadable vit.json; warn on unreadable
local .vit/login.json.
- src/lib/vit-dir.js: warn on unreadable .vit/config.json; warn on
malformed JSONL lines; warn on unreadable JSONL logs; warn on
unreadable following.json.
- src/lib/oauth.js: warn on unreadable session.json in the session
store, checkSession, and restoreAgent paths; warn on unreadable local
app-password sessions in checkSession and restoreAgent.
- src/lib/pds.js: warn when DID-document handle resolution fails, then
fall back to the DID.
- src/cmd/doctor.js: warn on unreadable SKILL.md files, unreadable
skill directories, install-path inspect failure, unreadable
local/global session files, and unexpected Bluesky session validation
failures.
- src/cmd/beacon.js: warn on invalid target .vit/config.json content.
- src/cmd/hack.js: warn when git remote add upstream fails.
- src/cmd/learn.js: warn when temp-dir cleanup fails.
- src/cmd/login.js: keep the .gitignore probe silent; warn on
unreadable local/global session files during login probes.
- src/cmd/firehose.js: warn and skip malformed JSON messages.
- src/cmd/scan.js: warn and skip malformed Jetstream events.
- src/cmd/init.js: keep the git work-tree probe and optional remote URL
probe chain silent; warn on git remote failure and unreadable remote
URLs.
- src/lib/compat.js: keep the executable lookup probe silent.
Test changes:
- added test/error-format.test.js for flat errors, nested causes,
non-Error throwables, non-Error causes, circular causes, the 10-level
cap, and verbose stack indentation
- added login coverage for cancelLogin() and printLoginFailure()
- added json-output throwable-input coverage for nested and flat errors
- updated explore and pds expectations for URL-specific error messages
Not done / founder steps:
- make ship BUMP=patch (-> 0.4.3): founder's step.
- make deploy-site: founder's step. Required because
docs/start/index.html changed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
refactor(ship): extract shared cap publisher (vit/cap.js)
- move org.v-it.cap record assembly + putRecord out of shipCap into new pure src/lib/cap.js (publishCap)
- expose it publicly via package.json exports as `vit/cap.js`; supports optional reply strong refs, app.bsky.embed.external, and caller-supplied rkey/swapCid for idempotent refreshes
- shipCap now builds+writes through publishCap; CLI contract (flags, help, output, caps.jsonl, verbose dump, error guidance) unchanged
- add unit tests (fake agent, exact-write + failure paths), an offline tarball resolve test, and a traversal invariant test
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat: cap requests — kind:request, vit inbox, vouch --kind want/endorse
Adds the inbound contribution channel for vit:
CLI:
- vit ship --kind request: beacon required (--beacon flag or project config),
text optional, ref auto-generated from title via slugify+hash fallback,
outputs "anyone can implement this. share the ref to build demand."
- vit vouch --kind want/endorse: want-vouches skip trusted gate and beacon
requirement; endorse keeps existing behavior; kind field written to record
- vit skim --kind <kind>: client-side filter on cap kind after beacon filter
- vit explore caps --kind <kind>: passes ?kind= to explore API
- vit inbox: new command — reads readBeaconSet(), queries explore API for
caps addressed to project beacon(s), renders with want-vouch count and age;
supports --kind, --sort want-vouches, --json; graceful degradation
Lexicons:
- org.v-it.cap: adds "request" to kind.knownValues
- org.v-it.vouch: adds optional kind field (endorse|want); omitted = endorse
Explore API:
- /api/caps: adds ?kind= filter and want_vouch_count per cap
- /api/caps: adds ?sort=want-vouches (by want_vouch_count DESC)
- jetstream: stores kind column for caps and vouches
- schema: adds kind column + index to caps and vouches tables
- migrate-cap-requests.sql: migration for existing deployed DB
Vet:
- vit vet <request-ref>: suppresses --trust for kind:request caps,
shows note to vouch --kind want instead
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: cap requests — kind:request, vit inbox, vouch --kind want/endorse
Adds the inbound contribution channel for vit:
CLI:
- vit ship --kind request: beacon required (--beacon flag or project config),
text optional, ref auto-generated from title via slugify+hash fallback,
outputs "anyone can implement this. share the ref to build demand."
- vit vouch --kind want/endorse: want-vouches skip trusted gate and beacon
requirement; endorse keeps existing behavior; kind field written to record
- vit skim --kind <kind>: client-side filter on cap kind after beacon filter
- vit explore caps --kind <kind>: passes ?kind= to explore API
- vit inbox: new command — reads readBeaconSet(), queries explore API for
caps addressed to project beacon(s), renders with want-vouch count and age;
supports --kind, --sort want-vouches, --json; graceful degradation
Lexicons:
- org.v-it.cap: adds "request" to kind.knownValues
- org.v-it.vouch: adds optional kind field (endorse|want); omitted = endorse
Explore API:
- /api/caps: adds ?kind= filter and want_vouch_count per cap
- /api/caps: adds ?sort=want-vouches (by want_vouch_count DESC)
- jetstream: stores kind column for caps and vouches
- schema: adds kind column + index to caps and vouches tables
- migrate-cap-requests.sql: migration for existing deployed DB
Vet:
- vit vet <request-ref>: suppresses --trust for kind:request caps,
shows note to vouch --kind want instead
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: cap requests — kind:request, vit inbox, vouch --kind want/endorse
Adds the inbound contribution channel for vit:
CLI:
- vit ship --kind request: beacon required (--beacon flag or project config),
text optional, ref auto-generated from title via slugify+hash fallback,
outputs "anyone can implement this. share the ref to build demand."
- vit vouch --kind want/endorse: want-vouches skip trusted gate and beacon
requirement; endorse keeps existing behavior; kind field written to record
- vit skim --kind <kind>: client-side filter on cap kind after beacon filter
- vit explore caps --kind <kind>: passes ?kind= to explore API
- vit inbox: new command — reads readBeaconSet(), queries explore API for
caps addressed to project beacon(s), renders with want-vouch count and age;
supports --kind, --sort want-vouches, --json; graceful degradation
Lexicons:
- org.v-it.cap: adds "request" to kind.knownValues
- org.v-it.vouch: adds optional kind field (endorse|want); omitted = endorse
Explore API:
- /api/caps: adds ?kind= filter and want_vouch_count per cap
- /api/caps: adds ?sort=want-vouches (by want_vouch_count DESC)
- jetstream: stores kind column for caps and vouches
- schema: adds kind column + index to caps and vouches tables
- migrate-cap-requests.sql: migration for existing deployed DB
Vet:
- vit vet <request-ref>: suppresses --trust for kind:request caps,
shows note to vouch --kind want instead
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>