@saptools/service-flow 0.1.69 → 0.1.70
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/CHANGELOG.md +4 -0
- package/README.md +2 -2
- package/TECHNICAL-NOTE.md +4 -0
- package/dist/{chunk-3N3B5KHV.js → chunk-GSLFY6J2.js} +78 -78
- package/dist/chunk-GSLFY6J2.js.map +1 -0
- package/dist/cli.js +19 -19
- package/dist/cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/cli/{002-doctor-lifecycle.ts → doctor-lifecycle.ts} +1 -1
- package/src/cli/{001-doctor-projection.ts → doctor-projection.ts} +1 -1
- package/src/cli/doctor.ts +5 -5
- package/src/cli.ts +5 -5
- package/src/db/{009-binding-fact-semantics.ts → binding-fact-semantics.ts} +2 -2
- package/src/db/{000-call-fact-repository.ts → call-fact-repository.ts} +6 -6
- package/src/db/{003-current-fact-semantics.ts → current-fact-semantics.ts} +4 -4
- package/src/db/{001-fact-lifecycle.ts → fact-lifecycle.ts} +3 -3
- package/src/db/{007-package-fact-semantics.ts → package-fact-semantics.ts} +6 -6
- package/src/db/{010-package-symbol-surface-semantics.ts → package-symbol-surface-semantics.ts} +2 -2
- package/src/db/{004-package-target-invalidation.ts → package-target-invalidation.ts} +1 -1
- package/src/db/{008-relative-fact-semantics.ts → relative-fact-semantics.ts} +3 -3
- package/src/db/{006-relative-symbol-resolution.ts → relative-symbol-resolution.ts} +1 -1
- package/src/db/repositories.ts +3 -3
- package/src/db/{011-symbol-call-semantics.ts → symbol-call-semantics.ts} +1 -1
- package/src/index.ts +3 -3
- package/src/indexer/repository-indexer.ts +5 -5
- package/src/indexer/workspace-indexer.ts +3 -3
- package/src/linker/{007-call-edge-insertion.ts → call-edge-insertion.ts} +2 -2
- package/src/linker/{002-call-evidence.ts → call-evidence.ts} +2 -2
- package/src/linker/cross-repo-linker.ts +5 -5
- package/src/linker/dynamic-edge-resolver.ts +1 -1
- package/src/linker/{004-event-subscription-handler-linker.ts → event-subscription-handler-linker.ts} +1 -1
- package/src/linker/external-http-target.ts +1 -1
- package/src/linker/helper-package-linker.ts +1 -1
- package/src/linker/{000-implementation-candidates.ts → implementation-candidates.ts} +1 -1
- package/src/linker/{001-implementation-evidence-projection.ts → implementation-evidence-projection.ts} +1 -1
- package/src/linker/odata-path-normalizer.ts +1 -1
- package/src/linker/{005-odata-path-structure.ts → odata-path-structure.ts} +1 -1
- package/src/linker/{003-package-import-symbol-resolver.ts → package-import-symbol-resolver.ts} +3 -3
- package/src/linker/service-resolver.ts +2 -2
- package/src/output/{001-compact-json-output.ts → compact-json-output.ts} +1 -1
- package/src/parsers/{006-binding-identity.ts → binding-identity.ts} +3 -3
- package/src/parsers/{011-binding-lexical-scope.ts → binding-lexical-scope.ts} +1 -1
- package/src/parsers/{021-binding-visibility.ts → binding-visibility.ts} +1 -1
- package/src/parsers/{005-event-subscription-facts.ts → event-subscription-facts.ts} +2 -2
- package/src/parsers/{016-local-symbol-reference.ts → local-symbol-reference.ts} +2 -2
- package/src/parsers/operation-path-analysis.ts +1 -1
- package/src/parsers/{023-outbound-call-classifier.ts → outbound-call-classifier.ts} +3 -3
- package/src/parsers/outbound-call-parser.ts +2 -2
- package/src/parsers/{022-outbound-expression-analysis.ts → outbound-expression-analysis.ts} +2 -2
- package/src/parsers/{018-package-commonjs-syntax.ts → package-commonjs-syntax.ts} +1 -1
- package/src/parsers/{012-package-fact-contract.ts → package-fact-contract.ts} +3 -3
- package/src/parsers/{010-package-public-surface-analysis.ts → package-public-surface-analysis.ts} +2 -2
- package/src/parsers/{003-package-public-surface.ts → package-public-surface.ts} +3 -3
- package/src/parsers/{008-package-surface-publication.ts → package-surface-publication.ts} +1 -1
- package/src/parsers/{001-query-entity-resolution.ts → query-entity-resolution.ts} +1 -1
- package/src/parsers/{015-service-binding-collector.ts → service-binding-collector.ts} +3 -3
- package/src/parsers/{014-service-binding-helper-flow.ts → service-binding-helper-flow.ts} +2 -2
- package/src/parsers/service-binding-parser-helpers.ts +1 -1
- package/src/parsers/service-binding-parser.ts +2 -2
- package/src/parsers/{007-source-fact-reconciliation.ts → source-fact-reconciliation.ts} +3 -3
- package/src/parsers/{020-stable-local-value.ts → stable-local-value.ts} +2 -2
- package/src/parsers/{009-symbol-call-facts.ts → symbol-call-facts.ts} +3 -3
- package/src/parsers/{017-symbol-derived-contexts.ts → symbol-derived-contexts.ts} +2 -2
- package/src/parsers/symbol-parser.ts +6 -6
- package/src/trace/{021-compact-decision-normalization.ts → compact-decision-normalization.ts} +2 -2
- package/src/trace/{020-compact-field-projection.ts → compact-field-projection.ts} +3 -3
- package/src/trace/{024-compact-observation-decision.ts → compact-observation-decision.ts} +3 -3
- package/src/trace/{016-compact-projector.ts → compact-projector.ts} +4 -4
- package/src/trace/{018-compact-trace.ts → compact-trace.ts} +3 -3
- package/src/trace/{006-contextual-projection.ts → contextual-projection.ts} +1 -1
- package/src/trace/{008-contextual-runtime-state.ts → contextual-runtime-state.ts} +1 -1
- package/src/trace/{001-dynamic-identity.ts → dynamic-identity.ts} +2 -2
- package/src/trace/{003-dynamic-references.ts → dynamic-references.ts} +2 -2
- package/src/trace/dynamic-targets.ts +6 -6
- package/src/trace/{030-event-runtime-resolution.ts → event-runtime-resolution.ts} +2 -2
- package/src/trace/{011-event-subscriber-traversal.ts → event-subscriber-traversal.ts} +1 -1
- package/src/trace/evidence.ts +2 -2
- package/src/trace/implementation-hints.ts +2 -2
- package/src/trace/{005-implementation-selection.ts → implementation-selection.ts} +2 -2
- package/src/trace/{031-local-call-expansion.ts → local-call-expansion.ts} +3 -3
- package/src/trace/{009-selected-handler-provenance.ts → selected-handler-provenance.ts} +1 -1
- package/src/trace/selectors.ts +1 -1
- package/src/trace/{017-trace-context.ts → trace-context.ts} +2 -2
- package/src/trace/{015-trace-edge-recorder.ts → trace-edge-recorder.ts} +2 -2
- package/src/trace/{019-trace-edge-semantics.ts → trace-edge-semantics.ts} +3 -3
- package/src/trace/trace-engine.ts +10 -10
- package/src/trace/{022-trace-fact-preflight.ts → trace-fact-preflight.ts} +2 -2
- package/src/trace/{025-trace-implementation-scope.ts → trace-implementation-scope.ts} +1 -1
- package/src/trace/{028-trace-operation-execution.ts → trace-operation-execution.ts} +10 -10
- package/src/trace/{013-trace-root-scopes.ts → trace-root-scopes.ts} +3 -3
- package/src/trace/{027-trace-scope-execution.ts → trace-scope-execution.ts} +14 -14
- package/src/trace/{029-trace-start-implementation.ts → trace-start-implementation.ts} +7 -7
- package/src/trace/{026-trace-start-scope.ts → trace-start-scope.ts} +5 -5
- package/src/trace/{010-traversal-scope.ts → traversal-scope.ts} +1 -1
- package/dist/chunk-3N3B5KHV.js.map +0 -1
- /package/src/cli/{000-clean.ts → clean.ts} +0 -0
- /package/src/cli/{003-doctor-package-resolution.ts → doctor-package-resolution.ts} +0 -0
- /package/src/cli/{001-index-summary.ts → index-summary.ts} +0 -0
- /package/src/db/{014-binding-helper-provenance.ts → binding-helper-provenance.ts} +0 -0
- /package/src/db/{012-binding-reference-proof.ts → binding-reference-proof.ts} +0 -0
- /package/src/db/{002-fact-json-inventory.ts → fact-json-inventory.ts} +0 -0
- /package/src/db/{013-index-publication-failure.ts → index-publication-failure.ts} +0 -0
- /package/src/db/{005-schema-structure.ts → schema-structure.ts} +0 -0
- /package/src/linker/{006-event-template-link.ts → event-template-link.ts} +0 -0
- /package/src/output/{000-stdout-policy.ts → stdout-policy.ts} +0 -0
- /package/src/parsers/{019-binding-assignment-targets.ts → binding-assignment-targets.ts} +0 -0
- /package/src/parsers/{000-direct-query-execution.ts → direct-query-execution.ts} +0 -0
- /package/src/parsers/{013-executable-body-eligibility.ts → executable-body-eligibility.ts} +0 -0
- /package/src/parsers/{004-fact-identity.ts → fact-identity.ts} +0 -0
- /package/src/parsers/{002-symbol-import-bindings.ts → symbol-import-bindings.ts} +0 -0
- /package/src/trace/{014-compact-contract.ts → compact-contract.ts} +0 -0
- /package/src/trace/{004-dynamic-candidate-sources.ts → dynamic-candidate-sources.ts} +0 -0
- /package/src/trace/{000-dynamic-target-types.ts → dynamic-target-types.ts} +0 -0
- /package/src/trace/{007-implementation-start-diagnostic.ts → implementation-start-diagnostic.ts} +0 -0
- /package/src/trace/{023-nested-event-scopes.ts → nested-event-scopes.ts} +0 -0
- /package/src/trace/{002-trace-diagnostics.ts → trace-diagnostics.ts} +0 -0
- /package/src/trace/{012-trace-graph-lookups.ts → trace-graph-lookups.ts} +0 -0
- /package/src/utils/{000-bounded-projection.ts → bounded-projection.ts} +0 -0
- /package/src/utils/{001-placeholders.ts → placeholders.ts} +0 -0
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Db } from '../db/connection.js';
|
|
2
|
-
import { factLifecycleDiagnostic } from '../db/
|
|
2
|
+
import { factLifecycleDiagnostic } from '../db/fact-lifecycle.js';
|
|
3
3
|
import { ANALYZER_VERSION } from '../version.js';
|
|
4
4
|
|
|
5
5
|
type Diagnostic = Record<string, unknown>;
|
package/src/cli/doctor.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { Db } from '../db/connection.js';
|
|
2
2
|
import { classifyODataPathIntent, normalizeODataOperationInvocationPath } from '../linker/odata-path-normalizer.js';
|
|
3
3
|
import { implementationHintSuggestions } from '../trace/implementation-hints.js';
|
|
4
|
-
import { boundDoctorDiagnostics } from './
|
|
5
|
-
import { factLifecycleDiagnostic } from '../db/
|
|
4
|
+
import { boundDoctorDiagnostics } from './doctor-projection.js';
|
|
5
|
+
import { factLifecycleDiagnostic } from '../db/fact-lifecycle.js';
|
|
6
6
|
import {
|
|
7
7
|
analyzerVersionDiagnostics,
|
|
8
8
|
schemaDriftDiagnostics,
|
|
9
|
-
} from './
|
|
9
|
+
} from './doctor-lifecycle.js';
|
|
10
10
|
import {
|
|
11
11
|
packagePendingDiagnostics,
|
|
12
12
|
symbolCallQuality,
|
|
13
|
-
} from './
|
|
14
|
-
export { linkUpgradeWarnings } from './
|
|
13
|
+
} from './doctor-package-resolution.js';
|
|
14
|
+
export { linkUpgradeWarnings } from './doctor-lifecycle.js';
|
|
15
15
|
|
|
16
16
|
type Diagnostic = Record<string, unknown>;
|
|
17
17
|
interface DoctorOptions {
|
package/src/cli.ts
CHANGED
|
@@ -21,7 +21,7 @@ import { indexWorkspace } from './indexer/workspace-indexer.js';
|
|
|
21
21
|
import { linkWorkspace } from './linker/cross-repo-linker.js';
|
|
22
22
|
import { doctorDiagnostics, linkUpgradeWarnings } from './cli/doctor.js';
|
|
23
23
|
import { trace } from './trace/trace-engine.js';
|
|
24
|
-
import { compactTrace } from './trace/
|
|
24
|
+
import { compactTrace } from './trace/compact-trace.js';
|
|
25
25
|
import {
|
|
26
26
|
parseVars,
|
|
27
27
|
selectorRepoAmbiguousDiagnostic,
|
|
@@ -31,8 +31,8 @@ import { renderTraceTable } from './output/table-output.js';
|
|
|
31
31
|
import { renderTraceJson, renderJson } from './output/json-output.js';
|
|
32
32
|
import { renderDoctorDiagnostics } from './output/doctor-output.js';
|
|
33
33
|
import { renderMermaid } from './output/mermaid-output.js';
|
|
34
|
-
import { createStdoutWriter } from './output/
|
|
35
|
-
import { renderCompactJson } from './output/
|
|
34
|
+
import { createStdoutWriter } from './output/stdout-policy.js';
|
|
35
|
+
import { renderCompactJson } from './output/compact-json-output.js';
|
|
36
36
|
import { VERSION } from './version.js';
|
|
37
37
|
import type {
|
|
38
38
|
DynamicMode,
|
|
@@ -40,8 +40,8 @@ import type {
|
|
|
40
40
|
TraceResult,
|
|
41
41
|
TraceStart,
|
|
42
42
|
} from './types.js';
|
|
43
|
-
import { cleanWorkspaceState } from './cli/
|
|
44
|
-
import { indexCommandOutcome } from './cli/
|
|
43
|
+
import { cleanWorkspaceState } from './cli/clean.js';
|
|
44
|
+
import { indexCommandOutcome } from './cli/index-summary.js';
|
|
45
45
|
|
|
46
46
|
const stdout = createStdoutWriter(process.stdout, fail);
|
|
47
47
|
const TRACE_FORMATS = ['table', 'json', 'mermaid', 'compact-json'] as const;
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
resolvedBindingReferenceProofValid,
|
|
9
9
|
validBindingLexicalScope,
|
|
10
10
|
type BindingProofTarget,
|
|
11
|
-
} from './
|
|
11
|
+
} from './binding-reference-proof.js';
|
|
12
12
|
import {
|
|
13
13
|
hasSingleHopHelperReturn,
|
|
14
|
-
} from './
|
|
14
|
+
} from './binding-helper-provenance.js';
|
|
15
15
|
|
|
16
16
|
export interface BindingFactCategoryCount {
|
|
17
17
|
category: string;
|
|
@@ -3,25 +3,25 @@ import {
|
|
|
3
3
|
selectCallOwner,
|
|
4
4
|
type OwnerCandidate,
|
|
5
5
|
type OwnerSelection,
|
|
6
|
-
} from '../parsers/
|
|
6
|
+
} from '../parsers/fact-identity.js';
|
|
7
7
|
import type { Db, Statement } from './connection.js';
|
|
8
8
|
import {
|
|
9
9
|
resolveRelativeSymbolCall,
|
|
10
|
-
} from './
|
|
10
|
+
} from './relative-symbol-resolution.js';
|
|
11
11
|
import {
|
|
12
12
|
parsePackageImportReference,
|
|
13
|
-
} from '../parsers/
|
|
13
|
+
} from '../parsers/package-fact-contract.js';
|
|
14
14
|
import {
|
|
15
15
|
resolvedBindingReferenceProofValid,
|
|
16
16
|
type BindingProofCall,
|
|
17
17
|
type BindingProofTarget,
|
|
18
|
-
} from './
|
|
18
|
+
} from './binding-reference-proof.js';
|
|
19
19
|
import {
|
|
20
20
|
preparedCallSnapshotError,
|
|
21
|
-
} from './
|
|
21
|
+
} from './index-publication-failure.js';
|
|
22
22
|
import {
|
|
23
23
|
hasSingleHopHelperReturn,
|
|
24
|
-
} from './
|
|
24
|
+
} from './binding-helper-provenance.js';
|
|
25
25
|
|
|
26
26
|
export function insertSymbolCalls(db: Db, repoId: number, rows: SymbolCallFact[]): void {
|
|
27
27
|
const insertStmt = db.prepare('INSERT INTO symbol_calls(repo_id,caller_symbol_id,callee_symbol_id,callee_expression,import_source,source_file,source_line,call_site_start_offset,call_site_end_offset,call_role,status,confidence,evidence_json,unresolved_reason) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)');
|
|
@@ -3,16 +3,16 @@ import type { CallType, RepoKind } from '../types.js';
|
|
|
3
3
|
import { ANALYZER_VERSION } from '../version.js';
|
|
4
4
|
import {
|
|
5
5
|
invalidPackageFactCategories,
|
|
6
|
-
} from './
|
|
6
|
+
} from './package-fact-semantics.js';
|
|
7
7
|
import {
|
|
8
8
|
invalidRelativeFactCategories,
|
|
9
|
-
} from './
|
|
9
|
+
} from './relative-fact-semantics.js';
|
|
10
10
|
import {
|
|
11
11
|
invalidBindingFactCategories,
|
|
12
|
-
} from './
|
|
12
|
+
} from './binding-fact-semantics.js';
|
|
13
13
|
import {
|
|
14
14
|
invalidSymbolFactCategories,
|
|
15
|
-
} from './
|
|
15
|
+
} from './symbol-call-semantics.js';
|
|
16
16
|
|
|
17
17
|
export type PackageFactPhase = 'pre_package' | 'terminal';
|
|
18
18
|
|
|
@@ -3,16 +3,16 @@ import { CURRENT_SCHEMA_VERSION, schemaVersion } from './migrations.js';
|
|
|
3
3
|
import {
|
|
4
4
|
invalidFactJsonCategories,
|
|
5
5
|
type FactJsonCategoryCount,
|
|
6
|
-
} from './
|
|
6
|
+
} from './fact-json-inventory.js';
|
|
7
7
|
import {
|
|
8
8
|
invalidFactSemanticCategories,
|
|
9
9
|
type FactSemanticCategoryCount,
|
|
10
10
|
type PackageFactPhase,
|
|
11
|
-
} from './
|
|
11
|
+
} from './current-fact-semantics.js';
|
|
12
12
|
import {
|
|
13
13
|
invalidSchemaStructureCategories,
|
|
14
14
|
type SchemaStructureCategoryCount,
|
|
15
|
-
} from './
|
|
15
|
+
} from './schema-structure.js';
|
|
16
16
|
import { ANALYZER_VERSION } from '../version.js';
|
|
17
17
|
|
|
18
18
|
export type FactLifecycleCode =
|
|
@@ -4,21 +4,21 @@ import type {
|
|
|
4
4
|
PackagePublicScope,
|
|
5
5
|
PackagePublicSurfaceFact,
|
|
6
6
|
PublicSurfaceTarget,
|
|
7
|
-
} from '../parsers/
|
|
7
|
+
} from '../parsers/package-public-surface.js';
|
|
8
8
|
import {
|
|
9
9
|
parsePackageImportReference,
|
|
10
10
|
parsePackagePublicSurfaceFact,
|
|
11
|
-
} from '../parsers/
|
|
11
|
+
} from '../parsers/package-fact-contract.js';
|
|
12
12
|
import type { SymbolImportReference } from
|
|
13
|
-
'../parsers/
|
|
14
|
-
import type { PackageFactPhase } from './
|
|
13
|
+
'../parsers/symbol-import-bindings.js';
|
|
14
|
+
import type { PackageFactPhase } from './current-fact-semantics.js';
|
|
15
15
|
import {
|
|
16
16
|
expectedPackageImportResolutions,
|
|
17
17
|
type PackageCallResolution,
|
|
18
|
-
} from '../linker/
|
|
18
|
+
} from '../linker/package-import-symbol-resolver.js';
|
|
19
19
|
import {
|
|
20
20
|
invalidPackageSymbolSurfaceCount,
|
|
21
|
-
} from './
|
|
21
|
+
} from './package-symbol-surface-semantics.js';
|
|
22
22
|
|
|
23
23
|
export interface PackageFactCategoryCount {
|
|
24
24
|
category: string;
|
package/src/db/{010-package-symbol-surface-semantics.ts → package-symbol-surface-semantics.ts}
RENAMED
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
type PackagePublicScope,
|
|
7
7
|
type PackagePublicSurfaceFact,
|
|
8
8
|
type PublicSurfaceTarget,
|
|
9
|
-
} from '../parsers/
|
|
9
|
+
} from '../parsers/package-public-surface.js';
|
|
10
10
|
import {
|
|
11
11
|
parsePackagePublicSurfaceFact,
|
|
12
|
-
} from '../parsers/
|
|
12
|
+
} from '../parsers/package-fact-contract.js';
|
|
13
13
|
import type { Db } from './connection.js';
|
|
14
14
|
|
|
15
15
|
interface Exposure {
|
|
@@ -2,7 +2,7 @@ import type { Db } from './connection.js';
|
|
|
2
2
|
import { ANALYZER_VERSION } from '../version.js';
|
|
3
3
|
import {
|
|
4
4
|
parsePackageImportReference,
|
|
5
|
-
} from '../parsers/
|
|
5
|
+
} from '../parsers/package-fact-contract.js';
|
|
6
6
|
|
|
7
7
|
interface PackageCallRow {
|
|
8
8
|
id: number;
|
|
@@ -2,12 +2,12 @@ import type { Db } from './connection.js';
|
|
|
2
2
|
import { ANALYZER_VERSION } from '../version.js';
|
|
3
3
|
import {
|
|
4
4
|
resolveRelativeSymbolCall,
|
|
5
|
-
} from './
|
|
5
|
+
} from './relative-symbol-resolution.js';
|
|
6
6
|
import type { SymbolCallFact } from '../types.js';
|
|
7
7
|
import { parseRelativeImportReference } from
|
|
8
|
-
'../parsers/
|
|
8
|
+
'../parsers/package-fact-contract.js';
|
|
9
9
|
import type { SymbolImportReference } from
|
|
10
|
-
'../parsers/
|
|
10
|
+
'../parsers/symbol-import-bindings.js';
|
|
11
11
|
|
|
12
12
|
export interface RelativeFactCategoryCount {
|
|
13
13
|
category: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { posix } from 'node:path';
|
|
2
2
|
import type { SymbolCallFact } from '../types.js';
|
|
3
3
|
import { packageModuleRequest } from
|
|
4
|
-
'../parsers/
|
|
4
|
+
'../parsers/symbol-import-bindings.js';
|
|
5
5
|
import type { Db } from './connection.js';
|
|
6
6
|
|
|
7
7
|
export interface RelativeSymbolCallResolution {
|
package/src/db/repositories.ts
CHANGED
|
@@ -11,11 +11,11 @@ import type {
|
|
|
11
11
|
import {
|
|
12
12
|
selectCallOwner,
|
|
13
13
|
type OwnerCandidate,
|
|
14
|
-
} from '../parsers/
|
|
14
|
+
} from '../parsers/fact-identity.js';
|
|
15
15
|
import {
|
|
16
16
|
PreparedRepositorySnapshotError,
|
|
17
17
|
type PreparedSnapshotFailureCode,
|
|
18
|
-
} from './
|
|
18
|
+
} from './index-publication-failure.js';
|
|
19
19
|
export interface RepoRow {
|
|
20
20
|
id: number;
|
|
21
21
|
name: string;
|
|
@@ -505,4 +505,4 @@ export function insertExecutableSymbols(db: Db, repoId: number, rows: Executable
|
|
|
505
505
|
const stmt = db.prepare('INSERT INTO symbols(repo_id,file_id,kind,name,qualified_name,exported,start_line,end_line,start_offset,end_offset,source_file,exported_name,evidence_json) VALUES(?,(SELECT id FROM files WHERE repo_id=? AND relative_path=?),?,?,?,?,?,?,?,?,?,?,?)');
|
|
506
506
|
for (const r of rows) stmt.run(repoId, repoId, r.sourceFile, r.kind, r.localName, r.qualifiedName, r.exported ? 1 : 0, r.startLine, r.endLine, r.startOffset, r.endOffset, r.sourceFile, r.exportedName, r.importExportEvidence ? JSON.stringify(r.importExportEvidence) : null);
|
|
507
507
|
}
|
|
508
|
-
export { insertCalls, insertSymbolCalls } from './
|
|
508
|
+
export { insertCalls, insertSymbolCalls } from './call-fact-repository.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SymbolCallFact } from '../types.js';
|
|
2
2
|
import { ANALYZER_VERSION } from '../version.js';
|
|
3
|
-
import { resolveSymbolCallTarget } from './
|
|
3
|
+
import { resolveSymbolCallTarget } from './call-fact-repository.js';
|
|
4
4
|
import type { Db } from './connection.js';
|
|
5
5
|
|
|
6
6
|
export interface SymbolFactCategoryCount {
|
package/src/index.ts
CHANGED
|
@@ -13,8 +13,8 @@ export { trace } from './trace/trace-engine.js';
|
|
|
13
13
|
export {
|
|
14
14
|
compactTrace,
|
|
15
15
|
traceAndCompact,
|
|
16
|
-
} from './trace/
|
|
17
|
-
export type { CompactTraceExecution } from './trace/
|
|
16
|
+
} from './trace/compact-trace.js';
|
|
17
|
+
export type { CompactTraceExecution } from './trace/compact-trace.js';
|
|
18
18
|
export type {
|
|
19
19
|
CompactDecisionV1,
|
|
20
20
|
CompactDiagnosticDetailsV1,
|
|
@@ -31,7 +31,7 @@ export type {
|
|
|
31
31
|
CompactStartV1,
|
|
32
32
|
CompactStatus,
|
|
33
33
|
CompactStatusCountsV1,
|
|
34
|
-
} from './trace/
|
|
34
|
+
} from './trace/compact-contract.js';
|
|
35
35
|
export { parseImplementationHint } from './trace/implementation-hints.js';
|
|
36
36
|
export type { DynamicMode, ImplementationHint, TraceOptions } from './types.js';
|
|
37
37
|
export { redactValue, redactText } from './utils/redaction.js';
|
|
@@ -27,14 +27,14 @@ import {
|
|
|
27
27
|
loadPackageJsonSnapshot,
|
|
28
28
|
} from '../parsers/package-json-parser.js';
|
|
29
29
|
import { parseServiceBindings } from '../parsers/service-binding-parser.js';
|
|
30
|
-
import { reconcileSourceFacts } from '../parsers/
|
|
30
|
+
import { reconcileSourceFacts } from '../parsers/source-fact-reconciliation.js';
|
|
31
31
|
import {
|
|
32
32
|
analyzeRepositoryPackageSurface,
|
|
33
33
|
mergePackageSymbolEvidence,
|
|
34
|
-
} from '../parsers/
|
|
34
|
+
} from '../parsers/package-surface-publication.js';
|
|
35
35
|
import type {
|
|
36
36
|
PackagePublicSurfaceFact,
|
|
37
|
-
} from '../parsers/
|
|
37
|
+
} from '../parsers/package-public-surface.js';
|
|
38
38
|
import { normalizePath } from '../utils/path-utils.js';
|
|
39
39
|
import { errorMessage } from '../utils/diagnostics.js';
|
|
40
40
|
import { sha256Text } from '../utils/hashing.js';
|
|
@@ -44,11 +44,11 @@ import {
|
|
|
44
44
|
finalizePackageTargetInvalidations,
|
|
45
45
|
invalidatePackageTargetFacts,
|
|
46
46
|
type PackageInvalidationBatch,
|
|
47
|
-
} from '../db/
|
|
47
|
+
} from '../db/package-target-invalidation.js';
|
|
48
48
|
import {
|
|
49
49
|
isPreparedRepositorySnapshotError,
|
|
50
50
|
recordPreparedSnapshotFailure,
|
|
51
|
-
} from '../db/
|
|
51
|
+
} from '../db/index-publication-failure.js';
|
|
52
52
|
import {
|
|
53
53
|
loadRepositorySourceContext,
|
|
54
54
|
type RepositorySourceContext,
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
finalizePackageTargetInvalidations,
|
|
14
14
|
mergePackageInvalidationEffects,
|
|
15
15
|
type PackageInvalidationBatch,
|
|
16
|
-
} from '../db/
|
|
16
|
+
} from '../db/package-target-invalidation.js';
|
|
17
17
|
import {
|
|
18
18
|
isPreparedRepositorySnapshotError,
|
|
19
|
-
} from '../db/
|
|
20
|
-
import { binaryCompare } from '../parsers/
|
|
19
|
+
} from '../db/index-publication-failure.js';
|
|
20
|
+
import { binaryCompare } from '../parsers/fact-identity.js';
|
|
21
21
|
// Ownerless rows predate PID coordination; this matches doctor's stale-run threshold without taking over a recent legacy writer.
|
|
22
22
|
const LEGACY_OWNER_RECOVERY_MS = 60 * 60 * 1_000;
|
|
23
23
|
type RunningIndexRow = Record<string, unknown>;
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
linkedCallEvidence,
|
|
5
5
|
objectJson,
|
|
6
6
|
objectValue,
|
|
7
|
-
} from './
|
|
7
|
+
} from './call-evidence.js';
|
|
8
8
|
import { applyVariables } from './dynamic-edge-resolver.js';
|
|
9
|
-
import { insertEventCallEdge } from './
|
|
9
|
+
import { insertEventCallEdge } from './event-template-link.js';
|
|
10
10
|
import { externalHttpTarget } from './external-http-target.js';
|
|
11
11
|
import {
|
|
12
12
|
classifyODataPathIntent,
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
boundCandidateLikeEvidence,
|
|
7
7
|
projectBounded,
|
|
8
8
|
type BoundedProjection,
|
|
9
|
-
} from '../utils/
|
|
10
|
-
import { extractPlaceholderKeys } from '../utils/
|
|
9
|
+
} from '../utils/bounded-projection.js';
|
|
10
|
+
import { extractPlaceholderKeys } from '../utils/placeholders.js';
|
|
11
11
|
|
|
12
12
|
export interface LinkedOperationResolution {
|
|
13
13
|
target?: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Db } from '../db/connection.js';
|
|
2
2
|
import { linkHelperPackages } from './helper-package-linker.js';
|
|
3
|
-
import { linkImplementations as linkCanonicalImplementations } from './
|
|
4
|
-
import { linkPackageImportSymbolCalls } from './
|
|
5
|
-
import { linkEventSubscriptionHandlers } from './
|
|
6
|
-
import { insertCallEdge } from './
|
|
7
|
-
import { assertWorkspaceLinkable } from '../db/
|
|
3
|
+
import { linkImplementations as linkCanonicalImplementations } from './implementation-candidates.js';
|
|
4
|
+
import { linkPackageImportSymbolCalls } from './package-import-symbol-resolver.js';
|
|
5
|
+
import { linkEventSubscriptionHandlers } from './event-subscription-handler-linker.js';
|
|
6
|
+
import { insertCallEdge } from './call-edge-insertion.js';
|
|
7
|
+
import { assertWorkspaceLinkable } from '../db/fact-lifecycle.js';
|
|
8
8
|
export interface LinkWorkspaceResult {
|
|
9
9
|
edgeCount: number;
|
|
10
10
|
unresolvedCount: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
|
-
import { projectBounded } from '../utils/
|
|
2
|
+
import { projectBounded } from '../utils/bounded-projection.js';
|
|
3
3
|
|
|
4
4
|
export type ExternalTargetKind = 'destination' | 'static_url' | 'url_expression' | 'unknown';
|
|
5
5
|
export interface ExternalHttpTarget { kind: ExternalTargetKind; toKind: 'external_destination' | 'external_endpoint'; toId: string; label: string; method?: string; dynamic: boolean; expression?: string; candidateLiteralCount?: number; shownCandidateLiteralCount?: number; omittedCandidateLiteralCount?: number; }
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
boundedImplementationTargetIds,
|
|
7
7
|
displayImplementationCandidates,
|
|
8
8
|
selectedHandlerProvenance,
|
|
9
|
-
} from './
|
|
9
|
+
} from './implementation-evidence-projection.js';
|
|
10
10
|
|
|
11
11
|
interface ImplementationCandidate extends Record<string, unknown> {
|
|
12
12
|
methodId: number;
|
package/src/linker/{003-package-import-symbol-resolver.ts → package-import-symbol-resolver.ts}
RENAMED
|
@@ -3,14 +3,14 @@ import type {
|
|
|
3
3
|
PackagePublicScope,
|
|
4
4
|
PackagePublicSurfaceFact,
|
|
5
5
|
PublicSurfaceTarget,
|
|
6
|
-
} from '../parsers/
|
|
6
|
+
} from '../parsers/package-public-surface.js';
|
|
7
7
|
import type {
|
|
8
8
|
SymbolImportReference,
|
|
9
|
-
} from '../parsers/
|
|
9
|
+
} from '../parsers/symbol-import-bindings.js';
|
|
10
10
|
import {
|
|
11
11
|
parsePackageImportReference,
|
|
12
12
|
parsePackagePublicSurfaceFact,
|
|
13
|
-
} from '../parsers/
|
|
13
|
+
} from '../parsers/package-fact-contract.js';
|
|
14
14
|
|
|
15
15
|
export interface PackageSymbolLinkSummary {
|
|
16
16
|
resolved: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Db } from '../db/connection.js';
|
|
2
|
-
import { extractPlaceholderKeys } from '../utils/
|
|
3
|
-
import { canonicalImplementationEvidence } from './
|
|
2
|
+
import { extractPlaceholderKeys } from '../utils/placeholders.js';
|
|
3
|
+
import { canonicalImplementationEvidence } from './implementation-candidates.js';
|
|
4
4
|
export interface OperationTarget {
|
|
5
5
|
operationId: number;
|
|
6
6
|
repoName: string;
|
|
@@ -9,7 +9,7 @@ import type {
|
|
|
9
9
|
import {
|
|
10
10
|
executableSymbolCandidates,
|
|
11
11
|
selectCallOwner,
|
|
12
|
-
} from './
|
|
12
|
+
} from './fact-identity.js';
|
|
13
13
|
import {
|
|
14
14
|
bindingSite,
|
|
15
15
|
createBindingLexicalIndex,
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
type BindingLexicalIndex,
|
|
18
18
|
type BindingLexicalSite,
|
|
19
19
|
type VisibleBinding,
|
|
20
|
-
} from './
|
|
21
|
-
import { selectVisibleBinding } from './
|
|
20
|
+
} from './binding-lexical-scope.js';
|
|
21
|
+
import { selectVisibleBinding } from './binding-visibility.js';
|
|
22
22
|
|
|
23
23
|
const scopeChainCap = 16;
|
|
24
24
|
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
symbolImportReference,
|
|
10
10
|
type SymbolImportBinding,
|
|
11
11
|
type SymbolImportReference,
|
|
12
|
-
} from './
|
|
12
|
+
} from './symbol-import-bindings.js';
|
|
13
13
|
import type { ClassifiedOutboundCall } from './outbound-call-parser.js';
|
|
14
14
|
import {
|
|
15
15
|
localSymbolTarget,
|
|
16
16
|
type LocalSymbolTargetIdentity,
|
|
17
|
-
} from './
|
|
17
|
+
} from './local-symbol-reference.js';
|
|
18
18
|
|
|
19
19
|
interface HandlerTarget {
|
|
20
20
|
calleeExpression: string;
|
|
@@ -3,8 +3,8 @@ import type { ExecutableSymbolFact } from '../types.js';
|
|
|
3
3
|
import {
|
|
4
4
|
lexicalIdentifierDeclaration,
|
|
5
5
|
lexicalIdentifierDeclarations,
|
|
6
|
-
} from './
|
|
7
|
-
import { stableLocalValueReference } from './
|
|
6
|
+
} from './symbol-import-bindings.js';
|
|
7
|
+
import { stableLocalValueReference } from './stable-local-value.js';
|
|
8
8
|
|
|
9
9
|
export interface LocalSymbolTargetIdentity {
|
|
10
10
|
sourceFile: string;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
classifyODataPathIntent,
|
|
4
4
|
normalizeODataOperationInvocationPath,
|
|
5
5
|
} from '../linker/odata-path-normalizer.js';
|
|
6
|
-
import { analyzeODataPathStructure } from '../linker/
|
|
6
|
+
import { analyzeODataPathStructure } from '../linker/odata-path-structure.js';
|
|
7
7
|
|
|
8
8
|
export type OperationPathStatus = 'static' | 'ambiguous' | 'dynamic' | 'unknown';
|
|
9
9
|
|
|
@@ -4,12 +4,12 @@ import { classifyODataPathIntent } from '../linker/odata-path-normalizer.js';
|
|
|
4
4
|
import type { OutboundCallFact } from '../types.js';
|
|
5
5
|
import { normalizePath, stripQuotes } from '../utils/path-utils.js';
|
|
6
6
|
import { summarizeExpression } from '../utils/redaction.js';
|
|
7
|
-
import { directQueryBuilderStatement } from './
|
|
7
|
+
import { directQueryBuilderStatement } from './direct-query-execution.js';
|
|
8
8
|
import {
|
|
9
9
|
expressionName,
|
|
10
10
|
queryEntityFromAst,
|
|
11
11
|
variableInitializers,
|
|
12
|
-
} from './
|
|
12
|
+
} from './query-entity-resolution.js';
|
|
13
13
|
import {
|
|
14
14
|
CDS_LIFECYCLE_EVENTS,
|
|
15
15
|
calledWrapperNames,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
wrapperSpec,
|
|
35
35
|
type ExpressionResolution,
|
|
36
36
|
type WrapperSpec,
|
|
37
|
-
} from './
|
|
37
|
+
} from './outbound-expression-analysis.js';
|
|
38
38
|
import {
|
|
39
39
|
analyzeOperationPath,
|
|
40
40
|
operationPathExpression,
|