@poncho-ai/cli 0.32.7 → 0.32.8

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.32.7 build /home/runner/work/poncho-ai/poncho-ai/packages/cli
2
+ > @poncho-ai/cli@0.32.8 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-LAL4PQVD.js 56.86 KB
13
- ESM dist/chunk-OJGEUTDF.js 535.48 KB
14
- ESM ⚡️ Build success in 68ms
11
+ ESM dist/index.js 917.00 B
12
+ ESM dist/run-interactive-ink-JOLJ5W33.js 56.86 KB
13
+ ESM dist/chunk-VHS3K24F.js 536.15 KB
14
+ ESM ⚡️ Build success in 77ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 4034ms
16
+ DTS ⚡️ Build success in 4356ms
17
17
  DTS dist/cli.d.ts 20.00 B
18
18
  DTS dist/index.d.ts 6.85 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @poncho-ai/cli
2
2
 
3
+ ## 0.32.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d623f80`](https://github.com/cesr/poncho-ai/commit/d623f8024c1336dc32301b7210ebc94fd94d4877) Thanks [@cesr](https://github.com/cesr)! - Fix raw JSON tool calls rendering in web UI for Telegram conversations; archive old conversation on /new instead of deleting.
8
+
3
9
  ## 0.32.7
4
10
 
5
11
  ### Patch Changes
@@ -7606,9 +7606,21 @@ var normalizeMessageForClient = (message) => {
7606
7606
  const text = typeof parsed.text === "string" ? parsed.text : void 0;
7607
7607
  const toolCalls = Array.isArray(parsed.tool_calls) ? parsed.tool_calls : void 0;
7608
7608
  if (typeof text === "string" && toolCalls) {
7609
+ const meta = { ...message.metadata ?? {} };
7610
+ if (!meta.sections && toolCalls.length > 0) {
7611
+ const toolLabels = toolCalls.map((tc) => {
7612
+ const name = typeof tc.name === "string" ? tc.name : "tool";
7613
+ return `\u2713 ${name}`;
7614
+ });
7615
+ const sections = [];
7616
+ if (toolLabels.length > 0) sections.push({ type: "tools", content: toolLabels });
7617
+ if (text) sections.push({ type: "text", content: text });
7618
+ meta.sections = sections;
7619
+ }
7609
7620
  return {
7610
7621
  ...message,
7611
- content: text
7622
+ content: text,
7623
+ metadata: meta
7612
7624
  };
7613
7625
  }
7614
7626
  } catch {
@@ -10286,15 +10298,14 @@ ${resultBody}`,
10286
10298
  async resetConversation(conversationId) {
10287
10299
  const existing = await conversationStore.get(conversationId);
10288
10300
  if (!existing) return;
10289
- existing.messages = [];
10290
- existing._harnessMessages = void 0;
10291
- existing._continuationMessages = void 0;
10292
- existing._toolResultArchive = void 0;
10293
- existing.pendingApprovals = void 0;
10294
- existing.runStatus = void 0;
10295
- existing.updatedAt = Date.now();
10296
- await conversationStore.update(existing);
10297
- console.log(`[messaging-runner] conversation reset: ${conversationId}`);
10301
+ const archiveId = `${conversationId}_${Date.now()}`;
10302
+ const archived = { ...existing, conversationId: archiveId };
10303
+ const datePart = (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", { month: "short", day: "numeric" });
10304
+ if (archived.title) archived.title = `${archived.title} (${datePart})`;
10305
+ archived.updatedAt = Date.now();
10306
+ await conversationStore.update(archived);
10307
+ await conversationStore.delete(conversationId);
10308
+ console.log(`[messaging-runner] conversation archived: ${conversationId} \u2192 ${archiveId}`);
10298
10309
  }
10299
10310
  };
10300
10311
  let waitUntilHook;
@@ -13206,7 +13217,7 @@ var runInteractive = async (workingDir, params) => {
13206
13217
  await harness.initialize();
13207
13218
  const identity = await ensureAgentIdentity2(workingDir);
13208
13219
  try {
13209
- const { runInteractiveInk } = await import("./run-interactive-ink-LAL4PQVD.js");
13220
+ const { runInteractiveInk } = await import("./run-interactive-ink-JOLJ5W33.js");
13210
13221
  await runInteractiveInk({
13211
13222
  harness,
13212
13223
  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-OJGEUTDF.js";
4
+ } from "./chunk-VHS3K24F.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-OJGEUTDF.js";
27
+ } from "./chunk-VHS3K24F.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-OJGEUTDF.js";
5
+ } from "./chunk-VHS3K24F.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.32.7",
3
+ "version": "0.32.8",
4
4
  "description": "CLI for building and deploying AI agents",
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -312,9 +312,21 @@ const normalizeMessageForClient = (message: Message): Message => {
312
312
  const text = typeof parsed.text === "string" ? parsed.text : undefined;
313
313
  const toolCalls = Array.isArray(parsed.tool_calls) ? parsed.tool_calls : undefined;
314
314
  if (typeof text === "string" && toolCalls) {
315
+ const meta = { ...(message.metadata ?? {}) } as Record<string, unknown>;
316
+ if (!meta.sections && toolCalls.length > 0) {
317
+ const toolLabels = toolCalls.map((tc: Record<string, unknown>) => {
318
+ const name = typeof tc.name === "string" ? tc.name : "tool";
319
+ return `✓ ${name}`;
320
+ });
321
+ const sections: { type: string; content: string | string[] }[] = [];
322
+ if (toolLabels.length > 0) sections.push({ type: "tools", content: toolLabels });
323
+ if (text) sections.push({ type: "text", content: text });
324
+ meta.sections = sections;
325
+ }
315
326
  return {
316
327
  ...message,
317
328
  content: text,
329
+ metadata: meta as Message["metadata"],
318
330
  };
319
331
  }
320
332
  } catch {
@@ -3430,15 +3442,16 @@ export const createRequestHandler = async (options?: {
3430
3442
  async resetConversation(conversationId) {
3431
3443
  const existing = await conversationStore.get(conversationId);
3432
3444
  if (!existing) return;
3433
- existing.messages = [];
3434
- existing._harnessMessages = undefined;
3435
- existing._continuationMessages = undefined;
3436
- existing._toolResultArchive = undefined;
3437
- existing.pendingApprovals = undefined;
3438
- existing.runStatus = undefined;
3439
- existing.updatedAt = Date.now();
3440
- await conversationStore.update(existing);
3441
- console.log(`[messaging-runner] conversation reset: ${conversationId}`);
3445
+ // Archive the old conversation under a unique ID so it stays
3446
+ // viewable in the web UI. The original ID is freed for a fresh one.
3447
+ const archiveId = `${conversationId}_${Date.now()}`;
3448
+ const archived = { ...existing, conversationId: archiveId };
3449
+ const datePart = new Date().toLocaleDateString("en-US", { month: "short", day: "numeric" });
3450
+ if (archived.title) archived.title = `${archived.title} (${datePart})`;
3451
+ archived.updatedAt = Date.now();
3452
+ await conversationStore.update(archived);
3453
+ await conversationStore.delete(conversationId);
3454
+ console.log(`[messaging-runner] conversation archived: ${conversationId} → ${archiveId}`);
3442
3455
  },
3443
3456
  };
3444
3457