gitnexus 1.6.11-rc.21 → 1.6.11-rc.23
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/README.md +24 -21
- package/dist/_shared/graph/types.d.ts +6 -0
- package/dist/_shared/graph/types.d.ts.map +1 -1
- package/dist/cli/ai-context.d.ts +4 -0
- package/dist/cli/ai-context.js +5 -2
- package/dist/cli/analyze-config.js +14 -0
- package/dist/cli/analyze-options.d.ts +5 -0
- package/dist/cli/analyze.js +2 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/watch.js +2 -0
- package/dist/core/group/cross-impact.d.ts +3 -0
- package/dist/core/group/cross-impact.js +26 -4
- package/dist/core/group/extractors/http-patterns/java.js +18 -4
- package/dist/core/group/extractors/http-patterns/kotlin.js +2 -0
- package/dist/core/group/normalization.d.ts +38 -1
- package/dist/core/group/normalization.js +59 -3
- package/dist/core/group/service.d.ts +11 -0
- package/dist/core/group/service.js +8 -0
- package/dist/core/group/sync.d.ts +21 -0
- package/dist/core/group/sync.js +15 -3
- package/dist/core/group/types.d.ts +13 -0
- package/dist/core/ingestion/frameworks/spring/actuator-runtime.d.ts +26 -0
- package/dist/core/ingestion/frameworks/spring/actuator-runtime.js +843 -0
- package/dist/core/ingestion/language-provider.d.ts +38 -1
- package/dist/core/ingestion/language-provider.js +22 -0
- package/dist/core/ingestion/languages/java/spring-actuator.d.ts +2 -0
- package/dist/core/ingestion/languages/java/spring-actuator.js +62 -0
- package/dist/core/ingestion/languages/java.js +8 -7
- package/dist/core/ingestion/languages/kotlin/spring-actuator.d.ts +4 -0
- package/dist/core/ingestion/languages/kotlin/spring-actuator.js +172 -0
- package/dist/core/ingestion/languages/kotlin.js +3 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +6 -1
- package/dist/core/ingestion/pipeline-phases/processes.d.ts +2 -1
- package/dist/core/ingestion/pipeline-phases/processes.js +39 -4
- package/dist/core/ingestion/pipeline-phases/scan.js +82 -1
- package/dist/core/ingestion/pipeline-phases/spring-auto-configuration.d.ts +2 -0
- package/dist/core/ingestion/pipeline-phases/spring-auto-configuration.js +8 -0
- package/dist/core/ingestion/pipeline.d.ts +8 -0
- package/dist/core/ingestion/route-extractors/constant-resolver.d.ts +16 -0
- package/dist/core/ingestion/route-extractors/constant-resolver.js +10 -0
- package/dist/core/ingestion/route-extractors/java-const-resolver.d.ts +27 -1
- package/dist/core/ingestion/route-extractors/java-const-resolver.js +161 -13
- package/dist/core/ingestion/route-extractors/kotlin-const-resolver.d.ts +7 -8
- package/dist/core/ingestion/route-extractors/kotlin-const-resolver.js +209 -23
- package/dist/core/ingestion/workers/parse-worker.js +5 -1
- package/dist/core/lbug/csv-generator.js +4 -1
- package/dist/core/lbug/graph-emit-sink.d.ts +3 -2
- package/dist/core/lbug/graph-emit-sink.js +4 -2
- package/dist/core/lbug/lbug-adapter.js +1 -1
- package/dist/core/lbug/schema.d.ts +1 -1
- package/dist/core/lbug/schema.js +3 -0
- package/dist/core/run-analyze.d.ts +5 -0
- package/dist/core/run-analyze.js +56 -0
- package/dist/mcp/local/local-backend.js +46 -3
- package/dist/mcp/resources.js +1 -0
- package/dist/mcp/tools.js +4 -4
- package/dist/server/analyze-launch.d.ts +1 -0
- package/dist/server/analyze-launch.js +1 -0
- package/dist/server/api.d.ts +4 -0
- package/dist/server/api.js +46 -4
- package/dist/storage/parse-cache.js +8 -1
- package/dist/storage/repo-meta.d.ts +12 -0
- package/package.json +1 -1
- package/skills/gitnexus-cli.md +3 -0
package/dist/core/group/sync.js
CHANGED
|
@@ -13,6 +13,7 @@ import { ManifestExtractor } from './extractors/manifest-extractor.js';
|
|
|
13
13
|
import { discoverWorkspaceLinks } from './extractors/workspace-extractor.js';
|
|
14
14
|
import { buildProviderIndex, runExactMatch, runWildcardMatch } from './matching.js';
|
|
15
15
|
import { detectServiceBoundaries, assignService } from './service-boundary-detector.js';
|
|
16
|
+
import { applyDegradedFlag } from './normalization.js';
|
|
16
17
|
import { getContractRegistryPath, readContractRegistry, writeContractRegistry } from './storage.js';
|
|
17
18
|
import { markBridgeProvenanceUnknown, refreshPreservedBridgeMeta, writeBridgeUnlocked, } from './bridge-db.js';
|
|
18
19
|
import { withGroupSyncLock } from './group-lock.js';
|
|
@@ -127,6 +128,8 @@ export function partitionManifestWindows(links, knownRepos, maxResident) {
|
|
|
127
128
|
}
|
|
128
129
|
export async function syncGroup(config, opts) {
|
|
129
130
|
const missingRepos = [];
|
|
131
|
+
const failedRepos = [];
|
|
132
|
+
const warnings = [];
|
|
130
133
|
// Repos that ARE registered but that we could not extract from — the index
|
|
131
134
|
// would not open, or an extractor threw partway and the repo's staged
|
|
132
135
|
// contracts were dropped. Kept separate from `missingRepos` because the two
|
|
@@ -309,6 +312,10 @@ export async function syncGroup(config, opts) {
|
|
|
309
312
|
// stack before logging it defeats the point.
|
|
310
313
|
logger.warn({ err, repo: regName, groupPath, lbugPath }, "⚠️ Could not read this repo's index; its contracts are omitted from this sync.");
|
|
311
314
|
unreadableRepos.push(groupPath);
|
|
315
|
+
failedRepos.push({
|
|
316
|
+
repo: groupPath,
|
|
317
|
+
reason: err instanceof Error ? err.message : String(err),
|
|
318
|
+
});
|
|
312
319
|
// Forget the handle recorded above (present only if the failure came
|
|
313
320
|
// after initLbug). Deferred manifest resolution derives its known-repo
|
|
314
321
|
// set from this map, so leaving the entry here re-opens a repo this
|
|
@@ -459,7 +466,7 @@ export async function syncGroup(config, opts) {
|
|
|
459
466
|
// manifest-declared link can also emit a matchType:'exact' CrossLink with the
|
|
460
467
|
// same endpoints. Prefer the manifest version — it reflects operator intent
|
|
461
468
|
// and carries matchType:'manifest' which downstream consumers may rely on.
|
|
462
|
-
const crossLinks = dedupeCrossLinks([...manifestCrossLinks, ...matched, ...wildcard.matched]);
|
|
469
|
+
const crossLinks = dedupeCrossLinks([...manifestCrossLinks, ...matched, ...wildcard.matched]).map(applyDegradedFlag);
|
|
463
470
|
const allContracts = autoContracts;
|
|
464
471
|
const registry = {
|
|
465
472
|
version: 1,
|
|
@@ -671,10 +678,12 @@ export async function syncGroup(config, opts) {
|
|
|
671
678
|
'a lower bound rather than as complete.'
|
|
672
679
|
: 'Its metadata could NOT be marked provenance-unknown, so those answers may still ' +
|
|
673
680
|
'report as complete despite describing an older sync.';
|
|
674
|
-
|
|
681
|
+
const writeBridgeWarn = '⚠️ writeBridge failed; contracts.json is intact and is the canonical copy, ' +
|
|
675
682
|
'but bridge.lbug was not replaced: cross-repo queries may still answer from ' +
|
|
676
683
|
`the previous sync's contracts. ${provenanceNote} ` +
|
|
677
|
-
'Re-run `gitnexus group sync` to retry.'
|
|
684
|
+
'Re-run `gitnexus group sync` to retry.';
|
|
685
|
+
logger.warn({ err: msg, groupDir, bridgeProvenanceWithdrawn: withdrawn }, writeBridgeWarn);
|
|
686
|
+
warnings.push(writeBridgeWarn);
|
|
678
687
|
}
|
|
679
688
|
}
|
|
680
689
|
});
|
|
@@ -686,6 +695,9 @@ export async function syncGroup(config, opts) {
|
|
|
686
695
|
unmatched: wildcard.remaining,
|
|
687
696
|
missingRepos,
|
|
688
697
|
unreadableRepos,
|
|
698
|
+
failedRepos,
|
|
699
|
+
warnings,
|
|
700
|
+
degradedLinks: crossLinks.filter((l) => l.degraded === true).length,
|
|
689
701
|
repoSnapshots,
|
|
690
702
|
registryOutcome,
|
|
691
703
|
};
|
|
@@ -80,6 +80,19 @@ export interface CrossLink {
|
|
|
80
80
|
contractId: string;
|
|
81
81
|
matchType: MatchType;
|
|
82
82
|
confidence: number;
|
|
83
|
+
/**
|
|
84
|
+
* `true` when the PROVIDER endpoint (`to`) has no resolved graph symbol —
|
|
85
|
+
* empty `symbolUid` / `symbolRef` at sync time (e.g. the handler failed to
|
|
86
|
+
* resolve and `symbolName` degraded to the file name). The contract boundary
|
|
87
|
+
* is still proven, but the link cannot anchor a cross-impact fan-out: an
|
|
88
|
+
* empty provider uid never matches a Phase-1 symbol id, and a downstream
|
|
89
|
+
* fan-out into it has no neighbor symbol to resolve. Derived once at the
|
|
90
|
+
* sync persistence boundary (`isUnresolvedEndpoint` in normalization.ts) and
|
|
91
|
+
* re-derived by `dedupeCrossLinks` when a merge backfills the uid. Absent on
|
|
92
|
+
* fully-anchored links. Distinct from manifest `manifest::…` synthetic UIDs,
|
|
93
|
+
* which have their own `fanout_status: 'not_attempted'` channel downstream.
|
|
94
|
+
*/
|
|
95
|
+
degraded?: boolean;
|
|
83
96
|
}
|
|
84
97
|
export interface RepoSnapshot {
|
|
85
98
|
indexedAt: string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { KnowledgeGraph } from '../../../graph/types.js';
|
|
2
|
+
export declare const ACTUATOR_ENDPOINTS: readonly ["mappings", "beans", "conditions", "configprops", "env"];
|
|
3
|
+
type ActuatorEndpoint = (typeof ACTUATOR_ENDPOINTS)[number];
|
|
4
|
+
export declare const MAX_RUNTIME_RECORDS = 50000;
|
|
5
|
+
export interface SpringActuatorImportStats {
|
|
6
|
+
readonly payloads: number;
|
|
7
|
+
readonly mappings: number;
|
|
8
|
+
readonly beans: number;
|
|
9
|
+
readonly conditions: number;
|
|
10
|
+
readonly configProperties: number;
|
|
11
|
+
readonly environmentProperties: number;
|
|
12
|
+
/** Endpoint categories that exceeded the bounded import size. */
|
|
13
|
+
readonly truncatedEndpoints: readonly ActuatorEndpoint[];
|
|
14
|
+
}
|
|
15
|
+
export declare class SpringActuatorImportError extends Error {
|
|
16
|
+
constructor(message: string);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Import explicitly supplied Spring Boot Actuator snapshots. Runtime evidence
|
|
20
|
+
* is additive: it confirms existing static nodes where possible and creates
|
|
21
|
+
* conservative synthetic Route/Bean/Property nodes otherwise. Raw payloads,
|
|
22
|
+
* condition messages, config values, env values, origins, and source names are
|
|
23
|
+
* never copied into graph properties or logs.
|
|
24
|
+
*/
|
|
25
|
+
export declare function importSpringActuatorRuntime(graph: KnowledgeGraph, repoPath: string, configuredPath: string): Promise<SpringActuatorImportStats>;
|
|
26
|
+
export {};
|