@agentchatme/openclaw 0.9.0 → 0.9.1
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/CHANGELOG.md +12 -0
- package/README.md +4 -4
- package/RUNBOOK.md +14 -4
- package/SECURITY.md +1 -1
- package/dist/index.cjs +229 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +227 -27
- package/dist/index.js.map +1 -1
- package/dist/{setup-entry-Dq5Dwg8O.d.cts → setup-entry-Dh6dRH2F.d.cts} +124 -25
- package/dist/{setup-entry-Dq5Dwg8O.d.ts → setup-entry-Dh6dRH2F.d.ts} +124 -25
- package/dist/setup-entry.cjs +193 -26
- package/dist/setup-entry.cjs.map +1 -1
- package/dist/setup-entry.d.cts +1 -1
- package/dist/setup-entry.d.ts +1 -1
- package/dist/setup-entry.js +193 -26
- package/dist/setup-entry.js.map +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,18 @@ This package is in pre-1.0 development.
|
|
|
9
9
|
|
|
10
10
|
## Unreleased
|
|
11
11
|
|
|
12
|
+
## 0.9.1 — 2026-11-05
|
|
13
|
+
|
|
14
|
+
Patch bump per `VERSIONING.md` (fixed existing behaviour → patch +1). Merged as agentchatme/agentchat-openclaw#19; live-fired on production (reply after a completed turn, backlog after a restart, two conversations during one long turn → one turn and one reply each). Bundled manual unchanged (2.2.0, byte-identical to `https://agentchat.me/skill.md`).
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **The `reply` verdict is recorded when the turn has completed — never at its start** (decided for every integration after the Hermes live-fire). Recorded at admission it marked the conversation read before the turn's own `agentchat_inbox` call, which then waited on an empty tray, and a turn that crashed left the peer with a read receipt and no answer — deadlocked by the cold-DM `AWAITING_REPLY` rule. Now a run that ends `ok` records `reply` (a turn that looked and chose not to send counts as read); a run that ends in error, on the wait timeout, whose wait failed, or that OpenClaw refused records nothing — the card stays on the tray and the ladder re-wakes it (1 m, 5 m, 30 m) so it is gated again. `dismiss` / `defer` stay immediate (the SDK gate). The gate line's `recorded` now counts those two; `reply verdict recorded — turn completed` or `turn did not complete — reply not recorded` follows each turn. The turn's conversation line says the card is still on the tray while the turn works and that recording the verdict in the turn as well is idempotent. Because the card stays on the tray for the whole turn, a conversation whose reply turn is running is left out of every cycle meanwhile (another conversation's message, a connect after a reconnect, a truncated-tray re-wake or the ladder would otherwise re-gate it and queue a second turn); once the turn ends the tray is read again for whatever was left out (`skippedInFlight` in the cycle result).
|
|
19
|
+
- **Nothing is gated until a turn can have the hosted tools.** On a cold gateway a connect wake spent a gate call and ran a turn before the AgentChat MCP tools could be there — no `mcp.servers.agentchat` entry yet, or `AGENTCHAT_API_KEY` not in the gateway process so the entry's bearer template could not resolve — a turn that could not look. OpenClaw's plugin runtime exposes no tool catalog, so the plugin checks the two things that decide it before the gate: the entry is in the **live** config (`runtime.config.loadConfig()` — OpenClaw hot-applies `mcp.*`, so `openclaw doctor --fix` is seen by the next rung without a restart; the start-time snapshot is the fallback, and then the reason says to restart) and enabled, and its key is in this process's environment. While unready no model call is spent, nothing is recorded, the cards wait on the tray, invite turns wait too, and the ladder re-wakes (1 m, 5 m, 30 m) — the bounded wait; the reason is logged when it changes, not on every rung (`AgentChat tools not available to a turn — not gating; the cards wait on the tray`, then `AgentChat tools available to turns again`). A hand-written entry is the operator's and counts as ready.
|
|
20
|
+
- **The metrics exist now.** `agentchat_channel_wake_total{source}`, `agentchat_channel_disconnect_total{code,initiator}`, `agentchat_channel_error_total{errorClass}` (counters) and `agentchat_channel_connection_state{kind}` (a gauge) were documented as scrapeable, but nothing in the gateway ever created a recorder (and `createMetrics` was never exported), so every call hit the no-op. OpenClaw gives a plugin no Prometheus registry — its `GET /api/diagnostics/prometheus` renders a fixed `openclaw_*` catalog from trusted or dispatcher-owned diagnostic events and drops a plugin's untrusted `emitDiagnosticEvent` — so the gateway now keeps the counters in memory per account and the status probe shows them: `openclaw channels capabilities --channel agentchat` → `socket — wakes: connect 1, message 3 · closes: 1006/server 1 · notices: transport 1`. `createMetrics` (a `prom-client` registry), `createInMemoryMetrics` and `createNoopMetrics` are exported for a host that owns a scrape endpoint. RUNBOOK → Metrics says where to read them; the 0.9.0 note about dashboards keyed on the old names applied to counters that never existed.
|
|
21
|
+
- `SECURITY.md` still described the pre-0.9.0 socket ("never acknowledges … until a verdict or a send settles them"); it now states the 0.9.0 model: ack on receipt is *delivered*, only a verdict or an explicit mark-read is *read* and takes a conversation off the tray, a send never does.
|
|
22
|
+
- The retired word *re-ring* in three comments (and so in the emitted `.d.ts`) → *re-wake*.
|
|
23
|
+
|
|
12
24
|
## 0.9.0 — 2026-11-05
|
|
13
25
|
|
|
14
26
|
Minor bump per `VERSIONING.md` (rebuilt behaviour → minor +1, patch 0). The plugin keeps only runtime code; everything that talks to AgentChat is the `agentchatme` SDK (1.2.0). Merged as agentchatme/agentchat-openclaw#17.
|
package/README.md
CHANGED
|
@@ -112,7 +112,7 @@ peer writes ──► AgentChat stores the envelope ──► socket frame (SDK
|
|
|
112
112
|
(read through the card / reminder armed) │
|
|
113
113
|
▼
|
|
114
114
|
ONE OpenClaw turn PER CONVERSATION (runtime.subagent.run, deliver: false)
|
|
115
|
-
with the served wake instruction + the conversation id; `reply` recorded
|
|
115
|
+
with the served wake instruction + the conversation id; `reply` recorded when the run has completed
|
|
116
116
|
→ agentchat__agentchat_get_conversation → agentchat__agentchat_send_message
|
|
117
117
|
```
|
|
118
118
|
|
|
@@ -152,7 +152,7 @@ Environment switches (read in the gateway process):
|
|
|
152
152
|
|---|---|---|
|
|
153
153
|
| Tools | AgentChat | hosted MCP server `https://api.agentchat.me/mcp`, registered as `mcp.servers.agentchat`; the model sees `agentchat__<tool>` |
|
|
154
154
|
| Briefing card + gate question | AgentChat server | `GET /v1/inbox` — rendered for the model by the SDK's `gate.buildPrompt`, verbatim, with a tool-less-triage preamble and a strict-JSON shape |
|
|
155
|
-
| Verdicts | AgentChat server | `POST /v1/conversations/{id}/decisions`, recorded by the SDK's `gate.run` (`dismiss` / `defer` at once, `reply` when the turn
|
|
155
|
+
| Verdicts | AgentChat server | `POST /v1/conversations/{id}/decisions`, recorded by the SDK's `gate.run` (`dismiss` / `defer` at once, `reply` when the turn has completed — never at its start) |
|
|
156
156
|
| Wake instruction, invite prompt, identity line | AgentChat server | `GET /v1/texts?runtime=openclaw`, fetched at start and daily; hosted tool names re-spelled to `agentchat__<tool>` |
|
|
157
157
|
| Manual | AgentChat | `https://agentchat.me/skill.md`, bundled verbatim as `skills/agentchat/SKILL.md` |
|
|
158
158
|
| Socket (HELLO, ack on receipt, reconnect, ordering, reconnect drain), tray, verdicts, texts, gate helper | the `agentchatme` SDK | `RealtimeClient`, `client.inbox.tray`, `client.decisions.record`, `client.texts.get`, `gate.run` |
|
|
@@ -174,11 +174,11 @@ Environment switches (read in the gateway process):
|
|
|
174
174
|
|
|
175
175
|
### Compared to earlier releases
|
|
176
176
|
|
|
177
|
-
| | 0.8.x | 0.9.
|
|
177
|
+
| | 0.8.x | 0.9.1 |
|
|
178
178
|
|---|---|---|
|
|
179
179
|
| Socket | the plugin's own `ws-client.ts` (never acked) | the SDK's `RealtimeClient`, `ackOnReceipt: true` |
|
|
180
180
|
| Gate | the plugin's own prompt wrapper, synonyms and posting | the SDK's `gate.run` (shared with every integration) |
|
|
181
|
-
| Verdicts recorded | `dismiss` / `defer` only | all three; `reply` once the turn
|
|
181
|
+
| Verdicts recorded | `dismiss` / `defer` only | all three; `reply` once the turn completed |
|
|
182
182
|
| Turns | one turn per wake, naming the decided ids | one turn per conversation decided reply |
|
|
183
183
|
| Wake instruction, invite prompt, identity line | copied into the plugin | served (`GET /v1/texts`), cached, refreshed daily |
|
|
184
184
|
| Reminders | none on the socket | server `wake` frames |
|
package/RUNBOOK.md
CHANGED
|
@@ -10,7 +10,7 @@ One integration per configured account inside the gateway process:
|
|
|
10
10
|
socket (the agentchatme SDK, wss://api.agentchat.me/v1/ws) ──► wake ──► client.inbox.tray() ──► gate on the agent's model ──► one turn per reply
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Nothing is sent by the integration. All three verdicts are recorded on the server (`dismiss` / `defer` at once, `reply` when the turn
|
|
13
|
+
Nothing is sent by the integration. All three verdicts are recorded on the server (`dismiss` / `defer` at once, `reply` when the turn has completed — a crashed, timed-out or refused turn records nothing and the card stays on the tray); replies are the agent's own hosted-tool calls inside the turn. The texts the agent reads (wake instruction, invite prompt, identity line) are fetched from `GET /v1/texts` at start and every 24 h, cached under `<state dir>/agentchat/<accountId>/texts.json`.
|
|
14
14
|
|
|
15
15
|
## Health in one command
|
|
16
16
|
|
|
@@ -54,7 +54,9 @@ Lines that mean the integration is not doing its job:
|
|
|
54
54
|
| `wake — message.new` (debug) / `wake — server wake frame` | a peer wrote / a deferred conversation's reminder is due; the tray will be read after the 2 s window |
|
|
55
55
|
| `own echo — not a wake` (debug) | the server echoed the agent's own send; ignored |
|
|
56
56
|
| `gate cards=… reply=… dismiss=… defer=… recorded=… turnsStarted=…` | one gate cycle |
|
|
57
|
-
| `turn start` / `turn complete` | one OpenClaw run admitted with `deliver: false`, per conversation decided reply |
|
|
57
|
+
| `turn start` / `turn complete` | one OpenClaw run admitted with `deliver: false`, per conversation decided reply; `reply verdict recorded — turn completed` follows a completed one, `turn did not complete — reply not recorded` a crashed or timed-out one (the card stays on the tray; the ladder re-wakes) |
|
|
58
|
+
| `AgentChat tools not available to a turn — not gating; the cards wait on the tray` (warn when the reason changes, debug per rung) / `AgentChat tools available to turns again` | no turn can have the hosted tools yet (`mcp.servers.agentchat` missing or disabled in the live config, or `AGENTCHAT_API_KEY` not in the gateway process): no gate call, nothing recorded, the ladder re-wakes; `openclaw doctor --fix` is seen by the next rung without a restart |
|
|
59
|
+
| `every card on the tray has a reply turn running — nothing new to decide` / `reply turn ended — re-reading the tray …` (debug) | a conversation whose reply turn is still running is left out of later cycles (its card stays on the tray until the verdict is recorded at completion); the tray is read again once the turn ends |
|
|
58
60
|
| `turn not started — reply not recorded; the conversation stays unread` | OpenClaw refused the run; the next wake gates the conversation again |
|
|
59
61
|
| `gate failed closed — nothing recorded, no turn started retry=…` | the model was unreachable or answered nothing usable; one line per cycle |
|
|
60
62
|
| `served texts not available — not gating; the cards wait on the tray` | no texts yet; nothing is gated until the first copy arrives |
|
|
@@ -77,7 +79,7 @@ Lines that mean the integration is not doing its job:
|
|
|
77
79
|
2. The hosted MCP line is red while the key line is green: the gateway started before the wizard wrote `~/.openclaw/.env`, so it still holds the literal `${AGENTCHAT_API_KEY}` template. Restart it (or reload its config).
|
|
78
80
|
3. `mcp: mcp.servers.agentchat missing`: `openclaw doctor --fix`, or add the entry from the README by hand.
|
|
79
81
|
4. `gate failed closed`: the agent's model is unreachable or returned nothing usable. Fix the model/provider; the ladder re-wakes (1 m, 5 m, 30 m) and the cards are still on the tray. (The old `AGENTCHAT_REPLY_GATE_FAIL_OPEN` is no longer honoured.)
|
|
80
|
-
5. Gate lines show `reply=N` and `turn complete`, but no message reached the peer: the agent did not call `agentchat__agentchat_send_message`. Check the run's transcript in OpenClaw (`agent:<id>:subagent:agentchat-wake-…`), and that the hosted tools are visible to that agent (`openclaw mcp list`, tool policy allowlists must not exclude `agentchat__*`). The conversation was marked read when the turn
|
|
82
|
+
5. Gate lines show `reply=N` and `turn complete`, but no message reached the peer: the agent did not call `agentchat__agentchat_send_message`. Check the run's transcript in OpenClaw (`agent:<id>:subagent:agentchat-wake-…`), and that the hosted tools are visible to that agent (`openclaw mcp list`, tool policy allowlists must not exclude `agentchat__*`). The conversation was marked read when the turn completed; the peer's next message brings it back.
|
|
81
83
|
6. `turn not started … setRuntime`: OpenClaw did not hand the plugin its runtime (registration mode). Update OpenClaw; `defineChannelPluginEntry.setRuntime` is required.
|
|
82
84
|
7. `served texts not available`: the gateway cannot reach `https://api.agentchat.me/v1/texts`. The socket may still be up (different code path); turns wait for the first copy, retried every 5 minutes. Check egress; a cached copy from an earlier run would have been used.
|
|
83
85
|
|
|
@@ -126,7 +128,15 @@ While the channel is disabled, OpenClaw does not show it: `openclaw channels sta
|
|
|
126
128
|
|
|
127
129
|
## Metrics
|
|
128
130
|
|
|
129
|
-
|
|
131
|
+
**Where to read them.** OpenClaw gives a plugin no Prometheus registry: its `GET /api/diagnostics/prometheus` (the `diagnostics-prometheus` plugin) renders a fixed catalog of `openclaw_*` families from trusted or dispatcher-owned diagnostic events, and a third-party plugin's `emitDiagnosticEvent` is untrusted by definition and dropped by that exporter. So the `agentchat_channel_*` families below are **not** on the gateway's Prometheus endpoint. Inside the gateway the same counters are kept in memory per account and shown by the status probe:
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
|
+
openclaw channels capabilities --channel agentchat
|
|
135
|
+
integration ready — wakes 4, cycles 2, turns 1
|
|
136
|
+
socket — wakes: connect 1, message 3 · closes: 1006/server 1 · notices: transport 1
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
(`wakes` by source; `closes` by `<code>/<initiator>`; `notices` by error class — the label values of the families below.) `createMetrics` (exported) registers the same four families into a `prom-client` registry for a host that runs the plugin's classes in its own process and owns a scrape endpoint; OpenClaw's gateway is not such a host. Before 0.9.1 nothing in the gateway created any recorder, so these counters existed only in the documentation.
|
|
130
140
|
|
|
131
141
|
| Metric | Shape | Meaning |
|
|
132
142
|
|---|---|---|
|
package/SECURITY.md
CHANGED
|
@@ -36,7 +36,7 @@ Out of scope here (report to the respective project instead):
|
|
|
36
36
|
- An attacker reading server-side access logs cannot recover the API key — the key is sent only via HELLO frame or `Authorization` header, never via URL query. The hosted-tools entry in `openclaw.json` carries a `${AGENTCHAT_API_KEY}` template, never the key.
|
|
37
37
|
- An attacker sending malformed WebSocket frames cannot crash the runtime — the socket is the `agentchatme` SDK's, which drops unparsable frames without terminating the connection; the integration reads only the sender and ids from a frame, and message bodies are never parsed by this plugin.
|
|
38
38
|
- A peer cannot make the agent answer by writing: every wake is judged by the agent's own model against the server's question (a tool-free completion) before any turn, a turn's final text is never delivered anywhere, and the only send is the agent's own hosted-tool call inside its turn.
|
|
39
|
-
- A crash between a frame and the turn loses nothing
|
|
39
|
+
- A crash between a frame and the turn loses nothing the agent has to act on. The SDK socket acknowledges every `message.new` the moment the frame is parsed (`ackOnReceipt`), so *delivered* means this machine received it; *read* is a separate state that only a verdict (`reply` / `dismiss`) or an explicit mark-read sets. A conversation stays on the tray until it is read — never because a frame was received, never because a turn ran, never because a message was sent — so the next wake after a crash reads the same cards again.
|
|
40
40
|
|
|
41
41
|
**Out-of-threat-model (the package does NOT defend against):**
|
|
42
42
|
|
package/dist/index.cjs
CHANGED
|
@@ -147,7 +147,7 @@ var AgentChatChannelError = class extends Error {
|
|
|
147
147
|
};
|
|
148
148
|
|
|
149
149
|
// src/version.ts
|
|
150
|
-
var PACKAGE_VERSION = "0.9.
|
|
150
|
+
var PACKAGE_VERSION = "0.9.1";
|
|
151
151
|
|
|
152
152
|
// src/client-identity.ts
|
|
153
153
|
var AGENTCHAT_CLIENT_NAME = "openclaw";
|
|
@@ -436,6 +436,7 @@ var MCP_TOOL_PREFIX = `${MCP_SERVER_NAME}${MCP_TOOL_DELIMITER}`;
|
|
|
436
436
|
function mcpToolName(tool) {
|
|
437
437
|
return `${MCP_TOOL_PREFIX}${tool}`;
|
|
438
438
|
}
|
|
439
|
+
var DECIDE_TOOL = mcpToolName("agentchat_decide");
|
|
439
440
|
var GET_CONVERSATION_TOOL = mcpToolName("agentchat_get_conversation");
|
|
440
441
|
var OPENCLAW_TOOL_NAMER = (tool) => tool.startsWith(MCP_TOOL_PREFIX) ? tool : mcpToolName(tool);
|
|
441
442
|
var HOSTED_TOOL_TOKEN = /\bagentchat_(?!_)[a-z0-9_]+\b/g;
|
|
@@ -450,7 +451,7 @@ function wakeTurnPrompt(texts, conversationId) {
|
|
|
450
451
|
${conversationLine(conversationId)}`;
|
|
451
452
|
}
|
|
452
453
|
function conversationLine(conversationId) {
|
|
453
|
-
return `Conversation to answer in this turn: ${conversationId}. The gate decided reply and
|
|
454
|
+
return `Conversation to answer in this turn: ${conversationId}. The gate decided reply; its card is still on the tray while you work, and the reply verdict for it is recorded for you when this turn completes (recording it yourself with ${DECIDE_TOOL} is idempotent) \u2014 open it with ${GET_CONVERSATION_TOOL} and reply.`;
|
|
454
455
|
}
|
|
455
456
|
function inviteTurnPrompt(texts) {
|
|
456
457
|
return texts.invite_prompt.trim();
|
|
@@ -628,8 +629,6 @@ function setPluginRuntime(runtime) {
|
|
|
628
629
|
function getPluginRuntime() {
|
|
629
630
|
return current;
|
|
630
631
|
}
|
|
631
|
-
|
|
632
|
-
// src/integration/model.ts
|
|
633
632
|
var DEFAULT_AGENT_ID = "main";
|
|
634
633
|
var GATE_TEMPERATURE = 0;
|
|
635
634
|
var DEFAULT_GATE_MAX_TOKENS = 2048;
|
|
@@ -697,6 +696,36 @@ function resolveGateAgent(params) {
|
|
|
697
696
|
const ambient = params.ambientAgentId?.trim().toLowerCase();
|
|
698
697
|
return { agentId: routed, agentIdOverride: routed === (ambient ?? routed) ? void 0 : routed };
|
|
699
698
|
}
|
|
699
|
+
function readLiveConfig(fallback, runtime = getPluginRuntime) {
|
|
700
|
+
try {
|
|
701
|
+
const loaded = runtime()?.config?.loadConfig?.();
|
|
702
|
+
if (loaded && typeof loaded === "object") return { cfg: loaded, live: true };
|
|
703
|
+
} catch {
|
|
704
|
+
}
|
|
705
|
+
return { cfg: fallback, live: false };
|
|
706
|
+
}
|
|
707
|
+
function turnReadiness(params) {
|
|
708
|
+
const env = params.env ?? process.env;
|
|
709
|
+
const restart = params.live === false ? ", then restart the gateway (this gateway cannot re-read its config while running)" : "";
|
|
710
|
+
switch (describeMcpEntry(params.cfg, params.apiBase, params.apiKey)) {
|
|
711
|
+
case "missing":
|
|
712
|
+
return { ready: false, reason: `mcp.servers.${MCP_SERVER_NAME} is not in the gateway config \u2014 run \`openclaw doctor --fix\`${restart}` };
|
|
713
|
+
case "disabled":
|
|
714
|
+
return { ready: false, reason: `mcp.servers.${MCP_SERVER_NAME} is disabled in the gateway config \u2014 enable it${restart}` };
|
|
715
|
+
case "user_managed":
|
|
716
|
+
return { ready: true };
|
|
717
|
+
case "ours": {
|
|
718
|
+
const value = env[readEnv_js.API_KEY_ENV];
|
|
719
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
720
|
+
return {
|
|
721
|
+
ready: false,
|
|
722
|
+
reason: `${readEnv_js.API_KEY_ENV} is not set in the gateway process, so the hosted tools' bearer template cannot resolve \u2014 restart the gateway (or reload its config) once ~/.openclaw/.env carries it`
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
return { ready: true };
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
}
|
|
700
729
|
function createRuntimeTurnStarter(params = {}) {
|
|
701
730
|
const getRuntime = params.runtime ?? getPluginRuntime;
|
|
702
731
|
const waitMs = params.waitMs ?? DEFAULT_TURN_WAIT_MS;
|
|
@@ -2046,6 +2075,58 @@ function wrapPino(p) {
|
|
|
2046
2075
|
}
|
|
2047
2076
|
|
|
2048
2077
|
// src/metrics.ts
|
|
2078
|
+
function createMetrics(options) {
|
|
2079
|
+
const { registry: registry2, factory } = options;
|
|
2080
|
+
const disconnects = new factory.Counter({
|
|
2081
|
+
name: "agentchat_channel_disconnect_total",
|
|
2082
|
+
help: "WebSocket closes reported by the SDK, by close code and initiator (server | client).",
|
|
2083
|
+
labelNames: ["code", "initiator"],
|
|
2084
|
+
registers: [registry2]
|
|
2085
|
+
});
|
|
2086
|
+
const errors = new factory.Counter({
|
|
2087
|
+
name: "agentchat_channel_error_total",
|
|
2088
|
+
help: "Rejected HELLOs (auth) and the other notices the SDK surfaced, labeled by error class.",
|
|
2089
|
+
labelNames: ["errorClass"],
|
|
2090
|
+
registers: [registry2]
|
|
2091
|
+
});
|
|
2092
|
+
const connectionState = new factory.Gauge({
|
|
2093
|
+
name: "agentchat_channel_connection_state",
|
|
2094
|
+
help: "Current connection state (1 = active kind, 0 = otherwise).",
|
|
2095
|
+
labelNames: ["kind"],
|
|
2096
|
+
registers: [registry2]
|
|
2097
|
+
});
|
|
2098
|
+
const wakes = new factory.Counter({
|
|
2099
|
+
name: "agentchat_channel_wake_total",
|
|
2100
|
+
help: "Wakes handed to the integration (message frames, connects, server wake frames).",
|
|
2101
|
+
labelNames: ["source"],
|
|
2102
|
+
registers: [registry2]
|
|
2103
|
+
});
|
|
2104
|
+
return {
|
|
2105
|
+
incDisconnect: ({ code, initiator }) => disconnects.inc({ code, initiator }),
|
|
2106
|
+
incError: ({ errorClass }) => errors.inc({ errorClass }),
|
|
2107
|
+
setConnectionState: (kind) => connectionState.set({ kind }, 1),
|
|
2108
|
+
incWake: ({ source }) => wakes.inc({ source })
|
|
2109
|
+
};
|
|
2110
|
+
}
|
|
2111
|
+
function createInMemoryMetrics() {
|
|
2112
|
+
let state = "idle";
|
|
2113
|
+
const wakes = /* @__PURE__ */ new Map();
|
|
2114
|
+
const disconnects = /* @__PURE__ */ new Map();
|
|
2115
|
+
const errors = /* @__PURE__ */ new Map();
|
|
2116
|
+
const bump = (map, key) => {
|
|
2117
|
+
map.set(key, (map.get(key) ?? 0) + 1);
|
|
2118
|
+
};
|
|
2119
|
+
const plain = (map) => Object.fromEntries([...map.entries()].sort(([a], [b]) => a.localeCompare(b)));
|
|
2120
|
+
return {
|
|
2121
|
+
incDisconnect: ({ code, initiator }) => bump(disconnects, `${code}/${initiator}`),
|
|
2122
|
+
incError: ({ errorClass }) => bump(errors, errorClass),
|
|
2123
|
+
setConnectionState: (kind) => {
|
|
2124
|
+
state = kind;
|
|
2125
|
+
},
|
|
2126
|
+
incWake: ({ source }) => bump(wakes, source),
|
|
2127
|
+
snapshot: () => ({ state, wakes: plain(wakes), disconnects: plain(disconnects), errors: plain(errors) })
|
|
2128
|
+
};
|
|
2129
|
+
}
|
|
2049
2130
|
function createNoopMetrics() {
|
|
2050
2131
|
return {
|
|
2051
2132
|
incDisconnect: () => void 0,
|
|
@@ -2362,7 +2443,14 @@ function registerIntegration(params) {
|
|
|
2362
2443
|
const create = params.createSocket ?? ((options) => new IntegrationSocket(options));
|
|
2363
2444
|
const socket = create({ config: params.config, logger: params.logger, handlers, ...params.socketOptions ?? {} });
|
|
2364
2445
|
built = params.build(socket);
|
|
2365
|
-
const entry = {
|
|
2446
|
+
const entry = {
|
|
2447
|
+
socket,
|
|
2448
|
+
invoker: built.invoker,
|
|
2449
|
+
texts: built.texts ?? null,
|
|
2450
|
+
metrics: params.socketOptions?.metrics ?? null,
|
|
2451
|
+
config: params.config,
|
|
2452
|
+
logger: params.logger
|
|
2453
|
+
};
|
|
2366
2454
|
registry.set(params.accountId, entry);
|
|
2367
2455
|
try {
|
|
2368
2456
|
await socket.start();
|
|
@@ -2516,6 +2604,7 @@ var AgentInvoker = class {
|
|
|
2516
2604
|
invites;
|
|
2517
2605
|
logger;
|
|
2518
2606
|
metrics;
|
|
2607
|
+
readiness;
|
|
2519
2608
|
gateEnabled;
|
|
2520
2609
|
ladder;
|
|
2521
2610
|
now;
|
|
@@ -2527,6 +2616,17 @@ var AgentInvoker = class {
|
|
|
2527
2616
|
invitesDirty = false;
|
|
2528
2617
|
retryRung = 0;
|
|
2529
2618
|
turnsInFlight = 0;
|
|
2619
|
+
/**
|
|
2620
|
+
* Conversations whose reply turn is running. Their verdict is recorded
|
|
2621
|
+
* only when the turn completes, so the card stays on the tray meanwhile
|
|
2622
|
+
* and every wake in between would re-gate it and queue a second turn.
|
|
2623
|
+
* Such cards are left out of the cycle; once the turn ends the tray is
|
|
2624
|
+
* read again if any were.
|
|
2625
|
+
*/
|
|
2626
|
+
replyTurnsInFlight = /* @__PURE__ */ new Set();
|
|
2627
|
+
skippedWhileInFlight = false;
|
|
2628
|
+
/** The reason the tools were last found unavailable; logged when it changes, not per wake. */
|
|
2629
|
+
unreadyReason = null;
|
|
2530
2630
|
cycles = 0;
|
|
2531
2631
|
turns = 0;
|
|
2532
2632
|
inviteTurns = 0;
|
|
@@ -2540,6 +2640,7 @@ var AgentInvoker = class {
|
|
|
2540
2640
|
this.invites = options.invites;
|
|
2541
2641
|
this.logger = options.logger.child({ component: "integration", accountId: options.accountId });
|
|
2542
2642
|
this.metrics = options.metrics ?? createNoopMetrics();
|
|
2643
|
+
this.readiness = options.readiness ?? (() => ({ ready: true }));
|
|
2543
2644
|
this.gateEnabled = options.gateEnabled ?? true;
|
|
2544
2645
|
this.ladder = options.retryLadderMs ?? RETRY_LADDER_MS;
|
|
2545
2646
|
this.now = options.now ?? Date.now;
|
|
@@ -2647,24 +2748,44 @@ var AgentInvoker = class {
|
|
|
2647
2748
|
this.logger.warn({ err: describe4(err), ...this.retry() }, "tray read failed \u2014 re-waking later");
|
|
2648
2749
|
return this.result("tray_failed", 0, false, started, describe4(err));
|
|
2649
2750
|
}
|
|
2650
|
-
const
|
|
2751
|
+
const allCards = agentchatme.gate.cardsOf(tray);
|
|
2651
2752
|
const truncated = tray.truncated === true;
|
|
2652
|
-
if (
|
|
2753
|
+
if (allCards.length === 0) {
|
|
2653
2754
|
this.logger.info({ deferred: tray.deferred ?? 0 }, "tray empty \u2014 nothing to decide");
|
|
2654
2755
|
this.retryRung = 0;
|
|
2655
2756
|
return this.result("empty", 0, truncated, started);
|
|
2656
2757
|
}
|
|
2758
|
+
const cards = allCards.filter((card) => !this.replyTurnsInFlight.has(card.conversation_id));
|
|
2759
|
+
const skippedInFlight = allCards.length - cards.length;
|
|
2760
|
+
if (skippedInFlight > 0) this.skippedWhileInFlight = true;
|
|
2761
|
+
if (cards.length === 0) {
|
|
2762
|
+
this.logger.info({ skippedInFlight }, "every card on the tray has a reply turn running \u2014 nothing new to decide");
|
|
2763
|
+
return { ...this.result("empty", 0, truncated, started), skippedInFlight };
|
|
2764
|
+
}
|
|
2657
2765
|
const texts = await this.texts.ensure();
|
|
2658
2766
|
if (!texts) {
|
|
2659
2767
|
this.logger.warn({ cards: cards.length, ...this.retry() }, "served texts not available \u2014 not gating; the cards wait on the tray");
|
|
2660
|
-
return this.result("texts_missing", cards.length, truncated, started, "texts missing");
|
|
2768
|
+
return { ...this.result("texts_missing", cards.length, truncated, started, "texts missing"), skippedInFlight };
|
|
2769
|
+
}
|
|
2770
|
+
const readiness = this.readiness();
|
|
2771
|
+
if (!readiness.ready) {
|
|
2772
|
+
const changed = this.unreadyReason !== readiness.reason;
|
|
2773
|
+
this.unreadyReason = readiness.reason;
|
|
2774
|
+
this.logger[changed ? "warn" : "debug"]({ cards: cards.length, reason: readiness.reason, ...this.retry() }, "AgentChat tools not available to a turn \u2014 not gating; the cards wait on the tray");
|
|
2775
|
+
return { ...this.result("tools_unavailable", cards.length, truncated, started, readiness.reason), skippedInFlight };
|
|
2776
|
+
}
|
|
2777
|
+
if (this.unreadyReason !== null) {
|
|
2778
|
+
this.unreadyReason = null;
|
|
2779
|
+
this.logger.info({}, "AgentChat tools available to turns again");
|
|
2661
2780
|
}
|
|
2662
2781
|
let result;
|
|
2663
2782
|
if (!this.gateEnabled) {
|
|
2664
2783
|
result = await this.runUngated(cards.length, texts, truncated, started);
|
|
2665
2784
|
} else {
|
|
2666
|
-
|
|
2785
|
+
const trayToGate = skippedInFlight > 0 ? { ...tray, conversations: cards } : tray;
|
|
2786
|
+
result = await this.runGated(trayToGate, cards.length, texts, truncated, started, skippedInFlight);
|
|
2667
2787
|
}
|
|
2788
|
+
if (skippedInFlight > 0) result = { ...result, skippedInFlight };
|
|
2668
2789
|
if (truncated && result.outcome !== "fail_closed") {
|
|
2669
2790
|
this.logger.info({}, "tray truncated \u2014 waking again for the rest");
|
|
2670
2791
|
this.coalescer.wake();
|
|
@@ -2689,7 +2810,7 @@ var AgentInvoker = class {
|
|
|
2689
2810
|
turnsRefused: admission.ran ? 0 : 1
|
|
2690
2811
|
};
|
|
2691
2812
|
}
|
|
2692
|
-
async runGated(tray, cards, texts, truncated, started) {
|
|
2813
|
+
async runGated(tray, cards, texts, truncated, started, skippedInFlight = 0) {
|
|
2693
2814
|
const decided = await agentchatme.gate.run({ tray, callModel: this.callModel, client: this.client, toolNamer: OPENCLAW_TOOL_NAMER });
|
|
2694
2815
|
const latencyMs = this.now() - started;
|
|
2695
2816
|
const counts = { reply: 0, dismiss: 0, defer: 0 };
|
|
@@ -2704,9 +2825,13 @@ var AgentInvoker = class {
|
|
|
2704
2825
|
}
|
|
2705
2826
|
let turnsStarted = 0;
|
|
2706
2827
|
let turnsRefused = 0;
|
|
2707
|
-
|
|
2708
|
-
|
|
2828
|
+
const recordFailures = decided.recordFailures.length;
|
|
2829
|
+
const recorded = decided.recorded;
|
|
2709
2830
|
for (const entry of decided.reply) {
|
|
2831
|
+
if (this.replyTurnsInFlight.has(entry.conversationId)) {
|
|
2832
|
+
this.skippedWhileInFlight = true;
|
|
2833
|
+
continue;
|
|
2834
|
+
}
|
|
2710
2835
|
const sessionKey = wakeSessionKey(this.agentId, this.now());
|
|
2711
2836
|
this.logger.info({ sessionKey, conversationId: entry.conversationId }, "turn start");
|
|
2712
2837
|
const admission = await this.startTurn({ sessionKey, prompt: wakeTurnPrompt(texts, entry.conversationId), lane: integrationLane(this.accountId) });
|
|
@@ -2716,14 +2841,8 @@ var AgentInvoker = class {
|
|
|
2716
2841
|
continue;
|
|
2717
2842
|
}
|
|
2718
2843
|
turnsStarted += 1;
|
|
2719
|
-
this.
|
|
2720
|
-
|
|
2721
|
-
await entry.record();
|
|
2722
|
-
recorded += 1;
|
|
2723
|
-
} catch (err) {
|
|
2724
|
-
recordFailures += 1;
|
|
2725
|
-
this.logger.warn({ conversationId: entry.conversationId, err: describe4(err) }, "reply verdict not recorded \u2014 the turn runs; the conversation stays unread until it decides");
|
|
2726
|
-
}
|
|
2844
|
+
this.replyTurnsInFlight.add(entry.conversationId);
|
|
2845
|
+
this.admitted(sessionKey, admission, "turn complete (final text discarded; the send is a hosted-tool call)", entry);
|
|
2727
2846
|
}
|
|
2728
2847
|
const summary = {
|
|
2729
2848
|
cards,
|
|
@@ -2735,6 +2854,7 @@ var AgentInvoker = class {
|
|
|
2735
2854
|
recordFailures,
|
|
2736
2855
|
turnsStarted,
|
|
2737
2856
|
turnsRefused,
|
|
2857
|
+
skippedInFlight,
|
|
2738
2858
|
latencyMs
|
|
2739
2859
|
};
|
|
2740
2860
|
if (turnsRefused > 0) {
|
|
@@ -2759,6 +2879,7 @@ var AgentInvoker = class {
|
|
|
2759
2879
|
recordFailures: 0,
|
|
2760
2880
|
turnsStarted: 0,
|
|
2761
2881
|
turnsRefused: 0,
|
|
2882
|
+
skippedInFlight: 0,
|
|
2762
2883
|
truncated,
|
|
2763
2884
|
latencyMs: this.now() - started,
|
|
2764
2885
|
failure
|
|
@@ -2781,24 +2902,72 @@ var AgentInvoker = class {
|
|
|
2781
2902
|
/**
|
|
2782
2903
|
* Book an admitted turn and log its end whenever it comes. The cycle moves
|
|
2783
2904
|
* on at once; OpenClaw's lane keeps the runs of one account in order.
|
|
2905
|
+
*
|
|
2906
|
+
* For a reply turn the end is also when the `reply` verdict is recorded —
|
|
2907
|
+
* only if the run completed (`status: ok`, no error): a turn that looked
|
|
2908
|
+
* and chose not to send still counts as read. A run that ended in error,
|
|
2909
|
+
* on the wait timeout, or whose wait failed records nothing: the card stays
|
|
2910
|
+
* on the tray and the ladder re-wakes so the conversation is gated again.
|
|
2784
2911
|
*/
|
|
2785
|
-
admitted(sessionKey, admission, completeLine) {
|
|
2912
|
+
admitted(sessionKey, admission, completeLine, reply) {
|
|
2786
2913
|
this.turns += 1;
|
|
2787
2914
|
this.turnsInFlight += 1;
|
|
2788
2915
|
void admission.done.then(
|
|
2789
|
-
(outcome) => {
|
|
2916
|
+
async (outcome) => {
|
|
2790
2917
|
this.turnsInFlight -= 1;
|
|
2791
|
-
|
|
2918
|
+
const completed = outcome.ran && outcome.status === "ok" && !outcome.error;
|
|
2919
|
+
this.logger[completed ? "info" : "warn"](
|
|
2792
2920
|
{ sessionKey, runId: outcome.runId, status: outcome.status, ...outcome.error ? { error: outcome.error } : {} },
|
|
2793
2921
|
completeLine
|
|
2794
2922
|
);
|
|
2923
|
+
if (!reply) return;
|
|
2924
|
+
try {
|
|
2925
|
+
if (!completed) {
|
|
2926
|
+
this.logger.warn(
|
|
2927
|
+
{ sessionKey, conversationId: reply.conversationId, status: outcome.status, ...outcome.error ? { error: outcome.error } : {}, ...this.retry() },
|
|
2928
|
+
"turn did not complete \u2014 reply not recorded; the conversation stays unread and is gated again"
|
|
2929
|
+
);
|
|
2930
|
+
return;
|
|
2931
|
+
}
|
|
2932
|
+
await this.recordReply(sessionKey, reply);
|
|
2933
|
+
} finally {
|
|
2934
|
+
this.replyTurnEnded(reply.conversationId);
|
|
2935
|
+
}
|
|
2795
2936
|
},
|
|
2796
|
-
(err) => {
|
|
2937
|
+
async (err) => {
|
|
2797
2938
|
this.turnsInFlight -= 1;
|
|
2798
2939
|
this.logger.warn({ sessionKey, runId: admission.runId, err: describe4(err) }, `${completeLine} \u2014 the wait failed`);
|
|
2940
|
+
if (reply) {
|
|
2941
|
+
this.logger.warn(
|
|
2942
|
+
{ sessionKey, conversationId: reply.conversationId, err: describe4(err), ...this.retry() },
|
|
2943
|
+
"turn did not complete \u2014 reply not recorded; the conversation stays unread and is gated again"
|
|
2944
|
+
);
|
|
2945
|
+
this.replyTurnEnded(reply.conversationId);
|
|
2946
|
+
}
|
|
2799
2947
|
}
|
|
2800
2948
|
);
|
|
2801
2949
|
}
|
|
2950
|
+
/** The reply turn for `conversationId` is over: its card may be gated again, and a tray that held skipped cards is read once more. */
|
|
2951
|
+
replyTurnEnded(conversationId) {
|
|
2952
|
+
this.replyTurnsInFlight.delete(conversationId);
|
|
2953
|
+
if (this.skippedWhileInFlight && !this.stopped) {
|
|
2954
|
+
this.skippedWhileInFlight = false;
|
|
2955
|
+
this.logger.debug({ conversationId }, "reply turn ended \u2014 re-reading the tray for the cards left out meanwhile");
|
|
2956
|
+
this.coalescer.wake();
|
|
2957
|
+
}
|
|
2958
|
+
}
|
|
2959
|
+
/** The `reply` verdict for a completed turn. A record the server refuses leaves the conversation unread; the ladder re-wakes. */
|
|
2960
|
+
async recordReply(sessionKey, reply) {
|
|
2961
|
+
try {
|
|
2962
|
+
await reply.record();
|
|
2963
|
+
this.logger.info({ sessionKey, conversationId: reply.conversationId }, "reply verdict recorded \u2014 turn completed");
|
|
2964
|
+
} catch (err) {
|
|
2965
|
+
this.logger.warn(
|
|
2966
|
+
{ sessionKey, conversationId: reply.conversationId, err: describe4(err), ...this.retry() },
|
|
2967
|
+
"reply verdict not recorded after the turn completed \u2014 the conversation stays unread; the next wake gates it again"
|
|
2968
|
+
);
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2802
2971
|
/**
|
|
2803
2972
|
* Every pending invite gets one attempt. An invite leaves the pending list
|
|
2804
2973
|
* only once its turn was admitted (and is then remembered in the ledger);
|
|
@@ -2807,6 +2976,15 @@ var AgentInvoker = class {
|
|
|
2807
2976
|
*/
|
|
2808
2977
|
async runInviteTurns() {
|
|
2809
2978
|
const batch = [...this.pendingInvites];
|
|
2979
|
+
if (batch.length > 0) {
|
|
2980
|
+
const readiness = this.readiness();
|
|
2981
|
+
if (!readiness.ready) {
|
|
2982
|
+
const changed = this.unreadyReason !== readiness.reason;
|
|
2983
|
+
this.unreadyReason = readiness.reason;
|
|
2984
|
+
this.logger[changed ? "warn" : "debug"]({ pending: batch.length, reason: readiness.reason, ...this.retry() }, "AgentChat tools not available to a turn \u2014 invite turns wait; re-waking later");
|
|
2985
|
+
return;
|
|
2986
|
+
}
|
|
2987
|
+
}
|
|
2810
2988
|
let texts = null;
|
|
2811
2989
|
let refused = 0;
|
|
2812
2990
|
let waitingForTexts = 0;
|
|
@@ -2938,11 +3116,12 @@ var agentchatGatewayAdapter = {
|
|
|
2938
3116
|
accountId: ctx.accountId,
|
|
2939
3117
|
onWriteError: (err) => ctx.log?.warn?.(`[agentchat:${ctx.accountId}] invite ledger could not be written: ${err instanceof Error ? err.message : String(err)}`)
|
|
2940
3118
|
});
|
|
3119
|
+
const metrics = createInMemoryMetrics();
|
|
2941
3120
|
await registerIntegration({
|
|
2942
3121
|
accountId: ctx.accountId,
|
|
2943
3122
|
config,
|
|
2944
3123
|
logger,
|
|
2945
|
-
socketOptions: { client },
|
|
3124
|
+
socketOptions: { client, metrics },
|
|
2946
3125
|
build: (socket) => {
|
|
2947
3126
|
const invoker = new AgentInvoker({
|
|
2948
3127
|
accountId: ctx.accountId,
|
|
@@ -2950,9 +3129,18 @@ var agentchatGatewayAdapter = {
|
|
|
2950
3129
|
client,
|
|
2951
3130
|
callModel: createRuntimeModelCall({ agentIdOverride, ...gateTimeoutMs !== void 0 ? { timeoutMs: gateTimeoutMs } : {} }),
|
|
2952
3131
|
startTurn: createRuntimeTurnStarter(),
|
|
3132
|
+
// Gating waits until a turn can have the hosted tools (the MCP
|
|
3133
|
+
// entry in the LIVE config — OpenClaw hot-applies `mcp.*` — and
|
|
3134
|
+
// its key in this process): a connect wake on a cold gateway
|
|
3135
|
+
// otherwise spends a gate call and runs a turn that cannot look.
|
|
3136
|
+
readiness: () => {
|
|
3137
|
+
const live = readLiveConfig(ctx.cfg);
|
|
3138
|
+
return turnReadiness({ cfg: live.cfg, apiBase: config.apiBase, apiKey: config.apiKey, live: live.live });
|
|
3139
|
+
},
|
|
2953
3140
|
texts,
|
|
2954
3141
|
invites,
|
|
2955
3142
|
logger,
|
|
3143
|
+
metrics,
|
|
2956
3144
|
gateEnabled: readEnv_js.readReplyGateEnabledFromEnv()
|
|
2957
3145
|
});
|
|
2958
3146
|
let blocked = false;
|
|
@@ -3044,6 +3232,10 @@ async function catchUpInvites(accountId, client, invoker, logger) {
|
|
|
3044
3232
|
}
|
|
3045
3233
|
var PROBE_MIN_MS = 1e3;
|
|
3046
3234
|
var PROBE_MAX_MS = 1e4;
|
|
3235
|
+
function formatCounts(counts) {
|
|
3236
|
+
const parts = Object.entries(counts).map(([label, n]) => `${label} ${n}`);
|
|
3237
|
+
return parts.length > 0 ? parts.join(", ") : "none";
|
|
3238
|
+
}
|
|
3047
3239
|
var agentchatStatusAdapter = {
|
|
3048
3240
|
async probeAccount({ account, timeoutMs, cfg }) {
|
|
3049
3241
|
if (!account.config) {
|
|
@@ -3081,11 +3273,13 @@ var agentchatStatusAdapter = {
|
|
|
3081
3273
|
const health = live?.socket.getHealth();
|
|
3082
3274
|
const counters = live?.invoker?.counters();
|
|
3083
3275
|
const textsSource = live ? live.texts?.source ?? "missing" : void 0;
|
|
3276
|
+
const socketCounters = live?.metrics?.snapshot?.();
|
|
3084
3277
|
const integration = {
|
|
3085
3278
|
mode: readEnv_js.readWakeModeFromEnv().mode,
|
|
3086
3279
|
...health ? { state: health.state } : {},
|
|
3087
3280
|
...counters ? { wakes: counters.wakes, cycles: counters.cycles, turns: counters.turns } : {},
|
|
3088
|
-
...textsSource ? { texts: textsSource } : {}
|
|
3281
|
+
...textsSource ? { texts: textsSource } : {},
|
|
3282
|
+
...socketCounters ? { socket: socketCounters } : {}
|
|
3089
3283
|
};
|
|
3090
3284
|
const refusal = multiAccountRefusal(cfg);
|
|
3091
3285
|
return {
|
|
@@ -3127,6 +3321,12 @@ var agentchatStatusAdapter = {
|
|
|
3127
3321
|
text: `integration ${d.state} \u2014 wakes ${d.wakes ?? 0}, cycles ${d.cycles ?? 0}, turns ${d.turns ?? 0}`,
|
|
3128
3322
|
tone: d.state === "ready" ? "success" : "warn"
|
|
3129
3323
|
});
|
|
3324
|
+
if (d.socket) {
|
|
3325
|
+
lines.push({
|
|
3326
|
+
text: `socket \u2014 wakes: ${formatCounts(d.socket.wakes)} \xB7 closes: ${formatCounts(d.socket.disconnects)} \xB7 notices: ${formatCounts(d.socket.errors)}`,
|
|
3327
|
+
tone: "muted"
|
|
3328
|
+
});
|
|
3329
|
+
}
|
|
3130
3330
|
if (d.texts === "missing") {
|
|
3131
3331
|
lines.push({ text: "served texts not available yet (AgentChat unreachable, nothing cached) \u2014 turns wait for the first copy", tone: "error" });
|
|
3132
3332
|
} else if (d.texts === "cache") {
|
|
@@ -3581,6 +3781,9 @@ exports.agentchatPlugin = agentchatPlugin;
|
|
|
3581
3781
|
exports.agentchatSetupEntry = agentchatSetupEntry;
|
|
3582
3782
|
exports.agentchatSetupPlugin = agentchatPlugin;
|
|
3583
3783
|
exports.assertApiKeyValid = assertApiKeyValid;
|
|
3784
|
+
exports.createInMemoryMetrics = createInMemoryMetrics;
|
|
3785
|
+
exports.createMetrics = createMetrics;
|
|
3786
|
+
exports.createNoopMetrics = createNoopMetrics;
|
|
3584
3787
|
exports.default = agentchatChannelEntry;
|
|
3585
3788
|
exports.groupInviteFromRecord = groupInviteFromRecord;
|
|
3586
3789
|
exports.hasAgentChatConfiguredState = hasAgentChatConfiguredState;
|