@ttsc/graph 0.30.4 → 0.31.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/README.md +122 -30
- package/lib/CapturedProcessOutput.d.ts +47 -0
- package/lib/CapturedProcessOutput.js +3 -0
- package/lib/CapturedProcessOutput.js.map +1 -0
- package/lib/ILauncherOption.d.ts +22 -0
- package/lib/ILauncherOption.js +3 -0
- package/lib/ILauncherOption.js.map +1 -0
- package/lib/IProjectOptions.d.ts +18 -0
- package/lib/IProjectOptions.js +3 -0
- package/lib/IProjectOptions.js.map +1 -0
- package/lib/ParsedLauncherOptions.d.ts +13 -0
- package/lib/ParsedLauncherOptions.js +3 -0
- package/lib/ParsedLauncherOptions.js.map +1 -0
- package/lib/TtscGraphApplication.d.ts +38 -1
- package/lib/TtscGraphApplication.js +26 -1
- package/lib/TtscGraphApplication.js.map +1 -1
- package/lib/TtscGraphLauncherArguments.d.ts +115 -0
- package/lib/TtscGraphLauncherArguments.js +181 -0
- package/lib/TtscGraphLauncherArguments.js.map +1 -0
- package/lib/TtscGraphViewSnapshot.d.ts +35 -0
- package/lib/TtscGraphViewSnapshot.js +48 -0
- package/lib/TtscGraphViewSnapshot.js.map +1 -0
- package/lib/index.d.ts +9 -24
- package/lib/index.js +6 -128
- package/lib/index.js.map +1 -1
- package/lib/internal/GraphProcessTrace.d.ts +1 -0
- package/lib/internal/GraphProcessTrace.js +235 -0
- package/lib/internal/GraphProcessTrace.js.map +1 -0
- package/lib/launcherArgs.d.ts +75 -16
- package/lib/launcherArgs.js +77 -8
- package/lib/launcherArgs.js.map +1 -1
- package/lib/model/IArtifactDirectory.d.ts +26 -0
- package/lib/model/IArtifactDirectory.js +3 -0
- package/lib/model/IArtifactDirectory.js.map +1 -0
- package/lib/model/IArtifactInputs.d.ts +19 -0
- package/lib/model/IArtifactInputs.js +3 -0
- package/lib/model/IArtifactInputs.js.map +1 -0
- package/lib/model/IPublishedArtifacts.d.ts +76 -0
- package/lib/model/IPublishedArtifacts.js +3 -0
- package/lib/model/IPublishedArtifacts.js.map +1 -0
- package/lib/model/IPublishedArtifactsResident.d.ts +19 -0
- package/lib/model/IPublishedArtifactsResident.js +3 -0
- package/lib/model/IPublishedArtifactsResident.js.map +1 -0
- package/lib/model/ITtscLintDaemonTarget.d.ts +20 -0
- package/lib/model/ITtscLintDaemonTarget.js +3 -0
- package/lib/model/ITtscLintDaemonTarget.js.map +1 -0
- package/lib/model/TtscGraphLinePeer.d.ts +146 -0
- package/lib/model/TtscGraphLinePeer.js +213 -0
- package/lib/model/TtscGraphLinePeer.js.map +1 -0
- package/lib/model/TtscGraphMemory.d.ts +156 -16
- package/lib/model/TtscGraphMemory.js +228 -222
- package/lib/model/TtscGraphMemory.js.map +1 -1
- package/lib/model/TtscGraphNativeArguments.d.ts +40 -0
- package/lib/model/TtscGraphNativeArguments.js +64 -0
- package/lib/model/TtscGraphNativeArguments.js.map +1 -0
- package/lib/model/TtscGraphNodeId.d.ts +55 -3
- package/lib/model/TtscGraphNodeId.js +40 -2
- package/lib/model/TtscGraphNodeId.js.map +1 -1
- package/lib/model/TtscGraphProjection.d.ts +156 -0
- package/lib/model/TtscGraphProjection.js +390 -0
- package/lib/model/TtscGraphProjection.js.map +1 -0
- package/lib/model/TtscGraphProtocol.d.ts +28 -0
- package/lib/model/TtscGraphProtocol.js +928 -0
- package/lib/model/TtscGraphProtocol.js.map +1 -0
- package/lib/model/TtscGraphReadonly.d.ts +15 -0
- package/lib/model/TtscGraphReadonly.js +3 -0
- package/lib/model/TtscGraphReadonly.js.map +1 -0
- package/lib/model/TtscGraphRequestOptions.d.ts +16 -0
- package/lib/model/TtscGraphRequestOptions.js +3 -0
- package/lib/model/TtscGraphRequestOptions.js.map +1 -0
- package/lib/model/TtscGraphSession.d.ts +82 -36
- package/lib/model/TtscGraphSession.js +164 -1238
- package/lib/model/TtscGraphSession.js.map +1 -1
- package/lib/model/TtscGraphSessionOptions.d.ts +20 -0
- package/lib/model/TtscGraphSessionOptions.js +3 -0
- package/lib/model/TtscGraphSessionOptions.js.map +1 -0
- package/lib/model/TtscGraphSessionState.d.ts +187 -0
- package/lib/model/TtscGraphSessionState.js +417 -0
- package/lib/model/TtscGraphSessionState.js.map +1 -0
- package/lib/model/TtscGraphShardStore.d.ts +64 -3
- package/lib/model/TtscGraphShardStore.js +85 -15
- package/lib/model/TtscGraphShardStore.js.map +1 -1
- package/lib/model/TtscGraphSourceReader.d.ts +31 -8
- package/lib/model/TtscGraphSourceReader.js +37 -13
- package/lib/model/TtscGraphSourceReader.js.map +1 -1
- package/lib/model/TtscLintDaemon.d.ts +35 -17
- package/lib/model/TtscLintDaemon.js +39 -117
- package/lib/model/TtscLintDaemon.js.map +1 -1
- package/lib/model/TtscLintDaemonState.d.ts +69 -0
- package/lib/model/TtscLintDaemonState.js +166 -0
- package/lib/model/TtscLintDaemonState.js.map +1 -0
- package/lib/model/copyGraphRecords.d.ts +14 -0
- package/lib/model/copyGraphRecords.js +19 -0
- package/lib/model/copyGraphRecords.js.map +1 -0
- package/lib/model/copyGraphSnapshot.d.ts +17 -0
- package/lib/model/copyGraphSnapshot.js +33 -0
- package/lib/model/copyGraphSnapshot.js.map +1 -0
- package/lib/model/loadGraph.d.ts +19 -10
- package/lib/model/loadGraph.js +21 -12
- package/lib/model/loadGraph.js.map +1 -1
- package/lib/model/publishedArtifacts.d.ts +78 -97
- package/lib/model/publishedArtifacts.js +271 -85
- package/lib/model/publishedArtifacts.js.map +1 -1
- package/lib/nativeExecutable.d.ts +19 -8
- package/lib/nativeExecutable.js +75 -15
- package/lib/nativeExecutable.js.map +1 -1
- package/lib/reduce.d.ts +19 -45
- package/lib/reduce.js +19 -3
- package/lib/reduce.js.map +1 -1
- package/lib/resolveGraphBinary.d.ts +9 -0
- package/lib/resolveGraphBinary.js +11 -3
- package/lib/resolveGraphBinary.js.map +1 -1
- package/lib/runGraph.d.ts +21 -0
- package/lib/runGraph.js +83 -0
- package/lib/runGraph.js.map +1 -0
- package/lib/server/IResolvedGraphHandle.d.ts +22 -0
- package/lib/server/IResolvedGraphHandle.js +3 -0
- package/lib/server/IResolvedGraphHandle.js.map +1 -0
- package/lib/server/createServer.d.ts +14 -10
- package/lib/server/createServer.js +42 -39
- package/lib/server/createServer.js.map +1 -1
- package/lib/server/exportSurface.d.ts +23 -1
- package/lib/server/exportSurface.js +23 -1
- package/lib/server/exportSurface.js.map +1 -1
- package/lib/server/formatGraphFailure.d.ts +20 -0
- package/lib/server/formatGraphFailure.js +35 -0
- package/lib/server/formatGraphFailure.js.map +1 -0
- package/lib/server/pathPolicy.d.ts +70 -5
- package/lib/server/pathPolicy.js +66 -4
- package/lib/server/pathPolicy.js.map +1 -1
- package/lib/server/resolveHandle.d.ts +10 -5
- package/lib/server/resolveHandle.js +39 -7
- package/lib/server/resolveHandle.js.map +1 -1
- package/lib/server/resultAudit.d.ts +17 -14
- package/lib/server/resultAudit.js +56 -27
- package/lib/server/resultAudit.js.map +1 -1
- package/lib/server/resultNext.d.ts +26 -1
- package/lib/server/resultNext.js +14 -0
- package/lib/server/resultNext.js.map +1 -1
- package/lib/server/runDetails.d.ts +72 -15
- package/lib/server/runDetails.js +104 -69
- package/lib/server/runDetails.js.map +1 -1
- package/lib/server/runEntrypoints.d.ts +9 -0
- package/lib/server/runEntrypoints.js +9 -0
- package/lib/server/runEntrypoints.js.map +1 -1
- package/lib/server/runLookup.d.ts +13 -3
- package/lib/server/runLookup.js +19 -6
- package/lib/server/runLookup.js.map +1 -1
- package/lib/server/runOverview.d.ts +13 -4
- package/lib/server/runOverview.js +13 -4
- package/lib/server/runOverview.js.map +1 -1
- package/lib/server/runTour.d.ts +9 -0
- package/lib/server/runTour.js +33 -65
- package/lib/server/runTour.js.map +1 -1
- package/lib/server/runTrace.d.ts +25 -1
- package/lib/server/runTrace.js +133 -88
- package/lib/server/runTrace.js.map +1 -1
- package/lib/server/startServer.d.ts +16 -0
- package/lib/server/startServer.js +24 -1
- package/lib/server/startServer.js.map +1 -1
- package/lib/structures/ITtscGraphApplication.d.ts +95 -41
- package/lib/structures/ITtscGraphDecorator.d.ts +18 -0
- package/lib/structures/ITtscGraphDetails.d.ts +81 -6
- package/lib/structures/ITtscGraphDocTag.d.ts +17 -8
- package/lib/structures/ITtscGraphDump.d.ts +106 -8
- package/lib/structures/ITtscGraphEdge.d.ts +14 -2
- package/lib/structures/ITtscGraphEntrypoints.d.ts +81 -6
- package/lib/structures/ITtscGraphEscape.d.ts +24 -2
- package/lib/structures/ITtscGraphEvidence.d.ts +9 -0
- package/lib/structures/ITtscGraphLookup.d.ts +42 -9
- package/lib/structures/ITtscGraphNext.d.ts +12 -1
- package/lib/structures/ITtscGraphNode.d.ts +38 -11
- package/lib/structures/ITtscGraphOverview.d.ts +81 -6
- package/lib/structures/ITtscGraphSnapshot.d.ts +97 -2
- package/lib/structures/ITtscGraphSpan.d.ts +9 -0
- package/lib/structures/ITtscGraphTour.d.ts +83 -9
- package/lib/structures/ITtscGraphTrace.d.ts +99 -14
- package/lib/structures/RawDump.d.ts +22 -0
- package/lib/structures/RawDump.js +3 -0
- package/lib/structures/RawDump.js.map +1 -0
- package/lib/structures/RawEdge.d.ts +20 -0
- package/lib/structures/RawEdge.js +3 -0
- package/lib/structures/RawEdge.js.map +1 -0
- package/lib/structures/RawNode.d.ts +26 -0
- package/lib/structures/RawNode.js +3 -0
- package/lib/structures/RawNode.js.map +1 -0
- package/lib/structures/TtscGraphArtifactNodeKind.d.ts +9 -0
- package/lib/structures/TtscGraphArtifactNodeKind.js +9 -0
- package/lib/structures/TtscGraphArtifactNodeKind.js.map +1 -1
- package/lib/structures/TtscGraphDumpEdgeKind.d.ts +15 -1
- package/lib/structures/TtscGraphDumpNodeKind.d.ts +9 -0
- package/lib/structures/TtscGraphEdgeKind.d.ts +13 -4
- package/lib/structures/TtscGraphNodeKind.d.ts +9 -0
- package/lib/structures/TtscGraphNodeModifier.d.ts +9 -0
- package/lib/structures/ViewerLink.d.ts +20 -0
- package/lib/structures/ViewerLink.js +3 -0
- package/lib/structures/ViewerLink.js.map +1 -0
- package/lib/structures/ViewerNode.d.ts +24 -0
- package/lib/structures/ViewerNode.js +3 -0
- package/lib/structures/ViewerNode.js.map +1 -0
- package/lib/structures/ViewerPayload.d.ts +42 -0
- package/lib/structures/ViewerPayload.js +3 -0
- package/lib/structures/ViewerPayload.js.map +1 -0
- package/lib/view.d.ts +9 -0
- package/lib/view.js +203 -91
- package/lib/view.js.map +1 -1
- package/lib/viewer/viewer.js +1 -1
- package/package.json +8 -6
- package/src/CapturedProcessOutput.ts +50 -0
- package/src/ILauncherOption.ts +24 -0
- package/src/IProjectOptions.ts +19 -0
- package/src/ParsedLauncherOptions.ts +13 -0
- package/src/TtscGraphApplication.ts +38 -1
- package/src/TtscGraphLauncherArguments.ts +207 -0
- package/src/TtscGraphViewSnapshot.ts +46 -0
- package/src/index.ts +9 -160
- package/src/internal/GraphProcessTrace.ts +242 -0
- package/src/launcherArgs.ts +89 -23
- package/src/model/IArtifactDirectory.ts +27 -0
- package/src/model/IArtifactInputs.ts +21 -0
- package/src/model/IPublishedArtifacts.ts +81 -0
- package/src/model/IPublishedArtifactsResident.ts +24 -0
- package/src/model/ITtscLintDaemonTarget.ts +22 -0
- package/src/model/TtscGraphLinePeer.ts +318 -0
- package/src/model/TtscGraphMemory.ts +284 -246
- package/src/model/TtscGraphNativeArguments.ts +67 -0
- package/src/model/TtscGraphNodeId.ts +57 -3
- package/src/model/TtscGraphProjection.ts +473 -0
- package/src/model/TtscGraphProtocol.ts +90 -0
- package/src/model/TtscGraphReadonly.ts +17 -0
- package/src/model/TtscGraphRequestOptions.ts +16 -0
- package/src/model/TtscGraphSession.ts +196 -475
- package/src/model/TtscGraphSessionOptions.ts +22 -0
- package/src/model/TtscGraphSessionState.ts +558 -0
- package/src/model/TtscGraphShardStore.ts +99 -23
- package/src/model/TtscGraphSourceReader.ts +37 -15
- package/src/model/TtscLintDaemon.ts +55 -136
- package/src/model/TtscLintDaemonState.ts +174 -0
- package/src/model/copyGraphRecords.ts +17 -0
- package/src/model/copyGraphSnapshot.ts +30 -0
- package/src/model/loadGraph.ts +23 -12
- package/src/model/publishedArtifacts.ts +361 -182
- package/src/nativeExecutable.ts +93 -26
- package/src/reduce.ts +24 -51
- package/src/resolveGraphBinary.ts +13 -3
- package/src/runGraph.ts +90 -0
- package/src/server/IResolvedGraphHandle.ts +24 -0
- package/src/server/createServer.ts +16 -22
- package/src/server/exportSurface.ts +23 -1
- package/src/server/formatGraphFailure.ts +32 -0
- package/src/server/pathPolicy.ts +70 -5
- package/src/server/resolveHandle.ts +45 -14
- package/src/server/resultAudit.ts +58 -27
- package/src/server/resultNext.ts +26 -1
- package/src/server/runDetails.ts +138 -73
- package/src/server/runEntrypoints.ts +13 -1
- package/src/server/runLookup.ts +23 -7
- package/src/server/runOverview.ts +17 -5
- package/src/server/runTour.ts +44 -82
- package/src/server/runTrace.ts +175 -102
- package/src/server/startServer.ts +29 -1
- package/src/structures/ITtscGraphApplication.ts +95 -41
- package/src/structures/ITtscGraphDecorator.ts +18 -0
- package/src/structures/ITtscGraphDetails.ts +81 -6
- package/src/structures/ITtscGraphDocTag.ts +17 -8
- package/src/structures/ITtscGraphDump.ts +106 -8
- package/src/structures/ITtscGraphEdge.ts +14 -2
- package/src/structures/ITtscGraphEntrypoints.ts +81 -6
- package/src/structures/ITtscGraphEscape.ts +24 -2
- package/src/structures/ITtscGraphEvidence.ts +9 -0
- package/src/structures/ITtscGraphLookup.ts +42 -9
- package/src/structures/ITtscGraphNext.ts +12 -1
- package/src/structures/ITtscGraphNode.ts +38 -11
- package/src/structures/ITtscGraphOverview.ts +88 -6
- package/src/structures/ITtscGraphSnapshot.ts +117 -2
- package/src/structures/ITtscGraphSpan.ts +9 -0
- package/src/structures/ITtscGraphTour.ts +83 -9
- package/src/structures/ITtscGraphTrace.ts +100 -14
- package/src/structures/RawDump.ts +25 -0
- package/src/structures/RawEdge.ts +22 -0
- package/src/structures/RawNode.ts +31 -0
- package/src/structures/TtscGraphArtifactNodeKind.ts +9 -0
- package/src/structures/TtscGraphDumpEdgeKind.ts +15 -1
- package/src/structures/TtscGraphDumpNodeKind.ts +9 -0
- package/src/structures/TtscGraphEdgeKind.ts +13 -4
- package/src/structures/TtscGraphNodeKind.ts +9 -0
- package/src/structures/TtscGraphNodeModifier.ts +9 -0
- package/src/structures/ViewerLink.ts +22 -0
- package/src/structures/ViewerNode.ts +28 -0
- package/src/structures/ViewerPayload.ts +52 -0
- package/src/view.ts +208 -110
- package/src/viewer/legend.ts +119 -27
|
@@ -16,11 +16,13 @@ import { ITtscGraphTrace } from "./ITtscGraphTrace";
|
|
|
16
16
|
* type relations. It returns answer-ready index evidence: names, edges,
|
|
17
17
|
* signatures, decorators, tests, spans, and anchors.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
19
|
+
* Declaration facts come from the compiler for the synchronized snapshot.
|
|
20
|
+
* The server derives file containers, containment, property kinds, path-convention test roles and dispatch
|
|
21
|
+
* hops; lint plugins supply artifact facts. The result's audit distinguishes
|
|
22
|
+
* these producers. Trust compiler facts without re-checking against files.
|
|
23
|
+
* Where an operation ranks a shortlist against your question (`lookup`,
|
|
24
|
+
* `entrypoints`, `tour`), its compiler facts retain that provenance while
|
|
25
|
+
* selection is heuristic: judge whether its coverage
|
|
24
26
|
* answers you, and a follow-up request or a read of a cited span is fair when
|
|
25
27
|
* it does not.
|
|
26
28
|
*
|
|
@@ -61,12 +63,16 @@ import { ITtscGraphTrace } from "./ITtscGraphTrace";
|
|
|
61
63
|
*
|
|
62
64
|
* ## What to trust
|
|
63
65
|
*
|
|
64
|
-
* Before source edits,
|
|
65
|
-
*
|
|
66
|
+
* Before source edits, compiler declaration facts retain the resolution of the
|
|
67
|
+
* synchronized snapshot. The server derives `file` containers, `contains`
|
|
68
|
+
* ownership, `property` kinds, `dispatches` hops and path-convention `test`
|
|
69
|
+
* roles from those declarations. Lint plugins supply document, data-model and API-operation facts; `audit`
|
|
70
|
+
* identifies these distinct producers. Never use extra graph calls,
|
|
71
|
+
* repository search, or file reads to doubt,
|
|
66
72
|
* fact-check, re-derive, re-narrate, or re-confirm a returned node, span, edge,
|
|
67
|
-
* signature, decorator, test, reference, step, or anchor. The
|
|
68
|
-
*
|
|
69
|
-
*
|
|
73
|
+
* signature, decorator, test, reference, step, or anchor. The result projects
|
|
74
|
+
* the snapshot's facts and identifies their provenance; this server does not
|
|
75
|
+
* perform a second compiler verification pass.
|
|
70
76
|
*
|
|
71
77
|
* Selection is the separate question. `lookup`, `entrypoints`, and `tour` match
|
|
72
78
|
* your question and return a scored, ranked, per-file-capped, limited
|
|
@@ -89,37 +95,61 @@ import { ITtscGraphTrace } from "./ITtscGraphTrace";
|
|
|
89
95
|
* `truncated` say whether coverage is settled; when it is not, one more
|
|
90
96
|
* request is the right move — not a file read to re-verify facts already
|
|
91
97
|
* given.
|
|
98
|
+
*
|
|
99
|
+
* @evidence contracts/common.md#principled-implementation The single async tool maps the discriminated request union to graph outputs, with audit and next separated from returned facts.
|
|
100
|
+
* @evidence contracts/common.md#clear-and-simple-design One tool owns graph dispatch; request branches keep their own shapes instead of independent nearly identical tools.
|
|
101
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The instruction retains explicit escape and permits legitimate coverage follow-ups without forced graph calls.
|
|
102
|
+
* @evidence contracts/common.md#meaningful-documentation Markdown-structured native documentation explains request choice, trust boundaries and ranked coverage before the tags.
|
|
103
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources signature only: the implementer owns any handle or retained state.
|
|
104
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms signature only: the implementer owns the algorithm and its cost.
|
|
105
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work signature only: the implementer decides what work is shared.
|
|
106
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation signature only: the implementer owns any path or process work.
|
|
92
107
|
*/
|
|
93
108
|
export interface ITtscGraphApplication {
|
|
94
109
|
/**
|
|
95
|
-
* Answer a TypeScript question from the
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* The graph holds every symbol, call, type, decorator and test, each with its
|
|
99
|
-
* file and line, resolved from the source on disk now. Submit exactly one
|
|
100
|
-
* request:
|
|
110
|
+
* Answer a TypeScript question from the synchronized source snapshot.
|
|
111
|
+
* Submit one request:
|
|
101
112
|
*
|
|
102
|
-
* - `tour`: architecture,
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* - `
|
|
106
|
-
* - `
|
|
107
|
-
* - `
|
|
108
|
-
* - `
|
|
109
|
-
* - `overview`: the project's layers and folder structure
|
|
113
|
+
* - `tour`: architecture, runtime flow and nearby tests in one orientation
|
|
114
|
+
* - `trace`: calls, callers or the path from A to B
|
|
115
|
+
* - `details`: signatures, members and interface implementations
|
|
116
|
+
* - `lookup`: named declarations
|
|
117
|
+
* - `entrypoints`: where execution starts
|
|
118
|
+
* - `overview`: project layers and folders
|
|
119
|
+
* - `escape`: source bodies, span text or evidence outside the graph
|
|
110
120
|
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* `
|
|
114
|
-
*
|
|
121
|
+
* `audit` identifies compiler declaration facts, server-derived structure
|
|
122
|
+
* and plugin artifact facts; it does not claim a second compiler check.
|
|
123
|
+
* Judge the coverage of ranked `lookup`, `entrypoints` and `tour` shortlists.
|
|
124
|
+
* Follow `next`; read source for omitted body text or missed coverage.
|
|
115
125
|
*
|
|
116
126
|
* @param props Reasoning plus one graph request
|
|
117
127
|
* @returns Matching `result` union member
|
|
128
|
+
*
|
|
129
|
+
* @evidence contracts/common.md#principled-implementation The callable consumes the typed reasoning/request envelope and returns the typed audit, next action and result envelope asynchronously.
|
|
130
|
+
* @evidence contracts/common.md#clear-and-simple-design One method delegates branch semantics to the request union instead of duplicating parameter lists.
|
|
131
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The supported method includes escape and does not require graph use for source bodies.
|
|
132
|
+
* @evidence contracts/common.md#meaningful-documentation Native prose lists request responsibilities, distinguishes ranking coverage and explains the body-text boundary with param/return tags.
|
|
133
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources signature only: the implementer owns any handle or retained state.
|
|
134
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms signature only: the implementer owns the algorithm and its cost.
|
|
135
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work signature only: the implementer decides what work is shared.
|
|
136
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation signature only: the implementer owns any path or process work.
|
|
118
137
|
*/
|
|
119
138
|
inspect_typescript_graph(props: ITtscGraphApplication.IProps): Promise<ITtscGraphApplication.IOutput>;
|
|
120
139
|
}
|
|
121
140
|
export declare namespace ITtscGraphApplication {
|
|
122
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* Draft, review, then submit exactly one graph request or escape.
|
|
143
|
+
*
|
|
144
|
+
* @evidence contracts/common.md#principled-implementation Required question, draft, review and discriminated final request represent the public selection protocol without treating rationale as graph evidence.
|
|
145
|
+
* @evidence contracts/common.md#clear-and-simple-design The final request union owns branch-specific fields; shared selection context is stored once.
|
|
146
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Escape remains in the union and question wording is not replaced by a hidden repository-specific prompt.
|
|
147
|
+
* @evidence contracts/common.md#meaningful-documentation Native member comments explain question preservation, draft correction and one final branch.
|
|
148
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
149
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
150
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
151
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
152
|
+
*/
|
|
123
153
|
interface IProps {
|
|
124
154
|
/**
|
|
125
155
|
* The code question, in the user's own words.
|
|
@@ -139,29 +169,53 @@ export declare namespace ITtscGraphApplication {
|
|
|
139
169
|
/** Final graph request chosen after review, or a no-op escape. */
|
|
140
170
|
request: ITtscGraphEntrypoints.IRequest | ITtscGraphLookup.IRequest | ITtscGraphTrace.IRequest | ITtscGraphDetails.IRequest | ITtscGraphOverview.IRequest | ITtscGraphTour.IRequest | ITtscGraphEscape.IRequest;
|
|
141
171
|
}
|
|
142
|
-
/**
|
|
172
|
+
/**
|
|
173
|
+
* First-pass plan; `reason` precedes `type` so it is written first.
|
|
174
|
+
*
|
|
175
|
+
* @evidence contracts/common.md#principled-implementation Reason explains selection while the request-indexed type union restricts the proposed operation to a supported branch.
|
|
176
|
+
* @evidence contracts/common.md#clear-and-simple-design Two fields represent the draft without copying branch inputs before review.
|
|
177
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The proposed operation remains caller-authored rather than a forced first call.
|
|
178
|
+
* @evidence contracts/common.md#meaningful-documentation Native comments explain the selection reason and proposed request type in separate member blocks.
|
|
179
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
180
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
181
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
182
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
183
|
+
*/
|
|
143
184
|
interface IDraft {
|
|
144
185
|
/** Why this is the smallest useful next step. */
|
|
145
186
|
reason: string;
|
|
146
187
|
/** The request type being considered. */
|
|
147
188
|
type: IProps["request"]["type"];
|
|
148
189
|
}
|
|
149
|
-
/**
|
|
190
|
+
/**
|
|
191
|
+
* The selected request's output. `result.type` mirrors `request.type`.
|
|
192
|
+
*
|
|
193
|
+
* @evidence contracts/common.md#principled-implementation Audit, next decision and discriminated result preserve different roles: provenance report, supported follow-up and graph facts.
|
|
194
|
+
* @evidence contracts/common.md#clear-and-simple-design Shared audit/control fields wrap the existing result branches without duplicating their contents.
|
|
195
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Ranked selection is explicitly heuristic and cannot be certified complete merely by valid node facts.
|
|
196
|
+
* @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain operation-aware audit and ranked coverage; member comments define next and matching result branch.
|
|
197
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
198
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
199
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
200
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
201
|
+
*/
|
|
150
202
|
interface IOutput {
|
|
151
203
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
204
|
+
* The provenance and coverage of the returned projection. Compiler facts
|
|
205
|
+
* belong to the synchronized program; file containers, containment,
|
|
206
|
+
* property kinds, path-convention test roles and dispatch hops are server-derived structure. Artifact
|
|
207
|
+
* facts come from the publishing lint plugin. This text reports those
|
|
208
|
+
* origins without claiming a second compiler verification pass.
|
|
156
209
|
*
|
|
157
210
|
* The audit is operation-aware. For the walks from a named handle (`trace`,
|
|
158
211
|
* `overview`) it reports the result as the structure the graph holds,
|
|
159
|
-
* bounded where `truncated` says. For `details` it reports the two halves
|
|
160
|
-
* a resolved symbol: its own shape returned whole, its fan-out returned
|
|
161
|
-
* slice with `trace` for the rest. For the ranked operations
|
|
162
|
-
* `entrypoints`, `tour`) it adds that the selection is heuristic
|
|
163
|
-
* scored, ranked, and limited against the question — so the
|
|
164
|
-
* verified but the shortlist's coverage is the caller's to
|
|
212
|
+
* bounded where `truncated` says. For `details` it reports the two halves
|
|
213
|
+
* of a resolved symbol: its own shape returned whole, its fan-out returned
|
|
214
|
+
* as a slice with `trace` for the rest. For the ranked operations
|
|
215
|
+
* (`lookup`, `entrypoints`, `tour`) it adds that the selection is heuristic
|
|
216
|
+
* — matched, scored, ranked, and limited against the question — so the
|
|
217
|
+
* facts are verified but the shortlist's coverage is the caller's to
|
|
218
|
+
* judge.
|
|
165
219
|
*/
|
|
166
220
|
audit: string;
|
|
167
221
|
/** What to do with `result`: answer, inspect one named request, or escape. */
|
|
@@ -4,6 +4,15 @@
|
|
|
4
4
|
* per framework: `name` is the decorator as written (`Controller`, `Get`,
|
|
5
5
|
* `TypedRoute.Get`, ...), and statically resolvable literal arguments are
|
|
6
6
|
* preserved so a consumer applies its own meaning without re-parsing source.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation The written name and literal arguments represent syntax without inventing framework semantics.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design Name and ordered arguments are the complete decorator envelope; argument details have their own record.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No framework-specific decorator names are encoded as special cases.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation Native comments distinguish written names, source ordering and statically resolvable arguments in separate paragraphs.
|
|
12
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
13
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
14
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
15
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
7
16
|
*/
|
|
8
17
|
export interface ITtscGraphDecorator {
|
|
9
18
|
/**
|
|
@@ -19,6 +28,15 @@ export declare namespace ITtscGraphDecorator {
|
|
|
19
28
|
* One argument of an {@link ITtscGraphDecorator}. `literal` is set only when
|
|
20
29
|
* the argument is a string, number, or boolean literal the producer could
|
|
21
30
|
* resolve statically, so a consumer can use it without evaluating code.
|
|
31
|
+
*
|
|
32
|
+
* @evidence contracts/common.md#principled-implementation The primitive union represents resolved literals; absence represents an argument that cannot be resolved statically.
|
|
33
|
+
* @evidence contracts/common.md#clear-and-simple-design One optional value carries the argument fact without embedding expression bodies.
|
|
34
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The representation does not evaluate an argument or substitute a guessed value.
|
|
35
|
+
* @evidence contracts/common.md#meaningful-documentation The argument comment explains absence and the literal-only boundary, with a blank line before acknowledgment tags.
|
|
36
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
37
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
38
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
39
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
22
40
|
*/
|
|
23
41
|
interface IArgument {
|
|
24
42
|
/** The statically-resolved literal value, when the argument is a literal. */
|
|
@@ -5,6 +5,15 @@ import { ITtscGraphEvidence } from "./ITtscGraphEvidence";
|
|
|
5
5
|
* Source-free facts for a few selected handles, not a file reader: signatures,
|
|
6
6
|
* member outlines, direct calls and types, implementation candidates,
|
|
7
7
|
* dependency summaries, and sourceSpan citation anchors.
|
|
8
|
+
*
|
|
9
|
+
* @evidence contracts/common.md#principled-implementation Nodes, unknown handles and ambiguity records distinguish resolved declaration facts from unresolved or multiply resolved inputs.
|
|
10
|
+
* @evidence contracts/common.md#clear-and-simple-design The envelope keeps resolution status outside each node's declaration shape.
|
|
11
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Ambiguous names retain candidates instead of selecting a convenient declaration.
|
|
12
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain source-free details and why ambiguity requires exact ids.
|
|
13
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
14
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
15
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
16
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
8
17
|
*/
|
|
9
18
|
export interface ITtscGraphDetails {
|
|
10
19
|
/** Discriminator for selected symbol inspection. */
|
|
@@ -25,7 +34,18 @@ export interface ITtscGraphDetails {
|
|
|
25
34
|
ambiguous?: ITtscGraphDetails.IAmbiguity[];
|
|
26
35
|
}
|
|
27
36
|
export declare namespace ITtscGraphDetails {
|
|
28
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Which selected handles to inspect, and how much of each to return.
|
|
39
|
+
*
|
|
40
|
+
* @evidence contracts/common.md#principled-implementation Handles identify declarations while independent limits select member, dependency and optional neighbor projections.
|
|
41
|
+
* @evidence contracts/common.md#clear-and-simple-design One request groups projection options around the handles they inspect.
|
|
42
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Limits are documented caller choices; complete members are the default rather than a hidden sample.
|
|
43
|
+
* @evidence contracts/common.md#meaningful-documentation Native comments explain default bounds, external inclusion and when trace should replace a wider details request.
|
|
44
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
45
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
46
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
47
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
48
|
+
*/
|
|
29
49
|
interface IRequest {
|
|
30
50
|
/** Discriminator for selected symbol inspection. */
|
|
31
51
|
type: "details";
|
|
@@ -72,14 +92,36 @@ export declare namespace ITtscGraphDetails {
|
|
|
72
92
|
*/
|
|
73
93
|
includeExternal?: boolean;
|
|
74
94
|
}
|
|
75
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* One handle and the several nodes it names.
|
|
97
|
+
*
|
|
98
|
+
* @evidence contracts/common.md#principled-implementation Submitted handle and candidate list preserve the exact ambiguous resolution outcome.
|
|
99
|
+
* @evidence contracts/common.md#clear-and-simple-design Two fields keep the unresolved choice separate from inspected node facts.
|
|
100
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No candidate is promoted to a resolved node solely to avoid clarification.
|
|
101
|
+
* @evidence contracts/common.md#meaningful-documentation Native comments explain submitted spelling and candidate ids for a follow-up selection.
|
|
102
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
103
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
104
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
105
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
106
|
+
*/
|
|
76
107
|
interface IAmbiguity {
|
|
77
108
|
/** The handle as submitted. */
|
|
78
109
|
handle: string;
|
|
79
110
|
/** Every node the handle names, each with the id to re-call `details` on. */
|
|
80
111
|
candidates: ICandidate[];
|
|
81
112
|
}
|
|
82
|
-
/**
|
|
113
|
+
/**
|
|
114
|
+
* One node a handle could mean: enough to choose, not to answer from.
|
|
115
|
+
*
|
|
116
|
+
* @evidence contracts/common.md#principled-implementation Stable id and declaration coordinates distinguish same-named candidates without claiming their bodies were inspected.
|
|
117
|
+
* @evidence contracts/common.md#clear-and-simple-design Only disambiguation facts are carried rather than a full details payload.
|
|
118
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Candidate names do not replace exact identity when selecting one declaration.
|
|
119
|
+
* @evidence contracts/common.md#meaningful-documentation Comments state follow-up id usage, qualified names and optional one-based line.
|
|
120
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
121
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
122
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
123
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
124
|
+
*/
|
|
83
125
|
interface ICandidate {
|
|
84
126
|
/** Stable node id: submit this as the handle to select this one. */
|
|
85
127
|
id: string;
|
|
@@ -92,7 +134,18 @@ export declare namespace ITtscGraphDetails {
|
|
|
92
134
|
/** 1-based declaration line, when known. */
|
|
93
135
|
line?: number;
|
|
94
136
|
}
|
|
95
|
-
/**
|
|
137
|
+
/**
|
|
138
|
+
* One inspected node: its declared shape and graph coordinates.
|
|
139
|
+
*
|
|
140
|
+
* @evidence contracts/common.md#principled-implementation Optional shape, relationships and literal values preserve distinct checker facts alongside stable identity and declaration coordinates.
|
|
141
|
+
* @evidence contracts/common.md#clear-and-simple-design Independent optional facets support the same node without embedding bodies or a second graph snapshot.
|
|
142
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Documentation tags remain reported claims, and missing literal enumeration stays absent rather than guessed from signatures.
|
|
143
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain complete literals and members versus sliced relationships, tag interpretation limits and implementation coordinates.
|
|
144
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
145
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
146
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
147
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
148
|
+
*/
|
|
96
149
|
interface INode {
|
|
97
150
|
/** Stable node id for subsequent `details` or `trace` calls. */
|
|
98
151
|
id: string;
|
|
@@ -151,7 +204,18 @@ export declare namespace ITtscGraphDetails {
|
|
|
151
204
|
/** Symbols that use this node (incoming dependency edges). */
|
|
152
205
|
dependedOnBy?: IReference[];
|
|
153
206
|
}
|
|
154
|
-
/**
|
|
207
|
+
/**
|
|
208
|
+
* One member of a container node, with its signature but not its body.
|
|
209
|
+
*
|
|
210
|
+
* @evidence contracts/common.md#principled-implementation Name, kind and optional declaration facts express a container outline without evaluating a member's implementation.
|
|
211
|
+
* @evidence contracts/common.md#clear-and-simple-design The outline omits relationships and bodies owned by deeper node inspection.
|
|
212
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Optional signature and decorators are available source facts rather than synthesized member content.
|
|
213
|
+
* @evidence contracts/common.md#meaningful-documentation Comments distinguish qualified member names, one-based lines and declaration signatures.
|
|
214
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
215
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
216
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
217
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
218
|
+
*/
|
|
155
219
|
interface IMember {
|
|
156
220
|
/** Member name, qualified when the graph records an owner-qualified handle. */
|
|
157
221
|
name: string;
|
|
@@ -164,7 +228,18 @@ export declare namespace ITtscGraphDetails {
|
|
|
164
228
|
/** Decorators written on this member, when any. */
|
|
165
229
|
decorators?: ITtscGraphDecorator[];
|
|
166
230
|
}
|
|
167
|
-
/**
|
|
231
|
+
/**
|
|
232
|
+
* A dependency neighbor of an inspected node and the edge that links them.
|
|
233
|
+
*
|
|
234
|
+
* @evidence contracts/common.md#principled-implementation Neighbor coordinates, relationship kind and optional edge span represent the resolved adjacency and its grounding.
|
|
235
|
+
* @evidence contracts/common.md#clear-and-simple-design Node presentation and relation cause share one compact record without repeating source bodies.
|
|
236
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A source span is citation evidence, not an invented instruction to verify the graph's fact.
|
|
237
|
+
* @evidence contracts/common.md#meaningful-documentation Native comments explain stable handles, relation kinds and evidence as coordinates rather than file-read cues.
|
|
238
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
239
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
240
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
241
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
242
|
+
*/
|
|
168
243
|
interface IReference {
|
|
169
244
|
/** Stable id of the neighboring node. */
|
|
170
245
|
id: string;
|
|
@@ -22,10 +22,19 @@
|
|
|
22
22
|
* The parser also decides where a tag begins, and that decision is reported
|
|
23
23
|
* rather than second-guessed. TypeScript opens a tag at an `@` wherever it sits
|
|
24
24
|
* inside a documentation block, so a tag name written mid-sentence arrives here
|
|
25
|
-
* as a tag, while a `//` comment is not documentation and contributes nothing
|
|
26
|
-
* all. A convention that wants the stricter rule enforces it in its own
|
|
27
|
-
* where the author gets a diagnostic; the graph reports what the
|
|
28
|
-
* parsed.
|
|
25
|
+
* as a tag, while a `//` comment is not documentation and contributes nothing
|
|
26
|
+
* at all. A convention that wants the stricter rule enforces it in its own
|
|
27
|
+
* linter, where the author gets a diagnostic; the graph reports what the
|
|
28
|
+
* compiler parsed.
|
|
29
|
+
*
|
|
30
|
+
* @evidence contracts/common.md#principled-implementation Name and optional text preserve the compiler-parsed custom tag without asserting target resolution or truth.
|
|
31
|
+
* @evidence contracts/common.md#clear-and-simple-design Parsing authority remains with the compiler; the record carries only its two reported facts.
|
|
32
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No tag-name allowlist or consumer-specific reinterpretation replaces compiler parsing.
|
|
33
|
+
* @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain unknown tags, unresolved targets, inline links and absent text rather than repeating field types.
|
|
34
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
35
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
36
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
37
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
29
38
|
*/
|
|
30
39
|
export interface ITtscGraphDocTag {
|
|
31
40
|
/** The tag name without its `@`: `evidence`, `evidenceExclude`, `reference`. */
|
|
@@ -33,10 +42,10 @@ export interface ITtscGraphDocTag {
|
|
|
33
42
|
/**
|
|
34
43
|
* Everything written after the tag name, joined into one line.
|
|
35
44
|
*
|
|
36
|
-
* An inline link keeps the braced form it was written in (`{@link ISale}`),
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
45
|
+
* An inline link keeps the braced form it was written in (`{@link ISale}`), so
|
|
46
|
+
* a consumer matching a citation target sees what the author typed. The same
|
|
47
|
+
* link is separately a resolved edge on the node, which is what says _which_
|
|
48
|
+
* `ISale` — a name can be declared twice and only the checker knows.
|
|
40
49
|
*
|
|
41
50
|
* Absent when the tag carries no text.
|
|
42
51
|
*/
|
|
@@ -21,6 +21,15 @@ import { TtscGraphDumpNodeKind } from "./TtscGraphDumpNodeKind";
|
|
|
21
21
|
* and a virtual compiler source stays `bundled:///…`. Raw absolute identities
|
|
22
22
|
* are never emitted. A source on another drive or UNC share makes the producer
|
|
23
23
|
* fail unless a future contract supplies a logical root for it.
|
|
24
|
+
*
|
|
25
|
+
* @evidence contracts/common.md#principled-implementation Provenance, diagnostics and complete node/edge arrays represent one producer generation with explicit portable identity coordinates.
|
|
26
|
+
* @evidence contracts/common.md#clear-and-simple-design The wire envelope separates origin and build universe from graph facts; span paths are reconstructed by the loader.
|
|
27
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Native output is the full graph rather than a fixture-specific capped subset.
|
|
28
|
+
* @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain producer/consumer roles, generation ownership and the portable path vocabulary.
|
|
29
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
30
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
31
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
32
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
24
33
|
*/
|
|
25
34
|
export interface ITtscGraphDump {
|
|
26
35
|
/** Absolute path of the project root the graph was built for. */
|
|
@@ -55,6 +64,15 @@ export declare namespace ITtscGraphDump {
|
|
|
55
64
|
* This carries no source text. A digest is the opposite of inlining: it is
|
|
56
65
|
* what lets a consumer prove byte-identity against text it read itself,
|
|
57
66
|
* without the graph ever shipping that text.
|
|
67
|
+
*
|
|
68
|
+
* @evidence contracts/common.md#principled-implementation Schema, producer, universe and source digests ground one snapshot; separate artifact producer identifies facts outside its Program.
|
|
69
|
+
* @evidence contracts/common.md#clear-and-simple-design Capabilities distinguish absent evidence from collected-empty evidence without version-specific field guesses.
|
|
70
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown capabilities remain permitted rather than rejecting a newer producer by a hardcoded list.
|
|
71
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain digest evidence, independent versions, capability extensibility and the second producer's scope.
|
|
72
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
73
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
74
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
75
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
58
76
|
*/
|
|
59
77
|
interface IProvenance {
|
|
60
78
|
/**
|
|
@@ -69,11 +87,13 @@ export declare namespace ITtscGraphDump {
|
|
|
69
87
|
* uncollected one look identical on the wire.
|
|
70
88
|
*
|
|
71
89
|
* The known members are `universe`, `sourceDigests`, `diskDigests`,
|
|
72
|
-
* `diagnostics`,
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
90
|
+
* `diagnostics`, `docTags`, and `artifactNodes`, which the producer lists
|
|
91
|
+
* only when it asked the project's configured plugins for artifact nodes.
|
|
92
|
+
* The type stays `string[]` rather than a
|
|
93
|
+
* union of those on purpose: a union would make `typia.assert` reject a
|
|
94
|
+
* newer producer for naming a capability this client has not heard of,
|
|
95
|
+
* turning "proves more than you know about" into a hard failure. An unknown
|
|
96
|
+
* capability is exactly the case a consumer should ignore.
|
|
77
97
|
*/
|
|
78
98
|
capabilities: string[];
|
|
79
99
|
/** What built the snapshot. */
|
|
@@ -101,6 +121,15 @@ export declare namespace ITtscGraphDump {
|
|
|
101
121
|
* stamped at release, the internal viewer tool is not versioned at all — so
|
|
102
122
|
* folding the name in would hand a consumer that parses a version a tool
|
|
103
123
|
* name.
|
|
124
|
+
*
|
|
125
|
+
* @evidence contracts/common.md#principled-implementation Tool, build version and TypeScript version identify distinct producer facts without conflating their version schemes.
|
|
126
|
+
* @evidence contracts/common.md#clear-and-simple-design Three textual coordinates are sufficient for provenance and permit unversioned producer builds.
|
|
127
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Empty build version remains an explicit supported producer state, not a fabricated release number.
|
|
128
|
+
* @evidence contracts/common.md#meaningful-documentation Comments explain dev placeholders, unversioned tools and the checker version independently.
|
|
129
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
130
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
131
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
132
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
104
133
|
*/
|
|
105
134
|
interface IProducer {
|
|
106
135
|
/** The producing binary's name, such as `ttscgraph`. */
|
|
@@ -119,6 +148,15 @@ export declare namespace ITtscGraphDump {
|
|
|
119
148
|
* contains, as opposed to what is inside them. A change to any of them can
|
|
120
149
|
* add or drop whole files, so a consumer reusing facts across snapshots must
|
|
121
150
|
* treat a universe change as invalidating everything.
|
|
151
|
+
*
|
|
152
|
+
* @evidence contracts/common.md#principled-implementation Config digests and attributed roots represent the inputs deciding Program membership independently of source contents.
|
|
153
|
+
* @evidence contracts/common.md#clear-and-simple-design Two collections separate configuration content from root attribution instead of duplicating whole sources.
|
|
154
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A missing configured root remains part of the universe rather than disappearing from invalidation evidence.
|
|
155
|
+
* @evidence contracts/common.md#meaningful-documentation Native documentation explains why compiler options and currently missing roots remain build inputs.
|
|
156
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
157
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
158
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
159
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
122
160
|
*/
|
|
123
161
|
interface IUniverse {
|
|
124
162
|
/**
|
|
@@ -136,14 +174,36 @@ export declare namespace ITtscGraphDump {
|
|
|
136
174
|
*/
|
|
137
175
|
roots: IRootFile[];
|
|
138
176
|
}
|
|
139
|
-
/**
|
|
177
|
+
/**
|
|
178
|
+
* A root file attributed to the config that named it.
|
|
179
|
+
*
|
|
180
|
+
* @evidence contracts/common.md#principled-implementation Config and file form the attribution pair, permitting one root to be named by multiple configurations.
|
|
181
|
+
* @evidence contracts/common.md#clear-and-simple-design Two portable coordinates express attribution without repeating config content.
|
|
182
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Root identity is not collapsed to a basename or guessed project owner.
|
|
183
|
+
* @evidence contracts/common.md#meaningful-documentation Both member comments specify the dump path vocabulary and config ownership.
|
|
184
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
185
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
186
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
187
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
188
|
+
*/
|
|
140
189
|
interface IRootFile {
|
|
141
190
|
/** The tsconfig that named this root, in the dump's path vocabulary. */
|
|
142
191
|
config: string;
|
|
143
192
|
/** The root file, in the dump's path vocabulary. */
|
|
144
193
|
file: string;
|
|
145
194
|
}
|
|
146
|
-
/**
|
|
195
|
+
/**
|
|
196
|
+
* A file and the hex-encoded SHA-256 of its on-disk bytes.
|
|
197
|
+
*
|
|
198
|
+
* @evidence contracts/common.md#principled-implementation The file coordinate pairs with a content digest, distinguishing byte identity from file timestamps.
|
|
199
|
+
* @evidence contracts/common.md#clear-and-simple-design One path and digest carry exactly the input witness needed by the build universe.
|
|
200
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The contract names content hashing rather than treating size or quiet watchers as content identity.
|
|
201
|
+
* @evidence contracts/common.md#meaningful-documentation Native comments identify path vocabulary and hexadecimal SHA-256 encoding.
|
|
202
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
203
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
204
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
205
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
206
|
+
*/
|
|
147
207
|
interface IFileDigest {
|
|
148
208
|
/** In the dump's path vocabulary. */
|
|
149
209
|
file: string;
|
|
@@ -158,6 +218,15 @@ export declare namespace ITtscGraphDump {
|
|
|
158
218
|
* compares against. They diverge when a source-preamble plugin injects text
|
|
159
219
|
* ahead of the file before tsgo parses it, which a real plugin project does
|
|
160
220
|
* on every build.
|
|
221
|
+
*
|
|
222
|
+
* @evidence contracts/common.md#principled-implementation Separate checker and disk digests preserve the distinction between transformed compiler text and raw source bytes.
|
|
223
|
+
* @evidence contracts/common.md#clear-and-simple-design The manifest retains only file and two witnesses, leaving source text outside the wire protocol.
|
|
224
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Missing raw bytes are an empty witness; augmented source does not receive a fabricated disk-equivalence claim.
|
|
225
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain preamble divergence, capability gating and empty-digest meaning.
|
|
226
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
227
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
228
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
229
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
161
230
|
*/
|
|
162
231
|
interface ISourceDigest {
|
|
163
232
|
/** In the dump's path vocabulary. */
|
|
@@ -185,7 +254,18 @@ export declare namespace ITtscGraphDump {
|
|
|
185
254
|
*/
|
|
186
255
|
diskDigest: string;
|
|
187
256
|
}
|
|
188
|
-
/**
|
|
257
|
+
/**
|
|
258
|
+
* One compiler diagnostic from the generation that produced the facts.
|
|
259
|
+
*
|
|
260
|
+
* @evidence contracts/common.md#principled-implementation Coordinates, compiler code, severity and message describe the actual finding for the same graph generation.
|
|
261
|
+
* @evidence contracts/common.md#clear-and-simple-design A self-contained diagnostic record avoids parsing codes and severity from prose.
|
|
262
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Diagnostic categories are explicit wire values, not inferred from expected test output.
|
|
263
|
+
* @evidence contracts/common.md#meaningful-documentation Native comments document one-based coordinates, diagnostic code and message without its code prefix.
|
|
264
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
265
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
266
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
267
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
268
|
+
*/
|
|
189
269
|
interface IDiagnostic {
|
|
190
270
|
/** In the dump's path vocabulary. */
|
|
191
271
|
file: string;
|
|
@@ -208,6 +288,15 @@ export declare namespace ITtscGraphDump {
|
|
|
208
288
|
* span was the same string a second time, once per node. It is the reader's
|
|
209
289
|
* to reconstruct, and {@link TtscGraphMemory} does, so nothing downstream of
|
|
210
290
|
* the loader sees a span without its file.
|
|
291
|
+
*
|
|
292
|
+
* @evidence contracts/common.md#principled-implementation Omit replaces memory-layer span and kind fields with native wire equivalents; parent applies only to published artifact containment.
|
|
293
|
+
* @evidence contracts/common.md#clear-and-simple-design Shared node facts are inherited while repeated declaration paths are removed from wire spans.
|
|
294
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Implementation spans may retain another file; they are not forced into declaration coordinates for compactness.
|
|
295
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain reconstruction, artifact parent ownership and cross-file implementation spans.
|
|
296
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
297
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
298
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
299
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
211
300
|
*/
|
|
212
301
|
interface INode extends Omit<ITtscGraphNode, "evidence" | "implementation" | "kind"> {
|
|
213
302
|
/** Node kind written by the native producer. */
|
|
@@ -233,6 +322,15 @@ export declare namespace ITtscGraphDump {
|
|
|
233
322
|
* An edge as the builder sends it. Its span is in the file its `from` id
|
|
234
323
|
* names — the id is `path#Qualified.Name:kind` — so the path rode the wire a
|
|
235
324
|
* second time on every edge, and edges outnumber nodes several times over.
|
|
325
|
+
*
|
|
326
|
+
* @evidence contracts/common.md#principled-implementation Native kind and compact span replace memory fields while endpoint ids determine the expression's source file.
|
|
327
|
+
* @evidence contracts/common.md#clear-and-simple-design Omit reuses relation fields and avoids repeating the source path inside each wire edge.
|
|
328
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Compression preserves endpoint identity and actual evidence rather than shortening ids heuristically.
|
|
329
|
+
* @evidence contracts/common.md#meaningful-documentation Native comments explain id-based path reconstruction and the producer's relationship vocabulary.
|
|
330
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
331
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
332
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
333
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
236
334
|
*/
|
|
237
335
|
interface IEdge extends Omit<ITtscGraphEdge, "evidence" | "kind"> {
|
|
238
336
|
/** Relationship kind written by the native producer. */
|