@geotechcli/core 0.4.92 → 0.4.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/fem-tools.js +2 -0
- package/dist/agents/fem-tools.js.map +1 -1
- package/dist/fem/engineering-evidence.d.ts +236 -0
- package/dist/fem/engineering-evidence.d.ts.map +1 -0
- package/dist/fem/engineering-evidence.js +583 -0
- package/dist/fem/engineering-evidence.js.map +1 -0
- package/dist/fem/index.d.ts +1 -0
- package/dist/fem/index.d.ts.map +1 -1
- package/dist/fem/index.js +1 -0
- package/dist/fem/index.js.map +1 -1
- package/dist/fem/production-readiness.d.ts +3 -1
- package/dist/fem/production-readiness.d.ts.map +1 -1
- package/dist/fem/production-readiness.js +31 -24
- package/dist/fem/production-readiness.js.map +1 -1
- package/dist/ingest/document-evidence-packet.d.ts +4 -4
- package/dist/meta/metadata.json +1 -1
- package/dist/workspace/resolve-root.d.ts.map +1 -1
- package/dist/workspace/resolve-root.js +26 -18
- package/dist/workspace/resolve-root.js.map +1 -1
- package/package.json +1 -1
package/dist/fem/index.js
CHANGED
|
@@ -5,5 +5,6 @@ export { buildFemDraftCandidateFromReadiness, buildFemDraftCandidatesFromGroundM
|
|
|
5
5
|
export { validateFemAnalysisCase, validateFemResultManifest } from './validation.js';
|
|
6
6
|
export { validateFemScenarioResult, validateFemScenarioSuite, } from './scenario-validation.js';
|
|
7
7
|
export { assessFemProductionReadiness, } from './production-readiness.js';
|
|
8
|
+
export { DEFAULT_FEM_CONVERGENCE_POLICY, evaluateFemTolerance, runDarcySeepage1D, runExcavationSupportDesignCheck, runFemEngineeringEvidenceSuite, runHydroMechanicalCoupling1D, runMohrCoulombMaterialPoint, runTerzaghiConsolidationTimeStepper, terzaghiAverageConsolidation, validateFemReviewerApprovalRecord, } from './engineering-evidence.js';
|
|
8
9
|
export { renderFemWebglHtml } from './webgl.js';
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
package/dist/fem/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fem/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,qCAAqC,EACrC,+BAA+B,EAC/B,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,GAM5B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mCAAmC,EACnC,sCAAsC,EACtC,+BAA+B,EAC/B,0BAA0B,EAC1B,yBAAyB,EACzB,oCAAoC,EACpC,mCAAmC,GAMpC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AACrF,OAAO,EACL,yBAAyB,EACzB,wBAAwB,GAQzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,4BAA4B,GAI7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fem/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,qCAAqC,EACrC,+BAA+B,EAC/B,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,GAM5B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mCAAmC,EACnC,sCAAsC,EACtC,+BAA+B,EAC/B,0BAA0B,EAC1B,yBAAyB,EACzB,oCAAoC,EACpC,mCAAmC,GAMpC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AACrF,OAAO,EACL,yBAAyB,EACzB,wBAAwB,GAQzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,4BAA4B,GAI7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,8BAA8B,EAC9B,oBAAoB,EACpB,iBAAiB,EACjB,+BAA+B,EAC/B,8BAA8B,EAC9B,4BAA4B,EAC5B,2BAA2B,EAC3B,mCAAmC,EACnC,4BAA4B,EAC5B,iCAAiC,GAuBlC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type FemRouteObjective } from './routing.js';
|
|
2
|
+
import { type FemEngineeringEvidenceReport } from './engineering-evidence.js';
|
|
2
3
|
export type FemProductionFeature = 'nonlinear-plasticity' | 'consolidation' | 'seepage-pore-pressure-coupling' | 'advanced-staged-construction' | 'support-design' | 'real-project-workspace-to-run-acceptance' | 'independent-benchmark-validation' | 'licensed-engineer-review-workflow';
|
|
3
4
|
export interface FemProductionFeatureRequirement {
|
|
4
5
|
feature: FemProductionFeature;
|
|
5
|
-
status: 'missing' | 'preview-only' | 'accepted';
|
|
6
|
+
status: 'missing' | 'preview-only' | 'kernel-verified' | 'accepted';
|
|
6
7
|
currentCoverage: string;
|
|
7
8
|
requiredForAcceptance: string[];
|
|
8
9
|
blockedUntil: string[];
|
|
@@ -23,6 +24,7 @@ export interface FemProductionReadinessReport {
|
|
|
23
24
|
runCommandTemplate?: string;
|
|
24
25
|
}>;
|
|
25
26
|
blockedFeatures: FemProductionFeatureRequirement[];
|
|
27
|
+
engineeringEvidence: FemEngineeringEvidenceReport;
|
|
26
28
|
blockers: string[];
|
|
27
29
|
safeUserActions: string[];
|
|
28
30
|
releasePositioning: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"production-readiness.d.ts","sourceRoot":"","sources":["../../src/fem/production-readiness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,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B,CAAC;IAClD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAgID,wBAAgB,4BAA4B,CAAC,OAAO,GAAE;IACpD,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,iBAAiB,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;CAChD,GAAG,4BAA4B,CAuDpC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { listFemCapabilities } from './routing.js';
|
|
2
|
+
import { runFemEngineeringEvidenceSuite, } from './engineering-evidence.js';
|
|
2
3
|
const ALL_PRODUCTION_FEATURES = [
|
|
3
4
|
'nonlinear-plasticity',
|
|
4
5
|
'consolidation',
|
|
@@ -11,45 +12,45 @@ const ALL_PRODUCTION_FEATURES = [
|
|
|
11
12
|
];
|
|
12
13
|
const FEATURE_REQUIREMENTS = {
|
|
13
14
|
'nonlinear-plasticity': {
|
|
14
|
-
status: '
|
|
15
|
-
currentCoverage: 'Current
|
|
15
|
+
status: 'kernel-verified',
|
|
16
|
+
currentCoverage: 'A deterministic Mohr-Coulomb triaxial material-point kernel is benchmarked against closed-form yield. Current preview result manifests still use linear elastic materials only.',
|
|
16
17
|
requiredForAcceptance: [
|
|
17
18
|
'constitutive models accepted for geotechnical use, such as Mohr-Coulomb/Hardening Soil or equivalent',
|
|
18
19
|
'stress-path, yield, plastic strain, and convergence validation fixtures',
|
|
19
20
|
'independent benchmark comparison against published or commercial-solver reference cases',
|
|
20
21
|
],
|
|
21
22
|
blockedUntil: [
|
|
22
|
-
'nonlinear-constitutive-
|
|
23
|
-
'plasticity-benchmark-suite-approved',
|
|
23
|
+
'nonlinear-constitutive-kernel-coupled-to-global-fem-solver',
|
|
24
|
+
'plasticity-benchmark-suite-approved-against-published-or-commercial-references',
|
|
24
25
|
'solver-convergence-audit-passed',
|
|
25
26
|
],
|
|
26
27
|
},
|
|
27
28
|
consolidation: {
|
|
28
|
-
status: '
|
|
29
|
-
currentCoverage: 'Current
|
|
29
|
+
status: 'kernel-verified',
|
|
30
|
+
currentCoverage: 'A deterministic 1D Terzaghi backward-Euler consolidation kernel is benchmarked against analytical average consolidation. Current preview result manifests do not expose time-dependent consolidation fields.',
|
|
30
31
|
requiredForAcceptance: [
|
|
31
32
|
'time-stepping consolidation backend with drainage boundary controls',
|
|
32
33
|
'Cv, mv/Cc, drainage path, stage duration, and monitoring calibration schema',
|
|
33
34
|
'settlement-time benchmark fixtures and tolerance envelopes',
|
|
34
35
|
],
|
|
35
36
|
blockedUntil: [
|
|
36
|
-
'consolidation-time-stepping-
|
|
37
|
+
'consolidation-time-stepping-kernel-coupled-to-fem-route',
|
|
37
38
|
'drainage-boundary-validation-approved',
|
|
38
|
-
'settlement-time-benchmark-suite-approved',
|
|
39
|
+
'settlement-time-benchmark-suite-approved-against-published-or-commercial-references',
|
|
39
40
|
],
|
|
40
41
|
},
|
|
41
42
|
'seepage-pore-pressure-coupling': {
|
|
42
|
-
status: '
|
|
43
|
-
currentCoverage: '
|
|
43
|
+
status: 'kernel-verified',
|
|
44
|
+
currentCoverage: 'Deterministic 1D Darcy seepage and effective-stress coupling kernels are benchmarked against closed-form flow and settlement checks. Current preview result manifests still record groundwater as assumptions only.',
|
|
44
45
|
requiredForAcceptance: [
|
|
45
46
|
'steady/transient seepage solver with hydraulic boundary conditions',
|
|
46
47
|
'pore-pressure coupling into effective stress/deformation calculations',
|
|
47
48
|
'uplift, gradient, and dewatering acceptance checks',
|
|
48
49
|
],
|
|
49
50
|
blockedUntil: [
|
|
50
|
-
'seepage-
|
|
51
|
-
'hydro-mechanical-coupling-accepted',
|
|
52
|
-
'pore-pressure-benchmark-suite-approved',
|
|
51
|
+
'seepage-kernel-coupled-to-fem-route-and-result-manifest',
|
|
52
|
+
'hydro-mechanical-coupling-accepted-for-2d-3d-fem',
|
|
53
|
+
'pore-pressure-benchmark-suite-approved-against-published-or-commercial-references',
|
|
53
54
|
],
|
|
54
55
|
},
|
|
55
56
|
'advanced-staged-construction': {
|
|
@@ -67,17 +68,17 @@ const FEATURE_REQUIREMENTS = {
|
|
|
67
68
|
],
|
|
68
69
|
},
|
|
69
70
|
'support-design': {
|
|
70
|
-
status: '
|
|
71
|
-
currentCoverage: '
|
|
71
|
+
status: 'kernel-verified',
|
|
72
|
+
currentCoverage: 'A deterministic Rankine support-screening kernel checks support capacity, passive toe resistance, and basal heave for controlled fixtures. It is not a wall/strut/anchor structural design engine.',
|
|
72
73
|
requiredForAcceptance: [
|
|
73
74
|
'wall/strut/anchor structural design checks with explicit standards assumptions',
|
|
74
75
|
'basal heave, kick-out, surcharge, and toe embedment verification',
|
|
75
76
|
'support reaction benchmark and safety-factor audit fixtures',
|
|
76
77
|
],
|
|
77
78
|
blockedUntil: [
|
|
78
|
-
'support-design-engine-
|
|
79
|
-
'basal-heave-and-toe-checks-approved',
|
|
80
|
-
'support-design-benchmark-suite-approved',
|
|
79
|
+
'support-design-engine-coupled-to-staged-excavation-route',
|
|
80
|
+
'basal-heave-and-toe-checks-approved-for-project-standards',
|
|
81
|
+
'support-design-benchmark-suite-approved-against-published-or-commercial-references',
|
|
81
82
|
],
|
|
82
83
|
},
|
|
83
84
|
'real-project-workspace-to-run-acceptance': {
|
|
@@ -109,15 +110,15 @@ const FEATURE_REQUIREMENTS = {
|
|
|
109
110
|
],
|
|
110
111
|
},
|
|
111
112
|
'licensed-engineer-review-workflow': {
|
|
112
|
-
status: '
|
|
113
|
-
currentCoverage: '
|
|
113
|
+
status: 'kernel-verified',
|
|
114
|
+
currentCoverage: 'A reviewer approval-record contract validates identity, license, jurisdiction, case hash, validation summary, assumptions, limitations, scope, and approval text. CLI preview runs still accept --reviewed without enforcing persisted approval metadata on every run.',
|
|
114
115
|
requiredForAcceptance: [
|
|
115
116
|
'reviewer identity and approval metadata captured for production runs',
|
|
116
117
|
'assumption, limitation, and change-control audit trail',
|
|
117
118
|
'jurisdiction/standard-specific sign-off workflow',
|
|
118
119
|
],
|
|
119
120
|
blockedUntil: [
|
|
120
|
-
'reviewer-approval-record-
|
|
121
|
+
'reviewer-approval-record-enforced-by-cli-run',
|
|
121
122
|
'assumption-change-control-audit-approved',
|
|
122
123
|
'jurisdiction-signoff-workflow-approved',
|
|
123
124
|
],
|
|
@@ -149,6 +150,7 @@ export function assessFemProductionReadiness(options = {}) {
|
|
|
149
150
|
feature,
|
|
150
151
|
...FEATURE_REQUIREMENTS[feature],
|
|
151
152
|
}));
|
|
153
|
+
const engineeringEvidence = runFemEngineeringEvidenceSuite();
|
|
152
154
|
return {
|
|
153
155
|
schemaVersion: 'fem-production-readiness.v1',
|
|
154
156
|
productionReady: false,
|
|
@@ -158,17 +160,22 @@ export function assessFemProductionReadiness(options = {}) {
|
|
|
158
160
|
currentMode,
|
|
159
161
|
supportedPreviewRoutes,
|
|
160
162
|
blockedFeatures,
|
|
161
|
-
|
|
163
|
+
engineeringEvidence,
|
|
164
|
+
blockers: [...new Set([
|
|
165
|
+
...blockedFeatures.flatMap((feature) => feature.blockedUntil),
|
|
166
|
+
...engineeringEvidence.remainingProductionBlockers,
|
|
167
|
+
])],
|
|
162
168
|
safeUserActions: [
|
|
163
169
|
'Use implemented routes only as experimental, human-reviewed previews.',
|
|
170
|
+
'Use FEM engineering evidence kernels for deterministic acceptance-gate checks only; they are not standalone production FEM result manifests.',
|
|
164
171
|
...supportedPreviewRoutes.flatMap((route) => [
|
|
165
172
|
...(route.draftCommandTemplate ? [`Draft command template: ${route.draftCommandTemplate}`] : []),
|
|
166
173
|
...(route.demoCommand ? [`Built-in demo command: ${route.demoCommand}`] : []),
|
|
167
174
|
...(route.runCommandTemplate ? [`Reviewed run command template: ${route.runCommandTemplate}`] : []),
|
|
168
175
|
]),
|
|
169
|
-
'Keep nonlinear/plasticity, consolidation, seepage, support design, and production acceptance requests in blocked planning state until the
|
|
176
|
+
'Keep full nonlinear/plasticity, consolidation, seepage, support design, and production acceptance requests in blocked planning state until the kernels are coupled to solver routes and independently benchmarked.',
|
|
170
177
|
],
|
|
171
|
-
releasePositioning: 'geotechCLI strong-beta must describe FEM as deterministic experimental previews plus contract-only planning for advanced routes; it is not a full production-grade nonlinear geotechnical FEM solver yet.',
|
|
178
|
+
releasePositioning: 'geotechCLI strong-beta must describe FEM as deterministic experimental previews plus verified engineering evidence kernels and contract-only planning for advanced routes; it is not a full production-grade nonlinear geotechnical FEM solver yet.',
|
|
172
179
|
};
|
|
173
180
|
}
|
|
174
181
|
//# sourceMappingURL=production-readiness.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"production-readiness.js","sourceRoot":"","sources":["../../src/fem/production-readiness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAA0B,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"production-readiness.js","sourceRoot":"","sources":["../../src/fem/production-readiness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAA0B,MAAM,cAAc,CAAC;AAC3E,OAAO,EACL,8BAA8B,GAE/B,MAAM,2BAA2B,CAAC;AA0CnC,MAAM,uBAAuB,GAA2B;IACtD,sBAAsB;IACtB,eAAe;IACf,gCAAgC;IAChC,8BAA8B;IAC9B,gBAAgB;IAChB,0CAA0C;IAC1C,kCAAkC;IAClC,mCAAmC;CACpC,CAAC;AAEF,MAAM,oBAAoB,GAAmF;IAC3G,sBAAsB,EAAE;QACtB,MAAM,EAAE,iBAAiB;QACzB,eAAe,EAAE,iLAAiL;QAClM,qBAAqB,EAAE;YACrB,sGAAsG;YACtG,yEAAyE;YACzE,yFAAyF;SAC1F;QACD,YAAY,EAAE;YACZ,4DAA4D;YAC5D,gFAAgF;YAChF,iCAAiC;SAClC;KACF;IACD,aAAa,EAAE;QACb,MAAM,EAAE,iBAAiB;QACzB,eAAe,EAAE,8MAA8M;QAC/N,qBAAqB,EAAE;YACrB,qEAAqE;YACrE,6EAA6E;YAC7E,4DAA4D;SAC7D;QACD,YAAY,EAAE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C,CAAC,EAAE,CAAC;gBAChG,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,0BAA0B,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC7E,GAAG,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,kCAAkC,KAAK,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;aACpG,CAAC;YACF,oNAAoN;SACrN;QACD,kBAAkB,EAChB,qPAAqP;KACxP,CAAC;AACJ,CAAC"}
|
|
@@ -888,19 +888,19 @@ export declare const DocumentEvidencePacketSchema: z.ZodObject<{
|
|
|
888
888
|
}, "strip", z.ZodTypeAny, {
|
|
889
889
|
text: string;
|
|
890
890
|
sourcePages: number[];
|
|
891
|
+
scope: "page" | "table" | "figure" | "section";
|
|
891
892
|
pageRange: [number, number];
|
|
892
893
|
chunkId: string;
|
|
893
894
|
headingAncestry: string[];
|
|
894
|
-
scope: "page" | "table" | "figure" | "section";
|
|
895
895
|
sectionType?: string | undefined;
|
|
896
896
|
significance?: number | undefined;
|
|
897
897
|
}, {
|
|
898
898
|
text: string;
|
|
899
899
|
sourcePages: number[];
|
|
900
|
+
scope: "page" | "table" | "figure" | "section";
|
|
900
901
|
pageRange: [number, number];
|
|
901
902
|
chunkId: string;
|
|
902
903
|
headingAncestry: string[];
|
|
903
|
-
scope: "page" | "table" | "figure" | "section";
|
|
904
904
|
sectionType?: string | undefined;
|
|
905
905
|
significance?: number | undefined;
|
|
906
906
|
}>, "many">;
|
|
@@ -1217,10 +1217,10 @@ export declare const DocumentEvidencePacketSchema: z.ZodObject<{
|
|
|
1217
1217
|
contentChunks: {
|
|
1218
1218
|
text: string;
|
|
1219
1219
|
sourcePages: number[];
|
|
1220
|
+
scope: "page" | "table" | "figure" | "section";
|
|
1220
1221
|
pageRange: [number, number];
|
|
1221
1222
|
chunkId: string;
|
|
1222
1223
|
headingAncestry: string[];
|
|
1223
|
-
scope: "page" | "table" | "figure" | "section";
|
|
1224
1224
|
sectionType?: string | undefined;
|
|
1225
1225
|
significance?: number | undefined;
|
|
1226
1226
|
}[];
|
|
@@ -1443,10 +1443,10 @@ export declare const DocumentEvidencePacketSchema: z.ZodObject<{
|
|
|
1443
1443
|
contentChunks: {
|
|
1444
1444
|
text: string;
|
|
1445
1445
|
sourcePages: number[];
|
|
1446
|
+
scope: "page" | "table" | "figure" | "section";
|
|
1446
1447
|
pageRange: [number, number];
|
|
1447
1448
|
chunkId: string;
|
|
1448
1449
|
headingAncestry: string[];
|
|
1449
|
-
scope: "page" | "table" | "figure" | "section";
|
|
1450
1450
|
sectionType?: string | undefined;
|
|
1451
1451
|
significance?: number | undefined;
|
|
1452
1452
|
}[];
|
package/dist/meta/metadata.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-root.d.ts","sourceRoot":"","sources":["../../src/workspace/resolve-root.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolve-root.d.ts","sourceRoot":"","sources":["../../src/workspace/resolve-root.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,uBAAuB,GAC/B,wBAAwB,GACxB,sBAAsB,GACtB,UAAU,GACV,KAAK,CAAC;AAEV,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,uBAAuB,CAAC;IACpC,UAAU,EAAE,UAAU,GAAG,UAAU,CAAC;IACpC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,qBAAqB,CAAC;CACnC;AAED,MAAM,WAAW,2BAA2B;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AA+BD,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,2BAAgC,GAAG,aAAa,CA8B7F"}
|
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { tmpdir } from 'node:os';
|
|
3
|
+
import { dirname, isAbsolute, join, relative, resolve } from 'node:path';
|
|
4
|
+
function isWithinOrSamePath(candidate, parent) {
|
|
5
|
+
const relation = relative(parent, candidate);
|
|
6
|
+
return relation === '' || (!relation.startsWith('..') && !isAbsolute(relation));
|
|
7
|
+
}
|
|
8
|
+
function findNearestWorkspaceMarker(startPath) {
|
|
4
9
|
let current = resolve(startPath);
|
|
10
|
+
const tempRoot = resolve(tmpdir());
|
|
11
|
+
const stopAt = isWithinOrSamePath(current, tempRoot) ? tempRoot : undefined;
|
|
5
12
|
for (;;) {
|
|
6
|
-
if (existsSync(join(current,
|
|
7
|
-
return
|
|
13
|
+
if (existsSync(join(current, '.geotech', 'project.json'))) {
|
|
14
|
+
return {
|
|
15
|
+
path: current,
|
|
16
|
+
detectedBy: 'geotech_project_file',
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
if (existsSync(join(current, '.git'))) {
|
|
20
|
+
return {
|
|
21
|
+
path: current,
|
|
22
|
+
detectedBy: 'git_root',
|
|
23
|
+
};
|
|
8
24
|
}
|
|
25
|
+
if (stopAt && current === stopAt)
|
|
26
|
+
return undefined;
|
|
9
27
|
const parent = dirname(current);
|
|
10
28
|
if (parent === current)
|
|
11
29
|
return undefined;
|
|
@@ -23,21 +41,11 @@ export function resolveWorkspaceRoot(options = {}) {
|
|
|
23
41
|
};
|
|
24
42
|
}
|
|
25
43
|
const cwd = resolve(options.cwd ?? process.cwd());
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
28
|
-
return {
|
|
29
|
-
path: geotechRoot,
|
|
30
|
-
detectedBy: 'geotech_project_file',
|
|
31
|
-
trustLevel: 'inferred',
|
|
32
|
-
readScope: 'root_only',
|
|
33
|
-
writeScope: 'geotech_output_only',
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
const gitRoot = findAncestorContaining(cwd, '.git');
|
|
37
|
-
if (gitRoot) {
|
|
44
|
+
const nearestMarker = findNearestWorkspaceMarker(cwd);
|
|
45
|
+
if (nearestMarker) {
|
|
38
46
|
return {
|
|
39
|
-
path:
|
|
40
|
-
detectedBy:
|
|
47
|
+
path: nearestMarker.path,
|
|
48
|
+
detectedBy: nearestMarker.detectedBy,
|
|
41
49
|
trustLevel: 'inferred',
|
|
42
50
|
readScope: 'root_only',
|
|
43
51
|
writeScope: 'geotech_output_only',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-root.js","sourceRoot":"","sources":["../../src/workspace/resolve-root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve-root.js","sourceRoot":"","sources":["../../src/workspace/resolve-root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBzE,SAAS,kBAAkB,CAAC,SAAiB,EAAE,MAAc;IAC3D,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC7C,OAAO,QAAQ,KAAK,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;AAClF,CAAC;AAED,SAAS,0BAA0B,CAAC,SAAiB;IACnD,IAAI,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,kBAAkB,CAAC,OAA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