Summary
Refactor core features based on design feedback to improve developer ergonomics and security:
- Human-readable reference strings — Add a
ref field to secrets (e.g., perplexity-api-key) that serves as an alternative lookup key alongside UUIDs.
- Batch grants — Allow multiple secrets to be requested in a single approval, producing a grant that unlocks all of them.
- Injection overhaul — Scan env vars for
2k://{ref} or 2k://{uuid} placeholders and replace with secret values, support multiple --grant flags, and redact secret values from subprocess stdout/stderr.
Design Decisions
- The existing
name field on SecretEntry becomes ref — a unique, URL-safe slug used for both display and lookup.
- Batch grants introduce
secretUuids: string[] on AccessRequest and AccessGrant, replacing the singular secretUuid.
- Placeholder injection (
2k://) is a new injection mode complementing the existing --env approach.
- Redaction wraps subprocess stdout/stderr streams, replacing any occurrence of a secret value with
[REDACTED].
Scope
All changes are in the core library (src/core/), CLI (src/cli/), types (src/core/types.ts), and tests (src/__tests__/). No server API changes in this epic.
Summary
Refactor core features based on design feedback to improve developer ergonomics and security:
reffield to secrets (e.g.,perplexity-api-key) that serves as an alternative lookup key alongside UUIDs.2k://{ref}or2k://{uuid}placeholders and replace with secret values, support multiple--grantflags, and redact secret values from subprocess stdout/stderr.Design Decisions
namefield onSecretEntrybecomesref— a unique, URL-safe slug used for both display and lookup.secretUuids: string[]onAccessRequestandAccessGrant, replacing the singularsecretUuid.2k://) is a new injection mode complementing the existing--envapproach.[REDACTED].Scope
All changes are in the core library (
src/core/), CLI (src/cli/), types (src/core/types.ts), and tests (src/__tests__/). No server API changes in this epic.