create-loopengine 0.1.71 → 0.1.72

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-loopengine",
3
- "version": "0.1.71",
3
+ "version": "0.1.72",
4
4
  "description": "Scaffold a new loopengine agent project — a runnable HTTP server with one example agent, in your own repo.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -135,6 +135,7 @@ import {
135
135
  type DecisionOutcome,
136
136
  type MessagingDeps,
137
137
  handleMessagingAction,
138
+ settleThreadChoice,
138
139
  describeChange,
139
140
  openSlackAnswerModal,
140
141
  parseSlackInteraction,
@@ -2803,6 +2804,12 @@ async function handleSlackInteraction(req: IncomingMessage, res: ServerResponse,
2803
2804
  if (interaction.type === 'decide') await resolvePendingApproval(capture.res, interaction.pendingId, { decision: interaction.decision })
2804
2805
  else await answerPendingQuestion(capture.res, interaction.pendingId, { answer: interaction.answer })
2805
2806
  const outcome = await capture.done
2807
+ // A proposed change or a Confirm still waiting in the thread no longer
2808
+ // applies: replace it so its buttons don't linger.
2809
+ if (botToken && outcome.status < 400 && !outcome.body.alreadyResolved) {
2810
+ const done = interaction.type === 'decide' ? (interaction.decision === 'approve' ? 'Approved' : 'Denied') : 'Answered'
2811
+ await settleThreadChoice(slackMessagingDeps(agentName, entry, botToken), interaction.pendingId, `${done}${interaction.user ? ` by <@${interaction.user}>` : ''} with the request's own buttons.`).catch((err) => console.error('[loopengine] Slack update failed:', err))
2812
+ }
2806
2813
  if (interaction.responseUrl) {
2807
2814
  let text = slackOutcomeText(interaction.type === 'decide' ? interaction.decision : 'answer', outcome.status, outcome.body, interaction.user)
2808
2815
  if (ran && outcome.status < 400 && !outcome.body.alreadyResolved) text += ran
@@ -9,7 +9,7 @@
9
9
  "cli": "tsx adapters/cli.ts"
10
10
  },
11
11
  "dependencies": {
12
- "loopengine": "^0.1.88",
12
+ "loopengine": "^0.1.89",
13
13
  "actauth": "^0.0.12",
14
14
  "tsx": "^4.19.0",
15
15
  "typescript": "^5.7.0"