@oxgeneral/orch 1.0.19 → 1.0.20

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/dist/index.d.ts CHANGED
@@ -303,8 +303,8 @@ declare function classifyAdapterError(error: string, exitCode?: number): Adapter
303
303
  * Goals have lower priority than tasks — agents work on goals only
304
304
  * when no regular tasks are available.
305
305
  *
306
- * State machine: active → achieved | abandoned
307
- * active paused
306
+ * State machine: active → achieved | abandoned | paused
307
+ * paused → active | achieved | abandoned
308
308
  */
309
309
  declare const GOAL_STATUSES: readonly ["active", "paused", "achieved", "abandoned"];
310
310
  type GoalStatus = (typeof GOAL_STATUSES)[number];
@@ -1474,8 +1474,8 @@ declare class GlobalConfigStore {
1474
1474
  * Goal service — business logic for goal lifecycle.
1475
1475
  *
1476
1476
  * Goals are persistent objectives that drive autonomous agent work.
1477
- * State machine: active → achieved | abandoned
1478
- * active paused
1477
+ * State machine: active → achieved | abandoned | paused
1478
+ * paused → active | achieved | abandoned
1479
1479
  *
1480
1480
  * Side effect: assigning an agent to a goal auto-enables autonomous mode;
1481
1481
  * removing the last active goal from an agent auto-disables it.
package/dist/index.js CHANGED
@@ -2160,7 +2160,7 @@ var MessageService = class {
2160
2160
  };
2161
2161
  var VALID_TRANSITIONS = {
2162
2162
  active: ["paused", "achieved", "abandoned"],
2163
- paused: ["active", "abandoned"],
2163
+ paused: ["active", "achieved", "abandoned"],
2164
2164
  achieved: [],
2165
2165
  abandoned: []
2166
2166
  };
@@ -2211,7 +2211,9 @@ var GoalService = class {
2211
2211
  }
2212
2212
  if (newStatus === "achieved" && this.taskService) {
2213
2213
  const childTasks = await this.taskService.list({ goalId: id });
2214
- const pending = childTasks.filter((t) => !isTerminal(t.status));
2214
+ const pending = childTasks.filter(
2215
+ (t) => !isTerminal(t.status) && !t.labels?.includes(AUTONOMOUS_LABEL)
2216
+ );
2215
2217
  if (pending.length > 0) {
2216
2218
  if (opts?.force) {
2217
2219
  const cancellable = pending.filter((t) => t.status !== "in_progress");