opencode-gitlab-duo-agentic 0.1.17 → 0.1.18

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -553,7 +553,7 @@ var WorkflowSession = class {
553
553
  #projectPath;
554
554
  #rootNamespaceId;
555
555
  #checkpoint = createCheckpointState();
556
- #running = false;
556
+ #pending = Promise.resolve();
557
557
  constructor(client, modelId) {
558
558
  this.#client = client;
559
559
  this.#tokenService = new WorkflowTokenService(client);
@@ -568,10 +568,11 @@ var WorkflowSession = class {
568
568
  this.#tokenService.clear();
569
569
  }
570
570
  async *runTurn(goal, abortSignal) {
571
- if (this.#running) {
572
- throw new Error("workflow session is already running");
573
- }
574
- this.#running = true;
571
+ await this.#pending;
572
+ let resolve;
573
+ this.#pending = new Promise((r) => {
574
+ resolve = r;
575
+ });
575
576
  const queue = new AsyncQueue();
576
577
  const socket = new WorkflowWebSocketClient({
577
578
  action: (action) => queue.push({ type: "action", action }),
@@ -646,9 +647,9 @@ var WorkflowSession = class {
646
647
  });
647
648
  }
648
649
  } finally {
649
- this.#running = false;
650
650
  abortSignal?.removeEventListener("abort", onAbort);
651
651
  socket.close();
652
+ resolve();
652
653
  }
653
654
  }
654
655
  async #createWorkflow(goal) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-gitlab-duo-agentic",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "OpenCode plugin and provider for GitLab Duo Agentic workflows",
5
5
  "license": "MIT",
6
6
  "type": "module",