secretless-ai 0.10.2 → 0.11.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.
- package/README.md +125 -8
- package/dist/backends/local.js +2 -2
- package/dist/backends/local.js.map +1 -1
- package/dist/backends/migrate.d.ts +1 -1
- package/dist/backends/migrate.d.ts.map +1 -1
- package/dist/backends/migrate.js +1 -1
- package/dist/backends/migrate.js.map +1 -1
- package/dist/broker/events.d.ts +86 -0
- package/dist/broker/events.d.ts.map +1 -0
- package/dist/broker/events.js +204 -0
- package/dist/broker/events.js.map +1 -0
- package/dist/broker/index.d.ts +1 -0
- package/dist/broker/index.d.ts.map +1 -1
- package/dist/broker/index.js +3 -1
- package/dist/broker/index.js.map +1 -1
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +237 -15
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -1
- package/dist/index.js.map +1 -1
- package/dist/phantom/index.d.ts +3 -0
- package/dist/phantom/index.d.ts.map +1 -0
- package/dist/phantom/index.js +13 -0
- package/dist/phantom/index.js.map +1 -0
- package/dist/phantom/ref.d.ts +56 -0
- package/dist/phantom/ref.d.ts.map +1 -0
- package/dist/phantom/ref.js +124 -0
- package/dist/phantom/ref.js.map +1 -0
- package/dist/phantom/resolver.d.ts +56 -0
- package/dist/phantom/resolver.d.ts.map +1 -0
- package/dist/phantom/resolver.js +135 -0
- package/dist/phantom/resolver.js.map +1 -0
- package/dist/session/hook.d.ts +49 -0
- package/dist/session/hook.d.ts.map +1 -0
- package/dist/session/hook.js +83 -0
- package/dist/session/hook.js.map +1 -0
- package/dist/session/index.d.ts +6 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +27 -0
- package/dist/session/index.js.map +1 -0
- package/dist/session/install.d.ts +37 -0
- package/dist/session/install.d.ts.map +1 -0
- package/dist/session/install.js +241 -0
- package/dist/session/install.js.map +1 -0
- package/dist/session/session-state.d.ts +68 -0
- package/dist/session/session-state.d.ts.map +1 -0
- package/dist/session/session-state.js +161 -0
- package/dist/session/session-state.js.map +1 -0
- package/dist/session/touchid.d.ts +31 -0
- package/dist/session/touchid.d.ts.map +1 -0
- package/dist/session/touchid.js +231 -0
- package/dist/session/touchid.js.map +1 -0
- package/dist/session/warm.d.ts +54 -0
- package/dist/session/warm.d.ts.map +1 -0
- package/dist/session/warm.js +136 -0
- package/dist/session/warm.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,6 +52,8 @@ Then enable CLI integration: **1Password > Settings > Developer > "Integrate wit
|
|
|
52
52
|
npx secretless-ai backend set 1password # Switch backend
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
**Prevent repeated popups:** Run `npx secretless-ai warm --ttl 1h` before starting an AI coding session. This pre-loads all secrets into the encrypted cache so no `op` CLI calls (and no biometric popups) happen during the session. See [Session Management](#session-management).
|
|
56
|
+
|
|
55
57
|
**CI/CD:** Set `OP_SERVICE_ACCOUNT_TOKEN` — same secrets, no code changes. No desktop app needed.
|
|
56
58
|
|
|
57
59
|
### HashiCorp Vault Backend
|
|
@@ -91,7 +93,7 @@ npx secretless-ai scope reset MY_CREDENTIAL # Clear baseline
|
|
|
91
93
|
|----------|-----------|----------|-------------------|
|
|
92
94
|
| **GCP** | Service account key JSON | `testIamPermissions` (Cloud Resource Manager) | None (self-inspection) |
|
|
93
95
|
| **Vault** | Token prefix (`hvs.`, `s.`) | `capabilities-self` (Sys) | None (self-inspection) |
|
|
94
|
-
| **AWS** | Access key prefix (`AKIA`) |
|
|
96
|
+
| **AWS** | Access key prefix (`AKIA`) | STS `GetCallerIdentity` + IAM policy introspection | None (self-inspection) |
|
|
95
97
|
|
|
96
98
|
### How It Works
|
|
97
99
|
|
|
@@ -242,7 +244,7 @@ npx secretless-ai init
|
|
|
242
244
|
Output:
|
|
243
245
|
|
|
244
246
|
```
|
|
245
|
-
Secretless v0.10.
|
|
247
|
+
Secretless v0.10.2
|
|
246
248
|
Keeping secrets out of AI
|
|
247
249
|
|
|
248
250
|
Detected:
|
|
@@ -300,6 +302,94 @@ npx secretless-ai verify
|
|
|
300
302
|
PASS: Secrets are accessible via env vars but hidden from AI context.
|
|
301
303
|
```
|
|
302
304
|
|
|
305
|
+
## Session Management
|
|
306
|
+
|
|
307
|
+
If you use 1Password or OS keychain as your backend, every secret access triggers a biometric prompt (Touch ID, 1Password popup). During an AI coding session, these fire repeatedly and interrupt your workflow.
|
|
308
|
+
|
|
309
|
+
The `warm` command front-loads all authentication into one intentional moment:
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
npx secretless-ai warm # Authenticate once, pre-load all secrets into cache
|
|
313
|
+
npx secretless-ai warm --ttl 1h # Set session length (default: 5m, accepts 300, 10m, 1h, 1d)
|
|
314
|
+
npx secretless-ai warm --no-broker # Skip auto-starting the broker daemon
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
**What happens during warm:**
|
|
318
|
+
|
|
319
|
+
1. Touch ID authenticates your biometric session (macOS)
|
|
320
|
+
2. All secrets are resolved from your backend (1Password, keychain, vault) and cached in an AES-256-GCM encrypted file at `~/.secretless-ai/store/.secret-cache`
|
|
321
|
+
3. Cache TTL is synced with your session TTL so entries don't expire mid-session
|
|
322
|
+
4. The broker daemon starts if not already running
|
|
323
|
+
|
|
324
|
+
**After warm, for the entire session:** every `resolve()` call hits the encrypted file cache. Zero `op` CLI calls, zero keychain prompts, zero popups.
|
|
325
|
+
|
|
326
|
+
```
|
|
327
|
+
$ npx secretless-ai warm --ttl 1h
|
|
328
|
+
|
|
329
|
+
Secretless Session
|
|
330
|
+
|
|
331
|
+
Warming session...
|
|
332
|
+
Session is warm.
|
|
333
|
+
|
|
334
|
+
TTL: 3600s (1h 0m)
|
|
335
|
+
Expires at: 2026-03-04T17:30:00.000Z
|
|
336
|
+
Touch ID: used
|
|
337
|
+
Cache: 12 secrets preloaded
|
|
338
|
+
Broker: running
|
|
339
|
+
|
|
340
|
+
You can now use AI tools without repeated auth prompts.
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### Auto-Start on Login (macOS)
|
|
344
|
+
|
|
345
|
+
Install as a macOS LaunchAgent so the broker starts automatically:
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
npx secretless-ai install # Install LaunchAgent
|
|
349
|
+
npx secretless-ai install status # Check installation status
|
|
350
|
+
npx secretless-ai install uninstall # Remove LaunchAgent
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### Claude Code Integration
|
|
354
|
+
|
|
355
|
+
Add a session gate to Claude Code so it blocks tool calls when your session has expired:
|
|
356
|
+
|
|
357
|
+
```json
|
|
358
|
+
{
|
|
359
|
+
"hooks": {
|
|
360
|
+
"PreToolUse": [
|
|
361
|
+
{
|
|
362
|
+
"matcher": "Bash",
|
|
363
|
+
"hooks": [
|
|
364
|
+
{
|
|
365
|
+
"type": "command",
|
|
366
|
+
"command": "npx secretless-ai hook --check-only"
|
|
367
|
+
}
|
|
368
|
+
]
|
|
369
|
+
}
|
|
370
|
+
]
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
When the session is warm, the hook passes silently (exit 0, ~57ms). When expired, it blocks with an actionable message:
|
|
376
|
+
|
|
377
|
+
```
|
|
378
|
+
Secretless session expired. Run: secretless-ai warm
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
If secretless has never been set up (no session file exists), the hook passes — it won't block users who haven't opted in.
|
|
382
|
+
|
|
383
|
+
### Secret Cache
|
|
384
|
+
|
|
385
|
+
The cache reduces OS authentication prompts for keychain and 1Password backends by storing resolved secrets in an AES-256-GCM encrypted file. The `warm` command pre-populates the cache automatically.
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
npx secretless-ai cache # Show cache status
|
|
389
|
+
npx secretless-ai cache ttl 1h # Set cache TTL (5m, 1h, 1d, off)
|
|
390
|
+
npx secretless-ai cache clear # Clear cached secrets
|
|
391
|
+
```
|
|
392
|
+
|
|
303
393
|
## Git Protection
|
|
304
394
|
|
|
305
395
|
Prevent secrets from being committed:
|
|
@@ -310,17 +400,35 @@ npx secretless-ai hook status # Check hook installation status
|
|
|
310
400
|
npx secretless-ai hook uninstall # Remove pre-commit hook
|
|
311
401
|
```
|
|
312
402
|
|
|
403
|
+
## Shell History Protection
|
|
404
|
+
|
|
405
|
+
Scan and clean credentials that leaked into shell history files:
|
|
406
|
+
|
|
407
|
+
```bash
|
|
408
|
+
npx secretless-ai scan --history # Scan shell history for credentials
|
|
409
|
+
npx secretless-ai clean-history # Redact credentials in shell history
|
|
410
|
+
npx secretless-ai clean-history --dry-run # Preview without modifying
|
|
411
|
+
```
|
|
412
|
+
|
|
313
413
|
## All Commands
|
|
314
414
|
|
|
315
415
|
| Command | Description |
|
|
316
416
|
|---------|-------------|
|
|
317
417
|
| `init` | Set up protections for your AI tools |
|
|
318
418
|
| `scan` | Scan for hardcoded secrets (49 patterns) |
|
|
319
|
-
| `status` | Show protection status |
|
|
419
|
+
| `status` | Show protection status (session, broker, transcripts) |
|
|
320
420
|
| `verify` | Verify keys are usable but hidden from AI |
|
|
321
421
|
| `doctor [--fix]` | Diagnose and auto-fix shell profile issues |
|
|
322
|
-
| `clean [--dry-run]` | Scan and redact credentials in transcripts |
|
|
422
|
+
| `clean [--dry-run] [--path P]` | Scan and redact credentials in transcripts |
|
|
323
423
|
| `watch` | Monitor transcripts in real-time |
|
|
424
|
+
| **Session Management** | |
|
|
425
|
+
| `warm` | Warm biometric session and pre-load secrets into cache |
|
|
426
|
+
| `warm --ttl 10m` | Set session TTL (accepts seconds, 5m, 1h, 1d) |
|
|
427
|
+
| `warm --no-broker` | Skip auto-starting the broker daemon |
|
|
428
|
+
| `install` | Install broker as macOS login daemon (LaunchAgent) |
|
|
429
|
+
| `install uninstall` | Remove LaunchAgent |
|
|
430
|
+
| `install status` | Check daemon installation status |
|
|
431
|
+
| `hook --check-only` | Session gate for Claude Code PreToolUse hooks |
|
|
324
432
|
| **Secret Management** | |
|
|
325
433
|
| `secret set <NAME[=VALUE]>` | Store a secret |
|
|
326
434
|
| `secret list` | List stored secret names |
|
|
@@ -336,6 +444,10 @@ npx secretless-ai hook uninstall # Remove pre-commit hook
|
|
|
336
444
|
| `hook install` | Install pre-commit secret scanner |
|
|
337
445
|
| `hook uninstall` | Remove pre-commit hook |
|
|
338
446
|
| `hook status` | Check hook installation status |
|
|
447
|
+
| **Shell History** | |
|
|
448
|
+
| `scan --history` | Scan shell history for credentials |
|
|
449
|
+
| `clean-history` | Redact credentials in shell history |
|
|
450
|
+
| `clean-history --dry-run` | Preview redaction without modifying |
|
|
339
451
|
| **MCP Protection** | |
|
|
340
452
|
| `protect-mcp [--backend TYPE]` | Encrypt MCP server secrets |
|
|
341
453
|
| `mcp-status` | Show MCP protection status |
|
|
@@ -355,8 +467,13 @@ npx secretless-ai hook uninstall # Remove pre-commit hook
|
|
|
355
467
|
| `env [--only K1,K2]` | Output export statements for stored secrets (use with `eval`) |
|
|
356
468
|
| `scan-staged` | Scan git staged files for secrets (used by pre-commit hook) |
|
|
357
469
|
| **Cache Management** | |
|
|
470
|
+
| `cache` | Show cache status (backend, TTL, entries) |
|
|
358
471
|
| `cache clear` | Clear the encrypted secret cache |
|
|
359
472
|
| `cache ttl [DURATION]` | Show or set cache TTL (e.g., `5m`, `1h`, `off`) |
|
|
473
|
+
| **Credential Broker** | |
|
|
474
|
+
| `broker start` | Start the credential broker daemon |
|
|
475
|
+
| `broker stop` | Stop the broker daemon |
|
|
476
|
+
| `broker status` | Show broker status, uptime, and request count |
|
|
360
477
|
|
|
361
478
|
## Usage via OpenA2A CLI
|
|
362
479
|
|
|
@@ -473,13 +590,13 @@ Each layer builds on the previous one. Start with `secretless-ai init` for immed
|
|
|
473
590
|
|
|
474
591
|
## What Gets Blocked
|
|
475
592
|
|
|
476
|
-
### File patterns (
|
|
593
|
+
### File patterns (21)
|
|
477
594
|
|
|
478
595
|
`.env`, `.env.*`, `*.key`, `*.pem`, `*.p12`, `*.pfx`, `*.crt`, `.aws/credentials`, `.ssh/*`, `.docker/config.json`, `.git-credentials`, `.npmrc`, `.pypirc`, `*.tfstate`, `*.tfvars`, `secrets/`, `credentials/`
|
|
479
596
|
|
|
480
|
-
### Credential patterns (
|
|
597
|
+
### Credential patterns (56)
|
|
481
598
|
|
|
482
|
-
Anthropic API keys, OpenAI keys, AWS access keys, GitHub PATs, Slack tokens, Google API keys, Stripe keys, SendGrid keys, Supabase keys, Azure keys, GitLab tokens, Twilio keys, Mailgun keys, MongoDB URIs, JWTs, and
|
|
599
|
+
Anthropic API keys, OpenAI keys, AWS access keys, GitHub PATs, Slack tokens, Google API keys, Stripe keys, SendGrid keys, Supabase keys, Azure keys, GitLab tokens, Twilio keys, Mailgun keys, MongoDB URIs, JWTs, and 41 more
|
|
483
600
|
|
|
484
601
|
### Bash commands
|
|
485
602
|
|
|
@@ -493,7 +610,7 @@ For Claude Code, Secretless installs a PreToolUse hook that intercepts every `Re
|
|
|
493
610
|
|
|
494
611
|
```bash
|
|
495
612
|
npm run build # Compile TypeScript to dist/
|
|
496
|
-
npm test # Run tests (vitest,
|
|
613
|
+
npm test # Run tests (vitest, 738 tests)
|
|
497
614
|
npm run dev # Watch mode — recompile on file changes
|
|
498
615
|
npm run clean # Remove dist/ directory
|
|
499
616
|
```
|
package/dist/backends/local.js
CHANGED
|
@@ -62,10 +62,10 @@ class LocalBackend {
|
|
|
62
62
|
const encrypted = fs.readFileSync(storePath);
|
|
63
63
|
const decrypted = this.decrypt(encrypted);
|
|
64
64
|
const store = JSON.parse(decrypted);
|
|
65
|
-
//
|
|
65
|
+
// Empty prefix returns all secrets; otherwise match exact key or prefix/
|
|
66
66
|
const results = {};
|
|
67
67
|
for (const [key, value] of Object.entries(store)) {
|
|
68
|
-
if (key === secretPath || key.startsWith(secretPath + '/')) {
|
|
68
|
+
if (!secretPath || key === secretPath || key.startsW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AAC;QAChF,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACzB,OAAO,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF;AAnID,oCAmIC"}
|
|
@@ -8,7 +8,7 @@ import type { WritableSecretBackend } from './types';
|
|
|
8
8
|
export interface MigrateOptions {
|
|
9
9
|
/** Delete successfully migrated secrets from the source backend. Default: false. */
|
|
10
10
|
deleteFromSource?: boolean;
|
|
11
|
-
/** Secret path prefix to migrate
|
|
11
|
+
/** Secret path prefix to migrate. Empty string means all secrets. Default: '' (all). */
|
|
12
12
|
prefix?: string;
|
|
13
13
|
}
|
|
14
14
|
export interface MigrateResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/backends/migrate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,WAAW,cAAc;IAC7B,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/backends/migrate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,WAAW,cAAc;IAC7B,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wFAAwF;IACxF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjD;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,qBAAqB,EAC7B,WAAW,EAAE,qBAAqB,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,aAAa,CAAC,CAyBxB"}
|
package/dist/backends/migrate.js
CHANGED
|
@@ -15,7 +15,7 @@ exports.migrateSecrets = migrateSecrets;
|
|
|
15
15
|
* @param options - Migration options
|
|
16
16
|
*/
|
|
17
17
|
async function migrateSecrets(source, destination, options) {
|
|
18
|
-
const prefix = options?.prefix ?? '
|
|
18
|
+
const prefix = options?.prefix ?? '';
|
|
19
19
|
const deleteFromSource = options?.deleteFromSource ?? false;
|
|
20
20
|
const secrets = await source.resolve(prefix);
|
|
21
21
|
const result = { migrated: 0, failed: 0, errors: [] };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/backends/migrate.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAwBH,wCA6BC;AApCD;;;;;;GAMG;AACI,KAAK,UAAU,cAAc,CAClC,MAA6B,EAC7B,WAAkC,EAClC,OAAwB;IAExB,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/backends/migrate.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAwBH,wCA6BC;AApCD;;;;;;GAMG;AACI,KAAK,UAAU,cAAc,CAClC,MAA6B,EAC7B,WAAkC,EAClC,OAAwB;IAExB,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,EAAE,CAAC;IACrC,MAAM,gBAAgB,GAAG,OAAO,EAAE,gBAAgB,IAAI,KAAK,CAAC;IAE5D,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAkB,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAErE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACnD,IAAI,CAAC;YACH,MAAM,WAAW,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YACpC,MAAM,CAAC,QAAQ,EAAE,CAAC;YAElB,IAAI,gBAAgB,EAAE,CAAC;gBACrB,MAAM,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,MAAM,EAAE,CAAC;YAChB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;gBACjB,GAAG;gBACH,OAAO,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aAC1D,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured credential events — typed audit trail for AIM integration.
|
|
3
|
+
*
|
|
4
|
+
* Extends the existing audit logger with strongly-typed credential lifecycle
|
|
5
|
+
* events. These events can be emitted to AIM's audit endpoint for centralized
|
|
6
|
+
* visibility into credential usage across all agents.
|
|
7
|
+
*
|
|
8
|
+
* Event types follow the credential lifecycle:
|
|
9
|
+
* requested -> granted | denied
|
|
10
|
+
* granted -> expired | revoked
|
|
11
|
+
* (any time) -> leak_detected | rotated
|
|
12
|
+
*/
|
|
13
|
+
import { AuditLogger } from './audit';
|
|
14
|
+
/** Credential event types covering the full lifecycle. */
|
|
15
|
+
export type CredentialEventType = 'credential.requested' | 'credential.granted' | 'credential.denied' | 'credential.expired' | 'credential.revoked' | 'credential.rotated' | 'credential.leak_detected';
|
|
16
|
+
/** Alert severity levels. */
|
|
17
|
+
export type AlertLevel = 'info' | 'warning' | 'critical';
|
|
18
|
+
/** Structured credential event for AIM audit trail. */
|
|
19
|
+
export interface CredentialEvent {
|
|
20
|
+
/** Event type. */
|
|
21
|
+
type: CredentialEventType;
|
|
22
|
+
/** ISO 8601 timestamp. */
|
|
23
|
+
timestamp: string;
|
|
24
|
+
/** Agent that triggered the event. */
|
|
25
|
+
agentId: string;
|
|
26
|
+
/** Secret reference (URI or name, never the actual value). */
|
|
27
|
+
secretRef: string;
|
|
28
|
+
/** AIM trust score at the time of the event (0.0 to 1.0). */
|
|
29
|
+
trustScore?: number;
|
|
30
|
+
/** TTL in seconds for granted credentials. */
|
|
31
|
+
ttlSeconds?: number;
|
|
32
|
+
/** Reason for the decision (denial reason, expiry reason, etc.). */
|
|
33
|
+
reason?: string;
|
|
34
|
+
/** Alert level for events that need attention. */
|
|
35
|
+
alertLevel?: AlertLevel;
|
|
36
|
+
/** Policy rule that matched (if any). */
|
|
37
|
+
policyRuleId?: string;
|
|
38
|
+
/** Capability that was requested or exercised. */
|
|
39
|
+
capability?: string;
|
|
40
|
+
/** Backend that was used (keychain, vault, etc.). */
|
|
41
|
+
backend?: string;
|
|
42
|
+
/** Event version for forward compatibility. */
|
|
43
|
+
version: 1;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Credential event emitter — writes structured events to audit log
|
|
47
|
+
* and optionally forwards them to AIM.
|
|
48
|
+
*/
|
|
49
|
+
export declare class CredentialEventEmitter {
|
|
50
|
+
private readonly auditLogger;
|
|
51
|
+
private readonly aimAuditUrl;
|
|
52
|
+
constructor(auditLogger: AuditLogger, aimAuditUrl?: string);
|
|
53
|
+
/** Emit a credential requested event. */
|
|
54
|
+
emitRequested(agentId: string, secretRef: string, capability?: string): void;
|
|
55
|
+
/** Emit a credential granted event. */
|
|
56
|
+
emitGranted(agentId: string, secretRef: string, options: {
|
|
57
|
+
trustScore?: number;
|
|
58
|
+
ttlSeconds?: number;
|
|
59
|
+
policyRuleId?: string;
|
|
60
|
+
backend?: string;
|
|
61
|
+
}): void;
|
|
62
|
+
/** Emit a credential denied event. */
|
|
63
|
+
emitDenied(agentId: string, secretRef: string, reason: string, options?: {
|
|
64
|
+
trustScore?: number;
|
|
65
|
+
policyRuleId?: string;
|
|
66
|
+
alertLevel?: AlertLevel;
|
|
67
|
+
}): void;
|
|
68
|
+
/** Emit a credential expired event. */
|
|
69
|
+
emitExpired(agentId: string, secretRef: string, wasUsed: boolean): void;
|
|
70
|
+
/** Emit a credential revoked event. */
|
|
71
|
+
emitRevoked(agentId: string, secretRef: string, reason: string): void;
|
|
72
|
+
/** Emit a credential leak detected event. */
|
|
73
|
+
emitLeakDetected(agentId: string, secretRef: string, leakContext: string): void;
|
|
74
|
+
/** Emit a credential rotated event. */
|
|
75
|
+
emitRotated(secretRef: string, trigger: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* Core emit: write to local audit log + forward to AIM.
|
|
78
|
+
*/
|
|
79
|
+
private emit;
|
|
80
|
+
/**
|
|
81
|
+
* Forward an event to AIM's audit endpoint.
|
|
82
|
+
* Non-blocking, fire-and-forget. Failure is never visible to the caller.
|
|
83
|
+
*/
|
|
84
|
+
private forwardToAim;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/broker/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,0DAA0D;AAC1D,MAAM,MAAM,mBAAmB,GAC3B,sBAAsB,GACtB,oBAAoB,GACpB,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB,GACpB,oBAAoB,GACpB,0BAA0B,CAAC;AAE/B,6BAA6B;AAC7B,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;AAEzD,uDAAuD;AACvD,MAAM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AM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;QACR,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,UAAU,CAAC,EAAE,UAAU,CAAC;KACzB,GACA,IAAI;IAcP,uCAAuC;IACvC,WAAW,CACT,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,GACf,IAAI;IAYP,uCAAuC;IACvC,WAAW,CACT,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,IAAI;IAYP,6CAA6C;IAC7C,gBAAgB,CACd,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,GAClB,IAAI;IAYP,uCAAuC;IACvC,WAAW,CACT,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,IAAI;IAYP;;OAEG;IACH,OAAO,CAAC,IAAI;IAsBZ;;;OAGG;IACH,OAAO,CAAC,YAAY;CAoCrB"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Structured credential events — typed audit trail for AIM integration.
|
|
4
|
+
*
|
|
5
|
+
* Extends the existing audit logger with strongly-typed credential lifecycle
|
|
6
|
+
* events. These events can be emitted to AIM's audit endpoint for centralized
|
|
7
|
+
* visibility into credential usage across all agents.
|
|
8
|
+
*
|
|
9
|
+
* Event types follow the credential lifecycle:
|
|
10
|
+
* requested -> granted | denied
|
|
11
|
+
* granted -> expired | revoked
|
|
12
|
+
* (any time) -> leak_detected | rotated
|
|
13
|
+
*/
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
+
}
|
|
20
|
+
Object.defineProperty(o, k2, desc);
|
|
21
|
+
}) : (function(o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
}));
|
|
25
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
+
}) : function(o, v) {
|
|
28
|
+
o["default"] = v;
|
|
29
|
+
});
|
|
30
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
+
var ownKeys = function(o) {
|
|
32
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
+
var ar = [];
|
|
34
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
+
return ar;
|
|
36
|
+
};
|
|
37
|
+
return ownKeys(o);
|
|
38
|
+
};
|
|
39
|
+
return function (mod) {
|
|
40
|
+
if (mod && mod.__esModule) return mod;
|
|
41
|
+
var result = {};
|
|
42
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
+
__setModuleDefault(result, mod);
|
|
44
|
+
return result;
|
|
45
|
+
};
|
|
46
|
+
})();
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.CredentialEventEmitter = void 0;
|
|
49
|
+
const http = __importStar(require("http"));
|
|
50
|
+
const https = __importStar(require("https"));
|
|
51
|
+
/**
|
|
52
|
+
* Credential event emitter — writes structured events to audit log
|
|
53
|
+
* and optionally forwards them to AIM.
|
|
54
|
+
*/
|
|
55
|
+
class CredentialEventEmitter {
|
|
56
|
+
constructor(auditLogger, aimAuditUrl) {
|
|
57
|
+
this.auditLogger = auditLogger;
|
|
58
|
+
this.aimAuditUrl = aimAuditUrl ?? null;
|
|
59
|
+
}
|
|
60
|
+
/** Emit a credential requested event. */
|
|
61
|
+
emitRequested(agentId, secretRef, capability) {
|
|
62
|
+
this.emit({
|
|
63
|
+
type: 'credential.requested',
|
|
64
|
+
timestamp: new Date().toISOString(),
|
|
65
|
+
agentId,
|
|
66
|
+
secretRef,
|
|
67
|
+
capability,
|
|
68
|
+
alertLevel: 'info',
|
|
69
|
+
version: 1,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/** Emit a credential granted event. */
|
|
73
|
+
emitGranted(agentId, secretRef, options) {
|
|
74
|
+
this.emit({
|
|
75
|
+
type: 'credential.granted',
|
|
76
|
+
timestamp: new Date().toISOString(),
|
|
77
|
+
agentId,
|
|
78
|
+
secretRef,
|
|
79
|
+
trustScore: options.trustScore,
|
|
80
|
+
ttlSeconds: options.ttlSeconds,
|
|
81
|
+
policyRuleId: options.policyRuleId,
|
|
82
|
+
backend: options.backend,
|
|
83
|
+
alertLevel: 'info',
|
|
84
|
+
version: 1,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/** Emit a credential denied event. */
|
|
88
|
+
emitDenied(agentId, secretRef, reason, options) {
|
|
89
|
+
this.emit({
|
|
90
|
+
type: 'credential.denied',
|
|
91
|
+
timestamp: new Date().toISOString(),
|
|
92
|
+
agentId,
|
|
93
|
+
secretRef,
|
|
94
|
+
reason,
|
|
95
|
+
trustScore: options?.trustScore,
|
|
96
|
+
policyRuleId: options?.policyRuleId,
|
|
97
|
+
alertLevel: options?.alertLevel ?? 'warning',
|
|
98
|
+
version: 1,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/** Emit a credential expired event. */
|
|
102
|
+
emitExpired(agentId, secretRef, wasUsed) {
|
|
103
|
+
this.emit({
|
|
104
|
+
type: 'credential.expired',
|
|
105
|
+
timestamp: new Date().toISOString(),
|
|
106
|
+
agentId,
|
|
107
|
+
secretRef,
|
|
108
|
+
reason: wasUsed ? 'TTL expired after use' : 'TTL expired (unused)',
|
|
109
|
+
alertLevel: wasUsed ? 'info' : 'warning',
|
|
110
|
+
version: 1,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/** Emit a credential revoked event. */
|
|
114
|
+
emitRevoked(agentId, secretRef, reason) {
|
|
115
|
+
this.emit({
|
|
116
|
+
type: 'credential.revoked',
|
|
117
|
+
timestamp: new Date().toISOString(),
|
|
118
|
+
agentId,
|
|
119
|
+
secretRef,
|
|
120
|
+
reason,
|
|
121
|
+
alertLevel: 'warning',
|
|
122
|
+
version: 1,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/** Emit a credential leak detected event. */
|
|
126
|
+
emitLeakDetected(agentId, secretRef, leakContext) {
|
|
127
|
+
this.emit({
|
|
128
|
+
type: 'credential.leak_detected',
|
|
129
|
+
timestamp: new Date().toISOString(),
|
|
130
|
+
agentId,
|
|
131
|
+
secretRef,
|
|
132
|
+
reason: leakContext,
|
|
133
|
+
alertLevel: 'critical',
|
|
134
|
+
version: 1,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/** Emit a credential rotated event. */
|
|
138
|
+
emitRotated(secretRef, trigger) {
|
|
139
|
+
this.emit({
|
|
140
|
+
type: 'credential.rotated',
|
|
141
|
+
timestamp: new Date().toISOString(),
|
|
142
|
+
agentId: 'system',
|
|
143
|
+
secretRef,
|
|
144
|
+
reason: trigger,
|
|
145
|
+
alertLevel: 'info',
|
|
146
|
+
version: 1,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Core emit: write to local audit log + forward to AIM.
|
|
151
|
+
*/
|
|
152
|
+
emit(event) {
|
|
153
|
+
// Write to local audit log (always)
|
|
154
|
+
this.auditLogger.logEvent(event.type, event.agentId, event.secretRef, event.policyRuleId ?? '', event.type.includes('denied') || event.type.includes('revoked') || event.type.includes('leak')
|
|
155
|
+
? 'denied'
|
|
156
|
+
: 'allowed', event.reason ?? '', 0);
|
|
157
|
+
// Forward to AIM (best-effort, fire-and-forget)
|
|
158
|
+
if (this.aimAuditUrl) {
|
|
159
|
+
this.forwardToAim(event).catch(() => {
|
|
160
|
+
// Silently ignore AIM forwarding failures
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Forward an event to AIM's audit endpoint.
|
|
166
|
+
* Non-blocking, fire-and-forget. Failure is never visible to the caller.
|
|
167
|
+
*/
|
|
168
|
+
forwardToAim(event) {
|
|
169
|
+
return new Promise((resolve) => {
|
|
170
|
+
if (!this.aimAuditUrl) {
|
|
171
|
+
resolve();
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
try {
|
|
175
|
+
const url = new URL(this.aimAuditUrl);
|
|
176
|
+
const transport = url.protocol === 'https:' ? https : http;
|
|
177
|
+
const body = JSON.stringify(event);
|
|
178
|
+
const req = transport.request({
|
|
179
|
+
hostname: url.hostname,
|
|
180
|
+
port: url.port,
|
|
181
|
+
path: url.pathname,
|
|
182
|
+
method: 'POST',
|
|
183
|
+
headers: {
|
|
184
|
+
'Content-Type': 'application/json',
|
|
185
|
+
'Content-Length': Buffer.byteLength(body),
|
|
186
|
+
},
|
|
187
|
+
timeout: 3000, // 3s timeout — don't block on AIM
|
|
188
|
+
}, (res) => {
|
|
189
|
+
res.resume(); // Drain response
|
|
190
|
+
resolve();
|
|
191
|
+
});
|
|
192
|
+
req.on('error', () => resolve());
|
|
193
|
+
req.on('timeout', () => { req.destroy(); resolve(); });
|
|
194
|
+
req.write(body);
|
|
195
|
+
req.end();
|
|
196
|
+
}
|
|
197
|
+
catch {
|
|
198
|
+
resolve();
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
exports.CredentialEventEmitter = CredentialEventEmitter;
|
|
204
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/broker/events.ts"],"names":[],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M,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;gBAEnC,MAAM,GAAG,GAAG,SAAS,CAAC,OAAO,CAC3B;oBACE,QAAQ,EAAE,GAAG,CAAC,QAAQ;oBACtB,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,IAAI,EAAE,GAAG,CAAC,QAAQ;oBAClB,MAAM,EAAE,MAAM;oBACd,OAAO,EAAE;wBACP,cAAc,EAAE,kBAAkB;wBAClC,gBAAgB,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC;qBAC1C;oBACD,OAAO,EAAE,IAAI,EAAE,kCAAkC;iBAClD,EACD,CAAC,GAAG,EAAE,EAAE;oBACN,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,iBAAiB;oBAC/B,OAAO,EAAE,CAAC;gBACZ,CAAC,CACF,CAAC;gBAEF,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;gBACjC,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvD,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAChB,GAAG,CAAC,GAAG,EAAE,CAAC;YACZ,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,EAAE,CAAC;YACZ,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA/MD,wDA+MC"}
|
package/dist/broker/index.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export { AimClient } from './aim-client';
|
|
|
6
6
|
export { CredentialResolver, type ResolverOptions } from './resolver';
|
|
7
7
|
export { BrokerServer } from './server';
|
|
8
8
|
export { startDaemon, stopDaemon, getDaemonStatus, isDaemonRunning, type DaemonOptions, } from './daemon';
|
|
9
|
+
export { CredentialEventEmitter, type CredentialEvent, type CredentialEventType, type AlertLevel, } from './events';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/broker/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,cAAc,EACd,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,YAAY,EACZ,YAAY,GACb,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EACL,WAAW,EACX,UAAU,EACV,eAAe,EACf,eAAe,EACf,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/broker/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,cAAc,EACd,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,YAAY,EACZ,YAAY,GACb,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EACL,WAAW,EACX,UAAU,EACV,eAAe,EACf,eAAe,EACf,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,sBAAsB,EACtB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,UAAU,GAChB,MAAM,UAAU,CAAC"}
|
package/dist/broker/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isDaemonRunning = exports.getDaemonStatus = exports.stopDaemon = exports.startDaemon = exports.BrokerServer = exports.CredentialResolver = exports.AimClient = exports.AuditLogger = exports.RateLimiter = exports.isWithinTimeWindow = exports.matchGlob = exports.PolicyEngine = void 0;
|
|
3
|
+
exports.CredentialEventEmitter = exports.isDaemonRunning = exports.getDaemonStatus = exports.stopDaemon = exports.startDaemon = exports.BrokerServer = exports.CredentialResolver = exports.AimClient = exports.AuditLogger = exports.RateLimiter = exports.isWithinTimeWindow = exports.matchGlob = exports.PolicyEngine = void 0;
|
|
4
4
|
var policy_1 = require("./policy");
|
|
5
5
|
Object.defineProperty(exports, "PolicyEngine", { enumerable: true, get: function () { return policy_1.PolicyEngine; } });
|
|
6
6
|
Object.defineProperty(exports, "matchGlob", { enumerable: true, get: function () { return policy_1.matchGlob; } });
|
|
@@ -20,4 +20,6 @@ Object.defineProperty(exports, "startDaemon", { enumerable: true, get: function
|
|
|
20
20
|
Object.defineProperty(exports, "stopDaemon", { enumerable: true, get: function () { return daemon_1.stopDaemon; } });
|
|
21
21
|
Object.defineProperty(exports, "getDaemonStatus", { enumerable: true, get: function () { return daemon_1.getDaemonStatus; } });
|
|
22
22
|
Object.defineProperty(exports, "isDaemonRunning", { enumerable: true, get: function () { return daemon_1.isDaemonRunning; } });
|
|
23
|
+
var events_1 = require("./events");
|
|
24
|
+
Object.defineProperty(exports, "CredentialEventEmitter", { enumerable: true, get: function () { return events_1.CredentialEventEmitter; } });
|
|
23
25
|
//# sourceMappingURL=index.js.map
|
package/dist/broker/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/broker/index.ts"],"names":[],"mappings":";;;AAYA,mCAA8F;AAArF,sGAAA,YAAY,OAAA;AAAE,mGAAA,SAAS,OAAA;AAAE,4GAAA,kBAAkB,OAAA;AACpD,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,iCAAsC;AAA7B,oGAAA,WAAW,OAAA;AACpB,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,uCAAsE;AAA7D,8GAAA,kBAAkB,OAAA;AAC3B,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,mCAMkB;AALhB,qGAAA,WAAW,OAAA;AACX,oGAAA,UAAU,OAAA;AACV,yGAAA,eAAe,OAAA;AACf,yGAAA,eAAe,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/broker/index.ts"],"names":[],"mappings":";;;AAYA,mCAA8F;AAArF,sGAAA,YAAY,OAAA;AAAE,mGAAA,SAAS,OAAA;AAAE,4GAAA,kBAAkB,OAAA;AACpD,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,iCAAsC;AAA7B,oGAAA,WAAW,OAAA;AACpB,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,uCAAsE;AAA7D,8GAAA,kBAAkB,OAAA;AAC3B,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,mCAMkB;AALhB,qGAAA,WAAW,OAAA;AACX,oGAAA,UAAU,OAAA;AACV,yGAAA,eAAe,OAAA;AACf,yGAAA,eAAe,OAAA;AAIjB,mCAKkB;AAJhB,gHAAA,sBAAsB,OAAA"}
|
package/dist/cli.d.ts
CHANGED
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
* npx secretless-ai setup — Set up secrets from .secretless manifest
|
|
18
18
|
* npx secretless-ai hook — Manage pre-commit hook
|
|
19
19
|
* npx secretless-ai broker — Manage credential broker daemon (start, stop, status)
|
|
20
|
+
* npx secretless-ai warm — Warm biometric session (Touch ID on macOS)
|
|
21
|
+
* npx secretless-ai install — Install broker as login daemon (macOS LaunchAgent)
|
|
20
22
|
*/
|
|
21
23
|
export {};
|
|
22
24
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;GAoBG"}
|