@davesheffer/hunch 1.40.1 → 1.41.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.
- package/dist/cli/index.js +57 -4
- package/dist/core/paths.d.ts +9 -1
- package/dist/core/paths.js +9 -1
- package/dist/core/taskQuery.d.ts +2 -0
- package/dist/core/taskQuery.js +2 -0
- package/dist/core/taskReportEvidence.js +3 -1
- package/dist/core/taskReportRender.js +9 -1
- package/dist/extractors/git.d.ts +37 -0
- package/dist/extractors/git.js +56 -1
- package/dist/extractors/languages.d.ts +9 -2
- package/dist/extractors/languages.js +13 -0
- package/dist/extractors/parse.js +41 -13
- package/dist/integrations/hooks.js +60 -7
- package/dist/integrations/team.js +11 -1
- package/dist/mcp/server.d.ts +125 -0
- package/dist/mcp/server.js +455 -3
- package/dist/store/hunchStore.d.ts +8 -0
- package/dist/store/hunchStore.js +14 -1
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -505,6 +505,14 @@ export declare class HunchStore {
|
|
|
505
505
|
* newest-first, with its valid-time window and supersession links. Answers
|
|
506
506
|
* "what did we believe, and when/why did it change?" (hunch_timeline). */
|
|
507
507
|
timeline(target: string): Decision[];
|
|
508
|
+
/** Invalidate, don't delete: close an active constraint's valid-time window
|
|
509
|
+
* (status → "retired", valid_to → now) so `hunch check` and the strict hook
|
|
510
|
+
* stop enforcing it while its full history stays on record. The caller has
|
|
511
|
+
* already resolved `existing` (id lookup + already-retired refusal are the
|
|
512
|
+
* CLI's job, not this method's), so there is no internal re-lookup and no
|
|
513
|
+
* nullable return. Writes to whichever store already holds the record
|
|
514
|
+
* (`putWhereItLives`), so a public/private twin can never be forked. */
|
|
515
|
+
retireConstraint(existing: Constraint): Constraint;
|
|
508
516
|
/** Invalidate, don't delete (Zep edge-invalidation): close `oldId`'s valid-time
|
|
509
517
|
* window at the superseding decision's `valid_from`, mark it superseded + linked,
|
|
510
518
|
* and write a `supersedes` edge. Returns the updated old decision, or null if it
|
package/dist/store/hunchStore.js
CHANGED
|
@@ -148,7 +148,10 @@ export class HunchStore {
|
|
|
148
148
|
const distinctNestedRoot = nestedBoundary ? gitWorktreeRoot(publicationProbe) : null;
|
|
149
149
|
if (canonical(candidate) === canonical(this.paths.hunch) ||
|
|
150
150
|
(nestedBoundary && (!distinctNestedRoot || sameGitPublication(distinctNestedRoot, this.paths.root))) ||
|
|
151
|
-
|
|
151
|
+
// If these paths are identical, the nested-boundary clause just ran
|
|
152
|
+
// this exact proof. Different probe paths still need their own check;
|
|
153
|
+
// no result is retained across store opens or publication operations.
|
|
154
|
+
(distinctNestedRoot !== publicationProbe && sameGitPublication(publicationProbe, this.paths.root))) {
|
|
152
155
|
throw new Error(`Unsafe private overlay "${candidate}" shares the public code repository's local or remote publication boundary. ` +
|
|
153
156
|
"Run `hunch private` or `hunch shared --repo <url>` to create a standalone overlay repository.");
|
|
154
157
|
}
|
|
@@ -1846,6 +1849,16 @@ export class HunchStore {
|
|
|
1846
1849
|
timeline(target) {
|
|
1847
1850
|
return this.why(target).decisions.sort((a, b) => (b.valid_from ?? b.date).localeCompare(a.valid_from ?? a.date));
|
|
1848
1851
|
}
|
|
1852
|
+
/** Invalidate, don't delete: close an active constraint's valid-time window
|
|
1853
|
+
* (status → "retired", valid_to → now) so `hunch check` and the strict hook
|
|
1854
|
+
* stop enforcing it while its full history stays on record. The caller has
|
|
1855
|
+
* already resolved `existing` (id lookup + already-retired refusal are the
|
|
1856
|
+
* CLI's job, not this method's), so there is no internal re-lookup and no
|
|
1857
|
+
* nullable return. Writes to whichever store already holds the record
|
|
1858
|
+
* (`putWhereItLives`), so a public/private twin can never be forked. */
|
|
1859
|
+
retireConstraint(existing) {
|
|
1860
|
+
return this.putWhereItLives("constraints", { ...existing, status: "retired", valid_to: new Date().toISOString() });
|
|
1861
|
+
}
|
|
1849
1862
|
/** Invalidate, don't delete (Zep edge-invalidation): close `oldId`'s valid-time
|
|
1850
1863
|
* window at the superseding decision's `valid_from`, mark it superseded + linked,
|
|
1851
1864
|
* and write a `supersedes` edge. Returns the updated old decision, or null if it
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
9
|
"websiteUrl": "https://www.hunchmemory.com",
|
|
10
|
-
"version": "1.
|
|
10
|
+
"version": "1.41.1",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
15
15
|
"identifier": "@davesheffer/hunch",
|
|
16
|
-
"version": "1.
|
|
16
|
+
"version": "1.41.1",
|
|
17
17
|
"runtimeHint": "npx",
|
|
18
18
|
"packageArguments": [
|
|
19
19
|
{
|