@s-gw/s-gw 0.1.0

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 (123) hide show
  1. package/.codex-plugin/plugin.json +35 -0
  2. package/.mcp.json +16 -0
  3. package/LICENSE +201 -0
  4. package/NOTICE +7 -0
  5. package/README.md +197 -0
  6. package/TRADEMARKS.md +9 -0
  7. package/assets/icons/aws-ec2.png +0 -0
  8. package/assets/icons/lucide/bot.svg +8 -0
  9. package/assets/icons/lucide/monitor.svg +5 -0
  10. package/assets/icons/lucide/server.svg +6 -0
  11. package/assets/icons/lucide/terminal.svg +4 -0
  12. package/assets/icons/s-gw-128.png +0 -0
  13. package/assets/icons/s-gw-16.png +0 -0
  14. package/assets/icons/s-gw-180.png +0 -0
  15. package/assets/icons/s-gw-192.png +0 -0
  16. package/assets/icons/s-gw-32.png +0 -0
  17. package/assets/icons/s-gw-64.png +0 -0
  18. package/assets/icons/s-gw-menu-bar-template.png +0 -0
  19. package/dist/agent-context.d.ts +17 -0
  20. package/dist/agent-context.js +207 -0
  21. package/dist/agents.d.ts +64 -0
  22. package/dist/agents.js +763 -0
  23. package/dist/cli.d.ts +2 -0
  24. package/dist/cli.js +1385 -0
  25. package/dist/command-suggest.d.ts +3 -0
  26. package/dist/command-suggest.js +131 -0
  27. package/dist/console-server.d.ts +16 -0
  28. package/dist/console-server.js +978 -0
  29. package/dist/console-ui/assets/codex-DYTPdPxi.png +0 -0
  30. package/dist/console-ui/assets/cursor-CBrUTJD-.png +0 -0
  31. package/dist/console-ui/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  32. package/dist/console-ui/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  33. package/dist/console-ui/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  34. package/dist/console-ui/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  35. package/dist/console-ui/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  36. package/dist/console-ui/assets/hermes-B8hNbJPm.png +0 -0
  37. package/dist/console-ui/assets/index-BxUf0Sye.js +96 -0
  38. package/dist/console-ui/assets/index-CmTiBR_w.css +2 -0
  39. package/dist/console-ui/assets/omnigent-Cxa4p2Mq.png +0 -0
  40. package/dist/console-ui/assets/openclaw-C5wL4ZVW.png +0 -0
  41. package/dist/console-ui/assets/opencode-D_wFATSC.png +0 -0
  42. package/dist/console-ui/assets/openhands-DnrlGgev.svg +9 -0
  43. package/dist/console-ui/assets/s-gw-64-ByMUGQ3K.png +0 -0
  44. package/dist/console-ui/assets/vscode-Bdtr9eyf.png +0 -0
  45. package/dist/console-ui/assets/zeptoclaw-DztQW8Sw.png +0 -0
  46. package/dist/console-ui/index.html +13 -0
  47. package/dist/crypto.d.ts +6 -0
  48. package/dist/crypto.js +53 -0
  49. package/dist/executor.d.ts +7 -0
  50. package/dist/executor.js +297 -0
  51. package/dist/gateway.d.ts +31 -0
  52. package/dist/gateway.js +114 -0
  53. package/dist/guard.d.ts +61 -0
  54. package/dist/guard.js +247 -0
  55. package/dist/install.d.ts +146 -0
  56. package/dist/install.js +629 -0
  57. package/dist/mcp-server.d.ts +2 -0
  58. package/dist/mcp-server.js +119 -0
  59. package/dist/native/s-gw-core +0 -0
  60. package/dist/native/s-gw-keychain-helper +0 -0
  61. package/dist/onepassword.d.ts +48 -0
  62. package/dist/onepassword.js +412 -0
  63. package/dist/paths.d.ts +4 -0
  64. package/dist/paths.js +22 -0
  65. package/dist/s-gw Menu Bar.app/Contents/Info.plist +28 -0
  66. package/dist/s-gw Menu Bar.app/Contents/MacOS/s-gw-menu-bar-helper +0 -0
  67. package/dist/s-gw Menu Bar.app/Contents/Resources/AppIcon.icns +0 -0
  68. package/dist/s-gw Menu Bar.app/Contents/Resources/AwsEc2.png +0 -0
  69. package/dist/s-gw Menu Bar.app/Contents/Resources/Lucide-bot.svg +8 -0
  70. package/dist/s-gw Menu Bar.app/Contents/Resources/Lucide-monitor.svg +5 -0
  71. package/dist/s-gw Menu Bar.app/Contents/Resources/Lucide-server.svg +6 -0
  72. package/dist/s-gw Menu Bar.app/Contents/Resources/Lucide-terminal.svg +4 -0
  73. package/dist/s-gw Menu Bar.app/Contents/Resources/MenuBarTemplate.png +0 -0
  74. package/dist/s-gw Menu Bar.app/Contents/_CodeSignature/CodeResources +194 -0
  75. package/dist/s-gw.app/Contents/Info.plist +28 -0
  76. package/dist/s-gw.app/Contents/MacOS/s-gw +0 -0
  77. package/dist/s-gw.app/Contents/Resources/AppIcon.icns +0 -0
  78. package/dist/s-gw.app/Contents/Resources/MenuBarTemplate.png +0 -0
  79. package/dist/s-gw.app/Contents/_CodeSignature/CodeResources +139 -0
  80. package/dist/scanner.d.ts +9 -0
  81. package/dist/scanner.js +437 -0
  82. package/dist/ssh.d.ts +31 -0
  83. package/dist/ssh.js +286 -0
  84. package/dist/store.d.ts +131 -0
  85. package/dist/store.js +1611 -0
  86. package/dist/types.d.ts +196 -0
  87. package/dist/types.js +2 -0
  88. package/dist/unlock.d.ts +29 -0
  89. package/dist/unlock.js +274 -0
  90. package/dist/windows/VERSION.txt +1 -0
  91. package/dist/windows/s-gw-client.cmd +4 -0
  92. package/dist/windows/s-gw-client.ps1 +106 -0
  93. package/dist/windows/s-gw-credential.cmd +4 -0
  94. package/dist/windows/s-gw-credential.ps1 +167 -0
  95. package/dist/windows/s-gw-helper.cmd +4 -0
  96. package/dist/windows/s-gw-helper.ps1 +180 -0
  97. package/docs/README.md +23 -0
  98. package/docs/agents.md +160 -0
  99. package/docs/architecture.md +72 -0
  100. package/docs/deployment.md +447 -0
  101. package/docs/detection.md +44 -0
  102. package/docs/images/s-gw-overview.png +0 -0
  103. package/docs/integrations.md +195 -0
  104. package/docs/keychain.md +39 -0
  105. package/docs/onepassword.md +84 -0
  106. package/docs/quickstart.md +104 -0
  107. package/docs/threat-model.md +100 -0
  108. package/docs/ui/THIRD_PARTY_NOTICES.md +111 -0
  109. package/docs/ui/apple-touch-icon.png +0 -0
  110. package/docs/ui/favicon-32.png +0 -0
  111. package/docs/ui/local-console.html +4477 -0
  112. package/docs/ui/vendor/d3-sankey/d3-array.LICENSE.txt +27 -0
  113. package/docs/ui/vendor/d3-sankey/d3-array.min.js +2 -0
  114. package/docs/ui/vendor/d3-sankey/d3-path.LICENSE.txt +27 -0
  115. package/docs/ui/vendor/d3-sankey/d3-path.min.js +2 -0
  116. package/docs/ui/vendor/d3-sankey/d3-sankey.LICENSE.txt +27 -0
  117. package/docs/ui/vendor/d3-sankey/d3-sankey.min.js +2 -0
  118. package/docs/ui/vendor/d3-sankey/d3-shape.LICENSE.txt +27 -0
  119. package/docs/ui/vendor/d3-sankey/d3-shape.min.js +2 -0
  120. package/docs/ui/vendor/sankeymatic/LICENSE.txt +17 -0
  121. package/docs/ui/vendor/sankeymatic/sankey.js +897 -0
  122. package/package.json +117 -0
  123. package/skills/s-gw/SKILL.md +19 -0
package/package.json ADDED
@@ -0,0 +1,117 @@
1
+ {
2
+ "name": "@s-gw/s-gw",
3
+ "version": "0.1.0",
4
+ "description": "Local credential control for AI coding agents.",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/sgateway/s-gw.git"
9
+ },
10
+ "homepage": "https://s-gw.com",
11
+ "bugs": {
12
+ "url": "https://github.com/sgateway/s-gw/issues"
13
+ },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "bin": {
18
+ "s-gw": "./dist/cli.js",
19
+ "sgw": "./dist/cli.js",
20
+ "s-gw-mcp": "./dist/mcp-server.js",
21
+ "secret-gateway-mcp": "./dist/mcp-server.js"
22
+ },
23
+ "files": [
24
+ "assets",
25
+ "dist",
26
+ "docs",
27
+ "README.md",
28
+ "LICENSE",
29
+ "NOTICE",
30
+ "TRADEMARKS.md",
31
+ ".codex-plugin",
32
+ ".mcp.json",
33
+ "skills",
34
+ "!dist/assets/icons/s-gw-*.png",
35
+ "!dist/assets/icons/AppIcon.icns",
36
+ "!dist/installers",
37
+ "!dist/**/*.map",
38
+ "!docs/ui/local-console*.png",
39
+ "!assets/icons/s-gw-source.png",
40
+ "!assets/icons/s-gw-menu-bar-template-source.png",
41
+ "!assets/icons/s-gw-1024.png",
42
+ "!assets/icons/s-gw-512.png",
43
+ "!assets/icons/s-gw-256.png"
44
+ ],
45
+ "scripts": {
46
+ "build": "npm run build:native && npm run build:console-ui && tsc -p tsconfig.json",
47
+ "build:console-ui": "vite build --config vite.console.config.ts",
48
+ "dev:console-ui": "vite --config vite.console.config.ts",
49
+ "build:native": "npm run build:rust-core && node scripts/build-native-keychain.mjs && node scripts/build-menu-bar-helper.mjs && node scripts/build-macos-app.mjs && node scripts/build-windows-client.mjs",
50
+ "build:rust-core": "node scripts/build-rust-core.mjs",
51
+ "build:macos-app": "node scripts/build-macos-app.mjs",
52
+ "build:menubar": "node scripts/build-menu-bar-helper.mjs",
53
+ "build:windows-client": "npm run build:rust-core && node scripts/build-windows-client.mjs",
54
+ "build:installers": "npm run build && node scripts/build-installers.mjs",
55
+ "dev:macos-app": "scripts/dev-macos-app.sh",
56
+ "check": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.console.json --noEmit",
57
+ "package:local": "npm run verify && npm pack",
58
+ "package:dry-run": "npm pack --dry-run",
59
+ "check:rust": "cargo fmt --all -- --check && cargo clippy --locked --all-targets -- -D warnings && cargo test --locked -p sgw-core",
60
+ "pretest": "npm run build:rust-core",
61
+ "test": "vitest run",
62
+ "test:watch": "vitest",
63
+ "verify": "npm run build && npm run check:rust && npm test && npm audit && npm run package:dry-run",
64
+ "prepack": "npm run build"
65
+ },
66
+ "keywords": [
67
+ "mcp",
68
+ "secrets",
69
+ "credential-security",
70
+ "local-first",
71
+ "ai-agents",
72
+ "codex",
73
+ "claude",
74
+ "cursor",
75
+ "opencode"
76
+ ],
77
+ "author": "Barry Yuan",
78
+ "license": "Apache-2.0",
79
+ "dependencies": {
80
+ "@fontsource-variable/geist": "^5.2.9",
81
+ "@modelcontextprotocol/sdk": "^1.29.0",
82
+ "class-variance-authority": "^0.7.1",
83
+ "clsx": "^2.1.1",
84
+ "cmdk": "^1.1.1",
85
+ "d3-sankey": "^0.12.3",
86
+ "lucide-react": "^1.23.0",
87
+ "next-themes": "^0.4.6",
88
+ "radix-ui": "^1.6.1",
89
+ "react": "^19.2.7",
90
+ "react-dom": "^19.2.7",
91
+ "react-grid-layout": "^2.2.3",
92
+ "react-resizable-panels": "^4.12.0",
93
+ "recharts": "^3.8.0",
94
+ "sonner": "^2.0.7",
95
+ "tailwind-merge": "^3.6.0",
96
+ "tw-animate-css": "^1.4.0",
97
+ "zod": "^3.25.76"
98
+ },
99
+ "devDependencies": {
100
+ "@tailwindcss/vite": "^4.3.2",
101
+ "@types/d3-sankey": "^0.12.5",
102
+ "@types/node": "^24.0.0",
103
+ "@types/react": "^19.2.17",
104
+ "@types/react-dom": "^19.2.3",
105
+ "@types/react-grid-layout": "^1.3.6",
106
+ "@vitejs/plugin-react": "^6.0.3",
107
+ "tailwindcss": "^4.3.2",
108
+ "tsx": "^4.20.3",
109
+ "typescript": "^5.8.3",
110
+ "vite": "^8.1.2",
111
+ "vitest": "^4.1.8",
112
+ "ws": "^8.21.0"
113
+ },
114
+ "engines": {
115
+ "node": ">=20"
116
+ }
117
+ }
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: s-gw
3
+ description: Use s-gw when working with credentials, private keys, API tokens, SSH identities, browser credentials, or other sensitive data in agentic coding workflows. Prefer typed handles and local approved execution over exposing raw secret values to a model.
4
+ ---
5
+
6
+ # s-gw
7
+
8
+ Use s-gw to keep raw credentials local while still letting an agent plan and request useful credential-backed actions.
9
+
10
+ Core rules:
11
+
12
+ - Never ask the user to paste a raw secret into the chat.
13
+ - Use `sgw_scan_file` to inspect local files and return typed handles instead of secret values.
14
+ - Use `sgw_list_handles` and `sgw_describe_handle` when the agent needs to reason about available secrets.
15
+ - Use `sgw_request_execution` to create a bounded operation manifest. The user must approve the request locally before execution.
16
+ - Use `sgw_execute_request` only after approval. Returned output is sanitized and should be treated as the only model-visible result.
17
+ - If a secret-backed action is too broad, ask for a narrower operation instead of requesting blanket access.
18
+
19
+ s-gw is local-first. The MCP server runs on the user's machine over stdio. Raw secrets should remain in the local encrypted ledger or local OS/vault-backed stores.