iteration-cli 0.17.0 → 0.17.1

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 (3) hide show
  1. package/README.md +2 -2
  2. package/dist/cli.js +30 -19
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Iteration CLI (private source)
2
2
 
3
- This package owns the `iteration-cli@0.17.0` product executable. Clerk sign-in,
3
+ This package owns the `iteration-cli@0.17.1` product executable. Clerk sign-in,
4
4
  workspace enrollment and automatic expansion, the default Iteration endpoint,
5
5
  commands/status UI, history progress, friction summaries and Codex/Cursor billing
6
6
  clients live here, not in the public Trace Vault repository.
@@ -38,7 +38,7 @@ From the private repository root after workspace initialization:
38
38
  ```sh
39
39
  pnpm --filter "iteration-cli..." --recursive --workspace-concurrency=4 run build
40
40
  pnpm --filter iteration-cli pack --pack-destination /tmp/iteration-cli-pack
41
- node packages/cli/smoke.mjs /tmp/iteration-cli-pack/iteration-cli-0.17.0.tgz
41
+ node packages/cli/smoke.mjs /tmp/iteration-cli-pack/iteration-cli-0.17.1.tgz
42
42
  ```
43
43
 
44
44
  The package smoke installs the tarball offline under a disposable home and checks
package/dist/cli.js CHANGED
@@ -15420,19 +15420,29 @@ async function scanSourceOnce(config22, paths, signal, policy, accounts) {
15420
15420
  },
15421
15421
  paths
15422
15422
  );
15423
- const sessions = sessionFiles.filter((file) => file.session);
15424
15423
  return {
15425
15424
  discovered: events.length,
15426
15425
  excludedRecords,
15427
15426
  caughtUp,
15428
- history: {
15429
- sessions: sessions.length,
15430
- readSessions: sessions.filter(
15431
- (file) => (cursors[file.filename] ?? 0) >= file.size
15432
- ).length
15433
- }
15427
+ history: historyProgress(sessionFiles, cursors)
15434
15428
  };
15435
15429
  }
15430
+ function historyProgress(files, cursors) {
15431
+ const sessions = files.filter((file) => file.session);
15432
+ return {
15433
+ sessions: sessions.length,
15434
+ readSessions: sessions.filter(
15435
+ (file) => (cursors[file.filename] ?? 0) >= file.size
15436
+ ).length
15437
+ };
15438
+ }
15439
+ async function savedHistoryProgress(config22, paths) {
15440
+ const files = await sourceFilesNewestFirst(
15441
+ collectorSource(config22),
15442
+ path14.resolve(collectorSourceDirectory(config22))
15443
+ );
15444
+ return historyProgress(files, (await loadState(paths)).cursors);
15445
+ }
15436
15446
  async function readRange(filename, start2, length) {
15437
15447
  const handle = await fs9.open(filename, "r");
15438
15448
  try {
@@ -15694,7 +15704,12 @@ async function collectorTick(config22, paths, fetcher = collectorFetch, signal,
15694
15704
  policy,
15695
15705
  first
15696
15706
  );
15697
- const scan = await outboxSize(paths) >= SCAN_PAUSE_OUTBOX_BYTES ? { discovered: 0, excludedRecords: 0, caughtUp: false, history: null } : await scanSourceOnce(config22, paths, signal, policy, accounts);
15707
+ const scan = await outboxSize(paths) >= SCAN_PAUSE_OUTBOX_BYTES ? {
15708
+ discovered: 0,
15709
+ excludedRecords: 0,
15710
+ caughtUp: false,
15711
+ history: await savedHistoryProgress(config22, paths)
15712
+ } : await scanSourceOnce(config22, paths, signal, policy, accounts);
15698
15713
  if (policy !== void 0 && scan.caughtUp) {
15699
15714
  const state = await loadState(paths);
15700
15715
  if (state.captureRecheckAt === void 0)
@@ -26870,8 +26885,7 @@ async function runCollector(directory = defaultCollectorDirectory("codex"), expe
26870
26885
  const summariesRefreshedAt = /* @__PURE__ */ new Map();
26871
26886
  let lastAutoCheckAt = 0;
26872
26887
  let lastBillingSyncAt = 0;
26873
- const historyProgress = new HistoryProgressReporter();
26874
- let scanned = null;
26888
+ const historyProgress2 = new HistoryProgressReporter();
26875
26889
  const runtimeVersion = process.env.ITERATION_RUNTIME_VERSION;
26876
26890
  let lastRuntimeCheckAt = 0;
26877
26891
  let trialSettled = runtimeVersion === void 0;
@@ -26969,14 +26983,11 @@ async function runCollector(directory = defaultCollectorDirectory("codex"), expe
26969
26983
  { recentMessages: RECENT_MESSAGE_LIMIT }
26970
26984
  );
26971
26985
  billingReady = result.historyCaughtUp && result.outboxBytes === 0;
26972
- scanned = result.history ?? scanned;
26973
- if (scanned !== null) {
26974
- history = {
26975
- ...scanned,
26976
- complete: billingReady && scanned.readSessions === scanned.sessions,
26977
- ...result.recentMessages === null ? {} : { recentMessages: result.recentMessages }
26978
- };
26979
- }
26986
+ history = {
26987
+ ...result.history,
26988
+ complete: billingReady && result.history.readSessions === result.history.sessions,
26989
+ ...result.recentMessages === null ? {} : { recentMessages: result.recentMessages }
26990
+ };
26980
26991
  await recordTickSuccess(result, acknowledgedAtMs);
26981
26992
  } catch (error3) {
26982
26993
  if (controller.signal.aborted) return null;
@@ -27007,7 +27018,7 @@ async function runCollector(directory = defaultCollectorDirectory("codex"), expe
27007
27018
  const reportHistory = async (history) => {
27008
27019
  if (history !== null) {
27009
27020
  try {
27010
- await historyProgress.report(
27021
+ await historyProgress2.report(
27011
27022
  config3,
27012
27023
  history,
27013
27024
  collectorFetch,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iteration-cli",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",