@coolclaw/coolclaw 0.2.1 → 0.2.3

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.
@@ -205,7 +205,7 @@ function finalizeAccount(account, source) {
205
205
  const agentId = typeof account.agentId === "string" ? account.agentId.trim() : "";
206
206
  const tokenSecretRef = typeof account.tokenSecretRef === "string" ? account.tokenSecretRef.trim() : account.tokenSecret?.trim();
207
207
  const allowFrom = normalizeStringArray(account.allowFrom);
208
- const dmPolicy = coerceDmPolicy(account.dmPolicy) ?? "allowlist";
208
+ const dmPolicy = coerceDmPolicy(account.dmPolicy) ?? "open";
209
209
  const reasons = [];
210
210
  if (!gatewayUrl) reasons.push("Missing gateway URL");
211
211
  if (!agentId) reasons.push("Missing Agent ID");
@@ -9,11 +9,13 @@ import {
9
9
  saveAgentToken,
10
10
  saveBinding,
11
11
  touchBinding
12
- } from "./chunk-4WOJKMUY.js";
12
+ } from "./chunk-DRLI24I7.js";
13
13
 
14
14
  // src/setup.ts
15
+ import { access } from "fs/promises";
15
16
  import { readFile as readFile3 } from "fs/promises";
16
17
  import path3 from "path";
18
+ import { homedir } from "os";
17
19
 
18
20
  // src/identity.ts
19
21
  import { mkdir, readFile, writeFile } from "fs/promises";
@@ -76,7 +78,7 @@ async function patchCoolclawAccountConfig(patch) {
76
78
  gatewayUrl: normalizeGatewayUrl(patch.gatewayUrl),
77
79
  agentId: patch.agentId,
78
80
  tokenSecretRef: patch.tokenSecretRef,
79
- dmPolicy: patch.dmPolicy ?? "allowlist"
81
+ dmPolicy: patch.dmPolicy ?? "open"
80
82
  };
81
83
  if (patch.allowFrom && patch.allowFrom.length > 0) {
82
84
  account.allowFrom = patch.allowFrom;
@@ -243,7 +245,15 @@ async function readWorkspaceDirFromOpenclawConfig(configPath) {
243
245
  const content = await readFile3(configPath, "utf-8");
244
246
  const config = JSON.parse(content);
245
247
  const workspace = config.agents?.defaults?.workspace;
246
- return typeof workspace === "string" && workspace.trim() ? workspace.trim() : void 0;
248
+ if (typeof workspace === "string" && workspace.trim()) {
249
+ return workspace.trim();
250
+ }
251
+ } catch {
252
+ }
253
+ const defaultWorkspace = path3.join(homedir(), ".openclaw", "workspace");
254
+ try {
255
+ await access(defaultWorkspace);
256
+ return defaultWorkspace;
247
257
  } catch {
248
258
  return void 0;
249
259
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  index_default
3
- } from "./chunk-FN7K37FU.js";
4
- import "./chunk-4WOJKMUY.js";
3
+ } from "./chunk-RGHFDBEP.js";
4
+ import "./chunk-DRLI24I7.js";
5
5
 
6
6
  // cli-metadata.ts
7
7
  var cli_metadata_default = index_default;
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  index_default,
3
3
  register
4
- } from "./chunk-FN7K37FU.js";
5
- import "./chunk-4WOJKMUY.js";
4
+ } from "./chunk-RGHFDBEP.js";
5
+ import "./chunk-DRLI24I7.js";
6
6
  export {
7
7
  index_default as default,
8
8
  register
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  coolclawChannelPlugin
3
- } from "./chunk-4WOJKMUY.js";
3
+ } from "./chunk-DRLI24I7.js";
4
4
 
5
5
  // setup-entry.ts
6
6
  var setup_entry_default = coolclawChannelPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolclaw/coolclaw",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "OpenClaw native channel plugin for Riddle/CoolClaw chat.",
5
5
  "type": "module",
6
6
  "files": [
@@ -58,7 +58,7 @@
58
58
  "runtimeSetupEntry": "./dist/setup-entry.js",
59
59
  "install": {
60
60
  "npmSpec": "@coolclaw/coolclaw",
61
- "expectedIntegrity": "sha512-u84VC6FSLmE/+I3FKwQujzgnCx7fjyDwxT4IOe4CZCpnsdLk3e0RvDVf2nz+M6/amy96MLMc2nqPy24S0NpqyQ==",
61
+ "expectedIntegrity": "sha512-4g8K+++mepfKqA7QXlQqa1U9Og8oCS9Xd13so4B7c4PcmU5WhfpCsx4XgBhIq+gvDcsOnwB5mPFJ6yxKcUzkpg==",
62
62
  "defaultChoice": "npm",
63
63
  "minHostVersion": ">=2026.3.13"
64
64
  },