@cortexkit/aft 0.58.0 → 0.58.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.
@@ -6,6 +6,7 @@ import { type NativeRunner } from "../lib/feature-plan.js";
6
6
  import { resolveAdaptersForCommand } from "../lib/harness-select.js";
7
7
  import { type ClearResult } from "../lib/lsp-cache.js";
8
8
  import { runOnnxFix } from "../lib/onnx-fix.js";
9
+ import { type RecentSession } from "../lib/sessions.js";
9
10
  import { type FeatureSetupDeps, type GhStatus } from "../setup/feature-wizard.js";
10
11
  import { type OpenCodeHostDetection } from "../setup/host-generation.js";
11
12
  export type DoctorClearTarget = "plugin-cache" | "lsp-cache" | "binary-cache";
@@ -137,5 +138,11 @@ export declare function fixPluginEntries(adapters: HarnessAdapter[]): Promise<{
137
138
  }>;
138
139
  export declare function renderIssueDescription(description: string): string;
139
140
  export declare function deriveIssueTitleFromBody(body: string): string;
141
+ /** Select matching lines across log history; the most recent lines may belong to other sessions. */
142
+ export declare function collectIssueLog(path: string, selectedSession: RecentSession | null): {
143
+ logText: string;
144
+ errors: string;
145
+ notice: string;
146
+ };
140
147
  export {};
141
148
  //# sourceMappingURL=doctor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAEL,KAAK,QAAQ,EAEd,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAE,KAAK,gBAAgB,EAAoC,MAAM,0BAA0B,CAAC;AAkBnG,OAAO,EAEL,kBAAkB,EAClB,KAAK,gBAAgB,EAMtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,KAAK,YAAY,EAIlB,MAAM,wBAAwB,CAAC;AAIhC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAYrE,OAAO,EAAE,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AQ,GAAG,eAAe,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACvF,OAAO,EAAE,MAAM,CAAC;CACjB;AA4ID,qEAAqE;AACrE,MAAM,MAAM,kBAAkB,GAAG,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAwIvE,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,cAAc,EAAE,EAC1B,MAAM,EAAE,gBAAgB,GACvB,iBAAiB,EAAE,CAgIrB;AAiBD,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAIvE;AAED,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAK9F;AAgXD,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,GAAG,MAAM,CAQ1F;AAiHD,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,cAAc,EAAE,GACzB,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAQ9C;AA+ED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAOlE;AAgCD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG7D;AAkED,oGAAoG;AACpG,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,aAAa,GAAG,IAAI,GACpC;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAaA"}
package/dist/index.js CHANGED
@@ -113,7 +113,7 @@ var init_active_logger = __esm(() => {
113
113
  var init_bash_hints = () => {};
114
114
 
115
115
  // ../aft-bridge/dist/child-process.js
116
- import { execFileSync as nodeExecFileSync, execSync as nodeExecSync, spawn as nodeSpawn, spawnSync as nodeSpawnSync } from "node:child_process";
116
+ import { execFile as nodeExecFile, execFileSync as nodeExecFileSync, execSync as nodeExecSync, spawn as nodeSpawn, spawnSync as nodeSpawnSync } from "node:child_process";
117
117
  function withWindowsHidden(args, takesArgv) {
118
118
  const out = [...args];
119
119
  let index = 1;
@@ -132,11 +132,12 @@ function withWindowsHidden(args, takesArgv) {
132
132
  function hidden(resolve, takesArgv) {
133
133
  return (...args) => resolve()(...withWindowsHidden(args, takesArgv));
134
134
  }
135
- var HIDDEN, spawn, spawnSync, execFileSync, execSync;
135
+ var HIDDEN, spawn, spawnSync, execFile, execFileSync, execSync;
136
136
  var init_child_process = __esm(() => {
137
137
  HIDDEN = { windowsHide: true };
138
138
  spawn = hidden(() => nodeSpawn, true);
139
139
  spawnSync = hidden(() => nodeSpawnSync, true);
140
+ execFile = hidden(() => nodeExecFile, true);
140
141
  execFileSync = hidden(() => nodeExecFileSync, true);
141
142
  execSync = hidden(() => nodeExecSync, false);
142
143
  });
@@ -1311,17 +1312,30 @@ var init_bridge = __esm(() => {
1311
1312
  }
1312
1313
  }
1313
1314
  onStderrData(data) {
1314
- this.stderrBuffer += data;
1315
- let newlineIdx;
1316
- while ((newlineIdx = this.stderrBuffer.indexOf(`
1317
- `)) !== -1) {
1318
- const line = this.stderrBuffer.slice(0, newlineIdx).replace(/\r$/, "");
1319
- this.stderrBuffer = this.stderrBuffer.slice(newlineIdx + 1);
1320
- if (!line || !shouldSurfaceStderrLine(line))
1321
- continue;
1322
- const tagged = tagStderrLine(line);
1323
- this.logVia(tagged);
1324
- this.pushStderrLine(tagged);
1315
+ const partialLimit = 64 * 1024;
1316
+ let offset = 0;
1317
+ while (offset < data.length) {
1318
+ const newline = data.indexOf(`
1319
+ `, offset);
1320
+ const end = newline < 0 ? data.length : newline;
1321
+ while (offset < end) {
1322
+ const count = Math.min(partialLimit - this.stderrBuffer.length, end - offset);
1323
+ this.stderrBuffer += data.slice(offset, offset + count);
1324
+ offset += count;
1325
+ if (this.stderrBuffer.length === partialLimit) {
1326
+ const last = this.stderrBuffer.charCodeAt(this.stderrBuffer.length - 1);
1327
+ const carry = last >= 55296 && last <= 56319 ? this.stderrBuffer.slice(-1) : "";
1328
+ const fragment = carry ? this.stderrBuffer.slice(0, -1) : this.stderrBuffer;
1329
+ const tagged = tagStderrLine(`${fragment} [stderr record truncated into bounded fragments; ${Buffer.byteLength(fragment)} bytes shown, continuation follows]`);
1330
+ this.stderrBuffer = carry;
1331
+ this.logVia(tagged);
1332
+ this.pushStderrLine(tagged);
1333
+ }
1334
+ }
1335
+ if (newline < 0)
1336
+ break;
1337
+ this.flushStderrBuffer();
1338
+ offset = newline + 1;
1325
1339
  }
1326
1340
  }
1327
1341
  flushStderrBuffer() {
@@ -1645,6 +1659,9 @@ function readConfigTiers(opts) {
1645
1659
  }
1646
1660
  var init_config_tiers = () => {};
1647
1661
 
1662
+ // ../aft-bridge/dist/config-watch.js
1663
+ var init_config_watch = () => {};
1664
+
1648
1665
  // ../aft-bridge/dist/platform.js
1649
1666
  var PLATFORM_ARCH_MAP, PLATFORM_ASSET_MAP;
1650
1667
  var init_platform = __esm(() => {
@@ -2625,13 +2642,14 @@ var init_lifecycle_registry = __esm(() => {
2625
2642
  var init_project_identity = () => {};
2626
2643
 
2627
2644
  // ../aft-bridge/dist/subc-transport.js
2628
- var LOCALLY_SATISFIED_COMMANDS;
2645
+ var CALL_DEADLINE_EXPIRED, LOCALLY_SATISFIED_COMMANDS;
2629
2646
  var init_subc_transport = __esm(() => {
2630
2647
  init_dist();
2631
2648
  init_active_logger();
2632
2649
  init_error_contract();
2633
2650
  init_lifecycle_registry();
2634
2651
  init_project_identity();
2652
+ CALL_DEADLINE_EXPIRED = Symbol("call deadline expired");
2635
2653
  LOCALLY_SATISFIED_COMMANDS = new Set(["configure"]);
2636
2654
  });
2637
2655
 
@@ -4493,6 +4511,7 @@ var init_dist2 = __esm(() => {
4493
4511
  init_config_error();
4494
4512
  init_config_keys();
4495
4513
  init_config_tiers();
4514
+ init_config_watch();
4496
4515
  init_downloader();
4497
4516
  init_durable_log();
4498
4517
  init_error_contract();
@@ -18423,12 +18442,6 @@ var init_github = __esm(() => {
18423
18442
  });
18424
18443
 
18425
18444
  // src/lib/issue-body.ts
18426
- function filterLogToSession(logText, sessionId) {
18427
- const bareId = sessionId.replace(/^ses_/, "");
18428
- const keepTokens = [`[ses_${bareId}]`, `[${bareId}]`];
18429
- return logText.split(/\r?\n/).filter((line) => !SESSION_TAG_PATTERN2.test(line) || keepTokens.some((token) => line.includes(token))).join(`
18430
- `);
18431
- }
18432
18445
  function isErrorLogLine(line) {
18433
18446
  return ERROR_LOG_PATTERNS.some((rx) => rx.test(line));
18434
18447
  }
@@ -18445,8 +18458,7 @@ function extractRecentErrors(sanitized, limit = 20) {
18445
18458
  function capBodyToGithubLimit(body, maxBytes = MAX_GITHUB_BODY_BYTES) {
18446
18459
  if (Buffer.byteLength(body, "utf8") <= maxBytes)
18447
18460
  return body;
18448
- const heading = "## Logs (last";
18449
- const headingIdx = body.indexOf(heading);
18461
+ const headingIdx = body.search(/^## Logs \(/m);
18450
18462
  if (headingIdx === -1) {
18451
18463
  const marker = `
18452
18464
 
@@ -18506,9 +18518,8 @@ function truncateToByteBudget(input, maxBytes) {
18506
18518
  }
18507
18519
  return buf.subarray(0, end).toString("utf8");
18508
18520
  }
18509
- var MAX_GITHUB_BODY_BYTES = 60000, SESSION_TAG_PATTERN2, ERROR_LOG_PATTERNS;
18521
+ var MAX_GITHUB_BODY_BYTES = 60000, ERROR_LOG_PATTERNS;
18510
18522
  var init_issue_body = __esm(() => {
18511
- SESSION_TAG_PATTERN2 = /\[ses_[^\]\s]+\]|\[[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\]/;
18512
18523
  ERROR_LOG_PATTERNS = [
18513
18524
  /\bcrashed:/i,
18514
18525
  /\bfailed:/i,
@@ -18671,8 +18682,87 @@ var init_onnx_fix = __esm(() => {
18671
18682
  init_prompts();
18672
18683
  });
18673
18684
 
18685
+ // src/lib/session-log.ts
18686
+ import { closeSync as closeSync8, openSync as openSync8, readSync as readSync6, statSync as statSync17 } from "node:fs";
18687
+ function readSessionLog(path, session, maxBytes = MAX_SCAN_BYTES) {
18688
+ const lines = [];
18689
+ const errors = [];
18690
+ let remaining = maxBytes;
18691
+ let boundHit = false;
18692
+ const bareId = session.id.replace(/^ses_/, "");
18693
+ const selectedTags = [`[ses_${bareId}]`, `[${bareId}]`];
18694
+ const tagPattern = /\[ses_[^\]\s]+\]|\[[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}\]/;
18695
+ const accept = (line) => {
18696
+ if (!line)
18697
+ return;
18698
+ const tag = tagPattern.exec(line)?.[0];
18699
+ if (tag && !selectedTags.includes(tag))
18700
+ return;
18701
+ if (!tag) {
18702
+ const stamp = /^\[([^\]]+)\]/.exec(line)?.[1];
18703
+ const time = stamp ? Date.parse(stamp) : NaN;
18704
+ const inWindow = Number.isFinite(time) && (session.startedAt === undefined || time >= session.startedAt) && time <= session.lastActivity;
18705
+ if (session.projectRoot) {
18706
+ if (Number.isFinite(time) && session.startedAt !== undefined && !inWindow)
18707
+ return;
18708
+ if (!line.includes(session.projectRoot) && (!inWindow || PROJECT_PATH.test(line)))
18709
+ return;
18710
+ } else if (!inWindow) {
18711
+ return;
18712
+ }
18713
+ }
18714
+ if (lines.length < 200)
18715
+ lines.push(line);
18716
+ if (errors.length < 20 && isErrorLogLine(line))
18717
+ errors.push(line);
18718
+ };
18719
+ for (const file of [path, `${path}.1`]) {
18720
+ if (remaining <= 0 || lines.length >= 200 && errors.length >= 20)
18721
+ break;
18722
+ let fd;
18723
+ try {
18724
+ fd = openSync8(file, "r");
18725
+ let position = statSync17(file).size;
18726
+ let suffix = Buffer.alloc(0);
18727
+ while (position > 0 && remaining > 0 && (lines.length < 200 || errors.length < 20)) {
18728
+ const length = Math.min(CHUNK_BYTES, position, remaining);
18729
+ position -= length;
18730
+ remaining -= length;
18731
+ const chunk = Buffer.allocUnsafe(length);
18732
+ const count = readSync6(fd, chunk, 0, length, position);
18733
+ const bytes = Buffer.concat([chunk.subarray(0, count), suffix]);
18734
+ let end = bytes.length;
18735
+ for (let i = bytes.length - 1;i >= 0; i -= 1) {
18736
+ if (bytes[i] !== 10)
18737
+ continue;
18738
+ accept(bytes.subarray(i + 1, end).toString("utf8").replace(/\r$/, ""));
18739
+ end = i;
18740
+ if (lines.length >= 200 && errors.length >= 20)
18741
+ break;
18742
+ }
18743
+ suffix = bytes.subarray(0, end);
18744
+ }
18745
+ if (position === 0)
18746
+ accept(suffix.toString("utf8").replace(/\r$/, ""));
18747
+ else if (remaining === 0)
18748
+ boundHit = true;
18749
+ } catch {} finally {
18750
+ if (fd !== undefined)
18751
+ closeSync8(fd);
18752
+ }
18753
+ }
18754
+ return { lines: lines.reverse(), errors: errors.reverse(), boundHit };
18755
+ }
18756
+ var MAX_SCAN_BYTES, CHUNK_BYTES, PROJECT_PATH;
18757
+ var init_session_log = __esm(() => {
18758
+ init_issue_body();
18759
+ MAX_SCAN_BYTES = 64 * 1024 * 1024;
18760
+ CHUNK_BYTES = 64 * 1024;
18761
+ PROJECT_PATH = /\broot\s*=|(?:^|[\s"'(=])(?:\/[^\s"'(),]+|[A-Za-z]:[\\/][^\s"'(),]+)/;
18762
+ });
18763
+
18674
18764
  // src/lib/sessions.ts
18675
- import { existsSync as existsSync29, readdirSync as readdirSync12, readFileSync as readFileSync16, statSync as statSync17 } from "node:fs";
18765
+ import { existsSync as existsSync29, readdirSync as readdirSync12, readFileSync as readFileSync16, statSync as statSync18 } from "node:fs";
18676
18766
  import { createRequire as createRequire4 } from "node:module";
18677
18767
  import { homedir as homedir16 } from "node:os";
18678
18768
  import { basename as basename3, join as join28 } from "node:path";
@@ -18698,10 +18788,13 @@ function mapOpenCodeSessionRows(rows) {
18698
18788
  const lastActivity = typeof row.time_updated === "number" ? row.time_updated : Number(row.time_updated);
18699
18789
  if (!Number.isFinite(lastActivity))
18700
18790
  return null;
18791
+ const startedAt = Number(row.time_created);
18701
18792
  return {
18702
18793
  id: row.id,
18703
18794
  title: row.title,
18704
- lastActivity
18795
+ lastActivity,
18796
+ ...typeof row.directory === "string" && row.directory ? { projectRoot: row.directory } : {},
18797
+ ...row.time_created != null && Number.isFinite(startedAt) ? { startedAt } : {}
18705
18798
  };
18706
18799
  }).filter((session) => session !== null).sort((a, b) => b.lastActivity - a.lastActivity).slice(0, MAX_RECENT_SESSIONS);
18707
18800
  }
@@ -18714,7 +18807,7 @@ function listRecentOpenCodeSessions() {
18714
18807
  const require2 = createRequire4(import.meta.url);
18715
18808
  const sqlite = require2("node:sqlite");
18716
18809
  db = new sqlite.DatabaseSync(dbPath, { readOnly: true });
18717
- const rows = db.prepare("SELECT id, title, time_updated FROM session ORDER BY time_updated DESC LIMIT 5").all();
18810
+ const rows = db.prepare("SELECT id, title, time_updated, time_created, directory FROM session ORDER BY time_updated DESC LIMIT 5").all();
18718
18811
  return mapOpenCodeSessionRows(rows);
18719
18812
  } catch {
18720
18813
  return [];
@@ -18741,7 +18834,7 @@ function listPiSessionsFromDir(sessionsDir) {
18741
18834
  return [];
18742
18835
  const files = collectJsonlFiles(sessionsDir).map((filePath) => {
18743
18836
  try {
18744
- const stats = statSync17(filePath);
18837
+ const stats = statSync18(filePath);
18745
18838
  return { filePath, mtimeMs: stats.mtimeMs };
18746
18839
  } catch {
18747
18840
  return null;
@@ -18788,6 +18881,8 @@ function collectJsonlFiles(root) {
18788
18881
  function parsePiSessionJsonl(jsonl, fallbackFilename = "") {
18789
18882
  let id = extractUuidFromFilename(fallbackFilename);
18790
18883
  let title = null;
18884
+ let projectRoot;
18885
+ let startedAt;
18791
18886
  for (const line of jsonl.split(/\r?\n/)) {
18792
18887
  const trimmed = line.trim();
18793
18888
  if (trimmed.length === 0)
@@ -18801,8 +18896,16 @@ function parsePiSessionJsonl(jsonl, fallbackFilename = "") {
18801
18896
  if (!value || typeof value !== "object")
18802
18897
  continue;
18803
18898
  const record = value;
18804
- if (record.type === "session" && typeof record.id === "string" && record.id.length > 0) {
18805
- id = record.id;
18899
+ if (record.type === "session") {
18900
+ if (typeof record.id === "string" && record.id.length > 0)
18901
+ id = record.id;
18902
+ if (typeof record.cwd === "string" && record.cwd.length > 0)
18903
+ projectRoot = record.cwd;
18904
+ if (typeof record.timestamp === "string") {
18905
+ const time = Date.parse(record.timestamp);
18906
+ if (Number.isFinite(time))
18907
+ startedAt = time;
18908
+ }
18806
18909
  }
18807
18910
  if (title === null) {
18808
18911
  const maybeTitle = extractPiUserMessageText(record);
@@ -18814,7 +18917,12 @@ function parsePiSessionJsonl(jsonl, fallbackFilename = "") {
18814
18917
  }
18815
18918
  if (!id)
18816
18919
  return null;
18817
- return { id, title: title ?? id };
18920
+ return {
18921
+ id,
18922
+ title: title ?? id,
18923
+ ...projectRoot ? { projectRoot } : {},
18924
+ ...startedAt !== undefined ? { startedAt } : {}
18925
+ };
18818
18926
  }
18819
18927
  function extractPiUserMessageText(record) {
18820
18928
  if (record.type !== "message")
@@ -18867,7 +18975,7 @@ import {
18867
18975
  readFileSync as readFileSync17,
18868
18976
  realpathSync as realpathSync6,
18869
18977
  rmSync as rmSync7,
18870
- statSync as statSync18,
18978
+ statSync as statSync19,
18871
18979
  writeFileSync as writeFileSync5
18872
18980
  } from "node:fs";
18873
18981
  import { tmpdir as tmpdir4 } from "node:os";
@@ -19293,7 +19401,7 @@ function clearOldBinaries() {
19293
19401
  const dir = join29(info.path, version);
19294
19402
  let bytes = 0;
19295
19403
  try {
19296
- bytes = statSync18(dir).isDirectory() ? dirSize(dir) : 0;
19404
+ bytes = statSync19(dir).isDirectory() ? dirSize(dir) : 0;
19297
19405
  } catch {
19298
19406
  bytes = 0;
19299
19407
  }
@@ -19649,7 +19757,7 @@ function userAftConfigPath(report) {
19649
19757
  }
19650
19758
  function fileIdentity(path) {
19651
19759
  try {
19652
- const stat = statSync18(path);
19760
+ const stat = statSync19(path);
19653
19761
  return `${stat.size}:${stat.mtimeMs}:${stat.ino}`;
19654
19762
  } catch {
19655
19763
  return null;
@@ -20136,6 +20244,23 @@ function shortSessionId(id) {
20136
20244
  const bareId = id.replace(/^ses_/, "");
20137
20245
  return bareId.length <= 12 ? bareId : bareId.slice(0, 12);
20138
20246
  }
20247
+ function collectIssueLog(path, selectedSession) {
20248
+ if (!selectedSession) {
20249
+ return { logText: tailLogFile(path, 200), errors: tailLogFile(path, 4000), notice: "" };
20250
+ }
20251
+ const scoped = readSessionLog(path, selectedSession);
20252
+ return {
20253
+ logText: scoped.lines.join(`
20254
+ `),
20255
+ errors: scoped.errors.join(`
20256
+ `),
20257
+ notice: [
20258
+ ...scoped.boundHit ? ["[scan limit reached; older session lines may be missing]"] : [],
20259
+ ...scoped.lines.length === 0 ? ["[no lines found for selected session]"] : []
20260
+ ].join(`
20261
+ `)
20262
+ };
20263
+ }
20139
20264
  async function runIssueFlow(argv) {
20140
20265
  intro(`${CLI} doctor --issue`);
20141
20266
  if (!isInteractiveTerminal()) {
@@ -20154,26 +20279,24 @@ async function runIssueFlow(argv) {
20154
20279
  const selectedSession = await promptForIssueSession(adapters[0]);
20155
20280
  const selectedBareSessionId = selectedSession?.id.replace(/^ses_/, "") ?? null;
20156
20281
  const report = await collectDiagnostics(adapters);
20157
- const logSections = adapters.map((adapter) => {
20282
+ const logResults = adapters.map((adapter) => {
20158
20283
  const path = adapter.getLogFile();
20159
- const tail = tailLogFile(path, 200);
20160
- const scopedTail = selectedBareSessionId ? filterLogToSession(tail, selectedBareSessionId) : tail;
20161
- return `#### ${adapter.displayName} log (${path})
20284
+ const { logText, errors, notice } = collectIssueLog(path, selectedSession);
20285
+ return {
20286
+ section: `#### ${adapter.displayName} log (${path})
20162
20287
 
20288
+ ${notice}
20163
20289
  \`\`\`
20164
- ${scopedTail || "<no log output>"}
20290
+ ${logText || "<no log output>"}
20165
20291
  \`\`\`
20166
- `;
20167
- }).join(`
20168
- `);
20169
- const errorScanWindow = adapters.map((adapter) => {
20170
- const path = adapter.getLogFile();
20171
- const tail = tailLogFile(path, 4000);
20172
- const scopedTail = selectedBareSessionId ? filterLogToSession(tail, selectedBareSessionId) : tail;
20173
- return sanitizeContent(scopedTail);
20174
- }).join(`
20292
+ `,
20293
+ errors
20294
+ };
20295
+ });
20296
+ const logSections = logResults.map((result) => result.section).join(`
20175
20297
  `);
20176
- const recentErrorLines = extractRecentErrors(errorScanWindow, 20);
20298
+ const recentErrorLines = extractRecentErrors(logResults.map((result) => sanitizeContent(result.errors)).join(`
20299
+ `), 20);
20177
20300
  const recentErrorsSection = recentErrorLines.length === 0 ? "_No error-shaped log lines found in recent history._" : ["```", recentErrorLines.join(`
20178
20301
  `), "```"].join(`
20179
20302
  `);
@@ -20197,7 +20320,7 @@ ${scopedTail || "<no log output>"}
20197
20320
  "",
20198
20321
  toolFailuresSection,
20199
20322
  "",
20200
- "## Logs (last 200 lines per harness)",
20323
+ selectedSession ? `## Logs (last 200 lines for session ${selectedSession.id}; project ${selectedSession.projectRoot ?? "unknown"}, ${selectedSession.startedAt !== undefined ? new Date(selectedSession.startedAt).toISOString() : "unknown start"}–${new Date(selectedSession.lastActivity).toISOString()})` : "## Logs (last 200 lines per harness)",
20201
20324
  logSections,
20202
20325
  "_Usernames and home paths have been stripped from this report._"
20203
20326
  ].join(`
@@ -20272,6 +20395,7 @@ var init_doctor = __esm(async () => {
20272
20395
  init_prompts();
20273
20396
  init_sanitize();
20274
20397
  init_self_version();
20398
+ init_session_log();
20275
20399
  init_sessions();
20276
20400
  init_host_generation();
20277
20401
  init_opencode_config();
@@ -20299,14 +20423,14 @@ var init_doctor = __esm(async () => {
20299
20423
  });
20300
20424
 
20301
20425
  // src/commands/lsp.ts
20302
- import { existsSync as existsSync31, readdirSync as readdirSync13, statSync as statSync19 } from "node:fs";
20426
+ import { existsSync as existsSync31, readdirSync as readdirSync13, statSync as statSync20 } from "node:fs";
20303
20427
  import { createRequire as createRequire5 } from "node:module";
20304
20428
  import { dirname as dirname11, join as join30, resolve as resolve13 } from "node:path";
20305
20429
  function findProjectRootForFile(filePath, fallbackCwd = process.cwd()) {
20306
20430
  const resolvedFile = resolve13(fallbackCwd, filePath);
20307
20431
  let dir = dirname11(resolvedFile);
20308
20432
  try {
20309
- if (existsSync31(resolvedFile) && statSync19(resolvedFile).isDirectory()) {
20433
+ if (existsSync31(resolvedFile) && statSync20(resolvedFile).isDirectory()) {
20310
20434
  dir = resolvedFile;
20311
20435
  }
20312
20436
  } catch {
@@ -20475,7 +20599,7 @@ function childDirs(path) {
20475
20599
  try {
20476
20600
  return readdirSync13(path).map((entry) => join30(path, entry)).filter((entry) => {
20477
20601
  try {
20478
- return statSync19(entry).isDirectory();
20602
+ return statSync20(entry).isDirectory();
20479
20603
  } catch {
20480
20604
  return false;
20481
20605
  }
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * 1. Error-line extraction — pull the most-recent ERROR-shaped lines from
8
8
  * a sanitized log so the issue body has a dedicated `## Recent errors`
9
- * section that survives even when the main log tail needs aggressive
9
+ * section that survives even when the main log section needs aggressive
10
10
  * truncation.
11
11
  *
12
12
  * 2. GitHub byte-budget capping — when a rendered report exceeds the
@@ -28,6 +28,7 @@
28
28
  */
29
29
  export declare const MAX_GITHUB_BODY_BYTES = 60000;
30
30
  export declare function filterLogToSession(logText: string, sessionId: string): string;
31
+ export declare function isErrorLogLine(line: string): boolean;
31
32
  /**
32
33
  * Extract the most-recent error-shaped log lines from a sanitized log.
33
34
  * Returns them in chronological order (oldest match first → newest match
@@ -43,7 +44,7 @@ export declare function extractRecentErrors(sanitized: string, limit?: number):
43
44
  /**
44
45
  * Apply a byte budget to a rendered issue body. If the body is already
45
46
  * within budget, returns it unchanged. Otherwise rewrites the main
46
- * fenced log block (whose heading must start with `## Logs (last`) to
47
+ * fenced log block (whose heading must start with `## Logs (`) to
47
48
  * drop oldest log lines until the body fits, leaving a clear
48
49
  * `[truncated for GitHub 64KB limit — older log lines dropped]` marker
49
50
  * at the top of the kept slice.
@@ -55,7 +56,7 @@ export declare function extractRecentErrors(sanitized: string, limit?: number):
55
56
  *
56
57
  * AFT's main log section contains per-harness sub-sections (`#### opencode
57
58
  * log (path)\n```...```\n#### pi log (path)\n```...```\n`). The cap walks
58
- * the entire `## Logs (last ...` block as a single shrinkable region
59
+ * the entire `## Logs (...)` block as a single shrinkable region
59
60
  * because precise per-harness allocation is fiddly and the alternative —
60
61
  * dropping the whole log block on overflow — is strictly worse for
61
62
  * debugging.
@@ -1 +1 @@
1
- {"version":3,"file":"issue-body.d.ts","sourceRoot":"","sources":["../../src/lib/issue-body.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,QAAS,CAAC;AAa5C,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAW7E;AA2CD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,MAAM,EAAE,CAU3E;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,MAA8B,GACvC,MAAM,CAqER"}
1
+ {"version":3,"file":"issue-body.d.ts","sourceRoot":"","sources":["../../src/lib/issue-body.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,QAAS,CAAC;AAa5C,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAW7E;AAuCD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,MAAM,EAAE,CAU3E;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,MAA8B,GACvC,MAAM,CAoER"}
@@ -0,0 +1,9 @@
1
+ import type { RecentSession } from "./sessions.js";
2
+ export interface SessionLogResult {
3
+ lines: string[];
4
+ errors: string[];
5
+ boundHit: boolean;
6
+ }
7
+ /** Read newest matching lines from the active log and its single rotated predecessor. */
8
+ export declare function readSessionLog(path: string, session: RecentSession, maxBytes?: number): SessionLogResult;
9
+ //# sourceMappingURL=session-log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-log.d.ts","sourceRoot":"","sources":["../../src/lib/session-log.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAQnD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,yFAAyF;AACzF,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,aAAa,EACtB,QAAQ,SAAiB,GACxB,gBAAgB,CAsElB"}
@@ -3,16 +3,20 @@ export interface RecentSession {
3
3
  id: string;
4
4
  title: string;
5
5
  lastActivity: number;
6
+ projectRoot?: string;
7
+ startedAt?: number;
6
8
  }
7
9
  interface OpenCodeSessionRow {
8
10
  id: unknown;
9
11
  title: unknown;
10
12
  time_updated: unknown;
13
+ time_created?: unknown;
14
+ directory?: unknown;
11
15
  }
12
16
  export declare function listRecentSessions(adapter: HarnessAdapter): RecentSession[];
13
17
  export declare function mapOpenCodeSessionRows(rows: OpenCodeSessionRow[]): RecentSession[];
14
18
  export declare function listPiSessionsFromDir(sessionsDir: string): RecentSession[];
15
- export declare function parsePiSessionJsonl(jsonl: string, fallbackFilename?: string): Pick<RecentSession, "id" | "title"> | null;
19
+ export declare function parsePiSessionJsonl(jsonl: string, fallbackFilename?: string): Pick<RecentSession, "id" | "title" | "projectRoot" | "startedAt"> | null;
16
20
  export declare function truncateTitle(title: string, maxLength?: number): string;
17
21
  export {};
18
22
  //# sourceMappingURL=sessions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sessions.d.ts","sourceRoot":"","sources":["../../src/lib/sessions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,kBAAkB;IAC1B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;CACvB;AASD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,aAAa,EAAE,CAS3E;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,kBAAkB,EAAE,GAAG,aAAa,EAAE,CAiBlF;AA0CD,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,EAAE,CA8B1E;AA0BD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,gBAAgB,SAAK,GACpB,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,IAAI,CA8B5C;AAqCD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,SAAK,GAAG,MAAM,CAInE"}
1
+ {"version":3,"file":"sessions.d.ts","sourceRoot":"","sources":["../../src/lib/sessions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,kBAAkB;IAC1B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AASD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,aAAa,EAAE,CAS3E;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,kBAAkB,EAAE,GAAG,aAAa,EAAE,CAsBlF;AA4CD,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,EAAE,CA8B1E;AA0BD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,gBAAgB,SAAK,GACpB,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,OAAO,GAAG,aAAa,GAAG,WAAW,CAAC,GAAG,IAAI,CA0C1E;AAqCD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,SAAK,GAAG,MAAM,CAInE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/aft",
3
- "version": "0.58.0",
3
+ "version": "0.58.1",
4
4
  "type": "module",
5
5
  "description": "Unified CLI for Agent File Tools (AFT) — setup, one-shot index snapshots, doctor, and diagnostics across supported agent harnesses (OpenCode, Pi)",
6
6
  "license": "MIT",
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@clack/core": "^1.4.2",
27
27
  "@clack/prompts": "^1.6.0",
28
- "@cortexkit/aft-bridge": "0.58.0",
28
+ "@cortexkit/aft-bridge": "0.58.1",
29
29
  "comment-json": "^4.6.2"
30
30
  },
31
31
  "devDependencies": {