@karmaniverous/jeeves-watcher-openclaw 0.13.1 → 0.14.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/README.md CHANGED
@@ -65,7 +65,7 @@ This plugin integrates with [`@karmaniverous/jeeves`](https://www.npmjs.com/pack
65
65
  |------|-------------|
66
66
  | `watcher_status` | Service health, uptime, and collection stats |
67
67
  | `watcher_search` | Semantic search across indexed documents |
68
- | `watcher_enrich` | Enrich document metadata via rules engine |
68
+ | `watcher_enrich` | Set or update document metadata by file path |
69
69
  | `watcher_config` | Query the effective runtime config via JSONPath |
70
70
  | `watcher_walk` | Walk watched filesystem paths with glob intersection |
71
71
  | `watcher_validate` | Validate a watcher configuration |
@@ -73,6 +73,7 @@ This plugin integrates with [`@karmaniverous/jeeves`](https://www.npmjs.com/pack
73
73
  | `watcher_reindex` | Trigger a scoped reindex with blast area plan |
74
74
  | `watcher_scan` | Filter-only point query with cursor pagination |
75
75
  | `watcher_issues` | List indexing issues and errors |
76
+ | `watcher_service` | Manage watcher background service (install/uninstall/start/stop/restart/status) |
76
77
 
77
78
  ## Documentation
78
79
 
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: jeeves
3
+ description: Jeeves platform architecture, data flow, component interaction, scripts repo, and coordination knowledge. Use when making architectural decisions, coordinating across components, checking platform health, managing service lifecycle, or working with the scripts repo.
4
+ ---
5
+
6
+ # Jeeves Platform Skill
7
+
8
+ ## Platform Architecture
9
+
10
+ Jeeves is a four-component platform coordinated by a shared library (`@karmaniverous/jeeves`):
11
+
12
+ | Component | Role | Port |
13
+ |-----------|------|------|
14
+ | **jeeves-runner** | Execute: scheduled jobs, SQLite state, HTTP API | 1937 |
15
+ | **jeeves-watcher** | Index: file→Qdrant semantic indexing, inference rules | 1936 |
16
+ | **jeeves-server** | Present: web UI, file browser, doc render, export | 1934 |
17
+ | **jeeves-meta** | Distill: LLM synthesis, .meta/ directories, scheduling | 1938 |
18
+
19
+ Core (`@karmaniverous/jeeves`) is a **library + CLI**, not a service. No port.
20
+
21
+ ## Data Flow
22
+
23
+ ```
24
+ Files → Watcher (index) → Qdrant → Meta (synthesize) → .meta/ → Watcher (re-index)
25
+
26
+ Runner (schedule) → Scripts → Services ← Server (present) ← Browser
27
+ ```
28
+
29
+ ## Component Interaction
30
+
31
+ - **Watcher** indexes files into Qdrant with inference rules and enrichments.
32
+ - **Meta** reads from Qdrant, synthesizes `.meta/` directories, which watcher re-indexes.
33
+ - **Runner** executes scheduled scripts that may call any service's HTTP API.
34
+ - **Server** presents files, renders documents, and provides the event gateway.
35
+ - **Core** provides shared content management (TOOLS.md, SOUL.md, AGENTS.md), service discovery, config resolution, and the component SDK.
36
+
37
+ ## Service Discovery
38
+
39
+ Services find each other via config resolution:
40
+ 1. Component's own config file (`{configRoot}/jeeves-{name}/config.json`)
41
+ 2. Core config file (`{configRoot}/jeeves-core/config.json`)
42
+ 3. Default port constants
43
+
44
+ ## Scripts Repo
45
+
46
+ Location: `{configRoot}/jeeves-core/scripts/`
47
+ Template: `@karmaniverous/jeeves-scripts-template`
48
+
49
+ Scripts use utilities from `@karmaniverous/jeeves` (general) and `@karmaniverous/jeeves-runner` (runner-specific). Any script that could be useful outside runner scheduling belongs in core.
50
+
51
+ ## Managed Content System
52
+
53
+ Core maintains managed sections in workspace files using comment markers:
54
+ - **TOOLS.md** — Component sections (section mode) + Platform section
55
+ - **SOUL.md** — Professional discipline and behavioral foundations (block mode)
56
+ - **AGENTS.md** — Operational protocols and memory architecture (block mode)
57
+ - **HEARTBEAT.md** — Platform health status (heading-based)
58
+
59
+ Managed blocks are stationary after initial insertion. Cleanup detection uses Jaccard similarity on 3-word shingles. Cleanup escalation spawns a gateway session when orphaned content is detected.
60
+
61
+ ## Workspace Configuration
62
+
63
+ `jeeves.config.json` at workspace root provides shared defaults:
64
+ - Precedence: CLI flags → env vars → file → defaults
65
+ - Namespaced: `core.*` (workspace, configRoot, gatewayUrl) and `memory.*` (budget, warningThreshold, staleDays)
66
+ - Inspect with `jeeves config [jsonpath]`
67
+
68
+ ## HEARTBEAT Protocol
69
+
70
+ The HEARTBEAT system uses a state machine per component:
71
+ `not_installed → deps_missing → config_missing → service_not_installed → service_stopped → healthy`
72
+
73
+ Dependency-aware: hard deps block alerts, soft deps add informational notes. Declined components are tracked via heading suffix.
74
+
75
+ ## Plugin Lifecycle
76
+
77
+ ```bash
78
+ # Core install (seed workspace content)
79
+ npx @karmaniverous/jeeves install
80
+
81
+ # Component plugin install
82
+ npx @karmaniverous/jeeves-{component}-openclaw install
83
+
84
+ # Component plugin uninstall
85
+ npx @karmaniverous/jeeves-{component}-openclaw uninstall
86
+
87
+ # Core uninstall (remove managed sections)
88
+ npx @karmaniverous/jeeves uninstall
89
+ ```
90
+
91
+ ## Memory Hygiene
92
+
93
+ MEMORY.md has a character budget (default 20,000). Core tracks:
94
+ - Character count and usage percentage
95
+ - Warning at 80% of budget
96
+ - Stale section candidates (H2 sections whose most recent ISO date exceeds the staleness threshold)
97
+ - Evergreen sections (no dates) are never flagged
98
+
99
+ Review is human/agent-mediated — core does not auto-delete.
100
+
101
+ ### HEARTBEAT Integration
102
+
103
+ Memory hygiene is checked on every `ComponentWriter` cycle alongside component health. When budget or staleness thresholds are breached, a `## MEMORY.md` alert appears in HEARTBEAT.md under `# Jeeves Platform Status`. The alert includes character count, budget usage percentage, and any stale section names. When memory is healthy, the heading is absent — no alert content, no LLM cost on heartbeat polls.
104
+
105
+ The `## MEMORY.md` heading follows the same declined/active lifecycle as component headings (`## jeeves-{name}`). Users can decline memory alerts by changing the heading to `## MEMORY.md: declined`.