jioogen 0.2.17 → 0.2.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.
package/dist/index.js CHANGED
@@ -9898,6 +9898,12 @@ function summarizeExecutionCounts(tasks) {
9898
9898
  }
9899
9899
  return base;
9900
9900
  }
9901
+ function isAdoptedTask(task) {
9902
+ if (task.source === "user") return true;
9903
+ return (task.evidence ?? []).some(
9904
+ (entry) => entry.type === "text" && entry.summary !== void 0 && entry.summary.startsWith("adopted outside harness")
9905
+ );
9906
+ }
9901
9907
  function computeCompletion(tasks, definitions) {
9902
9908
  const defById = new Map(
9903
9909
  (definitions ?? []).map((definition) => [definition.id.toUpperCase(), definition])
@@ -9918,20 +9924,26 @@ function computeCompletion(tasks, definitions) {
9918
9924
  for (const subfeature of definition.subfeatures ?? []) tally(subfeature, done);
9919
9925
  };
9920
9926
  let tasksDone = 0;
9927
+ let tasksVerified = 0;
9928
+ const adoptedTaskRefs = [];
9921
9929
  const seenIds = /* @__PURE__ */ new Set();
9922
9930
  const doneRefs = /* @__PURE__ */ new Set();
9923
9931
  for (const task of tasks) {
9924
9932
  const done = task.status === "done";
9933
+ const adopted = isAdoptedTask(task);
9934
+ const verifiedDone = done && !adopted;
9925
9935
  if (done) {
9926
9936
  tasksDone += 1;
9927
9937
  doneRefs.add(task.ref.toUpperCase());
9928
9938
  }
9939
+ if (verifiedDone) tasksVerified += 1;
9940
+ if (adopted) adoptedTaskRefs.push(task.ref);
9929
9941
  seenIds.add(task.ref.toUpperCase());
9930
9942
  const definition = defById.get(task.ref.toUpperCase());
9931
- tally(definition?.featureId ?? task.featureId, done);
9932
- tally(definition?.moduleId ?? task.moduleId, done);
9943
+ tally(definition?.featureId ?? task.featureId, verifiedDone);
9944
+ tally(definition?.moduleId ?? task.moduleId, verifiedDone);
9933
9945
  const subfeatures = definition?.subfeatures ?? task.subfeatures ?? [];
9934
- for (const subfeature of subfeatures) tally(subfeature, done);
9946
+ for (const subfeature of subfeatures) tally(subfeature, verifiedDone);
9935
9947
  }
9936
9948
  for (const definition of definitions ?? []) {
9937
9949
  if (definition !== void 0 && !seenIds.has(definition.id.toUpperCase())) {
@@ -9943,20 +9955,29 @@ function computeCompletion(tasks, definitions) {
9943
9955
  const status = entry.done === 0 ? "missing" : entry.done < entry.total ? "incomplete" : "complete";
9944
9956
  features[id] = { status, doneTasks: entry.done, totalTasks: entry.total };
9945
9957
  }
9946
- const allTasksDone = tasks.every((task) => task.status === "done");
9958
+ const allTasksVerified = tasks.every((task) => task.status === "done" && !isAdoptedTask(task));
9947
9959
  const unitIds = Object.keys(features);
9948
9960
  const allUnitsComplete = unitIds.length > 0 && unitIds.every((id) => features[id]?.status === "complete");
9949
9961
  let allIntegrationDone = true;
9950
9962
  for (const task of tasks) {
9951
- if (task.layer === "integration" && task.status !== "done") allIntegrationDone = false;
9963
+ if (task.layer === "integration" && (task.status !== "done" || isAdoptedTask(task))) {
9964
+ allIntegrationDone = false;
9965
+ }
9952
9966
  }
9953
9967
  for (const definition of definitions ?? []) {
9954
9968
  if (definition.layer === "integration" && !doneRefs.has(definition.id.toUpperCase())) {
9955
9969
  allIntegrationDone = false;
9956
9970
  }
9957
9971
  }
9958
- const projectComplete = allTasksDone && allUnitsComplete && allIntegrationDone;
9959
- return { tasksDone, totalTasks: tasks.length, features, projectComplete };
9972
+ const projectComplete = allTasksVerified && allUnitsComplete && allIntegrationDone;
9973
+ return {
9974
+ tasksDone,
9975
+ tasksVerified,
9976
+ totalTasks: tasks.length,
9977
+ features,
9978
+ adoptedTaskRefs,
9979
+ projectComplete
9980
+ };
9960
9981
  }
9961
9982
 
9962
9983
  // ../contracts/src/layout.ts
@@ -16366,7 +16387,7 @@ async function taskCompleteCommand(ref, options) {
16366
16387
  console.log(`Done ${completedTask?.ref ?? ref}.`);
16367
16388
  if (checkpoint) {
16368
16389
  if (next === null) {
16369
- console.log("Semua task selesai; menunggu review terakhir.");
16390
+ console.log(printCompletionHeadline(completion));
16370
16391
  printSeedGapTrigger(completion, next);
16371
16392
  } else {
16372
16393
  console.log(
@@ -16603,7 +16624,7 @@ async function taskAdoptCommand(ref, options) {
16603
16624
  );
16604
16625
  if (result.checkpoint) {
16605
16626
  console.log(
16606
- result.next === null ? "Semua task selesai; menunggu review terakhir." : `Checkpoint berikutnya: ${result.next.task.id} (${result.next.task.layer ?? "-"} / phase ${result.next.task.phase}).`
16627
+ result.next === null ? printCompletionHeadline(result.completion) : `Checkpoint berikutnya: ${result.next.task.id} (${result.next.task.layer ?? "-"} / phase ${result.next.task.phase}).`
16607
16628
  );
16608
16629
  printSeedGapTrigger(result.completion, result.next);
16609
16630
  console.log(
@@ -17329,10 +17350,30 @@ function printCompletionGaps(completion) {
17329
17350
  const entries = Object.entries(completion.features).filter(([, unit]) => unit.status !== "complete").sort(([left], [right]) => left.localeCompare(right));
17330
17351
  if (entries.length === 0) lines.push("- (tidak ada unit feature yang dideklarasikan)");
17331
17352
  for (const [id, unit] of entries) {
17332
- lines.push(`- ${id}: ${unit.status} (${unit.doneTasks}/${unit.totalTasks} task selesai)`);
17353
+ lines.push(`- ${id}: ${unit.status} (${unit.doneTasks}/${unit.totalTasks} task terverifikasi)`);
17354
+ }
17355
+ if (completion.adoptedTaskRefs.length > 0) {
17356
+ const shown = completion.adoptedTaskRefs.slice(0, 8).join(", ");
17357
+ const extra = completion.adoptedTaskRefs.length > 8 ? ` +${completion.adoptedTaskRefs.length - 8} lagi` : "";
17358
+ lines.push(
17359
+ `- Diadopsi di luar harness (bookkeeping, tidak dihitung complete): ${shown}${extra}`
17360
+ );
17333
17361
  }
17334
17362
  return lines.join("\n");
17335
17363
  }
17364
+ function printCompletionHeadline(completion) {
17365
+ if (completion.projectComplete) {
17366
+ return "Project complete: seluruh unit fitur & layer integration terverifikasi.";
17367
+ }
17368
+ const unverified = completion.tasksDone - completion.tasksVerified;
17369
+ const parts = [];
17370
+ if (completion.adoptedTaskRefs.length > 0) {
17371
+ parts.push(`${completion.adoptedTaskRefs.length} task diadopsi di luar harness`);
17372
+ }
17373
+ if (unverified > 0) parts.push(`${unverified} done belum terverifikasi`);
17374
+ const detail = parts.length > 0 ? ` \u2014 ${parts.join(", ")}` : "";
17375
+ return `Semua task dieksekusi, tetapi project BELUM complete${detail}.`;
17376
+ }
17336
17377
  function printSeedReBreakdown() {
17337
17378
  console.log("");
17338
17379
  console.log("Gap di atas tidak ditutup oleh DAG task yang ada \u2014 ini bukan 'selesai',");
@@ -17506,7 +17547,7 @@ async function readLine() {
17506
17547
  }
17507
17548
 
17508
17549
  // src/index.ts
17509
- var VERSION = "0.2.17";
17550
+ var VERSION = "0.2.18";
17510
17551
  function parseTaskModeOption(value) {
17511
17552
  if (value === void 0) return void 0;
17512
17553
  const parsed = TaskModeSchema.safeParse(value);