aibridge-context 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/watcher.js CHANGED
@@ -7,6 +7,8 @@ const { syncContextToGit } = require('./gitSync');
7
7
  const {
8
8
  createDebouncedStateUpdater,
9
9
  loadRuntimeConfig,
10
+ scoreEvent,
11
+ shouldIgnoreProjectFile,
10
12
  updateProjectState
11
13
  } = require('./stateManager');
12
14
 
@@ -18,8 +20,7 @@ async function startWatcher(projectRoot, options) {
18
20
  const settings = Object.assign({ logger: null }, options);
19
21
  const logger = settings.logger;
20
22
  const config = await loadRuntimeConfig(projectRoot);
21
- const syncCallback = async () =>
22
- syncContextToGit(projectRoot, config.gitSync, logger);
23
+ const syncCallback = async () => syncContextToGit(projectRoot, config.gitSync, logger);
23
24
  const debouncedUpdater = createDebouncedStateUpdater(projectRoot, {
24
25
  debounceMs: config.debounceMs,
25
26
  logger,
@@ -27,11 +28,10 @@ async function startWatcher(projectRoot, options) {
27
28
  });
28
29
 
29
30
  const watcher = chokidar.watch(projectRoot, {
30
- ignored: [
31
- /(^|[\\/])\.git([\\/]|$)/,
32
- /(^|[\\/])node_modules([\\/]|$)/,
33
- /(^|[\\/])\.ai-context([\\/]|$)/
34
- ],
31
+ ignored(filePath) {
32
+ const normalizedPath = normalizeFilePath(projectRoot, filePath);
33
+ return shouldIgnoreProjectFile(normalizedPath);
34
+ },
35
35
  ignoreInitial: true,
36
36
  persistent: true
37
37
  });
@@ -39,12 +39,12 @@ async function startWatcher(projectRoot, options) {
39
39
  function handleEvent(action, filePath) {
40
40
  const normalizedPath = normalizeFilePath(projectRoot, filePath);
41
41
 
42
- if (!normalizedPath || normalizedPath.startsWith('.ai-context/')) {
42
+ if (!normalizedPath || shouldIgnoreProjectFile(normalizedPath) || scoreEvent(normalizedPath) < 2) {
43
43
  return;
44
44
  }
45
45
 
46
46
  if (logger) {
47
- logger.info(`${action} ${normalizedPath}`);
47
+ logger.debug(`Queued meaningful ${action} for ${normalizedPath}`);
48
48
  }
49
49
 
50
50
  debouncedUpdater.enqueue({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aibridge-context",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "Zero-config CLI and library for generating AI-readable project context, serving it locally, and syncing it with git.",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -2,11 +2,16 @@
2
2
  "project": "",
3
3
  "version": "",
4
4
  "last_updated": "1970-01-01T00:00:00.000Z",
5
- "stats": {
6
- "files_changed": 0,
7
- "last_file": ""
5
+ "ai_summary": "",
6
+ "tech_stack": {
7
+ "language": "",
8
+ "framework": "",
9
+ "runtime": "",
10
+ "package_manager": ""
8
11
  },
12
+ "current_stage": "",
9
13
  "recent_updates": [],
10
- "features": [],
14
+ "key_features": [],
15
+ "known_issues": [],
11
16
  "next_steps": []
12
17
  }