Require production paths to use PostgreSQL-aware stores and prevent new unrestricted database access. - Add a checked allowlist that bans production getDatabase() calls by default. - Route Quality plugin persistence through an async PostgreSQL-aware store and add Drizzle ORM. - Document backend-safe plugin storage patterns and cover guarded access behavior. Files changed: docs/PLUGIN_AUTHORING.md | 20 +++ package.json | 6 +- .../src/__tests__/agent-logs-backend-mode.test.ts | 7 + packages/core/src/store.ts | 7 +- packages/core/src/task-store/remaining-ops-5.ts | 8 +- plugins/fusion-plugin-quality/package.json | 1 + .../src/__tests__/async-quality-store.pg.test.ts | 36 +++++ .../src/__tests__/cancel-and-plans.test.ts | 8 +- .../src/__tests__/experimental-gate.test.ts | 1 + .../src/routes/create-routes.ts | 50 +++---- .../src/runner/command-runner.ts | 17 ++- .../src/store/async-quality-store.ts | 34 +++++ pnpm-lock.yaml | 3 + scripts/__tests__/check-no-getdatabase.test.mjs | 90 ++++++++++++ scripts/check-no-getdatabase.mjs | 159 +++++++++++++++++++++ scripts/lib/getdatabase-allowlist.json | 18 +++ 16 files changed, 422 insertions(+), 43 deletions(-) Fusion-Task-Id: FN-8103 Fusion-Task-Lineage: ff17bcb2-5341-4c6c-a5c4-993580539676 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
42 lines
1.0 KiB
JSON
42 lines
1.0 KiB
JSON
{
|
|
"name": "@fusion-plugin-examples/quality",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"description": "Quality hub and Task QA surfaces for Fusion",
|
|
"private": true,
|
|
"exports": {
|
|
".": {
|
|
"types": "./src/index.ts",
|
|
"import": "./src/index.ts"
|
|
},
|
|
"./dashboard-view": {
|
|
"types": "./src/dashboard-view.tsx",
|
|
"import": "./src/dashboard-view.tsx"
|
|
},
|
|
"./qa-tab": {
|
|
"types": "./src/qa-tab.tsx",
|
|
"import": "./src/qa-tab.tsx"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"pretest": "node ../../scripts/ensure-test-artifacts.mjs",
|
|
"test": "vitest run --silent=passed-only --reporter=dot"
|
|
},
|
|
"dependencies": {
|
|
"@fusion/core": "workspace:*",
|
|
"@fusion/plugin-sdk": "workspace:*",
|
|
"drizzle-orm": "^0.45.2",
|
|
"lucide-react": "^0.542.0"
|
|
},
|
|
"devDependencies": {
|
|
"@testing-library/react": "^16.3.2",
|
|
"@types/node": "^25.5.2",
|
|
"@types/react": "^19.0.0",
|
|
"react": "^19.0.0",
|
|
"react-dom": "^19.2.4",
|
|
"typescript": "^5.7.0",
|
|
"vitest": "^4.1.0"
|
|
}
|
|
}
|