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