@haaaiawd/second-nature 0.1.29 → 0.1.30

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/index.js CHANGED
@@ -58,23 +58,11 @@ import { fileURLToPath } from "node:url";
58
58
  import { startRuntimeService, } from "./runtime/core/second-nature/runtime/service-entry.js";
59
59
  import { getLifecycleState, recordRegistration, } from "./runtime/core/second-nature/runtime/lifecycle-service.js";
60
60
  import { openWorkspaceOpsBridge } from "./workspace-ops-bridge.js";
61
- // definePluginEntry is OpenClaw's canonical factory for non-channel plugins
62
- // (provider/tool/command/service/memory/context-engine). At runtime it returns
63
- // a plain options object; it does NOT add a brand symbol earlier debugging
64
- // rounds wrongly assumed the factory was the "plain-capability" marker. The
65
- // real classification happens via manifest fields (see file header). We still
66
- // use the factory because it is the documented, supported entry shape, and
67
- // keeping it future-proof against SDK option-processing changes.
68
- //
69
- // IMPORTANT — keep this a STATIC import. The packaged runtime is loaded inside
70
- // OpenClaw's vm sandbox, which rejects top-level await (manifests as
71
- // "SyntaxError: Unexpected identifier 'Promise'" at host load time). The same
72
- // constraint applies to the sql.js async bootstrap noted in the file header.
73
- // In production the host always provides `openclaw` as a sibling module under
74
- // ~/.openclaw/npm/node_modules/, so this resolves synchronously. Locally,
75
- // `openclaw` is declared as a devDependency so build and tests resolve via
76
- // the same import path.
77
- import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
61
+ // Keep the entry as a plain object instead of importing OpenClaw's
62
+ // SDK entry helper. Upload/package validators may import this module
63
+ // before the host SDK is installed; a static SDK import turns a valid package
64
+ // into ERR_MODULE_NOT_FOUND. OpenClaw classifies this plugin from the manifest
65
+ // fields, and the helper returns this same object shape at runtime.
78
66
  // Stderr sentinels make daemon load-path observable in `gateway.log`. Three
79
67
  // lines should appear at startup: "module evaluated", "register() entered ...",
80
68
  // "register() completed". Their absence after `openclaw gateway run` proves
@@ -1189,7 +1177,7 @@ const SECOND_NATURE_TOOL_SCHEMA = {
1189
1177
  },
1190
1178
  required: ["command"],
1191
1179
  };
1192
- export default definePluginEntry({
1180
+ export default {
1193
1181
  id: "second-nature",
1194
1182
  name: "Second Nature",
1195
1183
  description: "Registers command/tool/service surface with load-reload lifecycle semantics.",
@@ -1264,4 +1252,4 @@ export default definePluginEntry({
1264
1252
  });
1265
1253
  process.stderr.write("[second-nature] register() completed\n");
1266
1254
  },
1267
- });
1255
+ };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "second-nature",
3
3
  "name": "Second Nature",
4
- "version": "0.1.29",
4
+ "version": "0.1.30",
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. Agent inner guide is packaged as agent-inner-guide.md. v7 ops surface: self_health, tool_affordance, heartbeat_digest, narrative:diff, timeline, restore, runtime_secret_bootstrap.",
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.29",
3
+ "version": "0.1.30",
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",