@haaaiawd/second-nature 0.1.21 → 0.1.22

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "second-nature",
3
3
  "name": "Second Nature",
4
- "version": "0.1.21",
4
+ "version": "0.1.22",
5
5
  "description": "OpenClaw native plugin with synchronous surface registration and bundled runtime spine. Set SECOND_NATURE_WORKSPACE_ROOT or tool workspaceRoot to the same path as the agent workspace (see README / T1.1.4 ops norm).",
6
6
  "activation": {
7
7
  "onStartup": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haaaiawd/second-nature",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "OpenClaw native plugin with synchronous registration, a packaged runtime artifact, and operator-facing status/explain flows.",
5
5
  "keywords": [
6
6
  "openclaw",
@@ -7,7 +7,7 @@ import { createOpsRouter } from "./ops/ops-router.js";
7
7
  import { createCliReadModels, } from "./read-models/index.js";
8
8
  import { resolvePackagedRuntime } from "./runtime/runtime-artifact-boundary.js";
9
9
  import { createRuntimeDecisionRecorder, } from "../observability/services/runtime-decision-recorder.js";
10
- import { createConnectorExecutorAdapter } from "../connectors/services/connector-executor-adapter.js";
10
+ import { createConnectorExecutorAdapter, } from "../connectors/services/connector-executor-adapter.js";
11
11
  export function createCliRuntimeDeps(overrides = {}) {
12
12
  const stateDb = overrides.stateDb ?? createStateDatabase();
13
13
  const observabilityDb = overrides.observabilityDb ?? createObservabilityDatabase();
@@ -21,6 +21,11 @@ export function createCliRuntimeDeps(overrides = {}) {
21
21
  });
22
22
  const actionBridge = overrides.actionBridge ?? createActionBridge(stateApi);
23
23
  const runtimeRecorder = overrides.runtimeRecorder ?? createRuntimeDecisionRecorder(observabilityDb);
24
+ const connectorExecutor = overrides.connectorExecutor ??
25
+ createConnectorExecutorAdapter({
26
+ stateDb,
27
+ observabilityDb,
28
+ });
24
29
  return {
25
30
  stateDb,
26
31
  observabilityDb,
@@ -28,15 +33,12 @@ export function createCliRuntimeDeps(overrides = {}) {
28
33
  readModels,
29
34
  actionBridge,
30
35
  runtimeRecorder,
36
+ connectorExecutor,
31
37
  };
32
38
  }
33
39
  export function createCommandRouter(options = {}) {
34
40
  const runtime = createCliRuntimeDeps(options.deps);
35
41
  const pluginRoot = path.join(process.cwd(), "plugin");
36
- const connectorExecutor = createConnectorExecutorAdapter({
37
- stateDb: runtime.stateDb,
38
- observabilityDb: runtime.observabilityDb,
39
- });
40
42
  const opsRouter = createOpsRouter({
41
43
  runtimeAvailable: resolvePackagedRuntime(pluginRoot).ok,
42
44
  readModels: runtime.readModels,
@@ -44,7 +46,7 @@ export function createCommandRouter(options = {}) {
44
46
  state: runtime.stateDb,
45
47
  workspaceRoot: process.cwd(),
46
48
  observabilityDb: runtime.observabilityDb,
47
- connectorExecutor,
49
+ connectorExecutor: runtime.connectorExecutor,
48
50
  });
49
51
  const commands = createCliCommands({
50
52
  readModels: runtime.readModels,
@@ -27,7 +27,7 @@ export function startRuntimeService(ctx) {
27
27
  // - control-plane-system (heartbeat bridge preparation)
28
28
  const workspaceRoot = ctx?.workspaceRoot ?? process.cwd();
29
29
  /** Keep in sync with `plugin/package.json` when cutting releases. */
30
- const version = "0.1.20";
30
+ const version = "0.1.21";
31
31
  activeHandle = {
32
32
  ready: true,
33
33
  version,
@@ -46,6 +46,7 @@ export async function openWorkspaceOpsBridge(workspaceRoot) {
46
46
  observabilityDb,
47
47
  state: stateDb,
48
48
  workspaceRoot: resolvedRoot,
49
+ connectorExecutor: deps.connectorExecutor,
49
50
  });
50
51
  const commands = commandsMod.createCliCommands({
51
52
  readModels: deps.readModels,