haansi 0.1.109 → 0.1.111
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 +64 -3
- 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.111",
|
|
99
99
|
description: "Haansi CLI - Session collector and MCP server for Claude Code & OpenAI Codex",
|
|
100
100
|
bin: {
|
|
101
101
|
haansi: "./dist/haansi.js"
|
|
@@ -19628,6 +19628,35 @@ var init_exclusions = __esm({
|
|
|
19628
19628
|
'Normalized "job \u203A step" names from CI config, the same signatures problem families compare; no logs or output.'
|
|
19629
19629
|
]
|
|
19630
19630
|
}),
|
|
19631
|
+
...exchangeExclusions(INTEL, "repo_conventions", {
|
|
19632
|
+
repository: [
|
|
19633
|
+
"join-key",
|
|
19634
|
+
"owner/repo the convention belongs to, as in stored_replay_tasks; matched by equality."
|
|
19635
|
+
],
|
|
19636
|
+
state: [
|
|
19637
|
+
"operational",
|
|
19638
|
+
"Closed CHECK vocabulary (proposed, approved, rejected, archived)."
|
|
19639
|
+
],
|
|
19640
|
+
origin: [
|
|
19641
|
+
"operational",
|
|
19642
|
+
"Closed CHECK vocabulary (mined, instruction_file, human)."
|
|
19643
|
+
],
|
|
19644
|
+
freshness: [
|
|
19645
|
+
"operational",
|
|
19646
|
+
"Closed CHECK vocabulary (current, may_be_outdated)."
|
|
19647
|
+
],
|
|
19648
|
+
freshness_commits: [
|
|
19649
|
+
"not-personal",
|
|
19650
|
+
"Commit SHAs that touched the convention's paths since its last update."
|
|
19651
|
+
]
|
|
19652
|
+
}),
|
|
19653
|
+
...exchangeExclusions(INTEL, "repo_convention_settings", {
|
|
19654
|
+
repository: [
|
|
19655
|
+
"join-key",
|
|
19656
|
+
"owner/repo, as in repo_conventions; the primary key with the org."
|
|
19657
|
+
],
|
|
19658
|
+
cadence: ["operational", "Closed CHECK vocabulary (weekly, monthly)."]
|
|
19659
|
+
}),
|
|
19631
19660
|
...exchangeExclusions(INTEL, "attempt_rule_configs", {
|
|
19632
19661
|
config: [
|
|
19633
19662
|
"operational",
|
|
@@ -26880,6 +26909,21 @@ var init_table_registry = __esm({
|
|
|
26880
26909
|
entry("intelligence", INTELLIGENCE_DB, "replay_session_calls", "direct", {
|
|
26881
26910
|
scopingColumn: "organization_id"
|
|
26882
26911
|
}),
|
|
26912
|
+
// Repository conventions, their revisions and per-repository settings
|
|
26913
|
+
// (repo-conventions/001).
|
|
26914
|
+
entry("intelligence", INTELLIGENCE_DB, "repo_conventions", "direct", {
|
|
26915
|
+
scopingColumn: "organization_id"
|
|
26916
|
+
}),
|
|
26917
|
+
entry(
|
|
26918
|
+
"intelligence",
|
|
26919
|
+
INTELLIGENCE_DB,
|
|
26920
|
+
"repo_convention_revisions",
|
|
26921
|
+
"direct",
|
|
26922
|
+
{ scopingColumn: "organization_id" }
|
|
26923
|
+
),
|
|
26924
|
+
entry("intelligence", INTELLIGENCE_DB, "repo_convention_settings", "direct", {
|
|
26925
|
+
scopingColumn: "organization_id"
|
|
26926
|
+
}),
|
|
26883
26927
|
// "Mine more tasks" requests the outcome ledger polls (outcome-ledger/058).
|
|
26884
26928
|
entry("intelligence", INTELLIGENCE_DB, "replay_mining_requests", "direct", {
|
|
26885
26929
|
scopingColumn: "organization_id"
|
|
@@ -86135,6 +86179,17 @@ function messageAt(lines, i) {
|
|
|
86135
86179
|
}
|
|
86136
86180
|
function testErrorsOf(output, root) {
|
|
86137
86181
|
const lines = output.split(/\r?\n/).map((l) => relativePaths(l.replace(ANSI, "").trimEnd(), root));
|
|
86182
|
+
const marker = lines.findIndex((l) => l.trim() === BUILD_FAILED_MARKER);
|
|
86183
|
+
if (marker >= 0) {
|
|
86184
|
+
const text = scrubSecrets(
|
|
86185
|
+
lines.slice(marker + 1).filter((l) => l.trim()).slice(-OUTPUT_LINES).join("\n")
|
|
86186
|
+
);
|
|
86187
|
+
return {
|
|
86188
|
+
failing: [BUILD_FAILED],
|
|
86189
|
+
output: text.length > MAX_ERROR_OUTPUT_CHARS ? `\u2026 (trimmed)
|
|
86190
|
+
${text.slice(-MAX_ERROR_OUTPUT_CHARS)}` : text || "The build failed before any test ran."
|
|
86191
|
+
};
|
|
86192
|
+
}
|
|
86138
86193
|
const failing = [];
|
|
86139
86194
|
const messages = /* @__PURE__ */ new Map();
|
|
86140
86195
|
for (const line of lines) {
|
|
@@ -86239,7 +86294,7 @@ function testCountsOf(output) {
|
|
|
86239
86294
|
const goFail = lines.filter((l) => /^--- FAIL:/.test(l)).length;
|
|
86240
86295
|
return goPass + goFail > 0 ? { passed: goPass, failed: goFail, total: goPass + goFail } : null;
|
|
86241
86296
|
}
|
|
86242
|
-
var MAX_ERROR_TESTS, MAX_ERROR_OUTPUT_CHARS, MAX_TEST_MESSAGE_CHARS, SUITE_LOAD_FAILED, OUTPUT_LINES, MESSAGE_LINES, ANSI, JS_FILE, SECRET_PATTERNS, TEMP_CHECKOUT, MESSAGE_END, PYTEST_SUMMARY, SUMMARY, isSummary, PYTEST_SECTION, PYTEST_WHERE, cut, count;
|
|
86297
|
+
var MAX_ERROR_TESTS, MAX_ERROR_OUTPUT_CHARS, MAX_TEST_MESSAGE_CHARS, SUITE_LOAD_FAILED, OUTPUT_LINES, MESSAGE_LINES, ANSI, JS_FILE, SECRET_PATTERNS, TEMP_CHECKOUT, MESSAGE_END, PYTEST_SUMMARY, SUMMARY, isSummary, PYTEST_SECTION, PYTEST_WHERE, cut, BUILD_FAILED_MARKER, BUILD_FAILED, count;
|
|
86243
86298
|
var init_replay_errors = __esm({
|
|
86244
86299
|
"src/commands/replay-errors.ts"() {
|
|
86245
86300
|
"use strict";
|
|
@@ -86271,6 +86326,8 @@ var init_replay_errors = __esm({
|
|
|
86271
86326
|
PYTEST_SECTION = /^_{3,}\s+(.+?)\s+_{3,}$/;
|
|
86272
86327
|
PYTEST_WHERE = /^\S+\.py:\d+:\s+\S/;
|
|
86273
86328
|
cut = (text, max2) => text.length > max2 ? `${text.slice(0, max2 - 2)} \u2026` : text;
|
|
86329
|
+
BUILD_FAILED_MARKER = "HAANSI_BUILD_FAILED";
|
|
86330
|
+
BUILD_FAILED = "(build failed)";
|
|
86274
86331
|
count = (text, word) => {
|
|
86275
86332
|
const m = new RegExp(`(\\d+)\\s+${word}`).exec(text);
|
|
86276
86333
|
return m ? Number(m[1]) : 0;
|
|
@@ -86882,7 +86939,10 @@ async function searchHaansi(session, ask, fetchImpl = fetch) {
|
|
|
86882
86939
|
...first ? { query: first } : {},
|
|
86883
86940
|
limit: PRIOR_ATTEMPTS_LIMIT
|
|
86884
86941
|
}
|
|
86885
|
-
}
|
|
86942
|
+
},
|
|
86943
|
+
// The task repository's conventions for those files (as of the
|
|
86944
|
+
// start; listed by the server only while the org has them).
|
|
86945
|
+
{ name: "get_conventions", arguments: { paths: ask.paths } }
|
|
86886
86946
|
] : []
|
|
86887
86947
|
]);
|
|
86888
86948
|
const others = [
|
|
@@ -89718,6 +89778,7 @@ function haansiSection(tools, hint = null) {
|
|
|
89718
89778
|
"",
|
|
89719
89779
|
"Start here, before you read or change any code, and search again when you get stuck:",
|
|
89720
89780
|
"",
|
|
89781
|
+
"- Repository conventions: before you start coding, get_conventions with the files you expect to change: the repository's approved conventions (rules this codebase follows) that apply to them.",
|
|
89721
89782
|
"- Past fixes: search_solutions with a sentence about the problem (its error line in error, failing tests in failing_tests, the files you expect to change in files, identifiers in names), then get_solution to read the matching results in full.",
|
|
89722
89783
|
"- Team procedures: match_playbook with the task, and search_skills; get_skill loads one.",
|
|
89723
89784
|
"- Earlier attempts at the same code: get_prior_attempts with the files you expect to change.",
|