Files
flynn/package.json
William Valentin 98f954de0d feat(audit): add reaction-rate drift gate thresholds
Add optional reaction match-drop and skip-increase drift thresholds, expose CLI flags, and enable conservative defaults in cadence package scripts. Includes tests and docs/state sync.
2026-02-27 13:23:28 -08:00

95 lines
6.7 KiB
JSON

{
"name": "flynn",
"version": "0.1.0",
"description": "Self-hosted personal AI agent",
"type": "module",
"main": "dist/index.js",
"bin": {
"flynn": "dist/cli/index.js"
},
"scripts": {
"build": "tsc && rm -rf dist/gateway/ui && cp -r src/gateway/ui dist/gateway/ui",
"dev": "tsx watch src/cli/index.ts -- start",
"start": "node dist/cli/index.js start",
"tui": "node --no-deprecation --import tsx/esm src/cli/index.ts tui",
"tui:fs": "node --no-deprecation --import tsx/esm src/cli/index.ts tui --fullscreen",
"tui:dev": "tsx watch src/cli/index.ts -- tui",
"test": "vitest",
"test:run": "vitest run",
"lint": "eslint src/",
"typecheck": "tsc --noEmit",
"config:profiles:generate": "node scripts/generate-config-profiles.mjs",
"config:profiles:check": "node scripts/generate-config-profiles.mjs --check",
"audit:backend-canary": "node --import tsx/esm scripts/summarize-backend-canary.ts",
"audit:phase0-baseline": "node --import tsx/esm scripts/summarize-phase0-baseline.ts",
"audit:phase0-baseline:live": "node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source channel --exclude-session-substring probe",
"audit:phase0-baseline:live:pi": "node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source channel --backend pi_embedded --exclude-session-substring probe",
"audit:phase0-baseline:live:native": "node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source channel --backend native --exclude-session-substring probe",
"audit:phase0-baseline:live:gateway": "node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source gateway --auto-gateway-cancel-window",
"audit:phase0-baseline:live:refresh": "pnpm audit:phase0-baseline:live && pnpm audit:phase0-baseline:live:gateway && pnpm audit:phase0-baseline:live:pi && pnpm audit:phase0-baseline:live:native",
"audit:phase0-baseline:live:drift": "node --import tsx/esm scripts/check-phase0-baseline-backend-drift.ts --artifacts-dir docs/plans/artifacts --backend pi_embedded,native --max-age-hours 36 --min-candidate-sampled-events 10 --max-sampled-events-drop-pct 80 --max-run-outcomes-drop-pct 80 --max-completion-rate-drop-pp 35 --max-cancel-rate-increase-pp 25 --max-error-rate-increase-pp 25 --max-cancel-latency-p95-increase-ms 6000 --max-reaction-match-rate-drop-pp 50 --max-reaction-skip-rate-increase-pp 50 --write-default-artifacts",
"audit:phase0-baseline:live:refresh:drift": "pnpm audit:phase0-baseline:live:refresh && pnpm audit:phase0-baseline:live:drift",
"audit:phase0-baseline:live:refresh:drift:rolling": "TAG=${TAG:-$(date -u +%F-%H%M%S)} && node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source channel --exclude-session-substring probe --tag \"$TAG\" && node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source gateway --auto-gateway-cancel-window --tag \"$TAG\" && node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source channel --backend pi_embedded --exclude-session-substring probe --tag \"$TAG\" && node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source channel --backend native --exclude-session-substring probe --tag \"$TAG\" && node --import tsx/esm scripts/check-phase0-baseline-backend-drift.ts --artifacts-dir docs/plans/artifacts --backend pi_embedded,native --max-age-hours 36 --min-candidate-sampled-events 10 --max-sampled-events-drop-pct 80 --max-run-outcomes-drop-pct 80 --max-completion-rate-drop-pp 35 --max-cancel-rate-increase-pp 25 --max-error-rate-increase-pp 25 --max-cancel-latency-p95-increase-ms 6000 --max-reaction-match-rate-drop-pp 50 --max-reaction-skip-rate-increase-pp 50 --write-default-artifacts --tag \"$TAG\" --report-tag \"$TAG\"",
"audit:phase0-baseline:live:prune": "KEEP_PER_FAMILY=${KEEP_PER_FAMILY:-8} && node --import tsx/esm scripts/prune-phase0-baseline-artifacts.ts --artifacts-dir docs/plans/artifacts --keep-per-family \"$KEEP_PER_FAMILY\" --write-default-artifacts",
"audit:phase0-baseline:live:prune:apply": "KEEP_PER_FAMILY=${KEEP_PER_FAMILY:-8} && node --import tsx/esm scripts/prune-phase0-baseline-artifacts.ts --artifacts-dir docs/plans/artifacts --keep-per-family \"$KEEP_PER_FAMILY\" --apply --write-default-artifacts",
"audit:phase0-baseline:live:refresh:drift:rolling:prune": "TAG=${TAG:-$(date -u +%F-%H%M%S)} && TAG=\"$TAG\" pnpm audit:phase0-baseline:live:refresh:drift:rolling && KEEP_PER_FAMILY=${KEEP_PER_FAMILY:-8} node --import tsx/esm scripts/prune-phase0-baseline-artifacts.ts --artifacts-dir docs/plans/artifacts --keep-per-family \"$KEEP_PER_FAMILY\" --apply --write-default-artifacts --report-tag \"$TAG\"",
"audit:backend-canary:probes": "node --import tsx/esm scripts/run-pi-canary-guard-probes.ts",
"companion:bundle": "node --import tsx/esm scripts/build-companion-release-bundle.ts",
"companion:reference-apps": "node --import tsx/esm scripts/export-companion-reference-apps.ts",
"companion:reference-apps:check": "pnpm companion:reference-apps -- --output ./apps/companion --url ws://127.0.0.1:18800 && git diff --exit-code -- apps/companion"
},
"keywords": [
"ai",
"agent",
"telegram",
"personal-assistant"
],
"license": "MIT",
"devDependencies": {
"@types/better-sqlite3": "^7.6.0",
"@types/node": "^22.0.0",
"@types/react": "^19.0.0",
"@types/turndown": "^5.0.0",
"@types/ws": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^8.55.0",
"@typescript-eslint/parser": "^8.55.0",
"eslint": "^9.0.0",
"tsx": "^4.0.0",
"typescript": "^5.7.0",
"vitest": "^3.0.0"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.39.0",
"@aws-sdk/client-bedrock-runtime": "^3.985.0",
"@google-cloud/pubsub": "^5.2.3",
"@google/generative-ai": "^0.24.1",
"@mariozechner/pi-agent-core": "^0.54.2",
"@modelcontextprotocol/sdk": "^1.26.0",
"@mozilla/readability": "^0.5.0",
"@slack/bolt": "^4.6.0",
"better-sqlite3": "^11.0.0",
"cli-highlight": "^2.1.11",
"commander": "^14.0.3",
"croner": "^10.0.1",
"discord.js": "^14.25.1",
"googleapis": "^148.0.0",
"grammy": "^1.35.0",
"ink": "^6.0.0",
"ink-text-input": "^6.0.0",
"linkedom": "^0.18.0",
"marked": "^17.0.1",
"ollama": "^0.5.0",
"openai": "^4.0.0",
"puppeteer-core": "^24.37.2",
"react": "^19.0.0",
"turndown": "^7.2.0",
"whatsapp-web.js": "^1.34.6",
"ws": "^8.19.0",
"yaml": "^2.7.0",
"zod": "^3.24.0"
},
"engines": {
"node": ">=22.0.0"
}
}