~/bend-docscommunity

store/base.bend checks

raw source on the hub · import cswap-bend-cli@0.1.0.0/store/base.bend as MBase

1 import
import Base

Types

type Ctx source · line 9 · raw

Data

Definitions

def ctx_of2 source · line 12 · raw

@+home:String -> @+dir:String -> @+unset:Bool -> Ctx

def ctx_of source · line 19 · raw

@+home:String -> @+claude_config_dir:String -> Ctx

def root_of source · line 22 · raw

@+ctx:Ctx -> String

def live_creds_path source · line 27 · raw

@+ctx:Ctx -> String

def global_config_path source · line 32 · raw

@+ctx:Ctx -> String

def seq_path source · line 37 · raw

@+root:String -> String

def lock_path source · line 40 · raw

@+root:String -> String

def log_path source · line 43 · raw

@+root:String -> String

def creds_dir source · line 46 · raw

@+root:String -> String

def configs_dir source · line 49 · raw

@+root:String -> String

def removed_dir source · line 52 · raw

@+root:String -> String

def removed_configs_dir source · line 55 · raw

@+root:String -> String

def enc_path source · line 58 · raw

@+root:String -> @+slot:String -> @+email:String -> String

def prev_path source · line 61 · raw

@+root:String -> @+slot:String -> @+email:String -> String

def config_path source · line 64 · raw

@+root:String -> @+slot:String -> @+email:String -> String

def removed_enc_path source · line 68 · raw

@+root:String -> @+ts:String -> @+slot:String -> @+email:String -> String

credentials/.removed/<utc-ts>-<slot>-<email>.enc, ts like 20261023T120000Z.

def removed_config_path source · line 71 · raw

@+root:String -> @+ts:String -> @+slot:String -> @+email:String -> String

def sel.s source · line 76 · raw

@+c:Bool -> @+x:String -> @+y:String -> String

def strip_chars.pick source · line 83 · raw

@+skip:Bool -> @+c:Char -> @+rest:String -> String

def strip_chars source · line 91 · raw

@+s:String -> @+drop:String -> String

Drop every char of drop from s.

def compact_ts source · line 99 · raw

@+iso:String -> String

2026-10-23T12:00:00Z becomes 20261023T120000Z, safe in a file name.

def log_stamp source · line 103 · raw

@+iso:String -> String

The reference's %(asctime)s stamp: 2026-10-23 12:00:00,000.

def log_line source · line 106 · raw

@+iso:String -> @+level:String -> @+msg:String -> String

def is_oauth_token source · line 111 · raw

@+t:String -> Bool

def not_ source · line 114 · raw

@+b:Bool -> Bool

def looks_like_api_key2 source · line 117 · raw

@+t:String -> Bool

def looks_like_api_key source · line 121 · raw

@+text:String -> Bool

A bare sk-ant- value that is not an OAuth token is a managed API key.

def email_char source · line 124 · raw

@+c:Char -> Bool

def domain_char source · line 127 · raw

@+c:Char -> Bool

def sel.b source · line 130 · raw

@+c:Bool -> @+x:Bool -> @+y:Bool -> Bool

def all_chars source · line 137 · raw

@+s:String -> @+local:Bool -> Bool

def all_alpha source · line 144 · raw

@+s:String -> Bool

def nonempty source · line 151 · raw

@+s:String -> Bool

def valid_host2 source · line 154 · raw

@+tld:Maybe<&2, String> -> @+n:Nat -> @+chars:Bool -> Bool

def valid_host source · line 163 · raw

@+segs:List<&2, String> -> @+host:String -> Bool

host = prefix.tld: the last dot-separated part is 2+ letters and what is left of it is a non-empty run of host characters.

def valid_email2 source · line 166 · raw

@+parts:List<&2, String> -> Bool

def valid_email source · line 174 · raw

@+e:String -> Bool

local@host.tld by ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$.

def all_digits source · line 177 · raw

@+s:String -> Bool

def alias_ok source · line 185 · raw

@+a:String -> Bool

models.normalize_alias: lowercase, non-empty, not all digits, no leading -.