haansi 0.1.122 → 0.1.123

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 (2) hide show
  1. package/dist/haansi.js +51 -4
  2. package/package.json +1 -1
package/dist/haansi.js CHANGED
@@ -95,7 +95,7 @@ var require_package = __commonJS({
95
95
  "package.json"(exports2, module2) {
96
96
  module2.exports = {
97
97
  name: "haansi",
98
- version: "0.1.122",
98
+ version: "0.1.123",
99
99
  description: "Haansi CLI - Session collector and MCP server for Claude Code & OpenAI Codex",
100
100
  bin: {
101
101
  haansi: "./dist/haansi.js"
@@ -19496,6 +19496,18 @@ var init_exclusions = __esm({
19496
19496
  dir_blinds: [
19497
19497
  "derived",
19498
19498
  "Org-keyed HMAC digests of the file's folders (blind indexes, plural so the *_blind rule misses it); no path text."
19499
+ ],
19500
+ change_status: [
19501
+ "operational",
19502
+ "GitHub's file status vocabulary (added, modified, removed, renamed)."
19503
+ ],
19504
+ change_ref: [
19505
+ "join-key",
19506
+ "owner/repo@sha or owner/repo#pr the diff was read from, as in change_outcomes."
19507
+ ],
19508
+ diff_state: [
19509
+ "operational",
19510
+ "Closed CHECK vocabulary (full, clipped, no_patch, unavailable)."
19499
19511
  ]
19500
19512
  }),
19501
19513
  ...exchangeExclusions(INTEL, "stored_replay_tasks", {
@@ -26259,6 +26271,17 @@ var init_change_paths = __esm({
26259
26271
  }
26260
26272
  });
26261
26273
 
26274
+ // ../../packages/@company/db/src/change-text.ts
26275
+ var KEYWORDS;
26276
+ var init_change_text = __esm({
26277
+ "../../packages/@company/db/src/change-text.ts"() {
26278
+ "use strict";
26279
+ KEYWORDS = new Set(
26280
+ "this that with from have will when then than else elif true false null none undefined return const function export import class async await string number boolean void unknown interface type extends implements public private protected static readonly new delete typeof instanceof while break continue switch case default throw catch finally yield super self def lambda pass raise except select where order group limit insert update into values join left right inner outer table create alter drop index begin commit rollback not and exists between expect describe test toBe toEqual mockResolvedValue".toLowerCase().split(" ")
26281
+ );
26282
+ }
26283
+ });
26284
+
26262
26285
  // ../../packages/@company/db/src/org-purge.ts
26263
26286
  var observability5;
26264
26287
  var init_org_purge = __esm({
@@ -28139,6 +28162,7 @@ var init_src6 = __esm({
28139
28162
  init_search_vector_write();
28140
28163
  init_keyword_terms();
28141
28164
  init_change_paths();
28165
+ init_change_text();
28142
28166
  init_org_purge();
28143
28167
  init_org_orphan_scan();
28144
28168
  init_integration_purge();
@@ -60344,7 +60368,7 @@ function searchSolutionsTool(contextSchema2) {
60344
60368
  "Optional. File (or folder) paths you changed (or will change), or that the failure runs through"
60345
60369
  ),
60346
60370
  names: stringList(
60347
- "Optional. Identifiers involved: functions, classes, routes, config keys"
60371
+ "Optional. Identifiers involved: functions, classes, routes, config keys (matched against the code past fixes changed)"
60348
60372
  ),
60349
60373
  _context: contextSchema2
60350
60374
  },
@@ -88281,7 +88305,27 @@ function recallAsk(problem, targetDiff, targetFiles) {
88281
88305
  terms.join(" "),
88282
88306
  files.join(" ")
88283
88307
  ].map((q) => q.slice(0, QUERY_CHARS).trim()).filter((q, i, all) => q !== "" && all.indexOf(q) === i);
88284
- return { task: problem.slice(0, 1e3), error: null, queries };
88308
+ const idCounts = /* @__PURE__ */ new Map();
88309
+ for (const line of targetDiff.split("\n"))
88310
+ if (line.startsWith("+") && !line.startsWith("+++")) {
88311
+ for (const id of line.slice(1).match(IDENTIFIER) ?? [])
88312
+ if (/[a-z][A-Z]|_/.test(id) && !COMMON.has(id.toLowerCase()))
88313
+ idCounts.set(id, (idCounts.get(id) ?? 0) + 1);
88314
+ }
88315
+ const names = [...idCounts.entries()].sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0])).slice(0, MAX_RECALL_HINTS).map(([id]) => id.slice(0, MAX_HINT_CHARS));
88316
+ const paths = [...new Set(targetFiles)].filter((p) => p.length <= MAX_HINT_CHARS).slice(0, MAX_RECALL_HINTS);
88317
+ return {
88318
+ task: problem.slice(0, 1e3),
88319
+ error: null,
88320
+ queries,
88321
+ ...paths.length ? { paths } : {},
88322
+ ...paths.length || names.length ? {
88323
+ hints: {
88324
+ ...paths.length ? { files: paths } : {},
88325
+ ...names.length ? { names } : {}
88326
+ }
88327
+ } : {}
88328
+ };
88285
88329
  }
88286
88330
  function parseRelevance(text, shown) {
88287
88331
  const match = /\{[\s\S]*\}/.exec(text);
@@ -88399,7 +88443,7 @@ async function judgeRelevance(deps, input) {
88399
88443
  deps.removeDir(dir);
88400
88444
  }
88401
88445
  }
88402
- var import_node_path15, MAX_CHANGE_CHARS2, MAX_ITEMS_CHARS, QUERY_CHARS, TERMS, clip2, COMMON, said;
88446
+ var import_node_path15, MAX_CHANGE_CHARS2, MAX_ITEMS_CHARS, QUERY_CHARS, TERMS, clip2, COMMON, MAX_RECALL_HINTS, MAX_HINT_CHARS, IDENTIFIER, said;
88403
88447
  var init_replay_relevance = __esm({
88404
88448
  "src/commands/replay-relevance.ts"() {
88405
88449
  "use strict";
@@ -88415,6 +88459,9 @@ var init_replay_relevance = __esm({
88415
88459
  COMMON = new Set(
88416
88460
  "this that with from have will when then than they them their there what which while where return const function export import class true false null undefined async await string number value values type types test tests expect should data item items list name names error errors".split(" ")
88417
88461
  );
88462
+ MAX_RECALL_HINTS = 10;
88463
+ MAX_HINT_CHARS = 300;
88464
+ IDENTIFIER = /[A-Za-z_$][A-Za-z0-9_$]{3,}/g;
88418
88465
  said = (v) => typeof v === "string" && v.trim() !== "";
88419
88466
  }
88420
88467
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "haansi",
3
- "version": "0.1.122",
3
+ "version": "0.1.123",
4
4
  "description": "Haansi CLI - Session collector and MCP server for Claude Code & OpenAI Codex",
5
5
  "bin": {
6
6
  "haansi": "./dist/haansi.js"