@signetai/connector-openclaw 0.226.14 → 0.226.16

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/dist/index.d.ts CHANGED
@@ -1,25 +1,3 @@
1
- /**
2
- * @signetai/connector-openclaw
3
- *
4
- * Signet connector for OpenClaw (and its earlier names: clawdbot, moltbot).
5
- *
6
- * Unlike Claude Code and OpenCode, OpenClaw reads ~/.agents/AGENTS.md
7
- * directly — so no generated output file is needed. Instead, this
8
- * connector can patch OpenClaw config to:
9
- * 1. Point `agents.defaults.workspace` at ~/.agents
10
- * 2. Enable the `signet-memory` internal hook entry
11
- *
12
- * It also installs hook handler files that OpenClaw loads for
13
- * /remember, /recall, and /context commands.
14
- *
15
- * @example
16
- * ```typescript
17
- * import { OpenClawConnector } from '@signetai/connector-openclaw';
18
- *
19
- * const connector = new OpenClawConnector();
20
- * await connector.install('~/.agents');
21
- * ```
22
- */
23
1
  import { BaseConnector, type InstallResult, type UninstallResult } from "@signetai/connector-base";
24
2
  export interface OpenClawInstallOptions {
25
3
  configureWorkspace?: boolean;
@@ -27,124 +5,42 @@ export interface OpenClawInstallOptions {
27
5
  runtimePath?: "plugin" | "legacy";
28
6
  }
29
7
  export type OpenClawRuntimeState = "plugin" | "legacy" | "dual" | null;
30
- /**
31
- * Connector for OpenClaw (and its historical names: clawdbot, moltbot).
32
- *
33
- * Idempotent — safe to run multiple times.
34
- */
35
8
  export declare class OpenClawConnector extends BaseConnector {
36
9
  readonly name = "OpenClaw";
37
10
  readonly harnessId = "openclaw";
38
11
  getIconAsset(): string;
39
- /**
40
- * Install the connector.
41
- *
42
- * - Patches OpenClaw hook entries by default
43
- * - Patches OpenClaw workspace only when explicitly requested
44
- * - Installs hook handler files under `<basePath>/hooks/agent-memory/`
45
- *
46
- * **`runtimePath` default changed in 0.53:** The default is now `"plugin"`
47
- * (automatic per-prompt memory injection via the OpenClaw plugin system)
48
- * instead of the old `"legacy"` (manual `/remember`/`/recall` commands
49
- * only). SDK callers that relied on the legacy path must now pass
50
- * `{ runtimePath: "legacy" }` explicitly.
51
- */
52
12
  install(basePath: string, options?: OpenClawInstallOptions): Promise<InstallResult>;
53
13
  private installRecovery;
54
14
  repair(basePath: string): Promise<InstallResult>;
55
15
  reinitialize(basePath: string): Promise<InstallResult>;
56
- /**
57
- * Patch OpenClaw configs to set workspace only.
58
- */
59
16
  configureWorkspace(basePath: string): Promise<string[]>;
60
- /**
61
- * Sync a multi-agent roster into the `agents.list` section of all
62
- * discovered OpenClaw configs. Only agents that include `"openclaw"` in
63
- * their `harnesses` array (or have no harnesses specified) are written.
64
- */
65
17
  syncMultipleAgents(roster: ReadonlyArray<{
66
18
  name: string;
67
19
  harnesses?: ReadonlyArray<string>;
68
20
  skills?: ReadonlyArray<string>;
69
21
  }>, basePath: string): Promise<void>;
70
- /**
71
- * Return all existing OpenClaw config paths discovered on this machine.
72
- */
73
22
  getDiscoveredConfigPaths(): string[];
74
- /**
75
- * Return normalized workspace paths declared in discovered OpenClaw configs.
76
- *
77
- * Paths are expanded (`~` -> home) and de-duplicated.
78
- */
79
23
  getDiscoveredWorkspacePaths(): string[];
80
- /**
81
- * Uninstall the connector.
82
- *
83
- * Disables both legacy hooks and plugin entries, removes hook handler files.
84
- */
85
24
  uninstall(): Promise<UninstallResult>;
86
25
  private removePluginFromAllow;
87
- /**
88
- * Check whether any OpenClaw config has signet enabled
89
- * (via legacy hooks or plugin entry).
90
- */
91
26
  isInstalled(): boolean;
92
27
  getRuntimeState(): OpenClawRuntimeState;
93
28
  getConfiguredRuntimePath(): "plugin" | "legacy" | null;
94
- /**
95
- * Get the primary config path (first existing config, or default).
96
- */
97
29
  getConfigPath(): string;
98
- /**
99
- * Reject workspace paths that point into temp directories.
100
- * Prevents accidental persistence of test/ephemeral paths
101
- * in production OpenClaw configs.
102
- */
103
30
  private validateWorkspacePath;
104
- /**
105
- * Check that a resolved workspace path exists and belongs to
106
- * the current user's home directory. Returns warnings (non-fatal)
107
- * so callers can surface them without blocking the install.
108
- */
109
31
  private checkWorkspaceOwnership;
110
32
  private getConfigCandidates;
111
- /**
112
- * Patch configs with plugin entry using the object format:
113
- * plugins.entries["signet-memory-openclaw"] = { enabled, hooks, config }
114
- *
115
- * Migrates:
116
- * - Legacy array-style plugins (["signet-memory"] -> { entries: {...} })
117
- * - Top-level `signet: { daemonUrl }` key
118
- * - Old plugin name "signet-memory" -> "signet-memory-openclaw"
119
- */
120
33
  private patchAllConfigsWithPlugin;
121
34
  private patchAllConfigs;
122
35
  private patchConfig;
123
- /**
124
- * Narrow config-only update: add `searchPath` to `plugins.load.paths` and
125
- * ensure `plugins.allow` trusts `signet-memory-openclaw` in all discovered
126
- * configs without re-running the full install flow.
127
- *
128
- * `searchPath` should be the **parent** directory of the plugin package
129
- * (e.g. `…/@signetai/`) so OpenClaw can find `signet-memory-openclaw`
130
- * as a subdirectory.
131
- */
132
36
  patchLoadPaths(searchPath: string): {
133
37
  patched: string[];
134
38
  warnings: string[];
135
39
  };
136
- /**
137
- * Create the hook handler files that OpenClaw loads for
138
- * /remember, /recall, and /context commands.
139
- *
140
- * This is the canonical implementation; cli.ts delegates here.
141
- */
142
40
  installHookFiles(basePath: string): string[];
143
- /** Detect the indentation style used in a JSON string. */
144
41
  private detectIndent;
145
42
  private getHomeDir;
146
43
  }
147
- /** Create an OpenClaw connector instance. */
148
44
  export declare function createConnector(): OpenClawConnector;
149
45
  export default OpenClawConnector;
150
46
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,OAAO,EACN,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,EAGpB,MAAM,wBAAwB,CAAC;AAkDhC,MAAM,WAAW,sBAAsB;IACtC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,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Ae,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-openclaw",
3
- "version": "0.226.14",
3
+ "version": "0.226.16",
4
4
  "description": "Signet connector for OpenClaw - configures workspace and memory hooks",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -25,8 +25,8 @@
25
25
  "test": "bun test"
26
26
  },
27
27
  "dependencies": {
28
- "@signetai/connector-base": "0.226.14",
29
- "@signetai/core": "0.226.14"
28
+ "@signetai/connector-base": "0.226.16",
29
+ "@signetai/core": "0.226.16"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.0.0",