@poncho-ai/cli 0.33.3 → 0.33.4

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @poncho-ai/cli@0.33.3 build /home/runner/work/poncho-ai/poncho-ai/packages/cli
2
+ > @poncho-ai/cli@0.33.4 build /home/runner/work/poncho-ai/poncho-ai/packages/cli
3
3
  > tsup src/index.ts src/cli.ts --format esm --dts
4
4
 
5
5
  CLI Building entry: src/cli.ts, src/index.ts
@@ -7,12 +7,12 @@
7
7
  CLI tsup v8.5.1
8
8
  CLI Target: es2022
9
9
  ESM Build start
10
- ESM dist/index.js 917.00 B
11
10
  ESM dist/cli.js 94.00 B
12
- ESM dist/run-interactive-ink-XQM7OIZT.js 56.86 KB
13
- ESM dist/chunk-METMUDY6.js 528.87 KB
14
- ESM ⚡️ Build success in 65ms
11
+ ESM dist/index.js 917.00 B
12
+ ESM dist/run-interactive-ink-JO343QM2.js 56.86 KB
13
+ ESM dist/chunk-QVCJIXPQ.js 529.65 KB
14
+ ESM ⚡️ Build success in 75ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 4296ms
16
+ DTS ⚡️ Build success in 4620ms
17
17
  DTS dist/cli.d.ts 20.00 B
18
18
  DTS dist/index.d.ts 7.07 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @poncho-ai/cli
2
2
 
3
+ ## 0.33.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#73](https://github.com/cesr/poncho-ai/pull/73) [`f72f202`](https://github.com/cesr/poncho-ai/commit/f72f202d839dbbb8240336ec76eb6340aba20f06) Thanks [@cesr](https://github.com/cesr)! - Fix Telegram approval message ordering: send accumulated assistant text before approval buttons so the conversation reads naturally. Skip empty bridge replies when text was already sent at checkpoint.
8
+
9
+ - Updated dependencies [[`f72f202`](https://github.com/cesr/poncho-ai/commit/f72f202d839dbbb8240336ec76eb6340aba20f06)]:
10
+ - @poncho-ai/messaging@0.7.10
11
+
3
12
  ## 0.33.3
4
13
 
5
14
  ### Patch Changes
@@ -10178,6 +10178,7 @@ ${resultBody}`,
10178
10178
  let latestRunId = "";
10179
10179
  const draft = createTurnDraftState();
10180
10180
  let checkpointedRun = false;
10181
+ let checkpointTextAlreadySent = false;
10181
10182
  let runContextTokens = 0;
10182
10183
  let runContextWindow = 0;
10183
10184
  let runContinuation2 = false;
@@ -10268,6 +10269,19 @@ ${resultBody}`,
10268
10269
  if (conv?.channelMeta?.platform === "telegram") {
10269
10270
  const tgAdapter = messagingAdapters.get("telegram");
10270
10271
  if (tgAdapter) {
10272
+ const threadRef = {
10273
+ channelId: conv.channelMeta.channelId,
10274
+ platformThreadId: conv.channelMeta.platformThreadId
10275
+ };
10276
+ const pendingText = draft.assistantResponse.trim();
10277
+ if (pendingText) {
10278
+ try {
10279
+ await tgAdapter.sendReply(threadRef, pendingText);
10280
+ checkpointTextAlreadySent = true;
10281
+ } catch (err) {
10282
+ console.error("[messaging-runner] failed to send pre-approval text:", err instanceof Error ? err.message : err);
10283
+ }
10284
+ }
10271
10285
  const approvals = event.approvals.map((a) => ({
10272
10286
  approvalId: a.approvalId,
10273
10287
  tool: a.tool,
@@ -10351,8 +10365,8 @@ ${resultBody}`,
10351
10365
  runOwners.delete(latestRunId);
10352
10366
  runConversations.delete(latestRunId);
10353
10367
  }
10354
- console.log("[messaging-runner] run complete, response length:", draft.assistantResponse.length, runContinuation2 ? "(continuation)" : "");
10355
- const response = draft.assistantResponse;
10368
+ const response = checkpointTextAlreadySent ? "" : draft.assistantResponse;
10369
+ console.log("[messaging-runner] run complete, response length:", response.length, checkpointTextAlreadySent ? "(text sent at checkpoint)" : "", runContinuation2 ? "(continuation)" : "");
10356
10370
  return {
10357
10371
  response,
10358
10372
  continuation: runContinuation2,
@@ -13075,7 +13089,7 @@ var runInteractive = async (workingDir, params) => {
13075
13089
  await harness.initialize();
13076
13090
  const identity = await ensureAgentIdentity2(workingDir);
13077
13091
  try {
13078
- const { runInteractiveInk } = await import("./run-interactive-ink-XQM7OIZT.js");
13092
+ const { runInteractiveInk } = await import("./run-interactive-ink-JO343QM2.js");
13079
13093
  await runInteractiveInk({
13080
13094
  harness,
13081
13095
  params,
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  main
4
- } from "./chunk-METMUDY6.js";
4
+ } from "./chunk-QVCJIXPQ.js";
5
5
 
6
6
  // src/cli.ts
7
7
  void main();
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  runTests,
25
25
  startDevServer,
26
26
  updateAgentGuidance
27
- } from "./chunk-METMUDY6.js";
27
+ } from "./chunk-QVCJIXPQ.js";
28
28
  export {
29
29
  __internalRunOrchestration,
30
30
  addSkill,
@@ -2,7 +2,7 @@ import {
2
2
  consumeFirstRunIntro,
3
3
  inferConversationTitle,
4
4
  resolveHarnessEnvironment
5
- } from "./chunk-METMUDY6.js";
5
+ } from "./chunk-QVCJIXPQ.js";
6
6
 
7
7
  // src/run-interactive-ink.ts
8
8
  import * as readline from "readline";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poncho-ai/cli",
3
- "version": "0.33.3",
3
+ "version": "0.33.4",
4
4
  "description": "CLI for building and deploying AI agents",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,8 +27,8 @@
27
27
  "react": "^19.2.4",
28
28
  "react-devtools-core": "^6.1.5",
29
29
  "yaml": "^2.8.1",
30
+ "@poncho-ai/messaging": "0.7.10",
30
31
  "@poncho-ai/harness": "0.32.1",
31
- "@poncho-ai/messaging": "0.7.9",
32
32
  "@poncho-ai/sdk": "1.7.1"
33
33
  },
34
34
  "devDependencies": {
package/src/index.ts CHANGED
@@ -3385,6 +3385,7 @@ export const createRequestHandler = async (options?: {
3385
3385
  let latestRunId = "";
3386
3386
  const draft = createTurnDraftState();
3387
3387
  let checkpointedRun = false;
3388
+ let checkpointTextAlreadySent = false;
3388
3389
  let runContextTokens = 0;
3389
3390
  let runContextWindow = 0;
3390
3391
  let runContinuation = false;
@@ -3479,11 +3480,27 @@ export const createRequestHandler = async (options?: {
3479
3480
  });
3480
3481
  checkpointedRun = true;
3481
3482
 
3482
- // Send inline keyboard approval buttons to Telegram
3483
3483
  const conv = await conversationStore.get(conversationId);
3484
3484
  if (conv?.channelMeta?.platform === "telegram") {
3485
3485
  const tgAdapter = messagingAdapters.get("telegram") as TelegramAdapter | undefined;
3486
3486
  if (tgAdapter) {
3487
+ const threadRef: import("@poncho-ai/messaging").ThreadRef = {
3488
+ channelId: conv.channelMeta.channelId,
3489
+ platformThreadId: conv.channelMeta.platformThreadId,
3490
+ };
3491
+
3492
+ // Send accumulated text BEFORE approval buttons so Telegram
3493
+ // shows them in the natural order (text → approval request).
3494
+ const pendingText = draft.assistantResponse.trim();
3495
+ if (pendingText) {
3496
+ try {
3497
+ await tgAdapter.sendReply(threadRef, pendingText);
3498
+ checkpointTextAlreadySent = true;
3499
+ } catch (err: unknown) {
3500
+ console.error("[messaging-runner] failed to send pre-approval text:", err instanceof Error ? err.message : err);
3501
+ }
3502
+ }
3503
+
3487
3504
  const approvals = event.approvals.map(a => ({
3488
3505
  approvalId: a.approvalId,
3489
3506
  tool: a.tool,
@@ -3571,8 +3588,8 @@ export const createRequestHandler = async (options?: {
3571
3588
  runConversations.delete(latestRunId);
3572
3589
  }
3573
3590
 
3574
- console.log("[messaging-runner] run complete, response length:", draft.assistantResponse.length, runContinuation ? "(continuation)" : "");
3575
- const response = draft.assistantResponse;
3591
+ const response = checkpointTextAlreadySent ? "" : draft.assistantResponse;
3592
+ console.log("[messaging-runner] run complete, response length:", response.length, checkpointTextAlreadySent ? "(text sent at checkpoint)" : "", runContinuation ? "(continuation)" : "");
3576
3593
 
3577
3594
  return {
3578
3595
  response,