0595794385
- Default export is { id, setup, server }: OpenCode 2 calls setup(ctx), OpenCode 1 (1.18.29+) calls server()
- Tools defined once in lib/tools.ts and registered for both versions (V2 with codemode: false)
- Blocking covers path args of any tool, patch/apply_patch envelopes, shell commands naming env files, grep output, and V2 permission checks
- Secret-looking values from the project's env files are replaced in every non-envsitter tool's output
- Protected files come from envsitter's path policy; example/template files stay readable
- npm run test:e2e drives the real OpenCode 1 and 2 CLIs with a scripted model
- @opencode-ai/plugin ^1.19.3, @opencode/plugin ^2.1.0 (peer >=2.0.32), envsitter ^0.1.0, TypeScript 6
BREAKING CHANGE: the named export EnvSitterGuard is now the plugin definition object; call EnvSitterGuard.server(input) instead of EnvSitterGuard(input).
70 lines
1.7 KiB
JSON
70 lines
1.7 KiB
JSON
{
|
|
"name": "envsitter-guard",
|
|
"version": "0.1.0",
|
|
"description": "OpenCode plugin (OpenCode 1 and 2) that prevents agents/tools from reading or editing sensitive .env files, while still allowing safe inspection via EnvSitter.",
|
|
"license": "MIT",
|
|
"homepage": "https://boxpositron.github.io/envsitter/guard/",
|
|
"keywords": [
|
|
"opencode",
|
|
"opencode-plugin",
|
|
"dotenv",
|
|
"env",
|
|
"secrets",
|
|
"security",
|
|
"guard",
|
|
"agent",
|
|
"llm",
|
|
"ai",
|
|
"mcp",
|
|
"envsitter"
|
|
],
|
|
"type": "module",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/boxpositron/envsitter-guard.git"
|
|
},
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
}
|
|
},
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"files": [
|
|
"dist/",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc -p tsconfig.build.json",
|
|
"typecheck": "tsc -p tsconfig.json",
|
|
"build:test": "tsc -p tsconfig.test.json",
|
|
"test": "npm run build:test && node --test dist-test/test/*.test.js",
|
|
"test:e2e": "npm run build && node scripts/e2e-opencode.mjs",
|
|
"prepack": "npm run build",
|
|
"prepublishOnly": "npm run typecheck && npm test && npm run build"
|
|
},
|
|
"dependencies": {
|
|
"@opencode-ai/plugin": "^1.19.3",
|
|
"envsitter": "^0.1.0"
|
|
},
|
|
"peerDependencies": {
|
|
"@opencode/plugin": ">=2.0.32"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"@opencode/plugin": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"devDependencies": {
|
|
"@opencode/plugin": "^2.1.0",
|
|
"@types/node": "^22.20.5",
|
|
"husky": "^9.1.7",
|
|
"typescript": "^6.0.3"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
}
|
|
}
|