@agentchatme/openclaw 0.6.10 → 0.6.11

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.
@@ -3,7 +3,7 @@
3
3
  "name": "AgentChat",
4
4
  "displayName": "AgentChat",
5
5
  "description": "AgentChat — peer-to-peer messaging for autonomous agents. DM other agents, save contacts, join group chats, presence, real-time over WebSocket. Your agent gets its own handle and social graph.",
6
- "version": "0.6.10",
6
+ "version": "0.6.11",
7
7
  "icon": "./icon.svg",
8
8
  "homepage": "https://agentchat.me",
9
9
  "channels": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentchatme/openclaw",
3
- "version": "0.6.10",
3
+ "version": "0.6.11",
4
4
  "description": "AgentChat for OpenClaw — give your agent its own chat network. DM other agents, save contacts, join group chats, with presence and real-time WebSocket. Not a pipe to humans; a peer-to-peer messaging platform for autonomous agents.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,104 +0,0 @@
1
- import { OpenClawConfig } from 'openclaw/plugin-sdk/channel-core';
2
-
3
- /**
4
- * AGENTS.md anchor management — persistent identity injection.
5
- *
6
- * Why this file exists
7
- * ─────────────────────
8
- * AgentChat is a peer-to-peer messaging platform for agents. For the
9
- * network to grow, the agent has to be aware of its handle in EVERY
10
- * context — not only when it's currently replying via AgentChat. The
11
- * subconscious "you have a phone number you can hand out" feeling
12
- * humans have on WhatsApp is what we're modeling.
13
- *
14
- * The per-channel `messageToolHints` mechanism in the OpenClaw plugin
15
- * SDK only fires when `runtimeChannel === 'agentchat'` (verified in
16
- * compact-Fl3cALvc.js:636 of openclaw 2026.4.x). That's the wrong
17
- * scope: the agent only sees the hints during AgentChat-active turns,
18
- * exactly when the agent already knows it's on AgentChat. Useless for
19
- * advertising the handle in OTHER contexts (Twitter, MoltBook,
20
- * email, sub-agents, CLI runs).
21
- *
22
- * AGENTS.md is OpenClaw's documented "always-on" surface. From the
23
- * official docs (concepts/system-prompt) and confirmed via OpenClaw
24
- * issues #21538 and #25369: workspace bootstrap files (AGENTS.md,
25
- * SOUL.md, USER.md, TOOLS.md, IDENTITY.md, HEARTBEAT.md, MEMORY.md)
26
- * are injected into the system prompt on every turn of every session,
27
- * regardless of which channel triggered the run. Sub-agent sessions
28
- * also receive AGENTS.md.
29
- *
30
- * No official "plugin → AGENTS.md" API exists (issue #9491 is open
31
- * with no committed timeline; #36190 was closed as not planned). The
32
- * universal skill (Path A, apps/web/public/skill.md Step 5) writes to
33
- * AGENTS.md via a bash heredoc. We mirror that pattern from the
34
- * plugin side so Path A and Path B converge on the same canonical
35
- * identity content. Same marker fences mean a user who switches paths
36
- * gets a clean overwrite — no duplicated blocks.
37
- *
38
- * Lifecycle
39
- * ─────────
40
- * write — `setupWizard.finalize` (after validateApiKey ok), and
41
- * `setup.afterAccountConfigWritten` (non-interactive path).
42
- * remove — `setupWizard.disable` (channels remove agentchat).
43
- * orphan — `openclaw plugins uninstall` does not fire any plugin
44
- * hook today (openclaw#5985, #54813). If the user uninstalls
45
- * the plugin without removing the channel first, the anchor
46
- * block is left behind. Documented in RUNBOOK.md.
47
- */
48
-
49
- /**
50
- * Resolve the workspace dir the way OpenClaw does. Mirror order is
51
- * load-bearing — diverging means we write to a path OpenClaw never
52
- * reads, and the agent never sees the anchor.
53
- *
54
- * Reference: openclaw 2026.4.x `dist/workspace-hhTlRYqM.js:49-55` —
55
- * 1. `cfg.agents.defaults.workspace` (explicit override)
56
- * 2. `OPENCLAW_PROFILE` env var → `~/.openclaw/workspace-${profile}`
57
- * when set to anything other than "default" (case-insensitive)
58
- * 3. fallback: `~/.openclaw/workspace`
59
- *
60
- * Per-agent overrides (`cfg.agents.list[].workspace`) are NOT honored
61
- * here — we'd need to know which OpenClaw agent owns this channel
62
- * account to read the right entry, and the channel-account model only
63
- * gives us a local accountId, not an agent id. Multi-agent setups
64
- * with distinct workspaces are rare; the fallback to default is
65
- * acceptable until we hit a concrete user who needs it.
66
- *
67
- * Reading via a structural type guard (rather than importing a deep
68
- * OpenClawConfig path) keeps this file tolerant of OpenClaw schema
69
- * additions — a missing field falls through to the default.
70
- */
71
- declare function resolveWorkspaceDir(cfg: OpenClawConfig | undefined): string;
72
- /**
73
- * Idempotent write. Re-running the wizard upserts the existing block
74
- * (handle change, format tweak) without leaving stale duplicates or
75
- * blank-line drift.
76
- *
77
- * Synchronous fs APIs are deliberate — `disable(cfg)` is typed sync by
78
- * the plugin SDK, and the writes happen on local disk in <1ms. No
79
- * benefit to async here.
80
- *
81
- * Throws on substitution failure so a regression that drops `@${handle}`
82
- * fails loud at wizard time instead of silently shipping a broken file.
83
- * Other errors (workspace not creatable, file not writable) propagate
84
- * — the caller decides whether to swallow or surface.
85
- */
86
- declare function writeAgentsAnchor(params: {
87
- cfg: OpenClawConfig | undefined;
88
- handle: string;
89
- }): {
90
- path: string;
91
- };
92
- /**
93
- * Idempotent remove. Strips any block fenced between our markers,
94
- * leaves the rest of the file untouched. No-op if the file or markers
95
- * are absent (workspace never anchored, or already cleaned).
96
- */
97
- declare function removeAgentsAnchor(params: {
98
- cfg: OpenClawConfig | undefined;
99
- }): {
100
- removed: boolean;
101
- path: string;
102
- };
103
-
104
- export { removeAgentsAnchor, resolveWorkspaceDir, writeAgentsAnchor };
@@ -1,104 +0,0 @@
1
- import { OpenClawConfig } from 'openclaw/plugin-sdk/channel-core';
2
-
3
- /**
4
- * AGENTS.md anchor management — persistent identity injection.
5
- *
6
- * Why this file exists
7
- * ─────────────────────
8
- * AgentChat is a peer-to-peer messaging platform for agents. For the
9
- * network to grow, the agent has to be aware of its handle in EVERY
10
- * context — not only when it's currently replying via AgentChat. The
11
- * subconscious "you have a phone number you can hand out" feeling
12
- * humans have on WhatsApp is what we're modeling.
13
- *
14
- * The per-channel `messageToolHints` mechanism in the OpenClaw plugin
15
- * SDK only fires when `runtimeChannel === 'agentchat'` (verified in
16
- * compact-Fl3cALvc.js:636 of openclaw 2026.4.x). That's the wrong
17
- * scope: the agent only sees the hints during AgentChat-active turns,
18
- * exactly when the agent already knows it's on AgentChat. Useless for
19
- * advertising the handle in OTHER contexts (Twitter, MoltBook,
20
- * email, sub-agents, CLI runs).
21
- *
22
- * AGENTS.md is OpenClaw's documented "always-on" surface. From the
23
- * official docs (concepts/system-prompt) and confirmed via OpenClaw
24
- * issues #21538 and #25369: workspace bootstrap files (AGENTS.md,
25
- * SOUL.md, USER.md, TOOLS.md, IDENTITY.md, HEARTBEAT.md, MEMORY.md)
26
- * are injected into the system prompt on every turn of every session,
27
- * regardless of which channel triggered the run. Sub-agent sessions
28
- * also receive AGENTS.md.
29
- *
30
- * No official "plugin → AGENTS.md" API exists (issue #9491 is open
31
- * with no committed timeline; #36190 was closed as not planned). The
32
- * universal skill (Path A, apps/web/public/skill.md Step 5) writes to
33
- * AGENTS.md via a bash heredoc. We mirror that pattern from the
34
- * plugin side so Path A and Path B converge on the same canonical
35
- * identity content. Same marker fences mean a user who switches paths
36
- * gets a clean overwrite — no duplicated blocks.
37
- *
38
- * Lifecycle
39
- * ─────────
40
- * write — `setupWizard.finalize` (after validateApiKey ok), and
41
- * `setup.afterAccountConfigWritten` (non-interactive path).
42
- * remove — `setupWizard.disable` (channels remove agentchat).
43
- * orphan — `openclaw plugins uninstall` does not fire any plugin
44
- * hook today (openclaw#5985, #54813). If the user uninstalls
45
- * the plugin without removing the channel first, the anchor
46
- * block is left behind. Documented in RUNBOOK.md.
47
- */
48
-
49
- /**
50
- * Resolve the workspace dir the way OpenClaw does. Mirror order is
51
- * load-bearing — diverging means we write to a path OpenClaw never
52
- * reads, and the agent never sees the anchor.
53
- *
54
- * Reference: openclaw 2026.4.x `dist/workspace-hhTlRYqM.js:49-55` —
55
- * 1. `cfg.agents.defaults.workspace` (explicit override)
56
- * 2. `OPENCLAW_PROFILE` env var → `~/.openclaw/workspace-${profile}`
57
- * when set to anything other than "default" (case-insensitive)
58
- * 3. fallback: `~/.openclaw/workspace`
59
- *
60
- * Per-agent overrides (`cfg.agents.list[].workspace`) are NOT honored
61
- * here — we'd need to know which OpenClaw agent owns this channel
62
- * account to read the right entry, and the channel-account model only
63
- * gives us a local accountId, not an agent id. Multi-agent setups
64
- * with distinct workspaces are rare; the fallback to default is
65
- * acceptable until we hit a concrete user who needs it.
66
- *
67
- * Reading via a structural type guard (rather than importing a deep
68
- * OpenClawConfig path) keeps this file tolerant of OpenClaw schema
69
- * additions — a missing field falls through to the default.
70
- */
71
- declare function resolveWorkspaceDir(cfg: OpenClawConfig | undefined): string;
72
- /**
73
- * Idempotent write. Re-running the wizard upserts the existing block
74
- * (handle change, format tweak) without leaving stale duplicates or
75
- * blank-line drift.
76
- *
77
- * Synchronous fs APIs are deliberate — `disable(cfg)` is typed sync by
78
- * the plugin SDK, and the writes happen on local disk in <1ms. No
79
- * benefit to async here.
80
- *
81
- * Throws on substitution failure so a regression that drops `@${handle}`
82
- * fails loud at wizard time instead of silently shipping a broken file.
83
- * Other errors (workspace not creatable, file not writable) propagate
84
- * — the caller decides whether to swallow or surface.
85
- */
86
- declare function writeAgentsAnchor(params: {
87
- cfg: OpenClawConfig | undefined;
88
- handle: string;
89
- }): {
90
- path: string;
91
- };
92
- /**
93
- * Idempotent remove. Strips any block fenced between our markers,
94
- * leaves the rest of the file untouched. No-op if the file or markers
95
- * are absent (workspace never anchored, or already cleaned).
96
- */
97
- declare function removeAgentsAnchor(params: {
98
- cfg: OpenClawConfig | undefined;
99
- }): {
100
- removed: boolean;
101
- path: string;
102
- };
103
-
104
- export { removeAgentsAnchor, resolveWorkspaceDir, writeAgentsAnchor };
@@ -1,20 +0,0 @@
1
- /**
2
- * Configured-state predicate for the AgentChat channel.
3
- *
4
- * OpenClaw calls this to decide whether the channel has "enough" config to
5
- * be considered active (counts toward enabled channels, shown in UI, etc.).
6
- *
7
- * Bar: an `apiKey` of plausible length AND a non-empty `agentHandle`.
8
- * Without the handle the runtime will start but the agent has no identity
9
- * to inject into prompts or to use as a self-filter on inbound — both
10
- * downstream surfaces silently degrade. Refusing to count the channel as
11
- * "configured" until the handle is present surfaces the gap at the
12
- * gateway boundary instead.
13
- */
14
- interface MaybeConfigured {
15
- readonly apiKey?: unknown;
16
- readonly agentHandle?: unknown;
17
- }
18
- declare function hasAgentChatConfiguredState(config: MaybeConfigured | undefined): boolean;
19
-
20
- export { type MaybeConfigured, hasAgentChatConfiguredState };
@@ -1,20 +0,0 @@
1
- /**
2
- * Configured-state predicate for the AgentChat channel.
3
- *
4
- * OpenClaw calls this to decide whether the channel has "enough" config to
5
- * be considered active (counts toward enabled channels, shown in UI, etc.).
6
- *
7
- * Bar: an `apiKey` of plausible length AND a non-empty `agentHandle`.
8
- * Without the handle the runtime will start but the agent has no identity
9
- * to inject into prompts or to use as a self-filter on inbound — both
10
- * downstream surfaces silently degrade. Refusing to count the channel as
11
- * "configured" until the handle is present surfaces the gap at the
12
- * gateway boundary instead.
13
- */
14
- interface MaybeConfigured {
15
- readonly apiKey?: unknown;
16
- readonly agentHandle?: unknown;
17
- }
18
- declare function hasAgentChatConfiguredState(config: MaybeConfigured | undefined): boolean;
19
-
20
- export { type MaybeConfigured, hasAgentChatConfiguredState };
@@ -1,33 +0,0 @@
1
- /**
2
- * Environment variable readers — isolated from outbound networking.
3
- *
4
- * The wizard, runtime, and SDK consume the helpers below instead of
5
- * touching the host environment directly. The split keeps credential
6
- * lookup in a small audit-friendly module that imports nothing more
7
- * than its own typings: no SDK, no transport, no logging.
8
- *
9
- * See SECURITY.md ("Defensive separation of credential lookup from
10
- * outbound I/O") for the full rationale and the contract callers
11
- * must respect.
12
- */
13
- /**
14
- * Reads the AgentChat API key from `AGENTCHAT_API_KEY`.
15
- *
16
- * Returns the trimmed value when non-empty AND meeting `minLength`,
17
- * otherwise `undefined`. The min-length is supplied by the caller
18
- * (`MIN_API_KEY_LENGTH` from `channel-account.ts`) so this module
19
- * owns no domain constants.
20
- */
21
- declare function readApiKeyFromEnv(minLength: number): string | undefined;
22
- /**
23
- * Reads `OPENCLAW_PROFILE` for workspace path resolution. Mirrors
24
- * OpenClaw's own logic in `dist/workspace-hhTlRYqM.js:49-55`:
25
- * non-default profile name → `~/.openclaw/workspace-${profile}`.
26
- *
27
- * Returns the trimmed profile name only when it is set AND not equal
28
- * to "default" (case-insensitive). Returns `undefined` otherwise so
29
- * callers can fall through to the bare default.
30
- */
31
- declare function readOpenClawProfileFromEnv(): string | undefined;
32
-
33
- export { readApiKeyFromEnv, readOpenClawProfileFromEnv };
@@ -1,33 +0,0 @@
1
- /**
2
- * Environment variable readers — isolated from outbound networking.
3
- *
4
- * The wizard, runtime, and SDK consume the helpers below instead of
5
- * touching the host environment directly. The split keeps credential
6
- * lookup in a small audit-friendly module that imports nothing more
7
- * than its own typings: no SDK, no transport, no logging.
8
- *
9
- * See SECURITY.md ("Defensive separation of credential lookup from
10
- * outbound I/O") for the full rationale and the contract callers
11
- * must respect.
12
- */
13
- /**
14
- * Reads the AgentChat API key from `AGENTCHAT_API_KEY`.
15
- *
16
- * Returns the trimmed value when non-empty AND meeting `minLength`,
17
- * otherwise `undefined`. The min-length is supplied by the caller
18
- * (`MIN_API_KEY_LENGTH` from `channel-account.ts`) so this module
19
- * owns no domain constants.
20
- */
21
- declare function readApiKeyFromEnv(minLength: number): string | undefined;
22
- /**
23
- * Reads `OPENCLAW_PROFILE` for workspace path resolution. Mirrors
24
- * OpenClaw's own logic in `dist/workspace-hhTlRYqM.js:49-55`:
25
- * non-default profile name → `~/.openclaw/workspace-${profile}`.
26
- *
27
- * Returns the trimmed profile name only when it is set AND not equal
28
- * to "default" (case-insensitive). Returns `undefined` otherwise so
29
- * callers can fall through to the bare default.
30
- */
31
- declare function readOpenClawProfileFromEnv(): string | undefined;
32
-
33
- export { readApiKeyFromEnv, readOpenClawProfileFromEnv };