{
  "name": "@smartergpt/lex",
  "version": "2.7.1",
  "description": "MIT-licensed memory, policy, and atlas framework with MCP server. For local dev and private automation.",
  "type": "module",
  "main": "dist/index.js",
  "types": "dist/index.d.ts",
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "import": "./dist/index.js"
    },
    "./cli": {
      "types": "./dist/shared/cli/index.d.ts",
      "import": "./dist/shared/cli/index.js"
    },
    "./cli-output": {
      "types": "./dist/shared/cli/output.d.ts",
      "import": "./dist/shared/cli/output.js"
    },
    "./types": {
      "types": "./dist/shared/types/index.d.ts",
      "import": "./dist/shared/types/index.js"
    },
    "./errors": {
      "types": "./dist/shared/errors/index.d.ts",
      "import": "./dist/shared/errors/index.js"
    },
    "./policy": {
      "types": "./dist/shared/policy/index.d.ts",
      "import": "./dist/shared/policy/index.js"
    },
    "./atlas": {
      "types": "./dist/shared/atlas/index.d.ts",
      "import": "./dist/shared/atlas/index.js"
    },
    "./atlas/code-unit": {
      "types": "./dist/atlas/schemas/code-unit.d.ts",
      "import": "./dist/atlas/schemas/code-unit.js"
    },
    "./atlas/schemas": {
      "types": "./dist/atlas/index.d.ts",
      "import": "./dist/atlas/index.js"
    },
    "./module-ids": {
      "types": "./dist/shared/module_ids/index.d.ts",
      "import": "./dist/shared/module_ids/index.js"
    },
    "./aliases": {
      "types": "./dist/shared/aliases/index.d.ts",
      "import": "./dist/shared/aliases/index.js"
    },
    "./store": {
      "types": "./dist/memory/store/index.d.ts",
      "import": "./dist/memory/store/index.js"
    },
    "./dedup": {
      "types": "./dist/memory/deduplication.d.ts",
      "import": "./dist/memory/deduplication.js"
    },
    "./similarity": {
      "types": "./dist/memory/similarity.d.ts",
      "import": "./dist/memory/similarity.js"
    },
    "./consolidation": {
      "types": "./dist/memory/store/consolidate.d.ts",
      "import": "./dist/memory/store/consolidate.js"
    },
    "./contradictions": {
      "types": "./dist/memory/contradictions.d.ts",
      "import": "./dist/memory/contradictions.js"
    },
    "./maintenance": {
      "types": "./dist/memory/maintenance/index.d.ts",
      "import": "./dist/memory/maintenance/index.js"
    },
    "./memory": {
      "types": "./dist/memory/validation/index.d.ts",
      "import": "./dist/memory/validation/index.js"
    },
    "./memory/receipts": {
      "types": "./dist/memory/receipts/index.d.ts",
      "import": "./dist/memory/receipts/index.js"
    },
    "./memory/receipts/validator": {
      "types": "./dist/memory/receipts/validator.d.ts",
      "import": "./dist/memory/receipts/validator.js"
    },
    "./logger": {
      "types": "./dist/shared/logger/index.d.ts",
      "import": "./dist/shared/logger/index.js"
    },
    "./prompts": {
      "types": "./dist/shared/prompts/index.d.ts",
      "import": "./dist/shared/prompts/index.js"
    },
    "./lexsona": {
      "types": "./dist/shared/lexsona/index.d.ts",
      "import": "./dist/shared/lexsona/index.js"
    },
    "./mcp-server": {
      "types": "./dist/memory/mcp_server/server.d.ts",
      "import": "./dist/memory/mcp_server/server.js"
    },
    "./schemas/cli-output.v1.schema.json": "./schemas/cli-output.v1.schema.json",
    "./schemas/feature-spec-v0.json": "./schemas/feature-spec-v0.json",
    "./schemas/profile.schema.json": "./schemas/profile.schema.json"
  },
  "bin": {
    "lex": "dist/shared/cli/lex.js"
  },
  "files": [
    "dist/**/*.js",
    "dist/**/*.d.ts",
    "dist/**/*.js.map",
    "!dist/**/*.tsbuildinfo",
    "src/policy/policy_spec/lexmap.policy.json.example",
    "src/policy/README.md",
    "examples/",
    "canon/prompts/",
    "canon/schemas/",
    "canon/rules/",
    "schemas/",
    "rules/",
    "README.md",
    "CHANGELOG.md",
    "LICENSE"
  ],
  "scripts": {
    "postinstall": "node -e \"if (process.env.npm_config_global === 'true' || !process.cwd().includes('node_modules')) { console.log('\\n📦 Lex installed! Run \\\"npx lex init\\\" to set up your workspace.\\n'); }\"",
    "setup-local": "./scripts/setup-local.sh",
    "build": "tsc -b tsconfig.build.json",
    "postbuild": "chmod +x dist/shared/cli/lex.js && npm run copy-canon",
    "copy-canon": "node scripts/copy-canon.js",
    "clean": "tsc -b tsconfig.build.json --clean && rimraf dist prompts schemas",
    "validate-schemas": "node scripts/validate-schemas.js",
    "validate-docs": "node scripts/validate-docs.mjs",
    "prompts:lint": "node scripts/lint-prompts.js",
    "type-check": "tsc -p tsconfig.build.json --noEmit",
    "check-sqlite": "npx tsx scripts/check-sqlite-bindings.ts",
    "rebuild-sqlite": "npm rebuild better-sqlite3-multiple-ciphers",
    "lint": "eslint .",
    "lint:fix": "eslint . --fix",
    "lint:baseline:check": "npx eslint . --format=json 2>&1 | grep -v '^>' > current-lint.json && node scripts/lint-budget.mjs current-lint.json lint-baseline.json && rm current-lint.json",
    "lint:baseline:update": "npx eslint . --format=json 2>&1 | grep -v '^>' > lint-baseline.json && echo 'Baseline updated. Please commit lint-baseline.json.'",
    "test": "npx tsx --import ./test/helpers/setup.ts --test --test-force-exit $(find test -name '*.test.ts' -o -name '*.test.mts' -o -name '*.spec.ts' | grep -v 'test/shared/git/' | grep -v 'normalizer.test' | grep -v 'export.test' | grep -v 'expander.test' | grep -v 'api-ingestion.perf.test' | grep -v 'encryption-edge-cases.spec' | tr '\\n' ' ') && npx tsx --import ./test/helpers/setup.ts --test --test-force-exit $(find test -name '*.test.mjs' | tr '\\n' ' ')",
    "test:perf": "npx tsx --import ./test/helpers/setup.ts --test --test-force-exit test/memory/api-ingestion.perf.test.ts",
    "test:recall-quality": "npx tsx --import ./test/helpers/setup.ts --test --test-force-exit test/recall-quality/*.test.ts",
    "test:git": "echo 'WARNING: Git tests require LEX_GIT_MODE=live and non-interactive git signing. Skipped by default.' && LEX_GIT_MODE=live npx tsx --test 'test/shared/git/**/*.test.ts' 'test/shared/paths/normalizer.test.ts' 'test/shared/cli/export.test.ts' 'test/shared/tokens/expander.test.ts'",
    "test:cli:slow": "LEX_ENABLE_SLOW_CLI_TESTS=1 LEX_GIT_MODE=live npx tsx --test 'test/shared/cli/export.test.ts'",
    "test:aliases": "npx tsx --import ./test/helpers/setup.ts --test test/shared/aliases/substring.spec.mjs test/shared/aliases/collision.spec.mjs test/shared/aliases/case-sensitivity.spec.mjs test/shared/aliases/resolution.spec.mjs",
    "test:integration": "npx tsx --import ./test/helpers/setup.ts --test test/memory/integration.test.ts && npx tsx --import ./test/helpers/setup.ts --test test/policy/integration.test.mjs",
    "test:benchmarks": "npx tsx --import ./test/helpers/setup.ts --test test/memory/benchmarks.test.ts",
    "test:all": "npm test && npm run test:integration",
    "test:coverage": "npm run test",
    "test:smoke": "./scripts/consumer-smoke-test.sh",
    "guard:no-js-src": "node ./scripts/check-no-js-in-src.mjs",
    "guard:pack": "node scripts/create-pack-json.js && node scripts/pack-guard.js && rm pack.json *.tgz",
    "check:release-drift": "node scripts/check-release-drift.mjs",
    "coverage": "c8 -r text -r lcov npm test",
    "check:coverage": "c8 --check-coverage --branches 60 --functions 60 --lines 60 --statements 60 npm test",
    "format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"",
    "format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
    "ci:minimal": "npm run lint && npm run type-check",
    "ci": "npm run lint && npm run type-check && npm test && npm run build",
    "ci:full": "npm run lint && npm run type-check && npm test && npm run test:integration && npm run build && npm run guard:pack",
    "local-ci": "npm run ci",
    "local-ci:nonet": "./scripts/ci-nonet.sh",
    "generate:test-frames": "node scripts/generate-test-frames.mjs",
    "changeset": "changeset",
    "version-packages": "changeset version",
    "release": "npm run build && changeset publish",
    "prepack": "npm run build",
    "prepare": "husky"
  },
  "keywords": [
    "mcp",
    "model-context-protocol",
    "memory",
    "policy",
    "developer-tools",
    "work-continuity",
    "atlas",
    "frame-storage",
    "session-tracking",
    "code-analysis",
    "policy-scanner",
    "fold-radius",
    "typescript",
    "continuity",
    "receipts"
  ],
  "author": "Guffawaffle",
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/Guffawaffle/lex.git"
  },
  "publishConfig": {
    "tag": "latest",
    "access": "public"
  },
  "bugs": {
    "url": "https://github.com/Guffawaffle/lex/issues"
  },
  "homepage": "https://github.com/Guffawaffle/lex#readme",
  "engines": {
    "node": ">=20 <25"
  },
  "peerDependencies": {
    "pino-pretty": "*"
  },
  "peerDependenciesMeta": {
    "pino-pretty": {
      "optional": true
    }
  },
  "overrides": {
    "tar-stream": "^3.1.7",
    "tar-fs": "^3.1.1"
  },
  "dependencies": {
    "@smartergpt/lex": "^2.0.3",
    "@types/express": "^5.0.5",
    "@types/jsonwebtoken": "^9.0.10",
    "axios": "^1.13.2",
    "better-sqlite3-multiple-ciphers": "^12.6.2",
    "commander": "^14.0.2",
    "express": "^5.1.0",
    "express-rate-limit": "^8.2.1",
    "glob": "^13.0.0",
    "helmet": "^8.1.0",
    "inquirer": "^13.1.0",
    "jsonwebtoken": "^9.0.2",
    "minimatch": "^10.1.1",
    "pino": "^10.1.0",
    "sharp": "^0.34.5",
    "shiki": "^3.20.0",
    "typescript": "^5.9.3",
    "uuid": "^13.0.0",
    "yaml": "^2.8.1",
    "zod": "^4.1.12"
  },
  "optionalDependencies": {
    "pino-pretty": "^13.1.2"
  },
  "devDependencies": {
    "@changesets/cli": "^2.29.7",
    "@commitlint/cli": "^20.1.0",
    "@commitlint/config-conventional": "^20.0.0",
    "@types/better-sqlite3": "^7.6.11",
    "@types/inquirer": "^9.0.9",
    "@types/node": "^25.0.2",
    "@types/supertest": "^6.0.3",
    "@types/uuid": "^11.0.0",
    "@typescript-eslint/eslint-plugin": "^8.46.3",
    "@typescript-eslint/parser": "^8.51.0",
    "ajv": "^8.17.1",
    "ajv-formats": "^3.0.1",
    "c8": "^10.1.3",
    "eslint": "^9.39.2",
    "eslint-config-prettier": "^10.1.8",
    "husky": "^9.1.7",
    "lint-staged": "^16.2.7",
    "prettier": "^3.7.1",
    "rimraf": "^6.0.0",
    "supertest": "^7.1.4",
    "ts-morph": "^27.0.2",
    "tsx": "^4.20.6"
  },
  "lint-staged": {
    "*.{ts,tsx,js,mjs}": [
      "prettier --check"
    ],
    "*.{json,md,yaml,yml}": [
      "prettier --check"
    ]
  }
}
