Commit graph

27 commits

Author SHA1 Message Date
bbf640abeb
App grants: one secret sealed to an external app (key hub phase 1) (#286)
Some checks failed
CI / build (push) Has been cancelled
Deploy to dev2 / deploy (push) Has been cancelled
test / test (push) Has been cancelled
* App grants: hand one secret to an external app, sealed to its per-user inbox

Phase 1 of the CoinPay <-> logicsrc key hub (spec: claude.ai/artifact/LAZgAiqWqeLQ14uJ5JpdKb).

- /grant consent page: logicsrc fetches the request manifest from the app's
  own origin over TLS (/.well-known/logicsrc-grant/<nonce>), public hosts
  only, so the page shows a verified origin, not a claimed name
- The browser decrypts with the identity key (as the vault page does) and
  seals with @profullstack/sealed-secrets to the app's inbox; the server
  stores ciphertext + metadata only (app_grant_requests, app_grants)
- Signed Standard Webhooks to the app: grant.delivered / updated / revoked
- Signing keys (wallet, seed, SSH) are refused for apps
- rotate-keys re-seals the new value to every app grant on the old
  fingerprint (resealAppGrants); /apps lists and revokes grants

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* App grants: re-check the webhook host is public on every delivery

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 05:16:37 -08:00
93f4e5a7ae
deps: autoblog 0.5.0, so the quality gate runs on c0mpute (#282)
Some checks failed
CI / build (push) Has been cancelled
Deploy to dev2 / deploy (push) Has been cancelled
test / test (push) Has been cancelled
0.5.0 routes scoreQuality through @profullstack/ai-providers: c0mpute
first, paid providers only when a key is set. The Anthropic key this
gate used is out of credit, so it was failing open on every post.

Co-authored-by: riotcoder <riotcoder@profullstack.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-11-05 09:25:06 -08:00
sh1pt-actions-fleet[bot]
fd0a6047e3
fix: fill company website from OpenProfile (#281)
Some checks failed
CI / build (push) Has been cancelled
Deploy to dev2 / deploy (push) Has been cancelled
test / test (push) Has been cancelled
Co-authored-by: Anthony Ettinger <anthony@profullstack.com>
2026-11-01 16:15:23 +00:00
sh1pt-actions-fleet[bot]
53e08902cb
feat: import OpenProfile on connect (#280)
Co-authored-by: Anthony Ettinger <anthony@profullstack.com>
2026-11-01 14:23:39 +00:00
sh1pt-actions-fleet[bot]
4daee10537
Use the latest shared footer (#277)
* Use latest shared footer

* Use latest shared footer and restore square badges

* Keep the existing workspace lock structure

---------

Co-authored-by: Anthony Ettinger <anthony@profullstack.com>
2026-10-31 07:14:35 +00:00
sh1pt-actions-fleet[bot]
e60d31a1b4
refactor(pwa): paid auto-rotation runs on @profullstack/key-rotation (#273)
Some checks are pending
CI / build (push) Waiting to run
Deploy to dev2 / deploy (push) Waiting to run
test / test (push) Waiting to run
The checkout, webhook settle, return check and expiry/renewal sweep from #272
move into the new @profullstack/key-rotation package (0.1.0) so other fleet
apps can sell the same add-on. lib/auto-rotation.mjs keeps its exports and
binds the package to credshare_teams, owners/admins, the audit log and the
app.logicsrc.com CoinPay business. No schema or behaviour change.

Co-authored-by: Anthony Ettinger <anthony@profullstack.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 05:33:56 +00:00
sh1pt-actions-fleet[bot]
0cfb94e56c
feat(rotation): buy automatic rotation, $29 per team per 30 days (CoinPay) (#272)
- Rotation page button + POST /api/credshare/teams/:slug/rotation/auto/checkout
  open a CoinPay hosted checkout (owner/admin only).
- POST /api/coinpay/webhook and the page's return check settle once per checkout
  session (rotation_payments); paying again extends from the current end.
- Hourly sweep: renewal email 3 days before, switch off when the days run out.
  A team switched on by hand (paid_until NULL) never expires.
- Migration 012 (both dialects), CSP form-action allows coinpayportal.com.

Co-authored-by: Anthony Ettinger <anthony@profullstack.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 05:12:01 +00:00
sh1pt-actions-fleet[bot]
87bbc50423
Rotation on every surface: desktop rotator, Rotation page + run queue, MCP tools (CLI 0.15.0) (#269)
- method "desktop": dashboard-only keys (OpenAI, ElevenLabs, Brave Search,
  Civitai, Cloudflare Global API Key roll, Anthropic/Claude OAuth report-only)
  rotated by an agent on a W3BS Agentic Desktop Layer host (--desktop /
  LOGICSRC_DESKTOP_HOST). Agent browser only, old key by its last 4 chars,
  DOM-to-file capture (wl-paste fallback), two-phase revoke after health,
  rollback deletes the new key, remote file shredded. needs-login and busy
  are waits, not failures. Roll needs --allow-roll plus a capture self-test.
- app.logicsrc.com: /teams/:slug/rotation plan page + rotation run queue
  (migration 010), API routes; runner: rotate-keys --from-queue.
- MCP: rotation_plan, rotation_set, rotate_keys (dry run default), rotation_runs.
- docs/rotation.md: desktop rotators and every surface.

Co-authored-by: Anthony Ettinger <anthony@profullstack.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 04:30:18 +00:00
sh1pt-actions-fleet[bot]
3254b2706b
feat(rotation): provider rotators, consumer propagation, weekly job, runbook (CLI 0.14.0) (#265)
- Catalog covers every key in the team plan (unknown 275 -> 0): new methods
  `provider` and `not-secret`, plus family/owner/never/disruptive on every
  spec. Wallets, treasury, Lightning, exchanges, Stripe, npm, GitHub App keys,
  signing identities and the personal vault are `never` and owner-only; an
  __ROTATE__ entry cannot make them automatic.
- Two-phase provider rotators (rotators.ts): resend, cloudflare-token,
  coinpay-api-key, coinpay-webhook-secret, vapid, postgres-role (SCRAM
  verifier over stdin, refuses self-hosted Supabase).
- rotate-keys --propagate [root]: finds consumer env files by value, backs
  up (.bak-rotate-<date>, 600), rewrites, restarts with the site's deploy.env
  through deploy-gate 3 at a time, health-checks local + public URL, revokes
  the old credential only after; any failure restores vaults, files and the
  provider. --scheduled, --max, --max-sites, --exclude-site, --report.
- scripts/logicsrc-rotate: weekly job, dry run unless LOGICSRC_ROTATE_LIVE=1,
  mails rotated / skipped / manual-by-owner report (never values).
- docs/rotation.md (logicsrc.com/docs/rotation) + docs/ROTATION.md pointer,
  including the wallets and signing keys section.

Co-authored-by: Anthony Ettinger <anthony@profullstack.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 00:43:55 +00:00
Anthony Ettinger
1bff3e975c feat(keyring): end-to-end encrypted keyring for SSH keys and key pairs, optional cloud sync (CLI 0.12.0)
`logicsrc keyring` (alias `kr`; `keys` is API keys): add/gen/list/show/restore/
rm/export --pub/sync/status. A keyring is an OpenCreds user-profile vault (same
PBKDF2-600k + HKDF + AES-256-GCM scheme as `logicsrc vault`, recovery key);
each private key is an OpenCreds `key` item envelope, public halves stay
readable. Works fully local under ~/.config/logicsrc/keyring; `keyring sync`
pushes ciphertext to the account. restore writes the default file name,
600/644, refuses a different existing key without --force and backs it up
first; private keys are printed only with --print-private.

- apps/pwa: /api/keyring (person Bearer key; session read-only; machine keys
  refused), additive migration 008_keyring, server refuses any upload that
  carries plaintext private key material (incl. base64'd PEM "ciphertext");
  /keyring page lists public halves and decrypts in the browser (WebCrypto,
  same derivation) for download.
- logicsrc-mcp: list/show/export_authorized_keys/add (sealed only)/remove/
  restore instructions; never returns a private key.
- docs/keyring.md served at /docs/keyring.
- Tests: crypto round trip, ssh-keygen fingerprint parity, AAD binding,
  restore perms + overwrite guard + backup, two-machine sync, server stores
  ciphertext only, browser decrypt opens CLI-sealed envelopes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 18:45:46 +00:00
Anthony Ettinger
ae6298851b security: harden credentials app after the 2026-10-27 dev2 incident (CLI 0.10.0)
An attacker with root on dev2 read identity.json (identity secret key + a user
lsk_ token) and used the token against app.logicsrc.com. This closes the gaps
that made that worse than it had to be, and adds the tools to recover.

Identity keys
- A registered identity public key is never replaced by a login any more
  ("last login wins" let a stolen token swap in an attacker key). Changing it
  needs `logicsrc teams rotate-identity`: the server seals a random answer to
  the CURRENT key (single use, 5 min); the CLI proves possession and re-seals
  every vault grant to the new key in one transaction (POST /keys/rotate).
- Lost key: reset from a signed-in browser (Settings), which drops every grant
  sealed to the old key. `logicsrc teams key --import` moves a key to a new box.

Vault re-key
- `logicsrc teams rekey <team> <project> <env>` and `--all`: new vault key,
  values re-encrypted client side, re-sealed to every current member and
  machine key. Server bumps credshare_vaults.key_version; writes that name a
  retired version get 409, and the rekey UPDATE only touches rows whose value
  did not change mid-flight. A verify pass (per vault and a final sweep)
  re-seals any value a racing older client wrote under the retired key.

Key pinning (TOFU)
- CLI pins teammates' and machine keys' fingerprints in known-keys.json (0600)
  and refuses to seal (grant, rekey) to a changed key without
  --accept-key-change. `teams members` shows fingerprints and pin status;
  the dashboard shows fingerprints and public/pins.js flags changes.

Audit
- Every person read of a vault key (/grant) and of ciphertext (/secrets) is
  audited with IP and user agent (also denied reads and identity events).
  GET /teams/:slug/audit, `logicsrc teams audit`, and tables on the dashboard
  and vault pages.

At rest / transport
- Session tokens stored as sha256 (rows hashed in migration 007); CLI auth
  codes hashed. New API keys no longer travel in the /settings URL.
- CSP (script-src 'self', no inline script or handlers, frame-ancestors none),
  HSTS, X-Frame-Options, Referrer-Policy no-referrer, COOP/CORP, no-store on
  authenticated pages. Inline scripts moved to /app.js and
  /vendor/profile-enhance.js.
- The shared footer renders from the bundled template of a pinned
  @profullstack/footer 0.5.0 (allowlist sanitizer); no runtime CDN fetch.
- Migrations can run as a separate owner role (MIGRATE_DATABASE_URL) so the
  app can connect as a DML-only role with an append-only audit table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 16:04:22 +00:00
a8d185bfc0
feat(teams): rotate secret values, with per-entry rotation instructions (CLI 0.9.0) (#260)
`credentials rotate` only re-keys a vault: values stay the same, so it does
nothing after a value leaks. This adds value rotation that agents can run.

- `teams rotation <team> [project] [env]`: per value, the method (random,
  ssh-keygen, command, manual), where the instructions come from, how many
  vaults hold it, and since when. --format json carries the steps for agents.
- `teams rotation-set <team> <project> <env> <KEY>`: store instructions as an
  encrypted `__ROTATE__<KEY>` entry. The team provider hides that prefix
  from sync, so it never lands in a .env and a push never deletes it.
- `teams rotate-keys <team> [project] [env] [--key] [--approve]`: dry run by
  default. random/ssh-keygen/command values are minted and written to EVERY
  vault holding the same value (by fingerprint); manual ones come back as
  steps. `--set-from-stdin` stores a hand-rotated value everywhere the old
  one lives. Values never print.
- Built-in catalog by key name: wallet keys and data-encryption keys are
  never automatic; provider keys point at the provider's dashboard; only
  secrets we mint ourselves are random (META_APP_SECRET etc. are not).
- Empty values (one shared fingerprint) are never planned or overwritten.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 07:31:21 -07:00
7cc95b8e1f
Lock @profullstack/footer 0.4.0 (inline newsletter feedback) (#258)
Some checks are pending
CI / build (push) Waiting to run
Deploy to dev2 / deploy (push) Waiting to run
test / test (push) Waiting to run
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 11:34:20 -07:00
297c5df54a
chore(deps): upgrade all dependencies; next 16.4.3 (RCE GHSA-2464-fhr4-w9xw) (#257)
- next 16.3.8 -> 16.4.3 (GHSA-2464-fhr4-w9xw, GHSA-673q-mjm6-r5xr)
- every workspace dependency to latest; majors: express 5, @simplewebauthn 14,
  imapflow 2 (status() may return false), nodemailer 10, libsodium-wrappers 0.8,
  commander 15, vite 8, @vitejs/plugin-react 6, typescript 7 (base tsconfig
  lists types: ["node"]), @logicsrc/validators 0.6, openmcp 0.4, hqtui 0.11,
  stack 0.5, x402-gateway 0.13
- bun 1.4.4 (image + packageManager)
- bun audit: 3 critical / 34 high -> 0

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 07:06:46 -07:00
50eb8ac30d
feat(pwa): signup profile fields via @profullstack/profile (#256)
The create-account form (/?mode=up) asks for first/last name (required) and
company domain, job title, LinkedIn (optional) beside the email box, rendered
by renderProfileFields. /auth/register validates them with validateProfile
before the user exists and stores them with saveSignupProfile in a new
user_profiles table keyed by users.id. GET/PUT/PATCH /api/v1/me/profile
(session cookie) and a "Your details" card on /settings. Sign-in, passkey and
CoinPay are unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 04:24:44 -07:00
ff0c903c6d
Profullstack footer on the app.logicsrc.com sign-in page (#255)
Some checks are pending
CI / build (push) Waiting to run
Deploy to dev2 / deploy (push) Waiting to run
test / test (push) Waiting to run
* Profullstack footer on the app.logicsrc.com sign-in page (webring + built.indie + pwamart badges)

Server-rendered @profullstack/footer (clearnet template) under the LogicSRC
footer on the public sign-in page (/), bundled at boot and refreshed from the
@latest template every 15 min. Serves /.well-known/openwebring.json for the
Profullstack ring. Lockfile footer 0.2.1 -> 0.2.6 (checked with bun 1.4.2
--frozen-lockfile).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* PWA manifest + meta description: say what the app is (it carried a moshcode tagline)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(web): ring nav has previous/next only since footer 0.2.2 (no random hop)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 03:45:08 -07:00
5192684de9
chore(deps): @profullstack/x402-gateway 0.11.0 (#253)
PAYMENT-REQUIRED / PAYMENT-SIGNATURE / PAYMENT-RESPONSE (x402 v2 transport
headers), sale metadata (property, page, payer, UA, ip hash) sent to CoinPay
and onSale, and a Buy a day pass button (CoinPay hosted checkout, any coin or
PayPal) on the 402 page once CoinPay serves checkout sessions.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 06:02:42 -07:00
d2cd5ffee3
OpenTask 0.1 + OpenWorkflow 0.1 (#250)
Some checks failed
CI / build (push) Has been cancelled
Deploy to dev2 / deploy (push) Has been cancelled
test / test (push) Has been cancelled
* OpenTask 0.1 + OpenWorkflow 0.1: specs, schemas, fixtures, validators

docs/opentask.md mints OpenTask: one task a person does on a computer,
written down as meaning (goal, apps, parameters with a sensitivity class
and never a value, semantic steps with no coordinates, capture gaps, stop
conditions, approvals, a success check, provenance, runners with digests)
so an agent can do it again. docs/openworkflow.md mints OpenWorkflow: a
collection of OpenTasks inline or by URL + sha256, in sequence or any
order respecting after, with a publisher index at
/.well-known/openworkflow.json.

- @logicsrc/schemas 0.6.0: opentask, openworkflow, openworkflow-index
- @logicsrc/validators 0.6.0: step numbering, placeholders, apps,
  no example on personal/secret parameters, after references

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* logicsrc-web: register OpenTask and OpenWorkflow

Registry entries (process family, status 0.1) after OpenErrand, with the
family blurb updated; /opentask and /openworkflow landing pages naming
w3bs.org/tasks and w3bs.org/workflows as the reference publisher and
moshscript (moshcode run) as one runner; the worked examples served under
/examples and a logicsrc.com workflow index at
/.well-known/openworkflow.json; contract tests holding the pages' lists and
the served files against the docs and fixtures, and both specs added to
spec discovery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:18:16 -07:00
fa70dcff5e
x402-gateway 0.10.1: AI chat bots welcome; search crawlers verified by published address (#249)
Anthony 2026-10-19 (bot hits decisions): sweep every site to the latest gateway;
"allow apple/google/cloudflare/bing etc. and ai chat bots".

- Verified Googlebot/bingbot/Applebot/DuckDuckBot/Cloudflare (full published
  lists, IPv4+IPv6) unmetered; the same strings from elsewhere are charged.
- ChatGPT-User/OAI-SearchBot/Perplexity (from their published addresses),
  Claude-User, Claude-SearchBot, meta-externalfetcher, meta-webindexer, YouBot,
  ExaSearchBot, AionBot: welcome, unmetered, never challenged.
- From 0.8: headless browsers, SEO resellers, stale desktop UA pools and
  Amazonbot are charged; training crawlers still pay.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:01:55 -07:00
ef35139f04
OpenABTest 0.2-draft: goal conversions (#239)
* OpenABTest 0.2-draft: goal conversions

0.1 conversions are purchases with a price, so button, onboarding and
landing-page experiments had nothing conformant to report. 0.2 adds a goal
conversion: metrics.conversion "unique-participants-with-goal" with
metrics.goal, metrics.profit "none", and conversion events carrying exactly
one of price or goal (optional observed value). Backward compatible: every
0.1 document stays valid; goal forms require "0.2-draft". The reference
implementation is w3bs.org/ab-testing.

@logicsrc/schemas and @logicsrc/validators 0.5.0, @logicsrc/sdk 0.4.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* contract: accept any 0.x draft status (OpenABTest is 0.2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 04:58:40 -07:00
0f5c479e2f
feat(footer): use @profullstack/footer (#236)
Some checks failed
CI / build (push) Waiting to run
Deploy to dev2 / deploy (push) Has been cancelled
test / test (push) Has been cancelled
Replaces the hand-written footer / ring nav with the shared @profullstack/footer, rendered on the server so the ring verifier sees it and a package release updates the footer without a redeploy.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 02:53:51 -07:00
ade33efd17
Machine API keys: headless teams pull for deploy boxes and CI (#230)
A person's lsk_ key acts as the person, with one identity key per user. Logging
a fresh box in with `login --token` uploaded the box's new keypair as the
person's identity and replaced the real one. Machine keys fix that: a key made
for a box, scoped to one team (and optionally named vaults), read-only unless
--read-write, optionally expiring, with its OWN identity key registered on the
key row. A vault key reaches it as a grant sealed to that public key
(credshare_key_grants), never through the person.

Schema (005_machine_keys, SQLite + Postgres): api_keys gains kind, team_id,
vault_scope, read_only (default 0, so existing person keys keep writing),
expires_at, public_key; new credshare_key_grants; credshare_audit.actor_key_id.

Server: each credshare route declares what a machine key may do (read / write /
register); the rest are people-only. Machine keys see only their team and
scoped vaults, read their grant from credshare_key_grants (audited as
vault:read with the key id), are refused every write when read-only, and cannot
mint/list/revoke keys, read /api/me or touch the personal vault. Expired and
revoked keys are 401. New GET|POST /api/keys, DELETE /api/keys/:id, and
GET|POST|DELETE /api/credshare/vaults/:id/key-grants. A re-key re-seals the
machine grants it is given and drops the rest.

CLI 0.8.0: `logicsrc keys create|list|revoke` (--team, --vault, --read-only /
--read-write, --expires, --out 0600); LOGICSRC_API_KEY and
`login --api-key` with a per-key identity in keys/<prefix>.json (0600),
generated and registered on first use; `login --token` with a machine key takes
that path instead of replacing the person's key; `teams grant … --key <name>`;
`credentials rotate` re-seals machine keys.

PWA: settings creates machine keys (team, vaults, read-only, expiry); a vault
page grants or revokes a machine key in the browser after unlock.

MCP: list_api_keys / create_api_key / revoke_api_key over /api/keys with a
Bearer LOGICSRC_API_KEY.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 23:08:32 -07:00
dde596b276
OpenErrand reference runner: @logicsrc/openerrand and logicsrc errand (#228)
* OpenErrand 0.1: an errand on a website with no API, with the human steps kept human

docs/openerrand.md mints OpenErrand: one JSON file per errand (register an
account, download a transcript) naming the site, the inputs with a
sensitivity class and ordered sources (document, vault, prompt, generate,
derive, candidate, literal), field rules matched by id then label, page and
wait steps, five human gates a runner never performs (declare,
identity-proofing, code, mail, captcha), outcomes, the never-retried shared
secret, vault and download outputs, hand-off cards that may name only public
inputs, the publisher index at /.well-known/openerrand.json, and thirteen
runner rules. The worked example is the MyFTB business registration that
cli-tools `ftb` performs (profullstack/cli-tools#125), with no personal data.

- @logicsrc/schemas: openerrand + openerrand-index schemas and fixtures
- @logicsrc/validators: semantic checks (references, templates, no personal
  or secret input on a card) and tests that validate the spec's own examples
- logicsrc-web: registry entry (process family), /openerrand landing page,
  the example and the index served as static files, contract tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* OpenErrand: hand-off cards stay on the surface that owns the data

Anthony's ruling: tax and finance data never touches a social or promotion
tool, and nothing is sent to a CPA or preparer.

- Hand-off cards are delivered only on the surface that owns the errand's
  data (for a tax or finance errand, the principal's finance app through its
  CLI, PWA, MCP server or API, such as CoinPay, or the runner's terminal),
  never a social, promotion or third-party posting service, and never to
  anyone but the principal. A card for an errand with personal or secret
  inputs does not leave that surface. Runner rule 9 says the same.
- The run record and the sample run name the card by an opaque id
  (pin-letter/7f3k2q) instead of a mynaposter.com URL; the myna mention is gone.
- `principal: represented` no longer cites a preparer with a power of attorney.
- The FTB card's last step no longer suggests sending the PIN to someone else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* OpenErrand: user-agent rule, captcha solver policy, reference runner note

Anthony's answers on #227 ("go with your recommendations"):

- Rule 11: a runner may run headless with a normal desktop browser user agent
  (dropping HeadlessChrome) and nothing more: no fingerprint spoofing beyond
  the UA string, no stealth plugins, no solving or evading a bot challenge.
  A challenge the browser completes itself is a wait step; any other is a
  captcha gate.
- Captcha solvers: new site.sector and captcha step `solver`
  (forbidden by default | allowed). Never allowed on government, tax,
  financial, healthcare or identity-provider sites, nor on any errand with a
  declare or identity-proofing step or a secret input; elsewhere only when the
  file says so, with every use logged. The validator rejects `allowed` in the
  forbidden set or without a stated sector; six new tests. The FTB example
  states sector "tax".
- Reference runner: @logicsrc/openerrand / `logicsrc errand run`, marked in
  progress; ftb stays the runner the example was taken from.
- Name stays OpenErrand; family stays Agents and process.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* OpenErrand reference runner: @logicsrc/openerrand and logicsrc errand

Ship the runner docs/openerrand.md promised. `logicsrc errand run <file>`
reads an OpenErrand 0.1 file, validates it with @logicsrc/validators, and
drives headless Chrome through it under the spec's thirteen rules;
`errand validate` shows what a file will ask of you and `errand status`
shows the last run of each errand, its card and any lockout.

The engine is generalised from cli-tools `ftb` (PR #125) with no dependency
on cli-tools: the CDP client and Chrome finder from wcag.ts, the page reader,
native-setter fill and forward-button picker from ftb-run.ts, and the rule
matcher, throttle and outcome logic from ftb.ts, all now driven by the file.

- Inputs: document (an extractor hook; the one shipped runs a local command
  that reads JSON requests and prints records), vault (teams or OpenCreds),
  prompt (no echo for secrets), generate, derive, candidate, literal.
  `--input name=value` wins. Shared-secret candidates are ranked as the spec
  says, one is submitted, and a rejection lists the others for --candidate.
- Rules: id before label, step rules first, choices before text, an id match
  final, an unmatched required field stops the run naming it.
- Gates: declare only with --declare after the values are shown; identity
  proofing never touched (URL only) and handed over or stopped on; code from
  the terminal or a code file, used once, a wrong code waits for the next;
  mail ends the run waiting with the card; captcha is the person's, and a
  CaptchaSolver interface is called only where the spec permits (no solver is
  bundled); wait steps are polled, never solved.
- Throttle: 2 runs per errand and account in 30 minutes, 4 a day, 2 minutes
  between runs on a site, lockouts from metadata.lockout or a default, held
  per site and account, never lifted by --force.
- Outputs: credentials written before success to a teams vault by pull,
  merge, push (metadata.vault or --vault), else a 0600 file said aloud;
  downloads type-checked and never overwritten with different bytes; cards
  only in the local run record.
- The user agent is Chrome's own with HeadlessChrome replaced, given at
  launch: a CDP override did not reach a navigation the page's own script
  started, which is exactly the proof-of-work interstitial case.

Tests: 85 in the package (rule engine, inputs, gates, throttle, outcomes,
captcha gating, vaults, outputs, commands) including an integration test
that runs the published FTB example unchanged in real headless Chrome
against a local HTTPS fake site (Chrome maps webapp.ftb.ca.gov to it and
every other host to NOTFOUND; all data fictional), and 2 in the CLI.

CLI 0.6.0 -> 0.7.0; @logicsrc/schemas and @logicsrc/validators 0.3.0 ->
0.4.0 (the OpenErrand schemas, and the vocabularies now exported for
runners); PRD 0009; the spec's Reference runner section and the landing
page say it ships.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 09:17:06 -07:00
d38db62e8b
vault: autosync the personal vault to the logicsrc account (#226)
Some checks are pending
CI / build (push) Waiting to run
Deploy to dev2 / deploy (push) Waiting to run
test / test (push) Waiting to run
`logicsrc vault` (OpenCreds) lived only in ~/.config/logicsrc/opencreds.
Lose the machine and the vault went with it, and a second machine had
no way to get it. It now syncs to the logged-in account.

Server (apps/pwa, /api/opencreds, session or lsk_ bearer):
- opencreds_vaults: one per user. meta (key material already wrapped
  under the master password) + an encrypted folder list, each with a
  revision.
- opencreds_items: one row per item, as the spec asks; envelope NULL is
  a tombstone so purges propagate; seq for incremental pulls.
- Every write names its base revision; a stale one gets 409 with the
  current row. Writes are conditional and read back (each envelope's
  random IV identifies our write), so this needs nothing dialect-specific
  from SQLite or Postgres.
- Stores ciphertext only. The server learns item count and type codes,
  as OpenCreds security.md already accepts.

Client (@logicsrc/opencreds sync.ts, key-free except where noted):
- Pull before every vault command, push after. Offline, the command
  still works and the change goes up next time.
- Conflicts never lose data: the account's edit keeps the id and this
  machine's becomes "<name> (conflict copy)" (needs the unlocked key, so
  it waits otherwise). An edit beats a purge. Byte-identical envelopes
  are adopted, not split, so a lost sync.json is harmless.
- Two different vaults (meta.createdAt differs) are never merged:
  refused, with `vault sync --use-remote` (backs this machine's up to
  .bak-NNN) or `--use-local`.
- Remote item ids must be plain ids; anything else is ignored and never
  becomes a path.
- Folder names are AES-GCM encrypted under the user key before upload.

CLI (0.6.0): `logicsrc vault sync [--status|--use-remote|--use-local]`.
Only the default vault syncs, and only when logged in; a --home or
OPENCREDS_HOME vault stays local unless LOGICSRC_VAULT_SYNC=on;
LOGICSRC_VAULT_SYNC=off disables it. The standalone `opencreds` binary
gets no remote and never syncs. `init` on a machine that just downloaded
the account's vault says to unlock it instead of suggesting --force.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 03:45:25 -07:00
5bebc50beb
pwa: read vault values in the browser with a pasted identity key (#225)
* pwa: read vault values in the browser with a pasted identity key

The web app listed vaults but could never show a value: decryption needs the
member's X25519 secret key, which only lives in identity.json on the machine
that ran `logicsrc login`.

Each vault now has a page (/teams/:slug/vaults/:id, linked from the
dashboard) listing its secret names. Paste the identity key (or the whole
identity.json) and public/vault.js decrypts in the browser with the same
libsodium calls as the CLI: crypto_box_seal_open for the grant, then
crypto_secretbox_open_easy per value. Nothing is sent to the server.

- The pasted key is checked against the public key the server has on file
  before use, so a key from another machine is named, not a generic failure.
- Show / Copy per value, Download .env, Forget key. The key is kept in
  sessionStorage unless "remember on this device" is ticked.
- A member with no identity yet can create one in the browser. That
  registers only the public half, and is offered only when no key is
  registered, since replacing one would orphan every grant sealed to it.
- libsodium is served from node_modules at /vendor (no CDN), like simplewebauthn.
- Vault pages are no-store and the service worker no longer caches no-store pages.
- CLI: `logicsrc teams key` prints the secret key to stdout alone (pipe to
  pbcopy) and warns when the server holds a different public key. The page
  also gives a jq one-liner for CLIs released before this command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* pwa: rename data-secret to data-key-name

ThreatCrush read data-secret="…" as a hardcoded credential (2 high, both
the attribute name, never a value).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* CLI 0.5.0 for teams key; install via install.sh, not npm

@logicsrc/cli is not on npm; the CLI ships through
curl -fsSL https://logicsrc.com/install.sh | sh, which builds master and
reports the version from packages/cli/package.json. 0.5.0 marks the first
build with teams key, and the vault page now says so and points older
installs at the jq fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 02:55:34 -07:00
722480f674
Upgrade Next.js to 16.3.8 (critical RCE advisories) (#223)
Some checks failed
CI / build (push) Has been cancelled
Deploy to dev2 / deploy (push) Has been cancelled
test / test (push) Has been cancelled
Patches GHSA-vcvr-r3jv-pc5j, GHSA-2xp9-vwfh-vxw4 and GHSA-p293-qw3h-jr36.

Next 16.3's build type check now fails on src/lib/pagination.test.ts,
which imports a .ts path; allow .ts import extensions (noEmit is already
on) so the build passes.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 16:23:22 -07:00
20797a98f1
Run on Bun: bun install, bun --bun next, both dev2 sites on Bun (#222)
Some checks are pending
CI / build (push) Waiting to run
Deploy to dev2 / deploy (push) Waiting to run
test / test (push) Waiting to run
* Run on Bun: bun install, bun --bun next, both dev2 sites on Bun

Moves logicsrc.com and app.logicsrc.com (one image) off Node + npm onto Bun,
following the fleet recipe (phonenumbers.bot pilot).

- Package manager: bun.lock migrated from package-lock.json, so every resolved
  version is unchanged; packageManager bun@1.4.2. Root scripts run each
  workspace with `bun run --cwd <dir>` instead of `npm --workspace`.
- Bun 1.4.2, not the fleet's 1.4.0: 1.4.0 re-resolves this workspace's `file:`
  cross-references differently on every install, so its own lockfile never
  passes --frozen-lockfile. 1.4.2 is stable on it.
- Runtime: logicsrc-web runs `bun --bun next build/start`; apps/pwa (Express,
  app.logicsrc.com) runs `bun src/server.mjs`.
- Image: .nixpacks/Dockerfile (the path both dev2 compose stacks build) is now
  a hand-written oven/bun image carrying the whole workspace, run as the
  non-root bun user. ENTRYPOINT stays `bash -l -c` so a compose `command:` is
  one string, as before; app.logicsrc.com's compose starts it with
  "npm --workspace @logicsrc/pwa run start", which .nixpacks/npm (the image's
  only `npm`) turns into `bun run start` in apps/pwa. Port 3000, the PUBLIC_URL
  build arg and the / health path are unchanged. The nixpacks .nix and
  build.sh are gone.
- CI: both workflows install with bun and run every script through bun (Node
  stays only as the interpreter for vitest/tsc/node --test/Playwright, as
  before), and CI now boots the site under Bun.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* ci: boot check on port 3100 and stop it before Playwright needs 3000

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(web): keep next dev on port 5174, which Playwright waits on

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 08:14:40 -07:00