UnENVerse 0.84.0
Local-first desktop secrets manager — TypeScript frontend
Loading...
Searching...
No Matches
secret-types.ts File Reference

The secret-type registry — Phase 24.5. More...

Functions

function export registry ()
 The full registry, in the order secret-types.json lists it.
function export findSecretType (id:string)
 One type's descriptor, or undefined for a type this build has never heard of — the A11 case: an unrecognised type is a fact to check, not a reason to guess at a default.

Variables

import registryJson from secret types json
export type Rotation = 'rotate' | 'reissue' | 'verify_session' | 'none'
export interface SecretTypeDescriptor
label __pad0__
group __pad1__
primary __pad2__
rotation __pad3__
probe __pad4__
mask_whole __pad5__
cxf __pad6__
emitters __pad7__
 Output formats the Copy menu offers (vault_core::type_emit).
const REGISTRY
export const GROUP_ORDER
 Section order and headings of "Group by secret type".
export const pool
export const api_key
export const password
export const env_var
export const connection_string
export const ssh_key
export const certificate
export const file_blob
export const const GROUP_LABELS
export const const string
export const groupLabel
export const groupOrder
 Types in display order: the user's own order first (typeOrder setting), then the built-in order, then anything else.

Detailed Description

The secret-type registry — Phase 24.5.

secret-types.json at the repo root is the one file, read here as a plain JSON import and by vault_core::secret_types (include_str! + serde) on the Rust side. Not a twin pair needing a parity fixture — there is exactly one copy of the data, so nothing can disagree with it.

A descriptor only ever chooses — which field is primary, how rotation reads, whether enrich --online may probe it. The code that validates, renders and masks a value still lives where it always did; this module does not add a form field, a card body or a validator for any of the sixteen new types. See CLAUDE.md Phase 24.5: "land the shape now, behavior later" — the same call Phase 24.1 made for composite and bundle.

Function Documentation

◆ registry()

function export registry ( )

The full registry, in the order secret-types.json lists it.

◆ findSecretType()

function export findSecretType ( id:string)

One type's descriptor, or undefined for a type this build has never heard of — the A11 case: an unrecognised type is a fact to check, not a reason to guess at a default.

Human label for a type, falling back to the raw id — a newer build's type is still readable in an older one, just unlabelled. Kept separate from TYPE_CHIP_LABELS in render.ts: that one is the eleven types the grid already has UI for, this one is every type the registry knows about. Descriptors grouped for a settings/picker UI, in registry order within each group. Whether an entry's extra_vars should be masked whole regardless of each value's own public flag — E5's rule, generalised in Phase 24.5 to every type whose payload is only useful as a set. secretType may be absent or unrecognised; both read as "no", matching the fail-open default every other type already has. The emit formats an entry's type offers (.npmrc, a DSN, a Wi-Fi string…).

Variable Documentation

◆ json

import registryJson from secret types json

◆ Rotation

export type Rotation = 'rotate' | 'reissue' | 'verify_session' | 'none'

◆ SecretTypeDescriptor

export interface SecretTypeDescriptor
Initial value:
{
id: string

◆ __pad0__

label __pad0__

◆ __pad1__

group __pad1__

◆ __pad2__

primary __pad2__

◆ __pad3__

rotation __pad3__

◆ __pad4__

probe __pad4__

◆ __pad5__

mask_whole __pad5__

◆ __pad6__

cxf __pad6__

◆ __pad7__

emitters __pad7__

Output formats the Copy menu offers (vault_core::type_emit).

◆ REGISTRY

const REGISTRY

◆ GROUP_ORDER

export const GROUP_ORDER

Section order and headings of "Group by secret type".

◆ pool

export const pool

◆ api_key

export const api_key

◆ password

export const password

◆ env_var

export const env_var

◆ connection_string

export const connection_string

◆ ssh_key

export const ssh_key

◆ certificate

export const certificate

◆ file_blob

export const file_blob

◆ GROUP_LABELS

export const const GROUP_LABELS

◆ string

export const const string
Initial value:
= {
bundle: 'Bundles',
pool: 'Key Pools',
api_key: 'API Keys',
password: 'Passwords',
env_var: 'Env Variables',
connection_string: 'Connections',
ssh_key: 'SSH Keys',
certificate: 'Certificates',
file_blob: 'File Blobs',
}
let pool
Definition generators.ts:39
export const file_blob
Definition secret-types.ts:94
export const password
Definition secret-types.ts:89
export const ssh_key
Definition secret-types.ts:92
export const env_var
Definition secret-types.ts:90
export const api_key
Definition secret-types.ts:88
export const connection_string
Definition secret-types.ts:91
export const certificate
Definition secret-types.ts:93

◆ groupLabel

export const groupLabel
Initial value:
= (t: string): string =>
GROUP_LABELS[t] ?? t.charAt(0).toUpperCase() + t.slice(1).replace(/_/g, ' ')
const string
Definition auth-panel.ts:39
export const const GROUP_LABELS
Definition secret-types.ts:96

◆ groupOrder

export const groupOrder
Initial value:
= (present: Iterable<string>, custom: string[] = []): string[] => {
const have = new Set(present);
const ranked = [...new Set([...custom, ...GROUP_ORDER])];
return [...ranked.filter((t) => have.has(t)), ...[...have].filter((t) => !ranked.includes(t))];
}
export const GROUP_ORDER
Section order and headings of "Group by secret type".
Definition secret-types.ts:86

Types in display order: the user's own order first (typeOrder setting), then the built-in order, then anything else.

Only types in present are returned.