@i4ctime/q-ring 0.11.0 → 0.11.7
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 +98 -49
- package/dist/mcp.js +467 -135
- package/dist/mcp.js.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -663,95 +663,95 @@ q-ring includes a full MCP server with 44 tools for AI agent integration.
|
|
|
663
663
|
|
|
664
664
|
| Tool | Description |
|
|
665
665
|
|------|-------------|
|
|
666
|
-
| `get_secret` |
|
|
667
|
-
| `list_secrets` | List keys
|
|
668
|
-
| `set_secret` |
|
|
669
|
-
| `delete_secret` |
|
|
670
|
-
| `has_secret` | Boolean check
|
|
671
|
-
| `export_secrets` |
|
|
672
|
-
| `import_dotenv` | Parse and
|
|
673
|
-
| `check_project` |
|
|
674
|
-
| `env_generate` |
|
|
666
|
+
| `get_secret` | Read a secret value (collapses superposition, audits the read) |
|
|
667
|
+
| `list_secrets` | List keys + metadata in scope (values never exposed); filter by tag, expiry, glob |
|
|
668
|
+
| `set_secret` | Create or overwrite a single secret with optional TTL, per-env state, tags, rotation format |
|
|
669
|
+
| `delete_secret` | Permanently remove a secret value (not undoable from q-ring) |
|
|
670
|
+
| `has_secret` | Boolean existence check that respects decay (no audit read) |
|
|
671
|
+
| `export_secrets` | Render multiple secrets as `.env` or JSON for one-off export |
|
|
672
|
+
| `import_dotenv` | Parse `.env` text and bulk-store every key/value pair |
|
|
673
|
+
| `check_project` | Compare `.q-ring.json` manifest against the keyring for missing/expired/stale keys |
|
|
674
|
+
| `env_generate` | Render a complete `.env` body from the project manifest, with warnings for gaps |
|
|
675
675
|
|
|
676
676
|
### Quantum Tools
|
|
677
677
|
|
|
678
678
|
| Tool | Description |
|
|
679
679
|
|------|-------------|
|
|
680
|
-
| `inspect_secret` |
|
|
681
|
-
| `detect_environment` |
|
|
682
|
-
| `generate_secret` |
|
|
683
|
-
| `entangle_secrets` | Link two
|
|
684
|
-
| `disentangle_secrets` |
|
|
680
|
+
| `inspect_secret` | Show metadata for one key (states, decay, entanglement, access count) without revealing the value |
|
|
681
|
+
| `detect_environment` | Resolve which env slug should drive superposition collapse for the current context |
|
|
682
|
+
| `generate_secret` | Generate a CSPRNG-backed value in a chosen format and optionally store it |
|
|
683
|
+
| `entangle_secrets` | Link two keys so future writes/rotations propagate the same value |
|
|
684
|
+
| `disentangle_secrets` | Break the sync link between two keys (does not delete values) |
|
|
685
685
|
|
|
686
686
|
### Tunneling Tools
|
|
687
687
|
|
|
688
688
|
| Tool | Description |
|
|
689
689
|
|------|-------------|
|
|
690
|
-
| `tunnel_create` |
|
|
691
|
-
| `tunnel_read` |
|
|
692
|
-
| `tunnel_list` |
|
|
693
|
-
| `tunnel_destroy` | Immediately
|
|
690
|
+
| `tunnel_create` | Stash a value in process memory and return an opaque ID (never touches disk) |
|
|
691
|
+
| `tunnel_read` | Fetch a tunneled value by ID — may self-destruct on read |
|
|
692
|
+
| `tunnel_list` | Enumerate active tunnels with remaining read budget and TTL (IDs only) |
|
|
693
|
+
| `tunnel_destroy` | Immediately remove a tunnel from memory before its TTL/reads run out |
|
|
694
694
|
|
|
695
695
|
### Teleportation Tools
|
|
696
696
|
|
|
697
697
|
| Tool | Description |
|
|
698
698
|
|------|-------------|
|
|
699
|
-
| `teleport_pack` | Encrypt secrets into a
|
|
700
|
-
| `teleport_unpack` | Decrypt and import
|
|
699
|
+
| `teleport_pack` | Encrypt selected secrets into a passphrase-protected AES-256-GCM bundle |
|
|
700
|
+
| `teleport_unpack` | Decrypt a teleport bundle and import each secret (with optional dry-run) |
|
|
701
701
|
|
|
702
702
|
### Validation Tools
|
|
703
703
|
|
|
704
704
|
| Tool | Description |
|
|
705
705
|
|------|-------------|
|
|
706
|
-
| `validate_secret` |
|
|
707
|
-
| `list_providers` |
|
|
706
|
+
| `validate_secret` | Hit the upstream service (OpenAI/Stripe/GitHub/AWS/HTTP) to confirm a single key is still live |
|
|
707
|
+
| `list_providers` | Enumerate built-in validation providers and their auto-detect prefixes |
|
|
708
708
|
|
|
709
709
|
### Hook Tools
|
|
710
710
|
|
|
711
711
|
| Tool | Description |
|
|
712
712
|
|------|-------------|
|
|
713
|
-
| `register_hook` | Register a shell/HTTP/signal
|
|
714
|
-
| `list_hooks` |
|
|
715
|
-
| `remove_hook` |
|
|
713
|
+
| `register_hook` | Register a shell/HTTP/signal side-effect that fires on write/delete/rotate |
|
|
714
|
+
| `list_hooks` | Show every registered hook with match criteria, type, and enabled flag |
|
|
715
|
+
| `remove_hook` | Detach a single hook by ID without touching any secrets |
|
|
716
716
|
|
|
717
717
|
### Execution & Scanning Tools
|
|
718
718
|
|
|
719
719
|
| Tool | Description |
|
|
720
720
|
|------|-------------|
|
|
721
|
-
| `exec_with_secrets` | Run a
|
|
722
|
-
| `scan_codebase_for_secrets` |
|
|
723
|
-
| `lint_files` |
|
|
721
|
+
| `exec_with_secrets` | Run a child command with secrets injected as env vars and any leaked values redacted from output |
|
|
722
|
+
| `scan_codebase_for_secrets` | Walk a directory tree and flag hardcoded secrets via regex + entropy heuristics |
|
|
723
|
+
| `lint_files` | Inspect a specific file list for hardcoded secrets with optional auto-fix to `process.env.KEY` |
|
|
724
724
|
|
|
725
725
|
### AI Agent Tools
|
|
726
726
|
|
|
727
727
|
| Tool | Description |
|
|
728
728
|
|------|-------------|
|
|
729
|
-
| `get_project_context` |
|
|
730
|
-
| `agent_remember` |
|
|
731
|
-
| `agent_recall` |
|
|
732
|
-
| `agent_forget` |
|
|
733
|
-
| `analyze_secrets` | Usage
|
|
729
|
+
| `get_project_context` | Single redacted snapshot of secrets, env, manifest, hooks, and recent audit activity |
|
|
730
|
+
| `agent_remember` | Persist a non-secret note in encrypted agent memory across sessions |
|
|
731
|
+
| `agent_recall` | Read a memory value, or list every stored key when no key is supplied |
|
|
732
|
+
| `agent_forget` | Permanently delete a key from agent memory |
|
|
733
|
+
| `analyze_secrets` | Usage profile: most-accessed, stale, never-accessed, no-rotation candidates |
|
|
734
734
|
|
|
735
735
|
### Observer & Health Tools
|
|
736
736
|
|
|
737
737
|
| Tool | Description |
|
|
738
738
|
|------|-------------|
|
|
739
|
-
| `audit_log` | Query
|
|
740
|
-
| `detect_anomalies` |
|
|
741
|
-
| `verify_audit_chain` |
|
|
742
|
-
| `export_audit` | Export audit events
|
|
743
|
-
| `health_check` |
|
|
744
|
-
| `status_dashboard` |
|
|
745
|
-
| `agent_scan` |
|
|
739
|
+
| `audit_log` | Query the tamper-evident audit log filtered by key, action, and limit |
|
|
740
|
+
| `detect_anomalies` | Surface burst-read and off-hours findings from audit history |
|
|
741
|
+
| `verify_audit_chain` | Recompute the audit hash chain and report the first break point if tampered |
|
|
742
|
+
| `export_audit` | Export audit events as jsonl, json, or csv for archival/SIEM |
|
|
743
|
+
| `health_check` | Read-only scope sweep: decay/stale/expired counts plus current anomalies |
|
|
744
|
+
| `status_dashboard` | Start a local SSE dashboard with live KPIs, secrets, hooks, and audit feed |
|
|
745
|
+
| `agent_scan` | Multi-project health pass with optional `autoRotate` for expired secrets |
|
|
746
746
|
|
|
747
747
|
### Governance & Policy Tools
|
|
748
748
|
|
|
749
749
|
| Tool | Description |
|
|
750
750
|
|------|-------------|
|
|
751
|
-
| `check_policy` |
|
|
752
|
-
| `get_policy_summary` |
|
|
753
|
-
| `rotate_secret` |
|
|
754
|
-
| `ci_validate_secrets` |
|
|
751
|
+
| `check_policy` | Dry-run a tool/key/exec action against `.q-ring.json` policy without performing it |
|
|
752
|
+
| `get_policy_summary` | High-level overview of policy rule counts and approval/rotation requirements |
|
|
753
|
+
| `rotate_secret` | Ask the upstream provider to issue a new credential and store it back in the keyring |
|
|
754
|
+
| `ci_validate_secrets` | Batch-validate every accessible secret in scope and return a structured pass/fail report |
|
|
755
755
|
|
|
756
756
|
### Cursor / Kiro Configuration
|
|
757
757
|
|
|
@@ -811,21 +811,66 @@ Add to `~/.claude/claude_desktop_config.json`:
|
|
|
811
811
|
}
|
|
812
812
|
```
|
|
813
813
|
|
|
814
|
-
##
|
|
814
|
+
## Editor Plugins
|
|
815
|
+
|
|
816
|
+
The q-ring repo ships three first-party editor packs — each one adds rules/steering, agents, commands, skills, hooks, and the MCP connector to its host editor.
|
|
817
|
+
|
|
818
|
+
| Plugin | Editor | Highlights |
|
|
819
|
+
|--------|--------|-----------|
|
|
820
|
+
| [`cursor-plugin/`](cursor-plugin/README.md) | [Cursor](https://cursor.com) | 3 rules, 5 skills, 2 agents, 8 slash commands, 3 hooks, MCP autoconnect |
|
|
821
|
+
| [`kiro-plugin/`](kiro-plugin/README.md) | [Kiro](https://kiro.dev) | Official [Power](https://kiro.dev/docs/powers/create/) layout: `POWER.md`, root `mcp.json`, `steering/`, `hooks/`; or flatten with `plugin:sync:kiro` |
|
|
822
|
+
| [`claude-code-plugin/`](claude-code-plugin/README.md) | [Claude Code](https://docs.claude.com/en/docs/claude-code/overview) | `CLAUDE.md` memory, project `.mcp.json`, 2 subagents, 8 slash commands, 5 skills, 3 hook scripts |
|
|
823
|
+
|
|
824
|
+
### Cursor Plugin
|
|
815
825
|
|
|
816
826
|
The **q-ring Cursor Plugin** brings quantum secret management directly into your IDE with rules, skills, agents, commands, hooks, and a built-in MCP connector.
|
|
817
827
|
|
|
818
828
|
| Component | What it does |
|
|
819
829
|
|-----------|-------------|
|
|
820
830
|
| **3 Rules** | Always-on guidance: never hardcode secrets, use q-ring for all ops, warn about `.env` files |
|
|
821
|
-
| **
|
|
831
|
+
| **5 Skills** | Auto-triggered by context: secret management, scanning, rotation, project onboarding, exec-with-secrets |
|
|
822
832
|
| **2 Agents** | `security-auditor` (proactive monitoring) and `secret-ops` (day-to-day assistant) |
|
|
823
|
-
| **
|
|
824
|
-
| **
|
|
833
|
+
| **8 Commands** | `/qring:scan-secrets`, `/qring:health-check`, `/qring:rotate-expired`, `/qring:setup-project`, `/qring:teleport-secrets`, `/qring:dashboard`, `/qring:exec-safe`, `/qring:analyze` |
|
|
834
|
+
| **3 Hooks** | `afterFileEdit` (lint scan), `sessionStart` (project context), `beforeShellExecution` (`.env` guard) |
|
|
825
835
|
| **MCP Connector** | Auto-connects to `qring-mcp` via stdio — all 44 tools available |
|
|
826
836
|
|
|
827
837
|
Install from the Cursor marketplace or see [`cursor-plugin/README.md`](cursor-plugin/README.md) for manual setup.
|
|
828
838
|
|
|
839
|
+
### Kiro Plugin (Power)
|
|
840
|
+
|
|
841
|
+
The [`kiro-plugin/`](kiro-plugin/) directory is a Kiro **Power** per [Create powers](https://kiro.dev/docs/powers/create/): `POWER.md` (metadata, onboarding, steering map), root [`mcp.json`](kiro-plugin/mcp.json) (MCP server must match the server name referenced in the power), and [`steering/`](kiro-plugin/steering/) for workflows. Install from Kiro → **Powers** → **Add power from Local Path** and select `kiro-plugin`, or publish the folder on GitHub and use **Add power from GitHub**.
|
|
842
|
+
|
|
843
|
+
Always-on steering blocks hardcoded secrets and routes everything through q-ring; `manual` steering files act as agent personas (`#qring-secret-ops`, `#qring-security-auditor`), skill packs, and slash-style commands (`#qring-cmd-scan-secrets`, etc.). Optional hooks live in `hooks/` for copy into `.kiro/hooks/`.
|
|
844
|
+
|
|
845
|
+
```bash
|
|
846
|
+
# Alternative: flatten into ~/.kiro (settings + steering + hooks)
|
|
847
|
+
pnpm run plugin:sync:kiro
|
|
848
|
+
|
|
849
|
+
# Or scope to a single project
|
|
850
|
+
pnpm run plugin:sync:kiro -- /path/to/your/project/.kiro
|
|
851
|
+
```
|
|
852
|
+
|
|
853
|
+
See [`kiro-plugin/README.md`](kiro-plugin/README.md) for the full breakdown.
|
|
854
|
+
|
|
855
|
+
### Claude Code Plugin
|
|
856
|
+
|
|
857
|
+
For [Claude Code](https://docs.claude.com/en/docs/claude-code/overview), q-ring ships a `CLAUDE.md` memory file, a project-scoped `.mcp.json`, two [subagents](https://docs.claude.com/en/docs/claude-code/sub-agents) (`secret-ops`, `security-auditor`), eight [slash commands](https://docs.claude.com/en/docs/claude-code/slash-commands) (`/qring-scan-secrets`, `/qring-health-check`, …), five [skills](https://docs.claude.com/en/docs/claude-code/skills), and three [hooks](https://docs.claude.com/en/docs/claude-code/hooks) (post-edit lint reminder, pre-Bash `.env` guard, session-start context primer).
|
|
858
|
+
|
|
859
|
+
```bash
|
|
860
|
+
# Install into the current project ($PWD)
|
|
861
|
+
pnpm run plugin:sync:claude
|
|
862
|
+
|
|
863
|
+
# Install agents/commands/skills/hooks at user scope (~/.claude)
|
|
864
|
+
pnpm run plugin:sync:claude -- --user
|
|
865
|
+
|
|
866
|
+
# Or target a specific project
|
|
867
|
+
pnpm run plugin:sync:claude -- /path/to/your/project
|
|
868
|
+
```
|
|
869
|
+
|
|
870
|
+
Existing `CLAUDE.md`, `.mcp.json`, or `.claude/settings.json` files are never silently overwritten — the script writes a `<filename>.qring-template` next to them so you can merge by hand. Pass `--force` to overwrite.
|
|
871
|
+
|
|
872
|
+
See [`claude-code-plugin/README.md`](claude-code-plugin/README.md) for the full breakdown.
|
|
873
|
+
|
|
829
874
|
## Architecture
|
|
830
875
|
|
|
831
876
|
```
|
|
@@ -900,7 +945,11 @@ Optional per-project configuration:
|
|
|
900
945
|
- Run **`pnpm run lint`**, **`pnpm run typecheck`**, and **`pnpm run test:ci`** before opening a PR.
|
|
901
946
|
- Tests or sandboxes can point the audit log elsewhere with **`QRING_AUDIT_DIR`** (directory is created if missing); default is `~/.config/q-ring/audit.jsonl`.
|
|
902
947
|
- Optional local pre-commit: **`qring hook:install`** (uses this package’s `precommit` hook when `qring` is on your `PATH`).
|
|
903
|
-
- After changing
|
|
948
|
+
- After changing one of the editor plugins:
|
|
949
|
+
- **Cursor:** `pnpm run plugin:sync` copies `cursor-plugin/` to `~/.cursor/plugins/local/my-plugin` (or pass a custom path).
|
|
950
|
+
- **Kiro:** `pnpm run plugin:sync:kiro` copies `kiro-plugin/mcp.json` → `~/.kiro/settings/mcp.json`, plus `steering/` and `hooks/` (or pass a project `.kiro` path). Prefer adding `kiro-plugin/` as a [Power](https://kiro.dev/docs/powers/create/) from the Powers panel instead.
|
|
951
|
+
- **Claude Code:** `pnpm run plugin:sync:claude` copies `claude-code-plugin/` into the current directory (or pass a project path; add `--user` to install at `~/.claude/`).
|
|
952
|
+
- See also [docs/cli-mcp-parity.md](docs/cli-mcp-parity.md).
|
|
904
953
|
|
|
905
954
|
## 📜 License
|
|
906
955
|
|