mirror of
https://github.com/Gitlawb/openclaude.git
synced 2026-10-06 05:46:46 -04:00
* feat(knowledge): introduce local Orama persistence (clean phase 1) - Added @orama/orama and persistence plugin. - Implemented optional local-only Orama backend in knowledgeGraph.ts. - Gated Orama logic behind OPENCLAUDE_KNOWLEDGE_ORAMA=1. - Converted knowledge and conversation arc functions to async. - Fixed circular dependency between knowledgeGraph and sessionStorage by moving getProjectsDir to envUtils. - Updated all call sites and tests to handle async Knowledge API. - Verified build and tests pass on latest main. * fix: address PR review comments for knowledge feature (async finalizeArcTurn and Orama cleanup) * test: add comprehensive stress and edge case testing for Orama Knowledge Graph * fix: prevent test pollution by restoring Orama env flag in stress test * refactor: harden Knowledge architecture with concurrency locks, optimized I/O, and consolidated state
144 lines
3.9 KiB
TypeScript
144 lines
3.9 KiB
TypeScript
/**
|
|
* Shared external dependency lists for CLI and SDK bundles.
|
|
*
|
|
* Used by build.ts and validate-externals.ts.
|
|
* When adding a new dependency to package.json, check if it should be
|
|
* added here (large packages, native modules, or packages with many exports).
|
|
*/
|
|
|
|
// Packages that should be kept external in ALL bundles (CLI + SDK)
|
|
export const COMMON_EXTERNALS: string[] = [
|
|
// OpenTelemetry — too many named exports to stub, kept external
|
|
'@opentelemetry/api',
|
|
'@opentelemetry/api-logs',
|
|
'@opentelemetry/core',
|
|
'@opentelemetry/exporter-trace-otlp-grpc',
|
|
'@opentelemetry/exporter-trace-otlp-http',
|
|
'@opentelemetry/exporter-trace-otlp-proto',
|
|
'@opentelemetry/exporter-logs-otlp-http',
|
|
'@opentelemetry/exporter-logs-otlp-proto',
|
|
'@opentelemetry/exporter-logs-otlp-grpc',
|
|
'@opentelemetry/exporter-metrics-otlp-proto',
|
|
'@opentelemetry/exporter-metrics-otlp-grpc',
|
|
'@opentelemetry/exporter-metrics-otlp-http',
|
|
'@opentelemetry/exporter-prometheus',
|
|
'@opentelemetry/resources',
|
|
'@opentelemetry/sdk-trace-base',
|
|
'@opentelemetry/sdk-trace-node',
|
|
'@opentelemetry/sdk-logs',
|
|
'@opentelemetry/sdk-metrics',
|
|
'@opentelemetry/semantic-conventions',
|
|
// Native image processing
|
|
'sharp',
|
|
// Cloud provider SDKs
|
|
'@aws-sdk/client-bedrock',
|
|
'@aws-sdk/client-bedrock-runtime',
|
|
'@aws-sdk/client-sts',
|
|
'@aws-sdk/credential-providers',
|
|
'@azure/identity',
|
|
'google-auth-library',
|
|
// @vscode/ripgrep ships a platform-specific binary alongside its
|
|
// index.js and resolves the path via __dirname at runtime. Bundling
|
|
// would freeze the build host's absolute path into dist/cli.mjs, so we
|
|
// keep it external and rely on the npm package being installed.
|
|
'@vscode/ripgrep',
|
|
// Orama search engine
|
|
'@orama/orama',
|
|
'@orama/plugin-data-persistence',
|
|
]
|
|
|
|
// Additional packages external only in the SDK bundle (TUI + heavy deps)
|
|
export const SDK_ONLY_EXTERNALS: string[] = [
|
|
'react',
|
|
'react-reconciler',
|
|
'ink',
|
|
'@anthropic-ai/sdk',
|
|
'@modelcontextprotocol/sdk',
|
|
]
|
|
|
|
// Computed full lists
|
|
export const CLI_EXTERNALS: string[] = COMMON_EXTERNALS
|
|
export const SDK_EXTERNALS: string[] = [...COMMON_EXTERNALS, ...SDK_ONLY_EXTERNALS]
|
|
|
|
// Packages intentionally bundled (not external, not flagged by validation)
|
|
// These are small utilities that are fine to inline into the output bundle.
|
|
export const INTENTIONALLY_BUNDLED: string[] = [
|
|
// Anthropic provider variants (bundled, not the main SDK)
|
|
'@anthropic-ai/bedrock-sdk',
|
|
'@anthropic-ai/foundry-sdk',
|
|
'@anthropic-ai/sandbox-runtime',
|
|
'@anthropic-ai/vertex-sdk',
|
|
// CLI / TUI utilities
|
|
'@alcalzone/ansi-tokenize',
|
|
'@commander-js/extra-typings',
|
|
'bidi-js',
|
|
'chalk',
|
|
'cli-boxes',
|
|
'cli-highlight',
|
|
'commander',
|
|
'emoji-regex',
|
|
'env-paths',
|
|
'figures',
|
|
'get-east-asian-width',
|
|
'indent-string',
|
|
'strip-ansi',
|
|
'supports-hyperlinks',
|
|
'wrap-ansi',
|
|
// Data formats
|
|
'jsonc-parser',
|
|
'yaml',
|
|
'marked',
|
|
'turndown',
|
|
'xss',
|
|
// Data utilities
|
|
'ajv',
|
|
'auto-bind',
|
|
'diff',
|
|
'fflate',
|
|
'fuse.js',
|
|
'ignore',
|
|
'lodash-es',
|
|
'lru-cache',
|
|
'p-map',
|
|
'picomatch',
|
|
'proper-lockfile',
|
|
'qrcode',
|
|
'semver',
|
|
'shell-quote',
|
|
'signal-exit',
|
|
'stack-utils',
|
|
'code-excerpt',
|
|
'type-fest',
|
|
// Networking
|
|
'axios',
|
|
'cross-spawn',
|
|
'duck-duck-scrape',
|
|
'execa',
|
|
'https-proxy-agent',
|
|
'tree-kill',
|
|
'undici',
|
|
'ws',
|
|
// React ecosystem (react/react-reconciler are SDK_ONLY_EXTERNALS, bundled in CLI)
|
|
'react',
|
|
'react-compiler-runtime',
|
|
'react-reconciler',
|
|
'usehooks-ts',
|
|
// Anthropic SDK (external in SDK bundle, bundled in CLI)
|
|
'@anthropic-ai/sdk',
|
|
// MCP SDK (external in SDK bundle, bundled in CLI)
|
|
'@modelcontextprotocol/sdk',
|
|
// Schema validation
|
|
'zod',
|
|
// Feature flags / analytics
|
|
'@growthbook/growthbook',
|
|
// gRPC (bundled into CLI, not external)
|
|
'@grpc/grpc-js',
|
|
'@grpc/proto-loader',
|
|
// Web scraping
|
|
'@mendable/firecrawl-js',
|
|
// Language server protocol
|
|
'vscode-languageserver-protocol',
|
|
// File watching
|
|
'chokidar',
|
|
]
|