lunel-cli 0.1.55 → 0.1.57

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.
@@ -48,6 +48,7 @@ export declare class CodexProvider implements AIProvider {
48
48
  private handleLine;
49
49
  private handleServerRequest;
50
50
  private handleNotification;
51
+ private isCommandApprovalMethod;
51
52
  private emitMirroredUserMessage;
52
53
  private handleItemStarted;
53
54
  private handleStructuredItemCompleted;
package/dist/ai/codex.js CHANGED
@@ -197,7 +197,11 @@ export class CodexProvider {
197
197
  : response === "always"
198
198
  ? "acceptForSession"
199
199
  : "accept";
200
- this.send({ jsonrpc: "2.0", id: pending.requestId, result: decision });
200
+ const isCommandApproval = this.isCommandApprovalMethod(pending.method);
201
+ const result = isCommandApproval
202
+ ? { decision }
203
+ : decision;
204
+ this.send({ jsonrpc: "2.0", id: pending.requestId, result });
201
205
  this.pendingPermissionRequestIds.delete(permissionId);
202
206
  this.emitter?.({
203
207
  type: "permission.replied",
@@ -276,6 +280,7 @@ export class CodexProvider {
276
280
  this.pendingPermissionRequestIds.set(permissionId, {
277
281
  sessionId: session?.id ?? "",
278
282
  requestId,
283
+ method,
279
284
  messageId,
280
285
  callId,
281
286
  });
@@ -424,6 +429,10 @@ export class CodexProvider {
424
429
  return;
425
430
  }
426
431
  }
432
+ isCommandApprovalMethod(method) {
433
+ return method === "item/commandExecution/requestApproval"
434
+ || method === "item/command_execution/request_approval";
435
+ }
427
436
  emitMirroredUserMessage(session, params) {
428
437
  if (!session)
429
438
  return;
@@ -1107,7 +1116,7 @@ export class CodexProvider {
1107
1116
  if (!payload || typeof payload !== "object")
1108
1117
  return undefined;
1109
1118
  const obj = payload;
1110
- const direct = this.readString(obj.threadId) ?? this.readString(obj.thread_id);
1119
+ const direct = this.readString(obj.threadId) ?? this.readString(obj.thread_id) ?? this.readString(obj.id);
1111
1120
  if (direct)
1112
1121
  return direct;
1113
1122
  const thread = this.asRecord(obj.thread);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lunel-cli",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "author": [
5
5
  {
6
6
  "name": "Soham Bharambe",