@nudojs/core 1.14.0 → 1.15.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/dist/{chunk-N7AGFMSD.js → chunk-47UPDZHE.js} +450 -53
- package/dist/{chunk-W3Z77Y2I.js → chunk-NUTYUT3I.js} +14439 -13885
- package/dist/exec.d.ts +206 -57
- package/dist/exec.js +1 -1
- package/dist/index.d.ts +141 -8
- package/dist/index.js +61 -395
- package/dist/internal.d.ts +101 -5
- package/dist/internal.js +8 -2
- package/dist/{projection-budget-DPPRBOLp.d.ts → projection-budget-07VnMktV.d.ts} +44 -2
- package/dist/{run-DhSqP3in.d.ts → run-DfloWX6i.d.ts} +9 -0
- package/package.json +2 -2
package/dist/internal.d.ts
CHANGED
|
@@ -1,9 +1,89 @@
|
|
|
1
|
-
import { I as InterfaceSource, a as InterfaceTierOpts, p as parseSource, C as CheckIssue } from './projection-budget-
|
|
2
|
-
export { L as LeakBudget, b as LoadDepsFingerprint, M as MAX_PROMISE_MICROS, P as PROJECTION_MAX_DEPTH, c as ProjectionBudget, d as ProjectionStopReason, e as
|
|
3
|
-
import { A as Abs, T as Term, c as AbsModuleExports, d as AstEnv } from './run-
|
|
4
|
-
export { $ as $tryDigestSoft, e as $tryMarkSoft, f as $tryReleaseSoft, E as ERROR_FAMILY, g as EvalFallbackStats, M as MayThrowEffect, h as absLit, i as absNumLit, j as absStrLit, k as allAbsStr, l as clearPureCallMemo, m as clearPureMemo, n as enterEvalCallBudgetSession, o as errorTypeAbs, p as exitEvalCallBudgetSession, q as filterDeclaredThrows, r as filterGateThrows, s as filterIgnoredThrows, t as flushMayThrowEffects, u as formatThrowsAbs, v as getEvalCallBudgetState, w as getEvalFallbackStats, x as getMayThrowCollector, y as isThrowsIgnored, z as mayThrowEffectsToAbs, B as orphanMayThrowEffects, D as popMayThrowFrame, F as pushMayThrowFrame, G as recordMayThrow, H as resetEvalFallbackStats, I as runWithMayThrowSession, J as setMayThrowCollector, K as throwAbsToKinds, N as throwsKindCovered, O as withEvalBudgetOverride } from './run-
|
|
1
|
+
import { I as InterfaceSource, a as InterfaceTierOpts, p as parseSource, C as CheckIssue } from './projection-budget-07VnMktV.js';
|
|
2
|
+
export { L as LeakBudget, b as LoadDepsFingerprint, M as MAX_PROMISE_MICROS, P as PROJECTION_MAX_DEPTH, c as ProjectionBudget, d as ProjectionStopReason, e as budgetAttributionSegs, f as defaultLeakBudget, g as exceedsBudget, h as exportedNameOfLocal, i as extractAllLoadSpecs, j as getPromiseMicrosLength, l as leakIfNeeded, k as loadModuleDepsFingerprint, m as maybeLeak, n as normPath, r as resetLeakCounter, o as resolveDepPath, s as sidecarSpecsOf, q as stablePathKey, t as stablePathKeyGraph, u as termDepth, v as termNodes } from './projection-budget-07VnMktV.js';
|
|
3
|
+
import { A as Abs, T as Term, c as AbsModuleExports, d as AstEnv } from './run-DfloWX6i.js';
|
|
4
|
+
export { $ as $tryDigestSoft, e as $tryMarkSoft, f as $tryReleaseSoft, E as ERROR_FAMILY, g as EvalFallbackStats, M as MayThrowEffect, h as absLit, i as absNumLit, j as absStrLit, k as allAbsStr, l as clearPureCallMemo, m as clearPureMemo, n as enterEvalCallBudgetSession, o as errorTypeAbs, p as exitEvalCallBudgetSession, q as filterDeclaredThrows, r as filterGateThrows, s as filterIgnoredThrows, t as flushMayThrowEffects, u as formatThrowsAbs, v as getEvalCallBudgetState, w as getEvalFallbackStats, x as getMayThrowCollector, y as isThrowsIgnored, z as mayThrowEffectsToAbs, B as orphanMayThrowEffects, D as popMayThrowFrame, F as pushMayThrowFrame, G as recordMayThrow, H as resetEvalFallbackStats, I as runWithMayThrowSession, J as setMayThrowCollector, K as throwAbsToKinds, N as throwsKindCovered, O as withEvalBudgetOverride } from './run-DfloWX6i.js';
|
|
5
5
|
import { File, Node } from '@babel/types';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* 诊断码唯一注册表(P3-7):所有 `nudo:*` 诊断码字符串的单一真理源。
|
|
9
|
+
*
|
|
10
|
+
* - 零依赖叶子:core 内部相对 import,跨包(parser/service/lsp/nudojs)
|
|
11
|
+
* 走 `@nudojs/core/internal`——不引环、加载零成本。
|
|
12
|
+
* - 拼写漂移在类型层不可表达:键不存在 → tsc 报错,新增码只能落在本表。
|
|
13
|
+
* - 门禁联动:packages/website/tests/docs-coverage.test.ts 的 emittedCodes()
|
|
14
|
+
* 以「本注册表 ∪ src 残留字面量」双源强制诊断术语表(en+zh)锚点——
|
|
15
|
+
* 注册表里每个码都必须有 `{#nudo-<code>}` 锚点(冒号转连字符)。
|
|
16
|
+
* - 非诊断码的 `nudo:*` 字符串**不进**本表:指令名(`nudo:case` 等)、
|
|
17
|
+
* 控制流/Error 标记(`nudo:throw` / `nudo:return` / `nudo:loop` /
|
|
18
|
+
* `nudo:unsupported`)、Symbol 哨兵(`nudo:not-literal` / `nudo:json-omit` /
|
|
19
|
+
* `nudo:no-lit-key`)。
|
|
20
|
+
*/
|
|
21
|
+
/** 键名 = 码去掉 `nudo:` 前缀后按 `-` 分段转 camelCase。 */
|
|
22
|
+
declare const DIAG: {
|
|
23
|
+
readonly argCount: "nudo:arg-count";
|
|
24
|
+
readonly argOpaque: "nudo:arg-opaque";
|
|
25
|
+
readonly argStructure: "nudo:arg-structure";
|
|
26
|
+
readonly assignMismatch: "nudo:assign-mismatch";
|
|
27
|
+
readonly constraintUnproven: "nudo:constraint-unproven";
|
|
28
|
+
readonly constraintViolated: "nudo:constraint-violated";
|
|
29
|
+
readonly fnNotFound: "nudo:fn-not-found";
|
|
30
|
+
readonly partialResult: "nudo:partial-result";
|
|
31
|
+
readonly unprovenReturn: "nudo:unproven-return";
|
|
32
|
+
readonly assumeInvalid: "nudo:assume-invalid";
|
|
33
|
+
readonly assumeRelied: "nudo:assume-relied";
|
|
34
|
+
readonly contractSyntax: "nudo:contract-syntax";
|
|
35
|
+
readonly directiveSyntax: "nudo:directive-syntax";
|
|
36
|
+
readonly invariantInvalid: "nudo:invariant-invalid";
|
|
37
|
+
readonly invariantRelied: "nudo:invariant-relied";
|
|
38
|
+
readonly mockInvalid: "nudo:mock-invalid";
|
|
39
|
+
readonly caseExpected: "nudo:case-expected";
|
|
40
|
+
readonly caseInconsistency: "nudo:case-inconsistency";
|
|
41
|
+
readonly dualEntry: "nudo:dual-entry";
|
|
42
|
+
readonly entryMayThrow: "nudo:entry-may-throw";
|
|
43
|
+
readonly mayThrow: "nudo:may-throw";
|
|
44
|
+
readonly noSignature: "nudo:no-signature";
|
|
45
|
+
readonly builtinUnknown: "nudo:builtin-unknown";
|
|
46
|
+
readonly forkTruncated: "nudo:fork-truncated";
|
|
47
|
+
readonly hostEffectBlocked: "nudo:host-effect-blocked";
|
|
48
|
+
readonly loopTruncated: "nudo:loop-truncated";
|
|
49
|
+
readonly mathFoldError: "nudo:math-fold-error";
|
|
50
|
+
readonly opaqueResult: "nudo:opaque-result";
|
|
51
|
+
readonly promiseMicroError: "nudo:promise-micro-error";
|
|
52
|
+
readonly promiseMicroTruncated: "nudo:promise-micro-truncated";
|
|
53
|
+
readonly recursionTruncated: "nudo:recursion-truncated";
|
|
54
|
+
readonly unknownInference: "nudo:unknown-inference";
|
|
55
|
+
readonly unknownRecv: "nudo:unknown-recv";
|
|
56
|
+
readonly missingSlot: "nudo:missing-slot";
|
|
57
|
+
readonly noMethod: "nudo:no-method";
|
|
58
|
+
readonly interfaceConflict: "nudo:interface-conflict";
|
|
59
|
+
readonly interfaceCycle: "nudo:interface-cycle";
|
|
60
|
+
readonly interfaceDomainExceeds: "nudo:interface-domain-exceeds";
|
|
61
|
+
readonly interfaceDrift: "nudo:interface-drift";
|
|
62
|
+
readonly interfaceEmitDenied: "nudo:interface-emit-denied";
|
|
63
|
+
readonly interfaceEntryOnly: "nudo:interface-entry-only";
|
|
64
|
+
readonly interfaceLoad: "nudo:interface-load";
|
|
65
|
+
readonly interfaceMultiDeclarator: "nudo:interface-multi-declarator";
|
|
66
|
+
readonly interfaceNameClash: "nudo:interface-name-clash";
|
|
67
|
+
readonly interfaceNotProjectable: "nudo:interface-not-projectable";
|
|
68
|
+
readonly interfaceParamMismatch: "nudo:interface-param-mismatch";
|
|
69
|
+
readonly interfaceUnderivable: "nudo:interface-underivable";
|
|
70
|
+
readonly envHarvestConflict: "nudo:env-harvest-conflict";
|
|
71
|
+
readonly envUnresolved: "nudo:env-unresolved";
|
|
72
|
+
readonly exportsUnresolved: "nudo:exports-unresolved";
|
|
73
|
+
readonly missingExport: "nudo:missing-export";
|
|
74
|
+
readonly moduleCycle: "nudo:module-cycle";
|
|
75
|
+
readonly moduleDepth: "nudo:module-depth";
|
|
76
|
+
readonly moduleMissing: "nudo:module-missing";
|
|
77
|
+
readonly internal: "nudo:internal";
|
|
78
|
+
readonly pathEmptyDir: "nudo:path-empty-dir";
|
|
79
|
+
readonly pathIo: "nudo:path-io";
|
|
80
|
+
readonly pathMissingCallsite: "nudo:path-missing-callsite";
|
|
81
|
+
readonly pathNotFound: "nudo:path-not-found";
|
|
82
|
+
readonly pathNotTarget: "nudo:path-not-target";
|
|
83
|
+
};
|
|
84
|
+
/** 全部诊断码字面量联合(DIAG 值的类型面)。 */
|
|
85
|
+
type DiagCode = (typeof DIAG)[keyof typeof DIAG];
|
|
86
|
+
|
|
7
87
|
/**
|
|
8
88
|
* 源码文本工具:注释/字符串/正则字面量剥离。
|
|
9
89
|
* 原文正则特性探测(require/import/exports 等)必须先剥再测——
|
|
@@ -89,6 +169,18 @@ type AbsBudgetStats = {
|
|
|
89
169
|
loopTruncated: boolean;
|
|
90
170
|
/** 调用截断原因集合(A+B;稳定排序,进 JSON) */
|
|
91
171
|
reasons: AbsTruncationReason[];
|
|
172
|
+
/** A 路径(enterCall 抽象调用)本轮截断原因——上屏归因用(与合并集 reasons 分流) */
|
|
173
|
+
callReasons: AbsTruncationReason[];
|
|
174
|
+
/** A 路径最大进入深度;depth 截断时 = 触发时深度(== 触发时生效上限) */
|
|
175
|
+
depth: number;
|
|
176
|
+
/** A 路径 depth 上限;depth 截断时 = 触发时生效上限(@nudo:budget 覆盖亦如实) */
|
|
177
|
+
maxDepth: number;
|
|
178
|
+
/** B 路径($callNamed 求值调用)本轮截断原因 */
|
|
179
|
+
evalReasons: AbsTruncationReason[];
|
|
180
|
+
/** B 路径最大进入深度;depth 截断时 = 触发时深度(== 触发时生效上限) */
|
|
181
|
+
evalDepth: number;
|
|
182
|
+
/** B 路径 depth 上限;depth 截断时 = 触发时生效上限(@nudo:budget 覆盖亦如实) */
|
|
183
|
+
maxEvalDepth: number;
|
|
92
184
|
};
|
|
93
185
|
declare function getAbsCallBudgetStats(): AbsBudgetStats;
|
|
94
186
|
/** 宿主入口(runTranspiled / callTranspiledExportFull / check)前重置 */
|
|
@@ -170,6 +262,10 @@ declare function resetEvalForkBudget(): void;
|
|
|
170
262
|
/** $fork 入口:超限放弃该分支(调用方返回 unknown = 最保守,安全)。 */
|
|
171
263
|
declare function bumpEvalForkBudget(): boolean;
|
|
172
264
|
|
|
265
|
+
/** 每轮模块图求值入口清空:上一轮 refresh 闭包只指向已死模块作用域,
|
|
266
|
+
* 语义无害但滞留膨胀;新图重新注册(evalAbsModuleGraph 入口调用)。 */
|
|
267
|
+
declare function clearLiveImportRefreshers(): void;
|
|
268
|
+
|
|
173
269
|
/**
|
|
174
270
|
* 可 ALS 隔离的模块级可变槽。
|
|
175
271
|
* 语义:`get`/`set` 作用于当前最内层 store(无作用域 = fallback);
|
|
@@ -774,4 +870,4 @@ declare function runWithEvalMissingSlot<T>(enabled: boolean, body: () => T): T;
|
|
|
774
870
|
*/
|
|
775
871
|
declare function noteObjSlotMissing(recv: Abs | undefined, name: string, loc?: [number, number]): boolean;
|
|
776
872
|
|
|
777
|
-
export { type AbsBudgetStats, type AbsInlay, type ArgDerivation, type ClassDef, type CollectAbsInlaysOpts, type CollectorScopeParticipant, type DerivationNode, type DiagChannel, type EvalMemberDiag, FORK_TRUNCATION_LABEL, type FnFp, HOST_EFFECT_LABEL_PREFIX, type InjectedDomainEvidenceOpts, type InjectedDomainRecord, MAX_CALL_DEPTH, MAX_EVAL_TOTAL_FORKS, MAX_TOTAL_CALLS, type MethodDef, OBJECT_PROTO_NAMES, PROMISE_MICRO_ERROR_LABEL, PROMISE_MICRO_OVERFLOW_LABEL, type ScopedDiagChannel, type ScopedSlot, type StringLiteralSpan, type TemplateMeta, type TemplatePartDesc, type TemplatePartView, type TemplatePredicateDecision, abortDerivationSession, absTemplateViews, allFixedTextOfViews, anyMemberResult, awaitAbs, beginDerivationSession, bumpEvalForkBudget, callBudgetKey, canSkipLiteralCallScan, checkInjectedDomainEvidence, classChainNames, classFromMethods, coerceAsyncReturn, collectAbsInlays, concatString, createDiagChannel, createScopedDiagChannel, createScopedSlot, createTemplateAbs, decideEndsWith, decideIncludes, decideStartsWith, defineClass, definitelyUncallableMember, denoteGuard, derivationChain, endDerivationSession, enterCall, escapeTemplateTypeFixed, exitCall, fixedLengthOfViews, fnFingerprints, formatObjectKey, formatTemplateNameViews, generalizeSourceKeyPart, getAbsCallBudgetStats, getAbsOrigin, getClass, getClassChain, getDerivation, getEvalForkBudgetLimit, getEvalForkCount, getFnNameAndBodies, hasDerivationSession, hashSource, instanceOf, instantiateClass, isEvalMissingSlotEnabled, isJsBindingIdent, isJsIdent, isNullishAbs, isTemplateLike, knownPrefixOfViews, knownSuffixOfViews, listTopFunctions, lookupMethod, lookupMethodWithOwner, lookupSuperMethod, maskCommentsAndStrings, mergeAdjacentFixedViews, noteAbsTruncation, noteAnyMemberMayThrow, noteDerivationAdd, noteDerivationJoin, noteEvalForkTruncation, noteHostEffectBlocked, noteMemberDispatchMiss, noteNullishMemberThrows, noteObjSlotMissing, notePrimMemberMissing, noteUnknownMemberMissing, popCallLoc, projectBrand, projectDerivationDsl, pushCallLoc, recordMemberDiag, registerCollectorScopeParticipant, resetAbsCallBudget, resetEvalForkBudget, resetFnFpCache, resetHashSourceCache, runWithCollectorScope, runWithEvalMissingSlot, safeMemberAccess, sanitizeCommentText, scanStringLiterals, setAbsTruncationCollector, setDerivation, setDerivationCollector, setEvalForkBudgetLimit, setEvalMissingSlotEnabled, setMemberDiagCollector, sourceHasCjsExports, sourceHasModuleDependency, sourceHasRequireCall, stableAnalyzeKeySource, stableCallId, stripCommentsAndStrings, stripStringsKeepComments, superNameOf, tagAbsOrigin, tagDerivationRoot, templateMatchesValue, templatePartsOf, termKey, toJsBindingIdent, truncatedAbs, viewTemplateParts, withFnBudgetOverride, wrapPromise };
|
|
873
|
+
export { type AbsBudgetStats, type AbsInlay, type ArgDerivation, type ClassDef, type CollectAbsInlaysOpts, type CollectorScopeParticipant, DIAG, type DerivationNode, type DiagChannel, type DiagCode, type EvalMemberDiag, FORK_TRUNCATION_LABEL, type FnFp, HOST_EFFECT_LABEL_PREFIX, type InjectedDomainEvidenceOpts, type InjectedDomainRecord, MAX_CALL_DEPTH, MAX_EVAL_TOTAL_FORKS, MAX_TOTAL_CALLS, type MethodDef, OBJECT_PROTO_NAMES, PROMISE_MICRO_ERROR_LABEL, PROMISE_MICRO_OVERFLOW_LABEL, type ScopedDiagChannel, type ScopedSlot, type StringLiteralSpan, type TemplateMeta, type TemplatePartDesc, type TemplatePartView, type TemplatePredicateDecision, abortDerivationSession, absTemplateViews, allFixedTextOfViews, anyMemberResult, awaitAbs, beginDerivationSession, bumpEvalForkBudget, callBudgetKey, canSkipLiteralCallScan, checkInjectedDomainEvidence, classChainNames, classFromMethods, clearLiveImportRefreshers, coerceAsyncReturn, collectAbsInlays, concatString, createDiagChannel, createScopedDiagChannel, createScopedSlot, createTemplateAbs, decideEndsWith, decideIncludes, decideStartsWith, defineClass, definitelyUncallableMember, denoteGuard, derivationChain, endDerivationSession, enterCall, escapeTemplateTypeFixed, exitCall, fixedLengthOfViews, fnFingerprints, formatObjectKey, formatTemplateNameViews, generalizeSourceKeyPart, getAbsCallBudgetStats, getAbsOrigin, getClass, getClassChain, getDerivation, getEvalForkBudgetLimit, getEvalForkCount, getFnNameAndBodies, hasDerivationSession, hashSource, instanceOf, instantiateClass, isEvalMissingSlotEnabled, isJsBindingIdent, isJsIdent, isNullishAbs, isTemplateLike, knownPrefixOfViews, knownSuffixOfViews, listTopFunctions, lookupMethod, lookupMethodWithOwner, lookupSuperMethod, maskCommentsAndStrings, mergeAdjacentFixedViews, noteAbsTruncation, noteAnyMemberMayThrow, noteDerivationAdd, noteDerivationJoin, noteEvalForkTruncation, noteHostEffectBlocked, noteMemberDispatchMiss, noteNullishMemberThrows, noteObjSlotMissing, notePrimMemberMissing, noteUnknownMemberMissing, popCallLoc, projectBrand, projectDerivationDsl, pushCallLoc, recordMemberDiag, registerCollectorScopeParticipant, resetAbsCallBudget, resetEvalForkBudget, resetFnFpCache, resetHashSourceCache, runWithCollectorScope, runWithEvalMissingSlot, safeMemberAccess, sanitizeCommentText, scanStringLiterals, setAbsTruncationCollector, setDerivation, setDerivationCollector, setEvalForkBudgetLimit, setEvalMissingSlotEnabled, setMemberDiagCollector, sourceHasCjsExports, sourceHasModuleDependency, sourceHasRequireCall, stableAnalyzeKeySource, stableCallId, stripCommentsAndStrings, stripStringsKeepComments, superNameOf, tagAbsOrigin, tagDerivationRoot, templateMatchesValue, templatePartsOf, termKey, toJsBindingIdent, truncatedAbs, viewTemplateParts, withFnBudgetOverride, wrapPromise };
|
package/dist/internal.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
budgetAttributionSegs,
|
|
2
3
|
canSkipLiteralCallScan,
|
|
3
4
|
checkInjectedDomainEvidence,
|
|
4
5
|
createDiagChannel,
|
|
@@ -21,11 +22,12 @@ import {
|
|
|
21
22
|
stableAnalyzeKeySource,
|
|
22
23
|
stablePathKey,
|
|
23
24
|
stablePathKeyGraph
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-47UPDZHE.js";
|
|
25
26
|
import {
|
|
26
27
|
$tryDigestSoft,
|
|
27
28
|
$tryMarkSoft,
|
|
28
29
|
$tryReleaseSoft,
|
|
30
|
+
DIAG,
|
|
29
31
|
ERROR_FAMILY,
|
|
30
32
|
FORK_TRUNCATION_LABEL,
|
|
31
33
|
HOST_EFFECT_LABEL_PREFIX,
|
|
@@ -52,6 +54,7 @@ import {
|
|
|
52
54
|
callBudgetKey,
|
|
53
55
|
classChainNames,
|
|
54
56
|
classFromMethods,
|
|
57
|
+
clearLiveImportRefreshers,
|
|
55
58
|
clearPureCallMemo,
|
|
56
59
|
clearPureMemo,
|
|
57
60
|
coerceAsyncReturn,
|
|
@@ -169,7 +172,7 @@ import {
|
|
|
169
172
|
withEvalBudgetOverride,
|
|
170
173
|
withFnBudgetOverride,
|
|
171
174
|
wrapPromise
|
|
172
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-NUTYUT3I.js";
|
|
173
176
|
|
|
174
177
|
// src/algebra/inlay.ts
|
|
175
178
|
function listFunctions(source) {
|
|
@@ -610,6 +613,7 @@ export {
|
|
|
610
613
|
$tryDigestSoft,
|
|
611
614
|
$tryMarkSoft,
|
|
612
615
|
$tryReleaseSoft,
|
|
616
|
+
DIAG,
|
|
613
617
|
ERROR_FAMILY,
|
|
614
618
|
FORK_TRUNCATION_LABEL,
|
|
615
619
|
HOST_EFFECT_LABEL_PREFIX,
|
|
@@ -632,12 +636,14 @@ export {
|
|
|
632
636
|
anyMemberResult,
|
|
633
637
|
awaitAbs,
|
|
634
638
|
beginDerivationSession,
|
|
639
|
+
budgetAttributionSegs,
|
|
635
640
|
bumpEvalForkBudget,
|
|
636
641
|
callBudgetKey,
|
|
637
642
|
canSkipLiteralCallScan,
|
|
638
643
|
checkInjectedDomainEvidence,
|
|
639
644
|
classChainNames,
|
|
640
645
|
classFromMethods,
|
|
646
|
+
clearLiveImportRefreshers,
|
|
641
647
|
clearPureCallMemo,
|
|
642
648
|
clearPureMemo,
|
|
643
649
|
coerceAsyncReturn,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { File } from '@babel/types';
|
|
2
|
-
import { A as Abs, T as Term, P as PrimName, a as Pred, L as LiteralValue, b as Phi, C as Confidence } from './run-
|
|
2
|
+
import { A as Abs, T as Term, P as PrimName, a as Pred, L as LiteralValue, b as Phi, C as Confidence } from './run-DfloWX6i.js';
|
|
3
3
|
|
|
4
4
|
declare function resetParseSourceCache(): void;
|
|
5
5
|
declare function getParseSourceCacheSize(): number;
|
|
@@ -727,6 +727,18 @@ type CheckReport = {
|
|
|
727
727
|
/** 循环迭代预算截断(#loop-iterations;maxIters/硬上限,非调用预算) */
|
|
728
728
|
loopTruncated: boolean;
|
|
729
729
|
reasons: string[];
|
|
730
|
+
/** A 路径(enterCall)截断原因——归因到具体预算/路径(depth≠calls 预算) */
|
|
731
|
+
callReasons: string[];
|
|
732
|
+
/** A 路径最大进入深度;depth 截断时 = 触发时深度(== 触发时生效上限) */
|
|
733
|
+
depth: number;
|
|
734
|
+
/** A 路径 depth 上限;depth 截断时 = 触发时生效上限 */
|
|
735
|
+
maxDepth: number;
|
|
736
|
+
/** B 路径($callNamed)截断原因 */
|
|
737
|
+
evalReasons: string[];
|
|
738
|
+
/** B 路径最大进入深度;depth 截断时 = 触发时深度(== 触发时生效上限) */
|
|
739
|
+
evalDepth: number;
|
|
740
|
+
/** B 路径 depth 上限;depth 截断时 = 触发时生效上限 */
|
|
741
|
+
maxEvalDepth: number;
|
|
730
742
|
};
|
|
731
743
|
};
|
|
732
744
|
/**
|
|
@@ -800,6 +812,36 @@ type CheckJsonMulti = {
|
|
|
800
812
|
declare function serializeCheckJson(r: CheckReport): CheckJson;
|
|
801
813
|
/** 多文件信封:汇总 summary,`ok` = 全部文件 ok。 */
|
|
802
814
|
declare function serializeCheckJsonMulti(reports: CheckJson[]): CheckJsonMulti;
|
|
815
|
+
/**
|
|
816
|
+
* budget 归因段构建器——check 面(formatCheckReport)与 health 面
|
|
817
|
+
* (nudojs commands/health)单一实现(#health-budget,两处曾各自维护
|
|
818
|
+
* 同一映射而漂移出回归):只打触发截断的那条预算自己的计数段——
|
|
819
|
+
* depth 截断打 depth/limit 对、calls 截断打计数/上限(必到顶)、
|
|
820
|
+
* cycle 不是预算(无可打的计数)——杜绝「71/20000 却标 truncated」。
|
|
821
|
+
* 参数是 CheckReport.budget 内联对象与 AbsBudgetStats 的结构公共子集
|
|
822
|
+
* (reasons 按 `?? []` 防御,两个来源都必填但防御面保持一致)。
|
|
823
|
+
*/
|
|
824
|
+
declare function budgetAttributionSegs(b: {
|
|
825
|
+
calls: number;
|
|
826
|
+
maxCalls: number;
|
|
827
|
+
/** A 路径(enterCall)截断原因 */
|
|
828
|
+
callReasons?: readonly string[];
|
|
829
|
+
depth: number;
|
|
830
|
+
maxDepth: number;
|
|
831
|
+
evalCalls: number;
|
|
832
|
+
maxEvalCalls: number;
|
|
833
|
+
/** B 路径($callNamed)截断原因 */
|
|
834
|
+
evalReasons?: readonly string[];
|
|
835
|
+
evalDepth: number;
|
|
836
|
+
maxEvalDepth: number;
|
|
837
|
+
forks: number;
|
|
838
|
+
maxForks: number;
|
|
839
|
+
forkTruncated: boolean;
|
|
840
|
+
loopTruncated: boolean;
|
|
841
|
+
}): {
|
|
842
|
+
segs: string[];
|
|
843
|
+
cycleOnly: boolean;
|
|
844
|
+
};
|
|
803
845
|
/**
|
|
804
846
|
* Nudo 原生报告:Abs 签名表 + actual ⊭ expected。
|
|
805
847
|
* 不是 tsc 输出的换皮。
|
|
@@ -880,4 +922,4 @@ declare class ProjectionBudget {
|
|
|
880
922
|
exit(): void;
|
|
881
923
|
}
|
|
882
924
|
|
|
883
|
-
export {
|
|
925
|
+
export { andC as $, type CheckAction as A, type CheckJson as B, type CheckIssue as C, type CheckJsonMulti as D, type EffectiveInterfaceOpts as E, type ConstraintBuilder as F, type Diagnostic as G, type EffectiveInterface as H, type InterfaceSource as I, type GitlabCodeQualityIssue as J, INTERFACE_SOURCE_ABBR as K, type LeakBudget as L, MAX_PROMISE_MICROS as M, type NudoConstraint as N, type InterfaceDiag as O, PROJECTION_MAX_DEPTH as P, type InterfaceTierInfo as Q, type NamedImport as R, type NudoField as S, type NudoFnConstraint as T, NudoSidecarError as U, type NudoSig as V, type RefineDiag as W, type RefineEntry as X, type RefineResolveOpts as Y, SELF as Z, actionsForIssue as _, type InterfaceTierOpts as a, string as a$, any as a0, array as a1, boolean as a2, checkArg as a3, checkCall as a4, constraintAdmitsNullish as a5, constraintToEntryAbs as a6, derefConstraint as a7, drainPromiseMicros as a8, effectiveInterface as a9, isIntFlag as aA, isNodeModulesPath as aB, isNudoConstraint as aC, lazy as aD, leavePromiseExecutorScope as aE, lenTerm as aF, litC as aG, localNamedExports as aH, notePromiseExecutorFork as aI, nullable as aJ, number as aK, omit as aL, partial as aM, pick as aN, queuePromiseMicro as aO, refineDiagCount as aP, refineToIndexedFull as aQ, resetNudoModuleExecCache as aR, resetParseSourceCache as aS, resetSidecarLoadFailureCache as aT, serializeCheckJson as aU, serializeCheckJsonMulti as aV, setInterfaceDiagCollector as aW, setRefineDiagCollector as aX, shape as aY, sidecarClosureFingerprint as aZ, sidecarPathOf as a_, enterPromiseExecutorScope as aa, evalPromiseCtor as ab, evalPromiseMethod as ac, evalPromiseStatic as ad, execNudoModule as ae, extractDeclaredThrows as af, extractFnBudget as ag, extractNudoImports as ah, extractRefineReturnFromSource as ai, extractRefinesFromSource as aj, fn as ak, fnConstraintToEntryReqs as al, formatCheckReport as am, formatConstraint as an, formatDiagnostics as ao, formatEffectiveInterfaceDisplay as ap, formatGithubAnnotations as aq, formatGitlabCodeQuality as ar, formatInterfaceTierLine as as, generatedExportNames as at, getParseSourceCacheSize as au, getTerm as av, instantiateConstraint as aw, interfaceDiagCount as ax, interfaceSourceOf as ay, interfaceTierOf as az, type LoadDepsFingerprint as b, takeInterfaceDiags as b0, takeInterfaceDiagsSince as b1, takeRefineDiags as b2, takeRefineDiagsSince as b3, throwConstraintToKinds as b4, union as b5, ProjectionBudget as c, type ProjectionStopReason as d, budgetAttributionSegs as e, defaultLeakBudget as f, exceedsBudget as g, exportedNameOfLocal as h, extractAllLoadSpecs as i, getPromiseMicrosLength as j, loadModuleDepsFingerprint as k, leakIfNeeded as l, maybeLeak as m, normPath as n, resolveDepPath as o, parseSource as p, stablePathKey as q, resetLeakCounter as r, sidecarSpecsOf as s, stablePathKeyGraph as t, termDepth as u, termNodes as v, type CheckReport as w, CONSTRAINT_BUILDERS as x, CONSTRAINT_BUILDER_NAMES as y, CONSTRAINT_EXPR_RE as z };
|
|
@@ -863,11 +863,16 @@ type TranspiledCallResult = {
|
|
|
863
863
|
declare function isAbsVal(v: unknown): v is Abs;
|
|
864
864
|
/** 调用 runTranspiled 导出(捕获 $throw)。opts.phi:入口 Φ 种子
|
|
865
865
|
* (instantiate/symbolic 的约束入口——eval 侧路径条件收窄)。
|
|
866
|
+
* opts.shareArgs:evaluator 内部桥(跨模块 import / mock 文件桥,
|
|
867
|
+
* callTranspiledExportApply)传引用——被调方对容器实参的变异必须对
|
|
868
|
+
* caller 帧可见(与同文件闭包调用同语义);宿主重放(case/记录/LSP)
|
|
869
|
+
* 不传,保持 D1 防御副本。
|
|
866
870
|
* 嵌套进入(导出桥 apply)继承外层预算;仅最外层宿主入口重置。
|
|
867
871
|
* #152 assume 前提不设选项位:播种统一走 withAssumePremises 动态域
|
|
868
872
|
* 包裹(check.ts 的 runSeeded extent),单一机制无第二路径。 */
|
|
869
873
|
declare function callTranspiledExportFull(exports: Record<string, unknown>, name: string, args: Abs[], opts?: {
|
|
870
874
|
phi?: Phi;
|
|
875
|
+
shareArgs?: boolean;
|
|
871
876
|
}): TranspiledCallResult;
|
|
872
877
|
/** 调用 runTranspiled 导出(仅结果) */
|
|
873
878
|
declare function callTranspiledExport(exports: Record<string, unknown>, name: string, args: Abs[]): Abs;
|
|
@@ -877,6 +882,10 @@ declare function callTranspiledExport(exports: Record<string, unknown>, name: st
|
|
|
877
882
|
* 返回 AbsApplyResult(`{abs, throws}`),$call 统一路由 throws。
|
|
878
883
|
* 手拆 `.result` 会静默丢 throws 面(BUG-006 根因)。
|
|
879
884
|
*
|
|
885
|
+
* 桥是 evaluator 内部调用(caller 帧 → 跨模块 import):实参传引用
|
|
886
|
+
* (shareArgs),被调方 mutator 写回 caller 绑定——与同文件闭包调用同语义;
|
|
887
|
+
* 宿主重放不走此工厂,保持 D1 防御副本。
|
|
888
|
+
*
|
|
880
889
|
* `exports` 可传惰性 getter(互递归模块桥:导出表在桥创建后才赋值)。
|
|
881
890
|
*/
|
|
882
891
|
declare function callTranspiledExportApply(exports: Record<string, unknown> | (() => Record<string, unknown>), name: string): (args: Abs[], thisVal?: Abs) => AbsApplyResult;
|
package/package.json
CHANGED