@vibesdotdev/secrets 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +12 -49
  2. package/package.json +11 -12
  3. package/SPEC.md +0 -47
package/README.md CHANGED
@@ -1,59 +1,22 @@
1
1
  # @vibesdotdev/secrets
2
2
 
3
- Runtime-resolved secrets management. Universal core: defines the
4
- `secrets/store` kind. Backends live in sibling packages.
3
+ Secret store contracts, encrypted local secret support, and runtime descriptors for Vibes packages.
5
4
 
6
- ## Quickstart
5
+ This package is part of the public Vibes framework package set. The source repository is private while the public repository split is being prepared, so package documentation is published on the Vibes docs site.
7
6
 
8
- ### Read a secret
7
+ ## Install
9
8
 
10
- ```ts
11
- import { getVibesRuntime } from '@vibesdotdev/runtime';
12
-
13
- const store = await getVibesRuntime().query('secrets/store').resolve();
14
- const apiKey = await store.get('production', 'STRIPE_API_KEY');
15
-
16
- if (!apiKey) {
17
- throw new Error('STRIPE_API_KEY not set for production tier');
18
- }
19
- ```
20
-
21
- If no backend is registered for the current scope, `resolve()` throws — apps
22
- should surface this at bootstrap.
23
-
24
- ### Declare requirements (consumed by `vibes secrets check`)
25
-
26
- Apps declare what secrets they need via `infra/web-app` or `infra/worker`
27
- descriptors (owned by [`infra-core`](../infra-core/SPEC.md)). The requirements
28
- resolver extracts them; the CLI compares against the active store.
29
-
30
- ## CLI
31
-
32
- ```bash
33
- vibes secrets check
34
- vibes secrets list --environment <name>
35
- vibes secrets list --environment <name> --show-values
36
- vibes secrets set <key> [value] --environment <name>
37
- vibes secrets unset <key> --environment <name>
38
- vibes secrets pull --environment <name>
39
- vibes secrets push --environment <name>
9
+ ```sh
10
+ bun add @vibesdotdev/secrets
11
+ # or
12
+ npm install @vibesdotdev/secrets
40
13
  ```
41
14
 
42
- ## Backends
43
-
44
- Core ships zero backends. Apps load the backend packages their scope supports:
15
+ ## Documentation
45
16
 
46
- - [`@vibesdotdev/secrets-backend-env-file`](../secrets-backend-env-file/) — local `.env` files
47
- - [`@vibesdotdev/secrets-backend-encrypted-local`](../secrets-backend-encrypted-local/) encrypted local files
48
- - External vendor integrations (AWS Secrets Manager, Vault, GCP) → [`platform`](../platform/SPEC.md)
49
-
50
- ## Test
51
-
52
- ```bash
53
- bun test
54
- ```
17
+ - Package guide: https://docs.vibes.dev/packages/secrets
18
+ - Vibes docs: https://docs.vibes.dev
55
19
 
56
- ## Docs
20
+ ## License
57
21
 
58
- - [SPEC.md](./SPEC.md) — package contract, hard rules, migration debt
59
- - [runtime](../runtime/SPEC.md), [infra-core](../infra-core/SPEC.md)
22
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibesdotdev/secrets",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -52,20 +52,15 @@
52
52
  "registry": "https://registry.npmjs.org",
53
53
  "access": "public"
54
54
  },
55
- "repository": {
56
- "type": "git",
57
- "url": "git+https://github.com/vibesdotdev/monorepo.git",
58
- "directory": "packages/secrets"
59
- },
60
55
  "dependencies": {
61
- "@vibesdotdev/runtime": "0.0.1",
62
- "@vibesdotdev/config": "0.0.1",
63
- "@vibesdotdev/infra-core": "0.0.1",
64
- "@vibesdotdev/cli": "0.0.1"
56
+ "@vibesdotdev/runtime": "0.0.2",
57
+ "@vibesdotdev/config": "0.0.2",
58
+ "@vibesdotdev/infra-core": "0.0.2",
59
+ "@vibesdotdev/cli": "0.0.2"
65
60
  },
66
61
  "peerDependencies": {
67
62
  "zod": "^4.3.6",
68
- "@vibesdotdev/infra-deploy": "0.0.1"
63
+ "@vibesdotdev/infra-deploy": "0.0.2"
69
64
  },
70
65
  "peerDependenciesMeta": {
71
66
  "@vibesdotdev/infra-deploy": {
@@ -83,7 +78,6 @@
83
78
  "src",
84
79
  "bin",
85
80
  "README.md",
86
- "SPEC.md",
87
81
  "LICENSE",
88
82
  "!src/**/__tests__/**",
89
83
  "!src/**/__stubs__/**",
@@ -104,5 +98,10 @@
104
98
  ],
105
99
  "vibes": {
106
100
  "visibility": "public-framework"
101
+ },
102
+ "description": "Secret store contracts, encrypted local secret support, and runtime descriptors for Vibes packages.",
103
+ "homepage": "https://docs.vibes.dev/packages/secrets",
104
+ "bugs": {
105
+ "url": "https://docs.vibes.dev/packages/secrets#support"
107
106
  }
108
107
  }
package/SPEC.md DELETED
@@ -1,47 +0,0 @@
1
- # @vibesdotdev/secrets
2
-
3
- Runtime-resolved secrets management. Universal core: defines the `secrets/store` kind, environment-tier resolution, and the requirements resolver. Backends live in sibling packages and register themselves.
4
-
5
- ## Owns
6
-
7
- - **Runtime kind:** `secrets/store`
8
- - **Kind definition + resolver** (`./kinds/store.kind`): backend resolution by environment tier (`scope.qualifiers.environmentTier`) + descriptor priority
9
- - **Schemas** (`./kinds/schemas`, `./kinds/store.schema`): Zod descriptors for stores and stored values; `EnvironmentTierSchema`, `SecretsBackendSchema`
10
- - **Store interface** (`./kinds/store.interface`): TS contract every backend implements (`list`, `get`, `set`, `unset`, `getAll`, `setAll`)
11
- - **Requirements resolver** (`./requirements/resolver`): reads `infra/web-app` and `infra/worker` descriptors to extract required secrets; helpers for grouping/deduping for `vibes secrets check`
12
- - **CLI descriptors** (`./cli`): `vibes secrets` group + `check`, `list`, `set`, `unset`, `pull`, `push`, `import`, `export`, `reveal`, `pre-commit-check`. Commands query the runtime; they do not import backends.
13
- - **Plugin:** `./plugin` (= `./secrets.plugin`) — registers the kind + CLI descriptors only
14
-
15
- ## Does not own
16
-
17
- - **Backend implementations** → each backend is its own package: [`secrets-backend-env-file`](../secrets-backend-env-file/), [`secrets-backend-encrypted-local`](../secrets-backend-encrypted-local/), and future cloud/keychain backends
18
- - **External vendor integrations** (AWS Secrets Manager, HashiCorp Vault, GCP Secret Manager, etc.) → [`platform`](../platform/SPEC.md) integrations
19
- - **Encryption primitive** → [`security`](../security/SPEC.md) / [`config/services`](../config/SPEC.md). Encrypted backends consume it.
20
- - **Application data persistence** (user/org/business secrets stored as data) → owning module's `storage/manifest`
21
- - **Auth credentials, sessions, cookies** → [`auth`](../auth/SPEC.md)
22
- - **Infra descriptor ownership** → [`infra-core`](../infra-core/SPEC.md)
23
- - **A separate secrets UI surface.** Apps that need a UI consume secrets through the runtime; no standalone secrets app.
24
-
25
- ## Hard rules
26
-
27
- - **The core package is universal.** No FS, crypto, or HTTP imports in core. Anything that breaks browser or Cloudflare bundles belongs in a backend package.
28
- - **All secret access goes through `runtime.query('secrets/store').resolve()`.** No direct backend imports in features. No reading `.env` files in feature code.
29
- - **Backend selection is runtime-resolved by scope** (`hardware`, `qualifiers.environmentTier`). Features do not branch on `isCloud`/`connectionMode`.
30
- - **Environment tiers are canonical** (dev/staging/prod). Backends declare which tiers they serve; the resolver picks the active backend by current tier + priority.
31
- - **Missing-backend means hard failure.** No silent no-op fallback. `resolve()` throws "no `secrets/store` registered for current scope" if no backend has registered. Apps surface this at bootstrap, not at first secret access.
32
- - **Backend package contract:** each `secrets-backend-{name}` package exports a plugin that registers a `secrets/store` descriptor + impl. Apps load only the backends their scope can support. Core never imports backend packages.
33
- - **Requirements resolver is read-only.** It surfaces what's required from infra descriptors. It does not write or modify infra.
34
-
35
- ## Public entrypoints
36
-
37
- `.`, `./kinds`, `./kinds/*`, `./requirements`, `./plugin` (= `./secrets.plugin`).
38
-
39
- ## Verification
40
-
41
- `bun test` from package root. Covers kind registration, environment-tier resolution, requirements resolver against fixture infra descriptors, CLI descriptor wiring. Backend-specific tests live in each backend package.
42
-
43
- ## Links
44
-
45
- - [runtime/SPEC.md](../runtime/SPEC.md)
46
- - [config/SPEC.md](../config/SPEC.md), [security/SPEC.md](../security/SPEC.md)
47
- - [infra-core/SPEC.md](../infra-core/SPEC.md), [platform/SPEC.md](../platform/SPEC.md)