@rigstate/cli 0.7.19 → 0.7.21
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/.rigstate/daemon.pid +1 -1
- package/.rigstate/daemon.state.json +3 -3
- package/.rigstate/guardian.lock +4 -2
- package/.rigstate/rules-cache.json +1 -1
- package/dist/index.cjs +23 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/daemon/core.ts +6 -0
- package/src/daemon/file-watcher.ts +12 -5
package/.rigstate/daemon.pid
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
32037
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"isRunning": true,
|
|
3
|
-
"startedAt": "2026-01-
|
|
3
|
+
"startedAt": "2026-01-26T13:11:14.337Z",
|
|
4
4
|
"filesChecked": 2,
|
|
5
|
-
"violationsFound":
|
|
5
|
+
"violationsFound": 50,
|
|
6
6
|
"tasksProcessed": 0,
|
|
7
|
-
"lastActivity": "2026-01-
|
|
7
|
+
"lastActivity": "2026-01-26T13:38:04.412Z"
|
|
8
8
|
}
|
package/.rigstate/guardian.lock
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1757,7 +1757,7 @@ var require_package = __commonJS({
|
|
|
1757
1757
|
"package.json"(exports2, module2) {
|
|
1758
1758
|
module2.exports = {
|
|
1759
1759
|
name: "@rigstate/cli",
|
|
1760
|
-
version: "0.7.
|
|
1760
|
+
version: "0.7.21",
|
|
1761
1761
|
description: "Rigstate CLI - Code audit, sync and supervision tool",
|
|
1762
1762
|
type: "module",
|
|
1763
1763
|
main: "./dist/index.js",
|
|
@@ -3268,7 +3268,8 @@ function createFileWatcher(watchPath) {
|
|
|
3268
3268
|
const absolutePath = import_path15.default.resolve(process.cwd(), watchPath);
|
|
3269
3269
|
watcher = chokidar.watch(absolutePath, {
|
|
3270
3270
|
ignored: (pathStr) => {
|
|
3271
|
-
const
|
|
3271
|
+
const relativePath = import_path15.default.relative(process.cwd(), pathStr);
|
|
3272
|
+
const segments = relativePath.split(import_path15.default.sep);
|
|
3272
3273
|
const ignoreDirs = [
|
|
3273
3274
|
"node_modules",
|
|
3274
3275
|
".git",
|
|
@@ -3286,7 +3287,16 @@ function createFileWatcher(watchPath) {
|
|
|
3286
3287
|
"artifacts",
|
|
3287
3288
|
"out",
|
|
3288
3289
|
".vercel",
|
|
3289
|
-
".npm"
|
|
3290
|
+
".npm",
|
|
3291
|
+
".agent",
|
|
3292
|
+
".cursor",
|
|
3293
|
+
".npm-cache",
|
|
3294
|
+
"backups",
|
|
3295
|
+
"docs",
|
|
3296
|
+
"tests",
|
|
3297
|
+
"tools",
|
|
3298
|
+
"scripts",
|
|
3299
|
+
"supabase"
|
|
3290
3300
|
];
|
|
3291
3301
|
if (segments.some((segment) => ignoreDirs.includes(segment))) {
|
|
3292
3302
|
return true;
|
|
@@ -3300,13 +3310,16 @@ function createFileWatcher(watchPath) {
|
|
|
3300
3310
|
persistent: true,
|
|
3301
3311
|
ignoreInitial: true,
|
|
3302
3312
|
ignorePermissionErrors: true,
|
|
3303
|
-
depth:
|
|
3304
|
-
//
|
|
3313
|
+
depth: 5,
|
|
3314
|
+
// Strongly reduced for major monorepos
|
|
3305
3315
|
awaitWriteFinish: {
|
|
3306
|
-
stabilityThreshold:
|
|
3307
|
-
|
|
3316
|
+
stabilityThreshold: 500,
|
|
3317
|
+
// Increased for stability
|
|
3318
|
+
pollInterval: 200
|
|
3308
3319
|
},
|
|
3309
3320
|
usePolling: false,
|
|
3321
|
+
followSymlinks: false,
|
|
3322
|
+
// Prevent symlink loops and extra handles
|
|
3310
3323
|
atomic: true
|
|
3311
3324
|
});
|
|
3312
3325
|
watcher.on("change", (filePath) => {
|
|
@@ -3796,6 +3809,7 @@ async function trackSkillUsage(apiUrl, apiKey, projectId, skillId) {
|
|
|
3796
3809
|
|
|
3797
3810
|
// src/daemon/core.ts
|
|
3798
3811
|
init_skills_provisioner();
|
|
3812
|
+
init_sync_rules();
|
|
3799
3813
|
var GuardianDaemon = class extends import_events3.EventEmitter {
|
|
3800
3814
|
config;
|
|
3801
3815
|
state;
|
|
@@ -3829,6 +3843,8 @@ var GuardianDaemon = class extends import_events3.EventEmitter {
|
|
|
3829
3843
|
this.guardianMonitor = createGuardianMonitor(this.config.projectId, this.config.apiUrl, this.config.apiKey);
|
|
3830
3844
|
await this.guardianMonitor.loadRules();
|
|
3831
3845
|
console.log(import_chalk18.default.green(` \u2713 Loaded ${this.guardianMonitor.getRuleCount()} rules`));
|
|
3846
|
+
console.log(import_chalk18.default.dim("\u{1F9E0} Syncing Brain to IDE (.cursor/rules)..."));
|
|
3847
|
+
await syncProjectRules(this.config.projectId, this.config.apiKey, this.config.apiUrl);
|
|
3832
3848
|
await this.syncHeuristics();
|
|
3833
3849
|
if (this.config.checkOnChange) {
|
|
3834
3850
|
this.setupFileWatcher();
|