haansi 0.1.124 → 0.1.125
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/haansi.js +18 -21
- 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.
|
|
98
|
+
version: "0.1.125",
|
|
99
99
|
description: "Haansi CLI - Session collector and MCP server for Claude Code & OpenAI Codex",
|
|
100
100
|
bin: {
|
|
101
101
|
haansi: "./dist/haansi.js"
|
|
@@ -26287,7 +26287,7 @@ var init_change_text = __esm({
|
|
|
26287
26287
|
});
|
|
26288
26288
|
|
|
26289
26289
|
// ../../packages/@company/db/src/org-purge.ts
|
|
26290
|
-
var observability5;
|
|
26290
|
+
var observability5, PURGE_STATEMENT_TIMEOUT_MS;
|
|
26291
26291
|
var init_org_purge = __esm({
|
|
26292
26292
|
"../../packages/@company/db/src/org-purge.ts"() {
|
|
26293
26293
|
"use strict";
|
|
@@ -26296,6 +26296,7 @@ var init_org_purge = __esm({
|
|
|
26296
26296
|
init_client();
|
|
26297
26297
|
init_org_context();
|
|
26298
26298
|
observability5 = createObservabilityService("org-purge");
|
|
26299
|
+
PURGE_STATEMENT_TIMEOUT_MS = 5 * 6e4;
|
|
26299
26300
|
}
|
|
26300
26301
|
});
|
|
26301
26302
|
|
|
@@ -89816,11 +89817,10 @@ function storedScoreOf(task) {
|
|
|
89816
89817
|
nearby: task.context?.nearby ?? 0
|
|
89817
89818
|
};
|
|
89818
89819
|
}
|
|
89819
|
-
function gateTierOf(state,
|
|
89820
|
+
function gateTierOf(state, recurring = 0) {
|
|
89820
89821
|
if (state === "found") return "found";
|
|
89821
89822
|
if (state === "missed") return "missed";
|
|
89822
89823
|
if (state === "none" && recurring > 0) return "recurring";
|
|
89823
|
-
if (state === "none" && score.nearby > 0) return "nearby";
|
|
89824
89824
|
return null;
|
|
89825
89825
|
}
|
|
89826
89826
|
function rankFound(tasks, scoreOf, tierOf = () => "found") {
|
|
@@ -90052,18 +90052,15 @@ async function gateOnContext(deps, tasks, options) {
|
|
|
90052
90052
|
const scoreOf = (t) => scores.get(t.taskId) ?? { onPoint: 0, nearby: 0 };
|
|
90053
90053
|
const tiers = /* @__PURE__ */ new Map();
|
|
90054
90054
|
let noContext = 0;
|
|
90055
|
+
let nearby = 0;
|
|
90055
90056
|
let unknown2 = 0;
|
|
90056
90057
|
for (const t of tasks) {
|
|
90057
90058
|
const label = t.name ?? t.taskKey;
|
|
90058
90059
|
const s = states.get(t.taskId);
|
|
90059
|
-
const tier = gateTierOf(s,
|
|
90060
|
+
const tier = gateTierOf(s, recurringOf(t).length);
|
|
90060
90061
|
if (tier) {
|
|
90061
90062
|
tiers.set(t.taskId, tier);
|
|
90062
|
-
if (tier === "
|
|
90063
|
-
deps.log(
|
|
90064
|
-
`nearby ${label}: no on-point context, ${scoreOf(t).nearby} nearby item(s): replayed, read apart`
|
|
90065
|
-
);
|
|
90066
|
-
else if (tier === "missed")
|
|
90063
|
+
if (tier === "missed")
|
|
90067
90064
|
deps.log(
|
|
90068
90065
|
`missed ${label}: Haansi holds an on-point item its search did not return: replayed as decisive`
|
|
90069
90066
|
);
|
|
@@ -90071,6 +90068,11 @@ async function gateOnContext(deps, tasks, options) {
|
|
|
90071
90068
|
deps.log(
|
|
90072
90069
|
`recurring ${label}: ${recurringOf(t).length} earlier bug fix(es) failed the same test and were fixed before it began: replayed as decisive`
|
|
90073
90070
|
);
|
|
90071
|
+
} else if (s === "none" && scoreOf(t).nearby > 0) {
|
|
90072
|
+
nearby += 1;
|
|
90073
|
+
deps.log(
|
|
90074
|
+
`skip ${label}: nothing on point, ${scoreOf(t).nearby} nearby item(s) only: its arms would tell nothing`
|
|
90075
|
+
);
|
|
90074
90076
|
} else if (s === "none") {
|
|
90075
90077
|
noContext += 1;
|
|
90076
90078
|
deps.log(
|
|
@@ -90086,7 +90088,7 @@ async function gateOnContext(deps, tasks, options) {
|
|
|
90086
90088
|
const count4 = (tier) => replay2.filter((t) => tiers.get(t.taskId) === tier).length;
|
|
90087
90089
|
return {
|
|
90088
90090
|
replay: replay2,
|
|
90089
|
-
nearby
|
|
90091
|
+
nearby,
|
|
90090
90092
|
missed: count4("missed"),
|
|
90091
90093
|
recurring: count4("recurring"),
|
|
90092
90094
|
noContext,
|
|
@@ -90094,11 +90096,7 @@ async function gateOnContext(deps, tasks, options) {
|
|
|
90094
90096
|
};
|
|
90095
90097
|
}
|
|
90096
90098
|
function fromChecks(tasks, limit, shard) {
|
|
90097
|
-
const tierOf = (t) => gateTierOf(
|
|
90098
|
-
t.context?.state,
|
|
90099
|
-
storedScoreOf(t),
|
|
90100
|
-
t.context?.recurringIds?.length ?? 0
|
|
90101
|
-
);
|
|
90099
|
+
const tierOf = (t) => gateTierOf(t.context?.state, t.context?.recurringIds?.length ?? 0);
|
|
90102
90100
|
const ready = tasks.filter(
|
|
90103
90101
|
(t) => !needsCheck(t) && tierOf(t) !== null && t.calibration?.state === "valid" && t.calibration.inputsFingerprint === t.inputsFingerprint
|
|
90104
90102
|
);
|
|
@@ -90119,8 +90117,7 @@ var init_replay_context = __esm({
|
|
|
90119
90117
|
TIER_ORDER = {
|
|
90120
90118
|
found: 0,
|
|
90121
90119
|
missed: 1,
|
|
90122
|
-
recurring: 2
|
|
90123
|
-
nearby: 3
|
|
90120
|
+
recurring: 2
|
|
90124
90121
|
};
|
|
90125
90122
|
QUERY_CHARS2 = 300;
|
|
90126
90123
|
ERROR_CHARS = 1e3;
|
|
@@ -90675,7 +90672,7 @@ async function runStoredReplays(options, deps) {
|
|
|
90675
90672
|
}
|
|
90676
90673
|
if (options.checkOnly) {
|
|
90677
90674
|
deps.log(
|
|
90678
|
-
`Checked: ${gated.length -
|
|
90675
|
+
`Checked: ${gated.length - missed - recurringCount} found \xB7 ${missed} missed \xB7 ${recurringCount} recurring \xB7 ${nearby} nearby \xB7 ${noContext} with no on-point or nearby context \xB7 ${contextUnknown} unknown \xB7 ${notValid} not valid.`
|
|
90679
90676
|
);
|
|
90680
90677
|
return {
|
|
90681
90678
|
results: [],
|
|
@@ -90936,7 +90933,7 @@ async function runStoredReplays(options, deps) {
|
|
|
90936
90933
|
task: label,
|
|
90937
90934
|
taskId: task.taskId,
|
|
90938
90935
|
kind: task.kind,
|
|
90939
|
-
tier: gateTierOf(task.context?.state
|
|
90936
|
+
tier: gateTierOf(task.context?.state),
|
|
90940
90937
|
arm,
|
|
90941
90938
|
passed,
|
|
90942
90939
|
attempts: r.attempts,
|
|
@@ -91650,7 +91647,7 @@ async function replayStored(options, token2, apiUrl2) {
|
|
|
91650
91647
|
if (options.checkOnly) {
|
|
91651
91648
|
console.log(
|
|
91652
91649
|
`
|
|
91653
|
-
Context checked: ${(found ?? 0) - (
|
|
91650
|
+
Context checked: ${(found ?? 0) - (missed ?? 0)} task(s) to replay (${missed ?? 0} of them missed: on point, not returned) \xB7 ${nearby ?? 0} skipped with nearby items only \xB7 ${noContext ?? 0} with no on-point or nearby context${contextUnknown ? ` \xB7 ${contextUnknown} could not be checked` : ""} \xB7 ${notValid} not valid to replay`
|
|
91654
91651
|
);
|
|
91655
91652
|
return;
|
|
91656
91653
|
}
|