{
  "name": "@hasna/knowledge",
  "version": "0.5.1",
  "description": "Agent-friendly local knowledge CLI with JSON output, pagination, and safe destructive actions",
  "type": "module",
  "exports": {
    ".": {
      "import": "./dist/index.js",
      "types": "./dist/index.d.ts"
    },
    "./sdk": {
      "import": "./dist/sdk.js",
      "types": "./dist/sdk.d.ts"
    },
    "./storage": {
      "import": "./dist/storage.js",
      "types": "./dist/storage.d.ts"
    },
    "./serve": {
      "import": "./dist/serve.js",
      "types": "./dist/serve.d.ts"
    }
  },
  "main": "./dist/index.js",
  "types": "./dist/index.d.ts",
  "bin": {
    "knowledge": "bin/knowledge.js",
    "knowledge-mcp": "bin/knowledge-mcp.js",
    "knowledge-serve": "bin/knowledge-serve.js"
  },
  "files": [
    "bin",
    "dist",
    "scripts/apply-postgres-migrations.mjs",
    "scripts/live-private-query.mjs",
    "scripts/lib/remote-temp-dir.mjs",
    "scripts/smoke-machine-sync-release.mjs",
    "scripts/smoke-machines-adapter.mjs",
    "scripts/smoke-files-installed-boundary.mjs",
    "scripts/strip-generated-trailing-whitespace.mjs",
    "scripts/verify-generated-artifacts.mjs",
    "docs/architecture/ai-native-knowledge-base.md",
    "docs/architecture/hosted-wrapper-responsibilities.md",
    "docs/architecture/hybrid-semantic-search.md",
    "docs/architecture/machine-sync-schema.md",
    "docs/examples/app-project-wiki-standard.md",
    "docs/examples/company-wiki-workflow.md",
    "docs/migration/global-rules-provenance-import.md",
    "docs/migration/json-to-sqlite.md",
    "LICENSE",
    "README.md"
  ],
  "scripts": {
    "test": "bun test --timeout 20000",
    "test:cli": "bun test tests/cli.test.ts",
    "test:package": "bun test tests/package-release.test.ts",
    "release:pack:check": "node scripts/validate-public-package.mjs",
    "smoke:machines-adapter": "bun scripts/smoke-machines-adapter.mjs",
    "smoke:machine-sync-release": "bun scripts/smoke-machine-sync-release.mjs",
    "smoke:files-installed-boundary": "bun scripts/smoke-files-installed-boundary.mjs",
    "migrate:postgres": "bun scripts/apply-postgres-migrations.mjs",
    "live:private-query": "bun scripts/live-private-query.mjs",
    "serve": "bun src/serve-entry.ts",
    "verify:generated": "bun scripts/verify-generated-artifacts.mjs",
    "contracts:conformance": "contracts conformance fixtures",
    "typecheck:conformance": "tsc -p tsconfig.conformance.json",
    "build": "bun scripts/check-bun-version.mjs && rm -rf dist && bun build --external @hasna/contracts --target=bun --outfile=bin/knowledge.js --minify --external pg --external @hasna/machines --external @hasna/machines/consumer --external @aws-sdk/client-s3 --external @aws-sdk/credential-providers --external ai --external @ai-sdk/openai --external @ai-sdk/anthropic --external @ai-sdk/deepseek src/cli.ts && bun build --external @hasna/contracts --target=bun --outfile=bin/knowledge-mcp.js --external pg --external @hasna/machines --external @hasna/machines/consumer --external @modelcontextprotocol/sdk --external @aws-sdk/client-s3 --external @aws-sdk/credential-providers --external ai --external @ai-sdk/openai --external @ai-sdk/anthropic --external @ai-sdk/deepseek src/mcp.js && bun build --external @hasna/contracts --target=bun --outfile=bin/knowledge-serve.js --external pg --external @hasna/machines --external @hasna/machines/consumer --external @aws-sdk/client-s3 --external @aws-sdk/credential-providers --external ai --external @ai-sdk/openai --external @ai-sdk/anthropic --external @ai-sdk/deepseek src/serve-entry.ts && bun build ./src/index.ts ./src/storage.ts ./src/serve.ts ./src/sdk.ts --outdir ./dist --external @hasna/contracts --target bun --external pg --external @hasna/machines --external @hasna/machines/consumer --external @aws-sdk/client-s3 --external @aws-sdk/credential-providers --external ai --external @ai-sdk/openai --external @ai-sdk/anthropic --external @ai-sdk/deepseek && bun scripts/strip-generated-trailing-whitespace.mjs && bun run tsc -p tsconfig.build.json && bun run typecheck:conformance",
    "prepublishOnly": "bun run contracts:conformance && contracts no-cloud-scan . && bun run build && node scripts/validate-public-package.mjs",
    "prepack": "bun run build && bun run scan:artifact",
    "scan:artifact": "bun pm pack --ignore-scripts --quiet --filename \"$PWD/knowledge-artifact-scan.tgz\" && contracts artifact-scan knowledge-artifact-scan.tgz; rc=$?; rm -f \"$PWD/knowledge-artifact-scan.tgz\"; exit $rc"
  },
  "keywords": [
    "knowledge",
    "cli",
    "agents",
    "json",
    "notes",
    "local",
    "store"
  ],
  "license": "Apache-2.0",
  "publishConfig": {
    "registry": "https://registry.npmjs.org",
    "access": "public"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/hasna/apps.git",
    "directory": "apps/knowledge"
  },
  "bugs": {
    "url": "https://github.com/hasna/apps/issues"
  },
  "author": "Hasna Inc. <hasna@example.com>",
  "engines": {
    "bun": ">=1.0",
    "node": ">=18"
  },
  "dependencies": {
    "@ai-sdk/anthropic": "^3.0.81",
    "@ai-sdk/deepseek": "^2.0.35",
    "@ai-sdk/openai": "^3.0.68",
    "@aws-sdk/client-s3": "^3.1063.0",
    "@aws-sdk/credential-providers": "^3.1063.0",
    "@hasna/contracts": "1.2.1",
    "@hasna/events": "0.1.14",
    "@hasna/secrets": "0.4.2",
    "@modelcontextprotocol/sdk": "^1.29.0",
    "@types/json-schema": "^7.0.15",
    "ai": "^6.0.197",
    "commander": "^13.1.0",
    "pg": "^8.16.3",
    "zod": "^4.3.6"
  },
  "devDependencies": {
    "@electric-sql/pglite": "0.5.4",
    "@types/bun": "1.3.14",
    "@types/pg": "^8.15.6",
    "typescript": "5.9.3"
  },
  "homepage": "https://github.com/hasna/apps/tree/main/apps/knowledge#readme"
}
