@hivelore/cli 0.46.0 → 0.49.0
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/{chunk-W7EPRKOZ.js → chunk-VW4U72ET.js} +29 -7
- package/dist/chunk-VW4U72ET.js.map +1 -0
- package/dist/index.js +42 -19
- package/dist/index.js.map +1 -1
- package/dist/{server-V3ZGBTAG.js → server-ZE5Y3Z4A.js} +2 -2
- package/package.json +4 -4
- package/dist/chunk-W7EPRKOZ.js.map +0 -1
- /package/dist/{server-V3ZGBTAG.js.map → server-ZE5Y3Z4A.js.map} +0 -0
|
@@ -1979,6 +1979,10 @@ var ScaffoldTestInputSchema = {
|
|
|
1979
1979
|
memory_id: z17.string().min(1).describe("Id of the attempt/gotcha lesson to scaffold a post-incident test from."),
|
|
1980
1980
|
framework: z17.enum(["vitest", "jest", "pytest", "gotest"]).optional().describe("Test framework. Auto-detected from the package that owns the lesson's anchor paths when omitted."),
|
|
1981
1981
|
out_path: z17.string().optional().describe("Override the generated test file path (repo-relative)."),
|
|
1982
|
+
style: z17.enum(["example", "property", "differential"]).optional().describe(
|
|
1983
|
+
"Test shape (default 'example'): 'property' states the invariant once and checks it over many generated inputs (fast-check/Hypothesis); 'differential' asserts the subject agrees with a `reference` implementation for all inputs. Both lower the cost of expressing the invariant."
|
|
1984
|
+
),
|
|
1985
|
+
reference: z17.string().optional().describe("Required for style='differential': import specifier of the reference implementation to compare against."),
|
|
1982
1986
|
red_ref: z17.string().optional().describe(
|
|
1983
1987
|
"Pre-fix incident commit/ref. When set, the scaffold names the symbols the fix (<red_ref>..HEAD) touched within the lesson's anchor scope and pre-fills the example around them, so the assertion is a targeted edit rather than a blank page. A bad ref falls back to the generic template."
|
|
1984
1988
|
),
|
|
@@ -1990,6 +1994,10 @@ async function scaffoldTest(input, ctx) {
|
|
|
1990
1994
|
if (!found) {
|
|
1991
1995
|
return { ok: false, error: `No memory found with id ${input.memory_id}`, memory_id: input.memory_id };
|
|
1992
1996
|
}
|
|
1997
|
+
const style = input.style ?? "example";
|
|
1998
|
+
if (style === "differential" && !input.reference) {
|
|
1999
|
+
return { ok: false, error: "style='differential' requires `reference` (the reference implementation to compare against).", memory_id: input.memory_id };
|
|
2000
|
+
}
|
|
1993
2001
|
const anchorPaths = found.memory.frontmatter.anchor.paths ?? [];
|
|
1994
2002
|
const allGroups = await detectTestFrameworksForAnchors(ctx.paths.root, anchorPaths);
|
|
1995
2003
|
const groups = input.out_path ? allGroups.slice(0, 1) : allGroups;
|
|
@@ -2013,8 +2021,9 @@ async function scaffoldTest(input, ctx) {
|
|
|
2013
2021
|
paths: anchorPaths,
|
|
2014
2022
|
incidentHints
|
|
2015
2023
|
};
|
|
2024
|
+
const styleOpts = { style, reference: input.reference };
|
|
2016
2025
|
let scaffolds = groups.map(
|
|
2017
|
-
(g) => scaffoldPostIncidentTest(lesson, { framework: frameworkFor(g.framework), outPath: input.out_path, baseDir: g.baseDir })
|
|
2026
|
+
(g) => scaffoldPostIncidentTest(lesson, { framework: frameworkFor(g.framework), outPath: input.out_path, baseDir: g.baseDir, ...styleOpts })
|
|
2018
2027
|
);
|
|
2019
2028
|
let proposeCommand = scaffolds[0].proposeCommand;
|
|
2020
2029
|
if (scaffolds.length > 1) {
|
|
@@ -2023,7 +2032,8 @@ async function scaffoldTest(input, ctx) {
|
|
|
2023
2032
|
(g) => scaffoldPostIncidentTest(lesson, {
|
|
2024
2033
|
framework: frameworkFor(g.framework),
|
|
2025
2034
|
baseDir: g.baseDir,
|
|
2026
|
-
proposeCommandOverride: proposeCommand
|
|
2035
|
+
proposeCommandOverride: proposeCommand,
|
|
2036
|
+
...styleOpts
|
|
2027
2037
|
})
|
|
2028
2038
|
);
|
|
2029
2039
|
}
|
|
@@ -3235,7 +3245,7 @@ function oneLine(value) {
|
|
|
3235
3245
|
return value.replace(/\s+/g, " ").replace(/"/g, '\\"').trim().slice(0, 120);
|
|
3236
3246
|
}
|
|
3237
3247
|
function serverVersion() {
|
|
3238
|
-
return true ? "0.
|
|
3248
|
+
return true ? "0.49.0" : "dev";
|
|
3239
3249
|
}
|
|
3240
3250
|
var CodeMapInputSchema = {
|
|
3241
3251
|
file: z21.string().optional().describe("Filter to files whose path contains this substring"),
|
|
@@ -4459,13 +4469,25 @@ Examples of things to look for:
|
|
|
4459
4469
|
### 5. Did you find that an existing memory is outdated or wrong?
|
|
4460
4470
|
\u2192 If yes, call **\`mem_update\`** with the correct information, or **\`mem_reject\`** if it's completely wrong
|
|
4461
4471
|
|
|
4472
|
+
## The bar \u2014 capture only what is UNGUESSABLE
|
|
4473
|
+
|
|
4474
|
+
A memory earns its place only if it carries *hard-won, repo-specific knowledge a capable teammate could
|
|
4475
|
+
NOT infer* from the code, the docs, or common practice. A "decision" that merely restates what the
|
|
4476
|
+
implementation already shows, a "convention" that is just standard style, a "gotcha" that is generic
|
|
4477
|
+
best practice \u2014 these are noise, and noise makes every future briefing worse. **For a routine change,
|
|
4478
|
+
capturing nothing is the correct, expected outcome.** Only reach for \`mem_save\` when you can name the
|
|
4479
|
+
arbitrary constraint (an invariant, a tradeoff with a real WHY, a footgun that cost you time) that the
|
|
4480
|
+
next agent would otherwise get wrong.
|
|
4481
|
+
|
|
4462
4482
|
## Rules
|
|
4463
4483
|
|
|
4464
4484
|
- One memory per insight. Don't cram multiple lessons into one body.
|
|
4465
4485
|
- Anchor memories to file paths when possible (the \`paths\` field) \u2014 this enables staleness detection.
|
|
4466
4486
|
- Prefer \`scope="team"\` for anything a teammate or future agent would benefit from.
|
|
4467
|
-
- Skip sections where you genuinely have nothing to add. Don't fabricate memories
|
|
4468
|
-
|
|
4487
|
+
- Skip sections where you genuinely have nothing to add. Don't fabricate memories \u2014 an empty post-task
|
|
4488
|
+
is better than a corpus of restated obvious facts.
|
|
4489
|
+
- Scan your exploration history for genuine code-level discoveries (failed approaches, real footguns),
|
|
4490
|
+
but hold each to the bar above before saving it.
|
|
4469
4491
|
|
|
4470
4492
|
### 6. Close the session \u2014 always
|
|
4471
4493
|
Call **\`mem_session_end\`** with:
|
|
@@ -4586,7 +4608,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
|
|
|
4586
4608
|
};
|
|
4587
4609
|
}
|
|
4588
4610
|
var SERVER_NAME = "hivelore";
|
|
4589
|
-
var SERVER_VERSION = "0.
|
|
4611
|
+
var SERVER_VERSION = "0.49.0";
|
|
4590
4612
|
function jsonResult(data) {
|
|
4591
4613
|
return {
|
|
4592
4614
|
content: [
|
|
@@ -5578,4 +5600,4 @@ export {
|
|
|
5578
5600
|
runHaiveMcpStdio,
|
|
5579
5601
|
writeMcpRuntimeMarker
|
|
5580
5602
|
};
|
|
5581
|
-
//# sourceMappingURL=chunk-
|
|
5603
|
+
//# sourceMappingURL=chunk-VW4U72ET.js.map
|