@inetafrica/open-claudia 2.14.2 → 2.14.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v2.14.3
4
+ - **`/channel add kazee` owner-confirm no longer depends on the inline button round-tripping.** After the wizard captures a candidate owner message it asks *"Is this you — the owner?"* with Yes/No/Skip buttons on the operator's channel — but if that button callback never reaches the bot (e.g. a channel that drops `message:action` server-side), the operator was stuck: the confirm step (`core/channel-wizard.js` `handleText`) only understood "skip" or a pasted 24-hex id, so typing "yes" did nothing. It now accepts **typed "yes"/"no"** (plus y/n/yep/yeah/nope) as a first-class answer — "yes" finalizes the captured candidate as owner, "no" clears it and keeps listening — and any other text nudges with the three options. The confirm prompt now reads *"Tap a button below, or just reply "yes" / "no"."*
5
+ - **Agent-space / OpenClaw:** no new deps, no new env, no schema change; Docker image builds identically. Purely a robustness fix to the Kazee onboarding wizard's owner-confirm step — inert for deployments that never run `/channel add kazee`.
6
+
3
7
  ## v2.14.2
4
8
  - **Token validation now hits the right service — the previous probe could never succeed.** v2.14.0/.1 validated a Kazee bot token by `GET {host}/api/me`, but chat-central has **no `/me` route** (confirmed against `src/config/routes.ts`) — every attempt 404'd. chat-central doesn't resolve identity itself; it delegates on every request to `@libraries/inet-central-auth`, which POSTs the opaque `kzb_…` token to **Central's `POST /api/principal/verify`**. `core/kazee-probe.js` now calls that endpoint: one request both **validates the token and returns the bot's own user id** (`principal.id`, with `principal.kind === "Bot"` enforced) plus its display name. Verified live end-to-end (real token → `ok` + botUserId + "Maya Bot"; bad token → clean 401).
5
9
  - **Central is hard-coded too (env-overridable).** New `CENTRAL_DEFAULT_URL = "https://central.inet.africa"` mirrors chat-central's own default; override with `CENTRAL_BASE_URL` for non-prod. The wizard now says "Verifying the bot token…" and greets the bot by name ("Connected as Maya Bot ✅"); `setup.js` prints "Verified as <name>."
@@ -122,8 +122,9 @@ async function handleText(envelope) {
122
122
  return;
123
123
  }
124
124
 
125
- // Text fallback for step 3 — the operator can still type a user id or
126
- // "skip" on their own channel instead of sending a Kazee message.
125
+ // Text fallback for step 3 — the operator can type "yes"/"no" to answer the
126
+ // owner-confirm prompt, or a user id / "skip", on their own channel instead of
127
+ // relying on the inline buttons (which may not round-trip on every channel).
127
128
  if (session.step === "awaiting-owner-message" || session.step === "confirming-owner") {
128
129
  if (text.toLowerCase() === "skip") {
129
130
  await finalizeOwner(envelope.canonicalUserId, session, "");
@@ -133,6 +134,30 @@ async function handleText(envelope) {
133
134
  await finalizeOwner(envelope.canonicalUserId, session, text);
134
135
  return;
135
136
  }
137
+ if (session.step === "confirming-owner") {
138
+ const t = text.toLowerCase();
139
+ if (t === "yes" || t === "y" || t === "yep" || t === "yeah") {
140
+ const cand = session.data.candidate;
141
+ if (cand?.userId) {
142
+ await finalizeOwner(envelope.canonicalUserId, session, cand.userId);
143
+ } else {
144
+ session.step = "awaiting-owner-message";
145
+ await send("Lost that candidate — send another message from Kazee.", { keyboard: cancelKeyboard });
146
+ }
147
+ return;
148
+ }
149
+ if (t === "no" || t === "n" || t === "nope") {
150
+ session.data.candidate = null;
151
+ session.step = "awaiting-owner-message";
152
+ await send("OK — still listening. Send a message from the owner's Kazee account.", { keyboard: cancelKeyboard });
153
+ return;
154
+ }
155
+ await send(
156
+ `Reply "yes" to confirm ${session.data.candidate?.name || "that account"} as the owner, "no" to keep listening, or "skip".`,
157
+ { keyboard: cancelKeyboard },
158
+ );
159
+ return;
160
+ }
136
161
  if (session.step === "awaiting-owner-message") {
137
162
  await send(
138
163
  "Still listening. Send a message from your Kazee account, paste a user id, or send \"skip\".",
@@ -162,7 +187,7 @@ async function tryCaptureOwner(envelope) {
162
187
  const who = name ? `${name} (${userId})` : userId;
163
188
  await sayToOrigin(
164
189
  session,
165
- `Got a Kazee message from ${who}.\n\nIs this you — the owner?`,
190
+ `Got a Kazee message from ${who}.\n\nIs this you — the owner? Tap a button below, or just reply "yes" / "no".`,
166
191
  { keyboard: { inline_keyboard: [
167
192
  [{ text: "Yes, that's me", callback_data: "chw:owner-yes" }],
168
193
  [{ text: "No, keep listening", callback_data: "chw:owner-no" }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inetafrica/open-claudia",
3
- "version": "2.14.2",
3
+ "version": "2.14.3",
4
4
  "description": "Your always-on AI coding assistant — Claude Code, Cursor Agent, and OpenAI Codex via Telegram or Kazee Chat",
5
5
  "main": "bot.js",
6
6
  "bin": {