CLI command
skarbiec subscription list
List every subscription grant the vault holds, whether it is due a sign-in and why, and its last sign-in.
Invocation#
skarbiec subscription list [--due]Purpose#
List every subscription grant the vault holds, whether it is due a sign-in and why, and its last sign-in.
Required inputs and options#
- No positional input. --due keeps the grants due a sign-in. POST /v1/operator/subscriptions takes due.
Output and state effects#
- Reads the vault and prints subscriptions (one row per live item tagged brama:subscription: item, provider, subscription_id, login_item, revision, grant present, absent or unreadable, refused with when, why and by whom, refusal_current, due, held (true when a sign-in refused on this same footing keeps the grant back; a word for the sign-in, never for the grant), why, blockers, last_attempt_at, last_status signed_in, held or retry, last_error, last_run, last_cause, the id of the declared cause the last sign-in failed for (skarbiec errors show skarbiec.subscription describes each; null after a sign-in that succeeded or a failure no cause declares), and last_due, why the grant was due when that sign-in was asked for (absent, refused or unreadable; null for one asked for with --now while it held a grant)) and due, the count. It changes no state and decrypts each subscription item only to tell whether a grant is in it, never printing it, and each login item only to judge its second factor.
Refusals#
- An argument or a flag other than --due exits 2 (form-unknown, flag-unknown). A subscriptions section or record that is not an object is refused naming its kind (section-malformed).
- skarbiec.subscription form-unknown — exit 2: reading what skarbiec subscription is asked; fix: run subscription list, refuse, withdraw or run; skarbiec subscription help lists them
- skarbiec.subscription flag-unknown — exit 2: reading the flags of subscription {verb}; fix: drop --{flag}; subscription {verb} takes {takes}
- skarbiec.subscription item-argument — exit 2: reading which subscription subscription {verb} acts on; fix: name one item `skarbiec subscription list` shows: skarbiec subscription {verb} <item-id> …
- skarbiec.subscription reason-missing — exit 2: recording that the provider refused the grant of {item}; fix: pass the provider's answer: skarbiec subscription refuse {item} --reason '<what the provider said>'
- skarbiec.subscription now-without-item — exit 2: signing one subscription in before it is due; fix: name it: skarbiec subscription run --item <item-id> --now
- skarbiec.subscription not-subscription — exit 1: reading the subscription {item}; fix: name an item `skarbiec subscription list` shows; a subscription is a live item tagged brama:subscription
- skarbiec.subscription section-malformed — exit 1: reading the vault's subscription sign-in records; fix: run skarbiec upgrade to see what it can read; withdraw each damaged record with subscription withdraw, which writes it again
- skarbiec.subscription no-refusal — exit 1: withdrawing the recorded refusal of {item}; fix: name an item whose grant `skarbiec subscription list` shows as refused
- skarbiec.subscription unsignable — exit 1: signing the subscription {item} in; fix: tag {item} with exactly one brama:provider:<provider>, brama:id:<subscription id> and brama:login:<login item> (skarbiec retag --add <tag> {item}), naming a login item that exists and opens here, whose recorded second factor the vault can answer (skarbiec login factor list <login item> names what it lacks; skarbiec totp set adds a seed), then run skarbiec subscription run --item {item} --now
- skarbiec.subscription grant-unreadable — exit 69: reading the stored grant of the subscription {item}; fix: open it by hand (skarbiec get {item}) and repair what that names; skarbiec doctor names a missing key
- skarbiec.subscription stado-absent — exit 1: asking Stado's browser-automation family to sign {item} in; fix: install Stado (it puts stado on PATH), or point STADO_BIN at the installed stado
- skarbiec.subscription stado-unstarted — exit 69: asking Stado's browser-automation family to sign {item} in; fix: make {program} an executable Stado ({program} --version answers when it is), or point STADO_BIN at one
- skarbiec.subscription stado-answer-unreadable — exit 1: reading what Stado answered for the sign-in of {item}; fix: run the command above by hand and repair what it says; a Stado older than the browser-automation operation subscription-sign-in is updated with stado product update stado
- skarbiec.subscription sign-in-unavailable — exit 69: signing the subscription {item} ({provider} {subscription}) in; fix: {remedy}; the next skarbiec maintain or skarbiec subscription run asks again
- skarbiec.subscription sign-in-refused — exit 1: signing the subscription {item} ({provider} {subscription}) in; fix: {remedy}; then skarbiec subscription run --item {item} --now
- skarbiec.subscription sign-in-unconfirmed — exit 1: confirming the sign-in of the subscription {item}; fix: read the run Weles names (weles runs show <run>), repair why its grant did not reach {item}, then skarbiec subscription run --item {item} --now
- skarbiec.subscription run-refused — exit 1: signing the due subscriptions in; fix: read each subscription's last_error with skarbiec subscription list and act on it; the other due sign-ins ran
- skarbiec.subscription report-unknown — exit 1: finding the subscription {subscription} of {provider} a consumer named; fix: send the provider and subscription id the subscription item's own tags carry (skarbiec subscription list names both)
- skarbiec.subscription report-ambiguous — exit 1: finding the subscription {subscription} of {provider} a consumer named; fix: keep the id on one item: skarbiec retag --remove brama:id:{subscription} <item> on each other one
- skarbiec.subscription report-not-granted — exit 1: answering {route} for {consumer}; fix: add report:subscriptions to {consumer}'s grant on the vault owner (skarbiec grant list shows its capabilities; Brama's launcher issues it to brama-subscription-reporter at each start), then present that grant's bearer
- skarbiec.subscription report-stale — exit 1: recording that the provider refused the grant of subscription {item}, as {by} reported it; fix: read the grant {item} holds now and present it; report a refusal of that grant if the provider refuses it too
- skarbiec.subscription report-grant-malformed — exit 2: reading which grant {consumer} reports refused; fix: send the SHA-256 of the grant's JSON with its object members in name order and no whitespace, as 64 hexadecimal digits, or leave grant_sha256 out