@schoolai/shipyard 3.12.0 → 3.13.0-rc.20260615.0

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 (34) hide show
  1. package/dist/capability-detector-worker.js +4 -4
  2. package/dist/{chunk-3NML6IJM.js → chunk-7MVFHLYV.js} +2 -2
  3. package/dist/{chunk-GMMRLPGI.js → chunk-BUAEJNUG.js} +78 -13
  4. package/dist/{chunk-GMMRLPGI.js.map → chunk-BUAEJNUG.js.map} +1 -1
  5. package/dist/{chunk-HUTIDJIT.js → chunk-IWBDVGD2.js} +634 -29
  6. package/dist/chunk-IWBDVGD2.js.map +1 -0
  7. package/dist/{chunk-OCCM6UXW.js → chunk-KUPHN3ZN.js} +2 -2
  8. package/dist/{chunk-LUKN75OT.js → chunk-M3WBYTB3.js} +4 -2
  9. package/dist/chunk-M3WBYTB3.js.map +1 -0
  10. package/dist/{chunk-KJAEED3H.js → chunk-MR6HRO7R.js} +3 -3
  11. package/dist/{chunk-Q6JQK2DR.js → chunk-OX3UY44R.js} +4 -4
  12. package/dist/{chunk-LXFMCDAZ.js → chunk-RCEAMZVG.js} +2 -2
  13. package/dist/cursor-runner.js +3 -3
  14. package/dist/electron-utility.js +2 -2
  15. package/dist/index.js +5 -5
  16. package/dist/{login-2DJVKACB.js → login-HRR3T4SZ.js} +3 -3
  17. package/dist/{plan-backfill-S7FKJVOP.js → plan-backfill-QNJUWOYP.js} +4 -4
  18. package/dist/{roi-PTTYX6XY.js → roi-HNJRISLW.js} +11 -12
  19. package/dist/roi-HNJRISLW.js.map +1 -0
  20. package/dist/{serve-2N7BIGRO.js → serve-3N7IHREI.js} +718 -268
  21. package/dist/{serve-2N7BIGRO.js.map → serve-3N7IHREI.js.map} +1 -1
  22. package/dist/{start-GKHRXDGA.js → start-UPNI6OOF.js} +6 -6
  23. package/package.json +1 -1
  24. package/dist/chunk-HUTIDJIT.js.map +0 -1
  25. package/dist/chunk-LUKN75OT.js.map +0 -1
  26. package/dist/roi-PTTYX6XY.js.map +0 -1
  27. /package/dist/{chunk-3NML6IJM.js.map → chunk-7MVFHLYV.js.map} +0 -0
  28. /package/dist/{chunk-OCCM6UXW.js.map → chunk-KUPHN3ZN.js.map} +0 -0
  29. /package/dist/{chunk-KJAEED3H.js.map → chunk-MR6HRO7R.js.map} +0 -0
  30. /package/dist/{chunk-Q6JQK2DR.js.map → chunk-OX3UY44R.js.map} +0 -0
  31. /package/dist/{chunk-LXFMCDAZ.js.map → chunk-RCEAMZVG.js.map} +0 -0
  32. /package/dist/{login-2DJVKACB.js.map → login-HRR3T4SZ.js.map} +0 -0
  33. /package/dist/{plan-backfill-S7FKJVOP.js.map → plan-backfill-QNJUWOYP.js.map} +0 -0
  34. /package/dist/{start-GKHRXDGA.js.map → start-UPNI6OOF.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  detectCapabilities,
4
4
  refreshMcpServers,
5
5
  registerBuiltInProfiles
6
- } from "./chunk-Q6JQK2DR.js";
6
+ } from "./chunk-OX3UY44R.js";
7
7
  import "./chunk-TUQTEWK3.js";
8
8
  import {
9
9
  getRepoMetadata
@@ -15,9 +15,9 @@ import {
15
15
  import "./chunk-RR6V6SNM.js";
16
16
  import "./chunk-4MRKRVIQ.js";
17
17
  import "./chunk-ZFKJAYAN.js";
18
- import "./chunk-LXFMCDAZ.js";
19
- import "./chunk-HUTIDJIT.js";
20
- import "./chunk-LUKN75OT.js";
18
+ import "./chunk-RCEAMZVG.js";
19
+ import "./chunk-IWBDVGD2.js";
20
+ import "./chunk-M3WBYTB3.js";
21
21
  import "./chunk-EHQITHQX.js";
22
22
  import "./chunk-X3MULCV5.js";
23
23
  import {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  getDaemonVersion
4
- } from "./chunk-KJAEED3H.js";
4
+ } from "./chunk-MR6HRO7R.js";
5
5
  import {
6
6
  WorkerCommandCodec,
7
7
  WorkerReplyCodec
@@ -1094,4 +1094,4 @@ export {
1094
1094
  shutdownFileWatcherGuard,
1095
1095
  guardedSubscribe
1096
1096
  };
1097
- //# sourceMappingURL=chunk-3NML6IJM.js.map
1097
+ //# sourceMappingURL=chunk-7MVFHLYV.js.map
@@ -30,7 +30,7 @@ import {
30
30
  parseShipyardDeliverableUrl,
31
31
  planEditorSerializer,
32
32
  toTaskIndexEntry
33
- } from "./chunk-HUTIDJIT.js";
33
+ } from "./chunk-IWBDVGD2.js";
34
34
  import {
35
35
  assertNever
36
36
  } from "./chunk-X3MULCV5.js";
@@ -33936,18 +33936,65 @@ function buildDirectoryRecordStore(opts) {
33936
33936
 
33937
33937
  // src/services/task/manager/task-pagination.ts
33938
33938
  function paginationCacheKey(version, opts) {
33939
- return `${version}|${opts.activeOnly === true}|${opts.limit ?? "inf"}|${opts.sinceLastActivityAt ?? "null"}|${opts.sinceLastId ?? "null"}|${opts.maxBytes ?? "inf"}`;
33940
- }
33941
- function applyByteBudget(taken, maxBytes) {
33939
+ return [
33940
+ version,
33941
+ opts.activeOnly === true,
33942
+ opts.limit ?? "inf",
33943
+ opts.sinceLastActivityAt ?? "null",
33944
+ opts.sinceLastId ?? "null",
33945
+ opts.maxBytes ?? "inf",
33946
+ opts.includeTaskIds?.join(",") ?? ""
33947
+ ].join("|");
33948
+ }
33949
+ function slimEntryBytes(record) {
33950
+ return Buffer.byteLength(JSON.stringify(toTaskIndexEntry(record)), "utf-8");
33951
+ }
33952
+ function isInitialRequest(opts) {
33953
+ return opts.sinceLastActivityAt == null && opts.sinceLastId == null;
33954
+ }
33955
+ function collectInitialIncludedTasks(baseEntries, opts) {
33956
+ if (!isInitialRequest(opts) || opts.includeTaskIds == null || opts.includeTaskIds.length === 0) {
33957
+ return [];
33958
+ }
33959
+ const byId = new Map(baseEntries);
33960
+ const seen = /* @__PURE__ */ new Set();
33961
+ const included = [];
33962
+ for (const taskId of opts.includeTaskIds) {
33963
+ if (seen.has(taskId)) continue;
33964
+ const record = byId.get(taskId);
33965
+ if (!record) continue;
33966
+ included.push([taskId, record]);
33967
+ seen.add(taskId);
33968
+ }
33969
+ return included;
33970
+ }
33971
+ function splitIncludedExtras(included, normalTaken) {
33972
+ const emittedNormally = new Set(normalTaken.map(([id]) => id));
33973
+ return included.filter(([id]) => !emittedNormally.has(id));
33974
+ }
33975
+ function selectBudgetedTasks(args) {
33976
+ const { normalCandidates, included, maxBytes } = args;
33977
+ if (maxBytes == null) {
33978
+ const normalTaken = [...normalCandidates];
33979
+ return { normalTaken, includedExtras: splitIncludedExtras(included, normalTaken) };
33980
+ }
33981
+ const includedIds = new Set(included.map(([id]) => id));
33982
+ const includedBytes = included.reduce((sum, [, record]) => sum + slimEntryBytes(record), 0);
33942
33983
  const kept = [];
33943
- let total = 0;
33944
- for (const entry of taken) {
33945
- const size2 = Buffer.byteLength(JSON.stringify(toTaskIndexEntry(entry[1])), "utf-8");
33984
+ let total = includedBytes;
33985
+ for (const entry of normalCandidates) {
33986
+ const [taskId, record] = entry;
33987
+ const size2 = includedIds.has(taskId) ? 0 : slimEntryBytes(record);
33946
33988
  if (kept.length > 0 && total + size2 > maxBytes) break;
33947
33989
  kept.push(entry);
33948
33990
  total += size2;
33949
33991
  }
33950
- return kept;
33992
+ if (kept.length === 0 && normalCandidates.length > 0) {
33993
+ const first2 = normalCandidates[0];
33994
+ if (!first2) return { normalTaken: kept, includedExtras: splitIncludedExtras(included, kept) };
33995
+ kept.push(first2);
33996
+ }
33997
+ return { normalTaken: kept, includedExtras: splitIncludedExtras(included, kept) };
33951
33998
  }
33952
33999
  function computePaginatedPage(all, capturedVersion, opts) {
33953
34000
  const entries = Object.entries(all);
@@ -33970,13 +34017,19 @@ function computePaginatedPage(all, capturedVersion, opts) {
33970
34017
  });
33971
34018
  const limit = opts.limit != null && Number.isFinite(opts.limit) ? opts.limit : Number.POSITIVE_INFINITY;
33972
34019
  const byCount = paged.slice(0, limit);
33973
- const taken = opts.maxBytes != null ? applyByteBudget(byCount, opts.maxBytes) : byCount;
33974
- const partial = paged.length > taken.length;
33975
- const last = partial ? taken[taken.length - 1] : void 0;
34020
+ const included = collectInitialIncludedTasks(baseEntries, opts);
34021
+ const { normalTaken, includedExtras } = selectBudgetedTasks({
34022
+ normalCandidates: byCount,
34023
+ included,
34024
+ maxBytes: opts.maxBytes
34025
+ });
34026
+ const emitted = [...normalTaken, ...includedExtras];
34027
+ const partial = paged.length > normalTaken.length;
34028
+ const last = partial ? normalTaken[normalTaken.length - 1] : void 0;
33976
34029
  const nextCursor = last ? last[1].lastActivityAt : void 0;
33977
34030
  const nextCursorId = last ? last[0] : void 0;
33978
34031
  return {
33979
- tasks: Object.fromEntries(taken),
34032
+ tasks: Object.fromEntries(emitted),
33980
34033
  version: capturedVersion,
33981
34034
  partial,
33982
34035
  nextCursor,
@@ -34107,6 +34160,7 @@ function buildNewTaskRecord(params, now) {
34107
34160
  importedSessionId: importedSessionId ?? null,
34108
34161
  importedSessionSourcePath: importedSessionSourcePath ?? null,
34109
34162
  currentSessionId: null,
34163
+ clearedAtSeqNo: null,
34110
34164
  runtimeId,
34111
34165
  ...buildOptionalFields(params)
34112
34166
  };
@@ -34438,6 +34492,17 @@ function buildTaskStateStore(dataDir) {
34438
34492
  options
34439
34493
  );
34440
34494
  },
34495
+ async setClearedAtSeqNo(taskId, clearedAtSeqNo, options) {
34496
+ await safeUpdate(
34497
+ taskId,
34498
+ (task) => ({
34499
+ ...task,
34500
+ clearedAtSeqNo,
34501
+ updatedAt: Date.now()
34502
+ }),
34503
+ options
34504
+ );
34505
+ },
34441
34506
  async updateCheckpointState(taskId, snapshot, options) {
34442
34507
  await safeUpdate(
34443
34508
  taskId,
@@ -34653,4 +34718,4 @@ export {
34653
34718
  runPlanBackfill,
34654
34719
  buildTaskStateStore
34655
34720
  };
34656
- //# sourceMappingURL=chunk-GMMRLPGI.js.map
34721
+ //# sourceMappingURL=chunk-BUAEJNUG.js.map