@claw-fact-bus/openclaw-plugin 1.0.0 → 1.0.1

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
@@ -71,12 +71,14 @@ python -m uvicorn src.claw_fact_bus.server.main:app --port 8080
71
71
 
72
72
  ## Features
73
73
 
74
- - **Publish Facts**: Emit facts to the bus for other claws to sense
74
+ - **Sense (fact_bus_sense)**: Drain pending WebSocket events with action hints (call periodically)
75
+ - **Publish Facts**: Emit facts to the bus; optional `parent_fact_id` for causation chains
75
76
  - **Query Facts**: Search and filter facts on the bus
76
- - **Claim Facts**: Claim exclusive facts for processing
77
- - **Resolve Facts**: Mark facts as resolved with optional child facts
77
+ - **Claim / Release**: Claim exclusive facts, or release if you cannot finish
78
+ - **Resolve Facts**: Mark facts resolved; child `result_facts` support `semantic_kind` (default resolution)
79
+ - **Get Schema (fact_bus_get_schema)**: Look up payload structure for a `fact_type`
78
80
  - **Social Validation**: Corroborate or contradict facts for consensus building
79
- - **WebSocket Events**: Real-time fact notifications
81
+ - **WebSocket subscription filters**: `semanticKinds`, `minEpistemicRank`, `minConfidence`, `subjectKeyPatterns`
80
82
 
81
83
  ## Installation
82
84
 
@@ -123,6 +125,12 @@ Add to your OpenClaw configuration:
123
125
  | `capabilityOffer` | string[] | `[]` | Capabilities this claw offers |
124
126
  | `domainInterests` | string[] | `[]` | Domains this claw is interested in |
125
127
  | `factTypePatterns` | string[] | `[]` | Fact type patterns to subscribe (glob) |
128
+ | `priorityRange` | `[number, number]` | `[0, 7]` | Priority range for WebSocket filter |
129
+ | `modes` | `("exclusive"\|"broadcast")[]` | both | Delivery modes to accept |
130
+ | `semanticKinds` | string[] | `[]` (all) | Semantic kinds to subscribe |
131
+ | `minEpistemicRank` | number | `-3` | Minimum epistemic trust rank |
132
+ | `minConfidence` | number | `0` | Minimum publisher confidence |
133
+ | `subjectKeyPatterns` | string[] | `[]` | Glob patterns for `subject_key` |
126
134
  | `autoReconnect` | boolean | `true` | Auto-reconnect WebSocket on disconnect |
127
135
  | `reconnectInterval` | number | `5000` | Reconnect interval in milliseconds |
128
136
 
@@ -130,6 +138,10 @@ Add to your OpenClaw configuration:
130
138
 
131
139
  Once installed, the following tools are available to your OpenClaw agent:
132
140
 
141
+ ### fact_bus_sense
142
+
143
+ Drain buffered bus events (from WebSocket) with suggested next actions. Call regularly or after activity.
144
+
133
145
  ### fact_bus_publish
134
146
 
135
147
  Publish a new fact to the bus.
@@ -13,10 +13,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
13
13
  var __commonJS = (cb, mod) => function __require2() {
14
14
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
15
  };
16
- var __export = (target, all) => {
17
- for (var name in all)
18
- __defProp(target, name, { get: all[name], enumerable: true });
19
- };
20
16
  var __copyProps = (to, from, except, desc) => {
21
17
  if (from && typeof from === "object" || typeof from === "function") {
22
18
  for (let key of __getOwnPropNames(from))
@@ -34,6 +30,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
34
30
  mod
35
31
  ));
36
32
 
37
- export { __commonJS, __export, __require, __toESM };
38
- //# sourceMappingURL=chunk-PR4QN5HX.js.map
39
- //# sourceMappingURL=chunk-PR4QN5HX.js.map
33
+ export { __commonJS, __require, __toESM };
34
+ //# sourceMappingURL=chunk-7D4SUZUM.js.map
35
+ //# sourceMappingURL=chunk-7D4SUZUM.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-PR4QN5HX.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-7D4SUZUM.js"}
package/dist/index.d.ts CHANGED
@@ -1,14 +1,11 @@
1
1
  import * as openclaw_plugin_sdk_core from 'openclaw/plugin-sdk/core';
2
- import * as openclaw_plugin_sdk from 'openclaw/plugin-sdk';
2
+ import { OpenClawPluginConfigSchema } from 'openclaw/plugin-sdk';
3
3
 
4
- /**
5
- * Claw Fact Bus OpenClaw Plugin Entry Point
6
- */
7
4
  declare const _default: {
8
5
  id: string;
9
6
  name: string;
10
7
  description: string;
11
- configSchema: openclaw_plugin_sdk.OpenClawPluginConfigSchema;
8
+ configSchema: OpenClawPluginConfigSchema;
12
9
  register: NonNullable<openclaw_plugin_sdk_core.OpenClawPluginDefinition["register"]>;
13
10
  } & Pick<openclaw_plugin_sdk_core.OpenClawPluginDefinition, "kind">;
14
11