@poncho-ai/cli 0.33.2 → 0.33.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @poncho-ai/cli@0.33.2 build /home/runner/work/poncho-ai/poncho-ai/packages/cli
2
+ > @poncho-ai/cli@0.33.3 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/cli.js 94.00 B
11
10
  ESM dist/index.js 917.00 B
12
- ESM dist/run-interactive-ink-VS35YSBB.js 56.86 KB
13
- ESM dist/chunk-QAUWCAWU.js 528.49 KB
14
- ESM ⚡️ Build success in 67ms
11
+ 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
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 4144ms
16
+ DTS ⚡️ Build success in 4296ms
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.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#71](https://github.com/cesr/poncho-ai/pull/71) [`3e5bf7e`](https://github.com/cesr/poncho-ai/commit/3e5bf7e527e394c5f823beac90712756e57cd491) Thanks [@cesr](https://github.com/cesr)! - Fix Telegram tool approval handler never persisting the approval decision, preventing the resume-from-checkpoint flow from triggering. Make answerCallbackQuery best-effort so transient fetch failures don't block approval processing.
8
+
9
+ - Updated dependencies [[`3e5bf7e`](https://github.com/cesr/poncho-ai/commit/3e5bf7e527e394c5f823beac90712756e57cd491)]:
10
+ - @poncho-ai/messaging@0.7.9
11
+
3
12
  ## 0.33.2
4
13
 
5
14
  ### Patch Changes
@@ -10905,26 +10905,30 @@ ${resultBody}`,
10905
10905
  }
10906
10906
  const found = await findPendingApproval(approvalId, "local-owner");
10907
10907
  let foundConversation = found?.conversation;
10908
- let foundApproval = found?.approval;
10908
+ const foundApproval = found?.approval;
10909
10909
  if (!foundConversation || !foundApproval) {
10910
10910
  console.warn("[telegram-approval] approval not found:", approvalId);
10911
10911
  return;
10912
10912
  }
10913
- foundApproval = normalizeApprovalCheckpoint(foundApproval, foundConversation.messages);
10914
- await adapter.updateApprovalMessage(approvalId, approved ? "approved" : "denied", foundApproval.tool);
10915
- foundApproval.decision = approved ? "approved" : "denied";
10913
+ const approvalDecision = approved ? "approved" : "denied";
10914
+ await adapter.updateApprovalMessage(approvalId, approvalDecision, foundApproval.tool);
10915
+ foundConversation.pendingApprovals = (foundConversation.pendingApprovals ?? []).map(
10916
+ (approval) => approval.approvalId === approvalId ? { ...normalizeApprovalCheckpoint(approval, foundConversation.messages), decision: approvalDecision } : normalizeApprovalCheckpoint(approval, foundConversation.messages)
10917
+ );
10918
+ await conversationStore.update(foundConversation);
10916
10919
  broadcastEvent(
10917
10920
  foundConversation.conversationId,
10918
10921
  approved ? { type: "tool:approval:granted", approvalId } : { type: "tool:approval:denied", approvalId }
10919
10922
  );
10920
- const allApprovals = (foundConversation.pendingApprovals ?? []).map(
10921
- (approval) => normalizeApprovalCheckpoint(approval, foundConversation.messages)
10923
+ const refreshedConversation = await conversationStore.get(foundConversation.conversationId);
10924
+ const allApprovals = (refreshedConversation?.pendingApprovals ?? []).map(
10925
+ (approval) => normalizeApprovalCheckpoint(approval, refreshedConversation.messages)
10922
10926
  );
10923
10927
  const allDecided = allApprovals.length > 0 && allApprovals.every((a) => a.decision != null);
10924
10928
  if (!allDecided) {
10925
- await conversationStore.update(foundConversation);
10926
10929
  return;
10927
10930
  }
10931
+ foundConversation = refreshedConversation;
10928
10932
  const conversationId = foundConversation.conversationId;
10929
10933
  const checkpointRef = allApprovals[0];
10930
10934
  foundConversation.pendingApprovals = [];
@@ -13071,7 +13075,7 @@ var runInteractive = async (workingDir, params) => {
13071
13075
  await harness.initialize();
13072
13076
  const identity = await ensureAgentIdentity2(workingDir);
13073
13077
  try {
13074
- const { runInteractiveInk } = await import("./run-interactive-ink-VS35YSBB.js");
13078
+ const { runInteractiveInk } = await import("./run-interactive-ink-XQM7OIZT.js");
13075
13079
  await runInteractiveInk({
13076
13080
  harness,
13077
13081
  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-QAUWCAWU.js";
4
+ } from "./chunk-METMUDY6.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-QAUWCAWU.js";
27
+ } from "./chunk-METMUDY6.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-QAUWCAWU.js";
5
+ } from "./chunk-METMUDY6.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.2",
3
+ "version": "0.33.3",
4
4
  "description": "CLI for building and deploying AI agents",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "react-devtools-core": "^6.1.5",
29
29
  "yaml": "^2.8.1",
30
30
  "@poncho-ai/harness": "0.32.1",
31
- "@poncho-ai/messaging": "0.7.8",
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
@@ -4188,17 +4188,22 @@ export const createRequestHandler = async (options?: {
4188
4188
  // Regular (non-subagent) approval
4189
4189
  const found = await findPendingApproval(approvalId, "local-owner");
4190
4190
  let foundConversation = found?.conversation;
4191
- let foundApproval = found?.approval;
4191
+ const foundApproval = found?.approval;
4192
4192
 
4193
4193
  if (!foundConversation || !foundApproval) {
4194
4194
  console.warn("[telegram-approval] approval not found:", approvalId);
4195
4195
  return;
4196
4196
  }
4197
- foundApproval = normalizeApprovalCheckpoint(foundApproval, foundConversation.messages);
4198
4197
 
4199
- await adapter.updateApprovalMessage(approvalId, approved ? "approved" : "denied", foundApproval.tool);
4198
+ const approvalDecision = approved ? "approved" as const : "denied" as const;
4199
+ await adapter.updateApprovalMessage(approvalId, approvalDecision, foundApproval.tool);
4200
4200
 
4201
- foundApproval.decision = approved ? "approved" : "denied";
4201
+ foundConversation.pendingApprovals = (foundConversation.pendingApprovals ?? []).map((approval) =>
4202
+ approval.approvalId === approvalId
4203
+ ? { ...normalizeApprovalCheckpoint(approval, foundConversation!.messages), decision: approvalDecision }
4204
+ : normalizeApprovalCheckpoint(approval, foundConversation!.messages),
4205
+ );
4206
+ await conversationStore.update(foundConversation);
4202
4207
 
4203
4208
  broadcastEvent(foundConversation.conversationId,
4204
4209
  approved
@@ -4206,15 +4211,16 @@ export const createRequestHandler = async (options?: {
4206
4211
  : { type: "tool:approval:denied", approvalId },
4207
4212
  );
4208
4213
 
4209
- const allApprovals = (foundConversation.pendingApprovals ?? []).map((approval) =>
4210
- normalizeApprovalCheckpoint(approval, foundConversation!.messages),
4214
+ const refreshedConversation = await conversationStore.get(foundConversation.conversationId);
4215
+ const allApprovals = (refreshedConversation?.pendingApprovals ?? []).map((approval) =>
4216
+ normalizeApprovalCheckpoint(approval, refreshedConversation!.messages),
4211
4217
  );
4212
4218
  const allDecided = allApprovals.length > 0 && allApprovals.every(a => a.decision != null);
4213
4219
 
4214
4220
  if (!allDecided) {
4215
- await conversationStore.update(foundConversation);
4216
4221
  return;
4217
4222
  }
4223
+ foundConversation = refreshedConversation!;
4218
4224
 
4219
4225
  // All decided — resume the run
4220
4226
  const conversationId = foundConversation.conversationId;