@linghun/tui 0.1.0 → 0.1.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/dist/background-control-runtime.js +27 -26
- package/dist/capability-runtime.js +16 -15
- package/dist/{chunk-N7G2X2LK.js → chunk-33E6RDCY.js} +10 -10
- package/dist/{chunk-FTAEPAVY.js → chunk-3BPKJMIV.js} +2 -2
- package/dist/{chunk-WQMSRO4D.js → chunk-4E56DWEZ.js} +2 -2
- package/dist/chunk-4UER2AKI.js +636 -0
- package/dist/{chunk-WHFDDZHY.js → chunk-5CXN4JLE.js} +2 -2
- package/dist/{chunk-JDWXC2OQ.js → chunk-624A7BBJ.js} +3 -3
- package/dist/{chunk-3GCIXKCI.js → chunk-7TYK55JT.js} +4 -0
- package/dist/{chunk-JO5ANTMR.js → chunk-AZU7HXIT.js} +76 -29
- package/dist/{chunk-B4GQTZMT.js → chunk-CD54BQJ5.js} +1 -1
- package/dist/{chunk-ZZ2CNCXJ.js → chunk-CDVYF7RU.js} +1 -1
- package/dist/{chunk-ECFLCY5V.js → chunk-DYDTLRHB.js} +1 -1
- package/dist/{chunk-AKPXMCVF.js → chunk-HIIYRATQ.js} +1 -1
- package/dist/{chunk-JHGWGH2C.js → chunk-J6CYFWSW.js} +89 -7
- package/dist/{chunk-66BNE332.js → chunk-JJQETFCR.js} +1 -1
- package/dist/{chunk-RVY34HK4.js → chunk-KOULRCYJ.js} +4 -1
- package/dist/{chunk-QB4VWH7W.js → chunk-LIPZJNXS.js} +2 -2
- package/dist/{chunk-OF3K3CU5.js → chunk-MXPBYB54.js} +1 -1
- package/dist/{chunk-DNQN74CC.js → chunk-NL4M3V5D.js} +33 -0
- package/dist/{chunk-GKZYTPN2.js → chunk-O6MKVGVK.js} +1 -1
- package/dist/{chunk-LVIM2PA7.js → chunk-QG2FJ3NR.js} +1 -1
- package/dist/{chunk-2FVEKTKN.js → chunk-QJTET7EZ.js} +1 -1
- package/dist/{chunk-4WHZ6JKD.js → chunk-RFSSKGCE.js} +178 -45
- package/dist/{chunk-OEYW3JE3.js → chunk-SILJJAK2.js} +1 -1
- package/dist/{chunk-THZBFYAH.js → chunk-UN53MBAR.js} +1 -1
- package/dist/{chunk-TYF4GJR3.js → chunk-VAGL7CNR.js} +1 -1
- package/dist/{chunk-D7TCSOAZ.js → chunk-WOBNOBB5.js} +1 -1
- package/dist/{chunk-JQCRCDOC.js → chunk-XWRHWM4H.js} +9 -9
- package/dist/{chunk-GMUCSNUD.js → chunk-Y5ZV47XC.js} +2 -2
- package/dist/command-panel-runtime.js +15 -14
- package/dist/compact-cache-command-runtime.js +27 -26
- package/dist/compact-preflight-runtime.js +5 -5
- package/dist/connector-runtime.js +17 -16
- package/dist/details-status-runtime.js +15 -14
- package/dist/evidence-runtime.js +2 -2
- package/dist/extension-command-runtime.js +3 -3
- package/dist/extension-slash-runtime.js +16 -15
- package/dist/failure-learning-command-runtime.js +16 -15
- package/dist/git-command-runtime.js +16 -15
- package/dist/headless-bench-runtime.d.ts +108 -0
- package/dist/headless-bench-runtime.d.ts.map +1 -0
- package/dist/headless-bench-runtime.js +30 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +492 -45
- package/dist/job-agent-command-runtime.d.ts +2 -1
- package/dist/job-agent-command-runtime.d.ts.map +1 -1
- package/dist/job-agent-command-runtime.js +15 -14
- package/dist/job-runtime.js +4 -4
- package/dist/mcp-index-command-runtime.js +3 -3
- package/dist/mcp-index-runtime.js +18 -17
- package/dist/mcp-stdio-runtime.js +2 -2
- package/dist/memory-command-runtime.js +16 -15
- package/dist/meta-scheduler-runtime.d.ts +10 -0
- package/dist/meta-scheduler-runtime.d.ts.map +1 -1
- package/dist/meta-scheduler-runtime.js +2 -1
- package/dist/model-command-runtime.js +16 -15
- package/dist/model-prompt-runtime.d.ts.map +1 -1
- package/dist/model-prompt-runtime.js +1 -1
- package/dist/model-stream-runtime.d.ts +4 -0
- package/dist/model-stream-runtime.d.ts.map +1 -1
- package/dist/model-stream-runtime.js +27 -26
- package/dist/model-tool-runtime.d.ts +2 -2
- package/dist/model-tool-runtime.js +27 -26
- package/dist/permission-approval-runtime.js +27 -26
- package/dist/process-command-runtime.d.ts.map +1 -1
- package/dist/process-command-runtime.js +2 -2
- package/dist/process-guard.d.ts +3 -0
- package/dist/process-guard.d.ts.map +1 -1
- package/dist/process-guard.js +1 -1
- package/dist/remote-command-runtime.js +16 -15
- package/dist/runner-runtime.js +3 -3
- package/dist/shell/components/ProductBlock.js +2 -2
- package/dist/shell/components/ShellApp.js +6 -6
- package/dist/shell/ink-renderer.js +6 -6
- package/dist/shell/view-model.js +2 -2
- package/dist/slash-command-runtime.js +27 -26
- package/dist/tui-agent-job-runtime.js +5 -5
- package/dist/tui-data-types.d.ts +10 -0
- package/dist/tui-data-types.d.ts.map +1 -1
- package/dist/tui-details-runtime.js +5 -5
- package/dist/tui-output-surface.js +3 -3
- package/dist/verification-command-runtime.js +6 -6
- package/dist/workflow-command-runtime.d.ts.map +1 -1
- package/dist/workflow-command-runtime.js +15 -14
- package/package.json +5 -5
- package/dist/{chunk-M4AIK2SP.js → chunk-KJVHLTQR.js} +3 -3
- package/dist/{chunk-64MJP6FK.js → chunk-L2GU3PWU.js} +3 -3
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
consumeRemoteInboundMessage,
|
|
22
22
|
processRemoteInbound,
|
|
23
23
|
validateRemotePairingEnvelope
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-JJQETFCR.js";
|
|
25
25
|
import {
|
|
26
26
|
formatLocalToolPermissionPrompt,
|
|
27
27
|
formatModelToolPermissionPrompt
|
|
@@ -36,18 +36,18 @@ import {
|
|
|
36
36
|
executeMemoryMutation,
|
|
37
37
|
resumeSessionWithHandoff,
|
|
38
38
|
runAutoLearningOnTurnEnd
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-Y5ZV47XC.js";
|
|
40
40
|
import {
|
|
41
41
|
evaluateMetaScheduler,
|
|
42
42
|
formatMetaSchedulerDirective,
|
|
43
43
|
formatPolicyDecisionSummary,
|
|
44
44
|
hasActiveProviderFailure,
|
|
45
45
|
verifyFailureLearningContract
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-NL4M3V5D.js";
|
|
47
47
|
import {
|
|
48
48
|
configureModelCommandRuntime,
|
|
49
49
|
startModelSetup
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-WOBNOBB5.js";
|
|
51
51
|
import {
|
|
52
52
|
looksLikeModelSetupInput,
|
|
53
53
|
parseModelSetupPrefill
|
|
@@ -59,10 +59,10 @@ import {
|
|
|
59
59
|
refreshIndexStatus,
|
|
60
60
|
runIndexRepository,
|
|
61
61
|
stabilizeMcpToolList
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-XWRHWM4H.js";
|
|
63
63
|
import {
|
|
64
64
|
formatIndexRefreshSummary
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-MXPBYB54.js";
|
|
66
66
|
import {
|
|
67
67
|
isIgnoredIndexPath
|
|
68
68
|
} from "./chunk-W3KHJNSH.js";
|
|
@@ -80,10 +80,10 @@ import {
|
|
|
80
80
|
} from "./chunk-7ZE5JFAZ.js";
|
|
81
81
|
import {
|
|
82
82
|
configureExtensionSlashRuntime
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-3BPKJMIV.js";
|
|
84
84
|
import {
|
|
85
85
|
configureFailureLearningCommandRuntime
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-QJTET7EZ.js";
|
|
87
87
|
import {
|
|
88
88
|
startFeishuLongConnection
|
|
89
89
|
} from "./chunk-WJWYRBWH.js";
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
inspectToolPairingSafety,
|
|
98
98
|
prepareMessagesForProviderPreflight,
|
|
99
99
|
recordCompactBoundary
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-5CXN4JLE.js";
|
|
101
101
|
import {
|
|
102
102
|
appendBreakCacheEvent,
|
|
103
103
|
buildPromptCacheRequestFields,
|
|
@@ -144,7 +144,13 @@ import {
|
|
|
144
144
|
transitionDurableJob,
|
|
145
145
|
upsertWorkflowBackgroundTask,
|
|
146
146
|
writeStatus
|
|
147
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-AZU7HXIT.js";
|
|
148
|
+
import {
|
|
149
|
+
addAllowRule,
|
|
150
|
+
decidePermission,
|
|
151
|
+
savePermissionState,
|
|
152
|
+
toPermissionPromptView
|
|
153
|
+
} from "./chunk-DDXS2RDZ.js";
|
|
148
154
|
import {
|
|
149
155
|
createReviewReport,
|
|
150
156
|
createVerificationPlan,
|
|
@@ -154,26 +160,7 @@ import {
|
|
|
154
160
|
formatVerificationTaskSummary,
|
|
155
161
|
runVerificationCommand,
|
|
156
162
|
runVerificationPlan
|
|
157
|
-
} from "./chunk-
|
|
158
|
-
import {
|
|
159
|
-
ShellBlockOutput,
|
|
160
|
-
beginAssistantStream,
|
|
161
|
-
discardAssistantBlock,
|
|
162
|
-
endAssistantStream,
|
|
163
|
-
replaceAssistantBlockContent,
|
|
164
|
-
writeAssistantDelta,
|
|
165
|
-
writeErrorLine,
|
|
166
|
-
writeLocalCommandOutputLine
|
|
167
|
-
} from "./chunk-ECFLCY5V.js";
|
|
168
|
-
import {
|
|
169
|
-
addAllowRule,
|
|
170
|
-
decidePermission,
|
|
171
|
-
savePermissionState,
|
|
172
|
-
toPermissionPromptView
|
|
173
|
-
} from "./chunk-DDXS2RDZ.js";
|
|
174
|
-
import {
|
|
175
|
-
createTerminalReadinessView
|
|
176
|
-
} from "./chunk-PBIPV4LD.js";
|
|
163
|
+
} from "./chunk-4E56DWEZ.js";
|
|
177
164
|
import {
|
|
178
165
|
abortBackgroundTask,
|
|
179
166
|
clearBackgroundAbortController,
|
|
@@ -188,28 +175,44 @@ import {
|
|
|
188
175
|
listCancellableAgents,
|
|
189
176
|
registerBackgroundAbortController,
|
|
190
177
|
rememberBackgroundTask
|
|
191
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-CDVYF7RU.js";
|
|
179
|
+
import {
|
|
180
|
+
ShellBlockOutput,
|
|
181
|
+
beginAssistantStream,
|
|
182
|
+
discardAssistantBlock,
|
|
183
|
+
endAssistantStream,
|
|
184
|
+
replaceAssistantBlockContent,
|
|
185
|
+
writeAssistantDelta,
|
|
186
|
+
writeErrorLine,
|
|
187
|
+
writeLocalCommandOutputLine
|
|
188
|
+
} from "./chunk-DYDTLRHB.js";
|
|
189
|
+
import {
|
|
190
|
+
createTerminalReadinessView
|
|
191
|
+
} from "./chunk-PBIPV4LD.js";
|
|
192
192
|
import {
|
|
193
193
|
appendJobLog,
|
|
194
194
|
parseJobRunOptions,
|
|
195
195
|
rescheduleDurableJobAgents
|
|
196
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-VAGL7CNR.js";
|
|
197
197
|
import {
|
|
198
198
|
refreshRunnerStatusForJob,
|
|
199
199
|
resolveNativeRunner,
|
|
200
200
|
startRunnerForDurableJob,
|
|
201
201
|
stopRunnerForDurableJob
|
|
202
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-CD54BQJ5.js";
|
|
203
|
+
import {
|
|
204
|
+
detectEngineeringTaskProfile
|
|
205
|
+
} from "./chunk-4UER2AKI.js";
|
|
203
206
|
import {
|
|
204
207
|
formatHooksDoctor
|
|
205
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-QG2FJ3NR.js";
|
|
206
209
|
import {
|
|
207
210
|
runCommandCapture
|
|
208
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-KOULRCYJ.js";
|
|
209
212
|
import {
|
|
210
213
|
createModelSystemPrompt,
|
|
211
214
|
sanitizeMainScreenLeakage
|
|
212
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-7TYK55JT.js";
|
|
213
216
|
import {
|
|
214
217
|
collectInputFiles,
|
|
215
218
|
createReportFinalReferenceReminder,
|
|
@@ -270,10 +273,7 @@ import {
|
|
|
270
273
|
recordVerificationEvidence,
|
|
271
274
|
rememberEvidence,
|
|
272
275
|
truncateRoundAssistantForProvider
|
|
273
|
-
} from "./chunk-
|
|
274
|
-
import {
|
|
275
|
-
applyToolResultBudgetToMessages
|
|
276
|
-
} from "./chunk-O7S3HYE6.js";
|
|
276
|
+
} from "./chunk-L2GU3PWU.js";
|
|
277
277
|
import {
|
|
278
278
|
BACKGROUND_KIND_CAPS,
|
|
279
279
|
BACKGROUND_RUNNING_GLOBAL_CAP,
|
|
@@ -288,6 +288,9 @@ import {
|
|
|
288
288
|
createSingleToolCallContinuation,
|
|
289
289
|
runtimeFromContinuation
|
|
290
290
|
} from "./chunk-RDGM4RUE.js";
|
|
291
|
+
import {
|
|
292
|
+
applyToolResultBudgetToMessages
|
|
293
|
+
} from "./chunk-O7S3HYE6.js";
|
|
291
294
|
import {
|
|
292
295
|
loadOrCreateHandoffPacket,
|
|
293
296
|
validateHandoffPacket,
|
|
@@ -3781,33 +3784,150 @@ function showProviderRetryActivity(context, info) {
|
|
|
3781
3784
|
function evaluateAggregatedFinalAnswerGate(context, assistantText, runExtendedGate = true) {
|
|
3782
3785
|
const claimVerdict = evaluateFinalAnswerClaims(assistantText, context.evidence);
|
|
3783
3786
|
const extended = runExtendedGate ? runArchitectureAndCompletenessFinalGate(context, assistantText) : { status: "passed" };
|
|
3787
|
+
const engineeringVerdict = evaluateEngineeringFinalBoundary(context, assistantText);
|
|
3784
3788
|
const needsClaim = claimVerdict.status === "needs_disclaimer";
|
|
3785
3789
|
const needsExtended = extended.status === "needs_disclaimer";
|
|
3786
|
-
|
|
3790
|
+
const needsEngineering = engineeringVerdict.status === "needs_disclaimer";
|
|
3791
|
+
if (!needsClaim && !needsExtended && !needsEngineering) {
|
|
3787
3792
|
return { status: "passed" };
|
|
3788
3793
|
}
|
|
3789
3794
|
return {
|
|
3790
3795
|
status: "needs_disclaimer",
|
|
3791
3796
|
...needsClaim ? { claimVerdict } : {},
|
|
3792
3797
|
...needsExtended ? { extendedVerdict: extended.verdict } : {},
|
|
3798
|
+
...needsEngineering ? { engineeringVerdict } : {},
|
|
3793
3799
|
unsupportedKinds: [
|
|
3794
3800
|
...needsClaim ? claimVerdict.unsupportedKinds : [],
|
|
3795
|
-
...needsExtended ? extended.verdict.unsupportedKinds : []
|
|
3801
|
+
...needsExtended ? extended.verdict.unsupportedKinds : [],
|
|
3802
|
+
...needsEngineering ? engineeringVerdict.unsupportedKinds : []
|
|
3796
3803
|
]
|
|
3797
3804
|
};
|
|
3798
3805
|
}
|
|
3806
|
+
function evaluateEngineeringFinalBoundary(context, assistantText) {
|
|
3807
|
+
const signal = context.lastMetaSchedulerDecision?.policyDecision.engineeringSignal;
|
|
3808
|
+
if (!signal) return { status: "passed" };
|
|
3809
|
+
const highRiskFinal = /(?:已完成|已修复|测试通过|全部通过|验证通过|pass(?:ed)?|completed|fixed|verified|tests? passed)/iu.test(
|
|
3810
|
+
assistantText
|
|
3811
|
+
);
|
|
3812
|
+
if (!highRiskFinal && !signal.failureCategory) return { status: "passed" };
|
|
3813
|
+
if (signal.failureCategory === "missing_artifact" && !hasArtifactEvidence(context, assistantText)) {
|
|
3814
|
+
return {
|
|
3815
|
+
status: "needs_disclaimer",
|
|
3816
|
+
unsupportedKinds: ["engineering_missing_artifact"],
|
|
3817
|
+
message: signal.finalBoundaryHint ?? "missing artifact is not verified"
|
|
3818
|
+
};
|
|
3819
|
+
}
|
|
3820
|
+
if (signal.failureCategory === "test_timeout") {
|
|
3821
|
+
return {
|
|
3822
|
+
status: "needs_disclaimer",
|
|
3823
|
+
unsupportedKinds: ["engineering_test_timeout"],
|
|
3824
|
+
message: signal.finalBoundaryHint ?? "verification timed out"
|
|
3825
|
+
};
|
|
3826
|
+
}
|
|
3827
|
+
if (signal.failureCategory === "provider_error") {
|
|
3828
|
+
return {
|
|
3829
|
+
status: "needs_disclaimer",
|
|
3830
|
+
unsupportedKinds: ["engineering_provider_error"],
|
|
3831
|
+
message: signal.finalBoundaryHint ?? "provider output was interrupted"
|
|
3832
|
+
};
|
|
3833
|
+
}
|
|
3834
|
+
if (signal.profile === "binary_or_artifact" && highRiskFinal && !hasArtifactEvidence(context, assistantText)) {
|
|
3835
|
+
return {
|
|
3836
|
+
status: "needs_disclaimer",
|
|
3837
|
+
unsupportedKinds: ["engineering_artifact_unverified"],
|
|
3838
|
+
message: signal.finalBoundaryHint ?? "artifact verification is missing"
|
|
3839
|
+
};
|
|
3840
|
+
}
|
|
3841
|
+
if ((signal.profile === "swe_python" || signal.profile === "large_python_project") && /\b(?:all|full|entire)\s+(?:tests?|suite)\s+pass(?:ed)?|全部测试|所有测试/iu.test(assistantText) && !hasFullVerificationEvidence(context)) {
|
|
3842
|
+
return {
|
|
3843
|
+
status: "needs_disclaimer",
|
|
3844
|
+
unsupportedKinds: ["engineering_full_suite_unverified"],
|
|
3845
|
+
message: signal.finalBoundaryHint ?? "full-suite verification is missing"
|
|
3846
|
+
};
|
|
3847
|
+
}
|
|
3848
|
+
if ((signal.profile === "qemu_or_service" || signal.profile === "security_or_network") && /(?:service|server|port|health|daemon|服务|端口|健康检查).{0,80}(?:verified|pass(?:ed)?|正常|通过)/iu.test(
|
|
3849
|
+
assistantText
|
|
3850
|
+
) && !hasServiceVerificationEvidence(context)) {
|
|
3851
|
+
return {
|
|
3852
|
+
status: "needs_disclaimer",
|
|
3853
|
+
unsupportedKinds: ["engineering_service_unverified"],
|
|
3854
|
+
message: signal.finalBoundaryHint ?? "service health verification is missing"
|
|
3855
|
+
};
|
|
3856
|
+
}
|
|
3857
|
+
return { status: "passed" };
|
|
3858
|
+
}
|
|
3859
|
+
function hasArtifactEvidence(context, assistantText) {
|
|
3860
|
+
const signalTargets = context.lastMetaSchedulerDecision?.policyDecision.engineeringSignal.artifactTargets ?? [];
|
|
3861
|
+
const targets = uniqueArtifactTargets([...signalTargets, ...extractArtifactTargets(assistantText)]);
|
|
3862
|
+
return context.evidence.some((item) => {
|
|
3863
|
+
const text = [item.summary, item.source, item.outputPath, item.fullOutputPath, ...item.supportsClaims].filter(Boolean).join(" ");
|
|
3864
|
+
if (!/(?:artifact|output file|out\.txt|write|created|non-empty|产物|输出文件|已写入|wrote|saved)/iu.test(text)) {
|
|
3865
|
+
return false;
|
|
3866
|
+
}
|
|
3867
|
+
if (targets.length === 0) {
|
|
3868
|
+
return /(?:artifact|output file|out\.txt|non-empty|产物|输出文件)/iu.test(text);
|
|
3869
|
+
}
|
|
3870
|
+
return targets.some((target) => text.toLowerCase().includes(target.toLowerCase()));
|
|
3871
|
+
});
|
|
3872
|
+
}
|
|
3873
|
+
function hasFullVerificationEvidence(context) {
|
|
3874
|
+
return context.evidence.some(
|
|
3875
|
+
(item) => /full(?: test)? suite|all tests|entire suite|test_passed|verification_passed|全部测试|所有测试/iu.test(
|
|
3876
|
+
[item.summary, item.source, ...item.supportsClaims].join(" ")
|
|
3877
|
+
)
|
|
3878
|
+
);
|
|
3879
|
+
}
|
|
3880
|
+
function hasServiceVerificationEvidence(context) {
|
|
3881
|
+
return context.evidence.some(
|
|
3882
|
+
(item) => /health|healthcheck|curl|port\s+\d+|listen(?:ing)?|localhost:\d+|status\s*(?:200|ok|pass)|日志.*(?:正常|通过)|健康检查|端口.*(?:监听|通过|正常)/iu.test(
|
|
3883
|
+
[item.summary, item.source, ...item.supportsClaims].join(" ")
|
|
3884
|
+
)
|
|
3885
|
+
);
|
|
3886
|
+
}
|
|
3887
|
+
function extractArtifactTargets(text) {
|
|
3888
|
+
const targets = /* @__PURE__ */ new Set();
|
|
3889
|
+
for (const match of text.matchAll(/(?:^|\s)(\/[A-Za-z0-9._/-]+\.[A-Za-z0-9._-]+)\b/gu)) {
|
|
3890
|
+
targets.add(match[1]);
|
|
3891
|
+
targets.add(match[1].split("/").filter(Boolean).at(-1) ?? match[1]);
|
|
3892
|
+
}
|
|
3893
|
+
for (const match of text.matchAll(/\b([A-Za-z0-9._-]+\.(?:txt|json|csv|bin|so|exe|out|patch|diff|md))\b/giu)) {
|
|
3894
|
+
targets.add(match[1]);
|
|
3895
|
+
}
|
|
3896
|
+
return Array.from(targets).filter(Boolean);
|
|
3897
|
+
}
|
|
3898
|
+
function uniqueArtifactTargets(targets) {
|
|
3899
|
+
const out = /* @__PURE__ */ new Set();
|
|
3900
|
+
for (const target of targets) {
|
|
3901
|
+
const trimmed = target.trim();
|
|
3902
|
+
if (!trimmed) continue;
|
|
3903
|
+
out.add(trimmed);
|
|
3904
|
+
const basename3 = trimmed.split(/[\\/]/u).filter(Boolean).at(-1);
|
|
3905
|
+
if (basename3) out.add(basename3);
|
|
3906
|
+
}
|
|
3907
|
+
return Array.from(out);
|
|
3908
|
+
}
|
|
3799
3909
|
function createAggregatedFinalAnswerReminder(result, language) {
|
|
3800
3910
|
return [
|
|
3801
3911
|
result.claimVerdict ? createFinalAnswerClaimReminder(result.claimVerdict, language) : "",
|
|
3802
|
-
result.extendedVerdict ? createExtendedFinalAnswerReminder(result.extendedVerdict, language) : ""
|
|
3912
|
+
result.extendedVerdict ? createExtendedFinalAnswerReminder(result.extendedVerdict, language) : "",
|
|
3913
|
+
result.engineeringVerdict ? createEngineeringFinalBoundaryReminder(result, language) : ""
|
|
3803
3914
|
].filter(Boolean).join("\n\n");
|
|
3804
3915
|
}
|
|
3805
3916
|
function buildAggregatedDowngradedFinalAnswer(result, language) {
|
|
3806
3917
|
return [
|
|
3807
3918
|
result.claimVerdict ? buildDowngradedFinalAnswer(result.claimVerdict, language) : "",
|
|
3808
|
-
result.extendedVerdict ? buildExtendedDowngradedFinalAnswer(result.extendedVerdict, language) : ""
|
|
3919
|
+
result.extendedVerdict ? buildExtendedDowngradedFinalAnswer(result.extendedVerdict, language) : "",
|
|
3920
|
+
result.engineeringVerdict ? buildEngineeringDowngradedFinalAnswer(result, language) : ""
|
|
3809
3921
|
].filter(Boolean).join("\n\n");
|
|
3810
3922
|
}
|
|
3923
|
+
function createEngineeringFinalBoundaryReminder(result, language) {
|
|
3924
|
+
const message = result.engineeringVerdict?.message ?? "engineering verification boundary missing";
|
|
3925
|
+
return language === "en-US" ? `Engineering boundary: ${message}. Downgrade the final answer unless matching evidence is available.` : `\u5DE5\u7A0B\u8FB9\u754C\uFF1A${message}\u3002\u9664\u975E\u5DF2\u6709\u5339\u914D\u8BC1\u636E\uFF0C\u5426\u5219\u6700\u7EC8\u56DE\u7B54\u5FC5\u987B\u964D\u7EA7\u8BF4\u660E\u3002`;
|
|
3926
|
+
}
|
|
3927
|
+
function buildEngineeringDowngradedFinalAnswer(result, language) {
|
|
3928
|
+
const message = result.engineeringVerdict?.message ?? "engineering verification boundary missing";
|
|
3929
|
+
return language === "en-US" ? `I cannot honestly mark this as complete yet: ${message}.` : `\u6211\u4E0D\u80FD\u628A\u8FD9\u8F6E\u8BDA\u5B9E\u6807\u8BB0\u4E3A\u5DF2\u5B8C\u6210\uFF1A${message}\u3002`;
|
|
3930
|
+
}
|
|
3811
3931
|
async function handleNaturalInput(text, context, gatewayOrOutput, maybeOutput) {
|
|
3812
3932
|
const gateway = maybeOutput ? gatewayOrOutput : void 0;
|
|
3813
3933
|
const output = maybeOutput ?? gatewayOrOutput;
|
|
@@ -4039,6 +4159,9 @@ async function sendMessage2(text, context, gateway, output) {
|
|
|
4039
4159
|
);
|
|
4040
4160
|
});
|
|
4041
4161
|
const worktreeContext = await computeWorktreeContext(context.projectPath);
|
|
4162
|
+
const _tProfile0 = Date.now();
|
|
4163
|
+
const engineeringProfile = await resolveEngineeringTaskProfile(text, context.projectPath);
|
|
4164
|
+
perfEvents.push(`perf:engineering_profile_ms=${Date.now() - _tProfile0}`);
|
|
4042
4165
|
if (context.lastMetaSchedulerFailureLearningRequired && !context.lastMetaSchedulerFailureLearningFulfilled) {
|
|
4043
4166
|
const preCount = context.failureLearning.records.length;
|
|
4044
4167
|
const contract = verifyFailureLearningContract({
|
|
@@ -4103,6 +4226,7 @@ async function sendMessage2(text, context, gateway, output) {
|
|
|
4103
4226
|
const metaSchedulerDecision = evaluateMetaScheduler({
|
|
4104
4227
|
..._msInput,
|
|
4105
4228
|
userText: text,
|
|
4229
|
+
engineeringProfile,
|
|
4106
4230
|
messages: createPolicyContextPressureMessages(runtimeStatus, text),
|
|
4107
4231
|
...context.lastToolFailure ? { lastToolFailure: context.lastToolFailure } : {},
|
|
4108
4232
|
...context.lastProviderFailure ? {
|
|
@@ -4857,21 +4981,30 @@ async function appendPolicyDecisionEvent(context, sessionId, decision) {
|
|
|
4857
4981
|
await appendSystemEvent(
|
|
4858
4982
|
context,
|
|
4859
4983
|
sessionId,
|
|
4860
|
-
`strategy: ${formatPolicyDecisionSummary(decision, context.language)}; hints=${decision.hints.map((hint) => hint.id).join(",") || "none"}; role_suggestion=${decision.modelRouteSignal.suggestedRole ?? "none"}; verification=${decision.verificationSignal.recommendedLevel}; route_commands=${decision.verificationSignal.route.commands.join("+")}; permission_gate=${decision.permissionSignal.requireExplicitGate ? "yes" : "no"}; windows_safe=${decision.platformSignal.windowsSafeHint ? "yes" : "no"}; user_state=${decision.userState.kind}; detail=${decision.userState.detailPlan.style}; notification=${decision.userState.notificationPlan.quiet ? "quiet" : "normal"}; memory_candidate=${decision.userState.memoryCandidate.shouldCreate ? "candidate_only" : "none"}`,
|
|
4984
|
+
`strategy: ${formatPolicyDecisionSummary(decision, context.language)}; hints=${decision.hints.map((hint) => hint.id).join(",") || "none"}; role_suggestion=${decision.modelRouteSignal.suggestedRole ?? "none"}; verification=${decision.verificationSignal.recommendedLevel}; route_commands=${decision.verificationSignal.route.commands.join("+")}; permission_gate=${decision.permissionSignal.requireExplicitGate ? "yes" : "no"}; windows_safe=${decision.platformSignal.windowsSafeHint ? "yes" : "no"}; engineering_profile=${decision.engineeringSignal.profile}; engineering_failure=${decision.engineeringSignal.failureCategory ?? "none"}; user_state=${decision.userState.kind}; detail=${decision.userState.detailPlan.style}; notification=${decision.userState.notificationPlan.quiet ? "quiet" : "normal"}; memory_candidate=${decision.userState.memoryCandidate.shouldCreate ? "candidate_only" : "none"}`,
|
|
4861
4985
|
decision.riskLevel === "high" || decision.providerPlan === "cooldownBlocked" ? "warning" : "info"
|
|
4862
4986
|
);
|
|
4863
4987
|
}
|
|
4864
4988
|
async function appendRuntimePolicyHint(context, sessionId, userText, extra) {
|
|
4865
4989
|
const runtime = getSelectedModelRuntime(context);
|
|
4990
|
+
const engineeringProfile = await resolveEngineeringTaskProfile(userText, context.projectPath);
|
|
4866
4991
|
const decision = evaluateMetaScheduler({
|
|
4867
4992
|
...createMetaSchedulerInput(context, runtime, userText, Boolean(extra.providerCooldownBlocked)),
|
|
4868
4993
|
userText,
|
|
4994
|
+
engineeringProfile,
|
|
4869
4995
|
messages: createPolicyContextPressureMessages(void 0, userText),
|
|
4870
4996
|
...extra
|
|
4871
4997
|
}).policyDecision;
|
|
4872
4998
|
enqueuePolicyHints(context, decision);
|
|
4873
4999
|
await appendPolicyDecisionEvent(context, sessionId, decision);
|
|
4874
5000
|
}
|
|
5001
|
+
async function resolveEngineeringTaskProfile(prompt, projectPath) {
|
|
5002
|
+
try {
|
|
5003
|
+
return await detectEngineeringTaskProfile({ prompt, projectPath });
|
|
5004
|
+
} catch {
|
|
5005
|
+
return "generic";
|
|
5006
|
+
}
|
|
5007
|
+
}
|
|
4875
5008
|
async function handleRemoteInboundMessage(message, context, gateway, output) {
|
|
4876
5009
|
const channel = context.remote.channels.find((item) => item.id === message.channel);
|
|
4877
5010
|
if (channel && message.kind === "natural_language_message") {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatMcpTools
|
|
3
3
|
} from "./chunk-W6NU7ZAV.js";
|
|
4
|
+
import {
|
|
5
|
+
isPotentiallyMutatingMcpTool,
|
|
6
|
+
runMcpStdioToolCall,
|
|
7
|
+
runMcpStdioToolList
|
|
8
|
+
} from "./chunk-SILJJAK2.js";
|
|
4
9
|
import {
|
|
5
10
|
buildIndexStatusPanel,
|
|
6
11
|
buildMcpStatusPanel,
|
|
7
12
|
formatIndexRefreshSummary,
|
|
8
13
|
formatIndexStatus,
|
|
9
14
|
formatMcpStatus
|
|
10
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MXPBYB54.js";
|
|
11
16
|
import {
|
|
12
17
|
runMcpSseToolCall
|
|
13
18
|
} from "./chunk-SRZIA6B4.js";
|
|
14
|
-
import {
|
|
15
|
-
isPotentiallyMutatingMcpTool,
|
|
16
|
-
runMcpStdioToolCall,
|
|
17
|
-
runMcpStdioToolList
|
|
18
|
-
} from "./chunk-OEYW3JE3.js";
|
|
19
19
|
import {
|
|
20
20
|
createIndexTransientExcludes,
|
|
21
21
|
formatIndexAutoSkipDetails,
|
|
@@ -26,14 +26,14 @@ import {
|
|
|
26
26
|
} from "./chunk-W3KHJNSH.js";
|
|
27
27
|
import {
|
|
28
28
|
showCommandPanel
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-AZU7HXIT.js";
|
|
30
30
|
import {
|
|
31
31
|
writeDiagnosticLine
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-DYDTLRHB.js";
|
|
33
33
|
import {
|
|
34
34
|
redactedPath,
|
|
35
35
|
runCommandCapture
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-KOULRCYJ.js";
|
|
37
37
|
import {
|
|
38
38
|
findDeferredTool,
|
|
39
39
|
getCodebaseMemoryToolRisk,
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk-VTQL23UM.js";
|
|
7
7
|
import {
|
|
8
8
|
showCommandPanel
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AZU7HXIT.js";
|
|
10
10
|
import {
|
|
11
11
|
writeErrorLine
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DYDTLRHB.js";
|
|
13
13
|
import {
|
|
14
14
|
createHandoffPacket,
|
|
15
15
|
formatResumePacket,
|
|
@@ -3,26 +3,27 @@ import {
|
|
|
3
3
|
getCommandPanelRowText,
|
|
4
4
|
getCommandPanelSelectableRows,
|
|
5
5
|
showCommandPanel
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-WQMSRO4D.js";
|
|
6
|
+
} from "./chunk-AZU7HXIT.js";
|
|
8
7
|
import "./chunk-V7GDHHBL.js";
|
|
9
8
|
import "./chunk-GCMH5P4W.js";
|
|
10
|
-
import "./chunk-THZBFYAH.js";
|
|
11
|
-
import "./chunk-ECFLCY5V.js";
|
|
12
9
|
import "./chunk-DDXS2RDZ.js";
|
|
10
|
+
import "./chunk-4E56DWEZ.js";
|
|
11
|
+
import "./chunk-CDVYF7RU.js";
|
|
12
|
+
import "./chunk-UN53MBAR.js";
|
|
13
|
+
import "./chunk-DYDTLRHB.js";
|
|
13
14
|
import "./chunk-4K6UB524.js";
|
|
14
15
|
import "./chunk-PBIPV4LD.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-B4GQTZMT.js";
|
|
16
|
+
import "./chunk-VAGL7CNR.js";
|
|
17
|
+
import "./chunk-CD54BQJ5.js";
|
|
18
18
|
import "./chunk-L4XXW6Y5.js";
|
|
19
19
|
import "./chunk-CRSLDQOA.js";
|
|
20
20
|
import "./chunk-VIBENDE3.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-4UER2AKI.js";
|
|
22
|
+
import "./chunk-QG2FJ3NR.js";
|
|
23
|
+
import "./chunk-KOULRCYJ.js";
|
|
24
|
+
import "./chunk-J6CYFWSW.js";
|
|
24
25
|
import "./chunk-E72U7WW7.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-HIIYRATQ.js";
|
|
26
27
|
import "./chunk-NKFKOEYX.js";
|
|
27
28
|
import "./chunk-3AKXDMVS.js";
|
|
28
29
|
import "./chunk-H3T4EF5F.js";
|
|
@@ -30,7 +31,7 @@ import "./chunk-NSIKYD3X.js";
|
|
|
30
31
|
import "./chunk-FRIMDSRU.js";
|
|
31
32
|
import "./chunk-RBOQJFIZ.js";
|
|
32
33
|
import "./chunk-KI7C6ZOD.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-7TYK55JT.js";
|
|
34
35
|
import "./chunk-J7ZE2JKP.js";
|
|
35
36
|
import "./chunk-BOV4K7FP.js";
|
|
36
37
|
import "./chunk-KTWV5JC5.js";
|
|
@@ -38,9 +39,9 @@ import "./chunk-PGNALDEH.js";
|
|
|
38
39
|
import "./chunk-UDQT5CWK.js";
|
|
39
40
|
import "./chunk-6SMM5CMP.js";
|
|
40
41
|
import "./chunk-I3NTAIMF.js";
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-O7S3HYE6.js";
|
|
42
|
+
import "./chunk-L2GU3PWU.js";
|
|
43
43
|
import "./chunk-RDGM4RUE.js";
|
|
44
|
+
import "./chunk-O7S3HYE6.js";
|
|
44
45
|
import "./chunk-IWUIOLMF.js";
|
|
45
46
|
import "./chunk-MLUIOBKL.js";
|
|
46
47
|
import "./chunk-LQTVYUT3.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
refreshWorkspaceReferenceCache,
|
|
17
17
|
requestBreakCacheMutationApproval,
|
|
18
18
|
requestMemoryMutationApproval
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RFSSKGCE.js";
|
|
20
20
|
import "./chunk-SJOS5PM6.js";
|
|
21
21
|
import "./chunk-IN42UISW.js";
|
|
22
22
|
import "./chunk-GC55DMZV.js";
|
|
@@ -25,56 +25,57 @@ import "./chunk-3XNUDLOM.js";
|
|
|
25
25
|
import "./chunk-ZYSN7AWW.js";
|
|
26
26
|
import "./chunk-RM5QMOFY.js";
|
|
27
27
|
import "./chunk-WKMBK5UP.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-JJQETFCR.js";
|
|
29
29
|
import "./chunk-UT5BOJKU.js";
|
|
30
30
|
import "./chunk-RM5JDRCW.js";
|
|
31
31
|
import "./chunk-QTDGRZMZ.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-Y5ZV47XC.js";
|
|
33
33
|
import "./chunk-VTQL23UM.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-NL4M3V5D.js";
|
|
35
35
|
import "./chunk-KQJHVJZB.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-WOBNOBB5.js";
|
|
37
37
|
import "./chunk-NMNOAFFT.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-XWRHWM4H.js";
|
|
39
39
|
import "./chunk-W6NU7ZAV.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-SILJJAK2.js";
|
|
41
|
+
import "./chunk-MXPBYB54.js";
|
|
41
42
|
import "./chunk-SRZIA6B4.js";
|
|
42
|
-
import "./chunk-OEYW3JE3.js";
|
|
43
43
|
import "./chunk-CRW3636S.js";
|
|
44
44
|
import "./chunk-W3KHJNSH.js";
|
|
45
45
|
import "./chunk-P277M7Z5.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-O6MKVGVK.js";
|
|
47
47
|
import "./chunk-GTP2KPLY.js";
|
|
48
48
|
import "./chunk-7ZE5JFAZ.js";
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-3BPKJMIV.js";
|
|
50
|
+
import "./chunk-QJTET7EZ.js";
|
|
51
51
|
import "./chunk-X7A22JHP.js";
|
|
52
52
|
import "./chunk-WJWYRBWH.js";
|
|
53
53
|
import "./chunk-CFXB5SE5.js";
|
|
54
|
-
import "./chunk-
|
|
54
|
+
import "./chunk-5CXN4JLE.js";
|
|
55
55
|
import "./chunk-WVAQYKGL.js";
|
|
56
56
|
import "./chunk-QIU3FJPC.js";
|
|
57
57
|
import "./chunk-LDABZV5V.js";
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-WQMSRO4D.js";
|
|
58
|
+
import "./chunk-AZU7HXIT.js";
|
|
60
59
|
import "./chunk-V7GDHHBL.js";
|
|
61
60
|
import "./chunk-GCMH5P4W.js";
|
|
62
|
-
import "./chunk-THZBFYAH.js";
|
|
63
|
-
import "./chunk-ECFLCY5V.js";
|
|
64
61
|
import "./chunk-DDXS2RDZ.js";
|
|
62
|
+
import "./chunk-4E56DWEZ.js";
|
|
63
|
+
import "./chunk-CDVYF7RU.js";
|
|
64
|
+
import "./chunk-UN53MBAR.js";
|
|
65
|
+
import "./chunk-DYDTLRHB.js";
|
|
65
66
|
import "./chunk-4K6UB524.js";
|
|
66
67
|
import "./chunk-PBIPV4LD.js";
|
|
67
|
-
import "./chunk-
|
|
68
|
-
import "./chunk-
|
|
69
|
-
import "./chunk-B4GQTZMT.js";
|
|
68
|
+
import "./chunk-VAGL7CNR.js";
|
|
69
|
+
import "./chunk-CD54BQJ5.js";
|
|
70
70
|
import "./chunk-L4XXW6Y5.js";
|
|
71
71
|
import "./chunk-CRSLDQOA.js";
|
|
72
72
|
import "./chunk-VIBENDE3.js";
|
|
73
|
-
import "./chunk-
|
|
74
|
-
import "./chunk-
|
|
75
|
-
import "./chunk-
|
|
73
|
+
import "./chunk-4UER2AKI.js";
|
|
74
|
+
import "./chunk-QG2FJ3NR.js";
|
|
75
|
+
import "./chunk-KOULRCYJ.js";
|
|
76
|
+
import "./chunk-J6CYFWSW.js";
|
|
76
77
|
import "./chunk-E72U7WW7.js";
|
|
77
|
-
import "./chunk-
|
|
78
|
+
import "./chunk-HIIYRATQ.js";
|
|
78
79
|
import "./chunk-NKFKOEYX.js";
|
|
79
80
|
import "./chunk-3AKXDMVS.js";
|
|
80
81
|
import "./chunk-H3T4EF5F.js";
|
|
@@ -82,7 +83,7 @@ import "./chunk-NSIKYD3X.js";
|
|
|
82
83
|
import "./chunk-FRIMDSRU.js";
|
|
83
84
|
import "./chunk-RBOQJFIZ.js";
|
|
84
85
|
import "./chunk-KI7C6ZOD.js";
|
|
85
|
-
import "./chunk-
|
|
86
|
+
import "./chunk-7TYK55JT.js";
|
|
86
87
|
import "./chunk-J7ZE2JKP.js";
|
|
87
88
|
import "./chunk-BOV4K7FP.js";
|
|
88
89
|
import "./chunk-KTWV5JC5.js";
|
|
@@ -90,9 +91,9 @@ import "./chunk-PGNALDEH.js";
|
|
|
90
91
|
import "./chunk-UDQT5CWK.js";
|
|
91
92
|
import "./chunk-6SMM5CMP.js";
|
|
92
93
|
import "./chunk-I3NTAIMF.js";
|
|
93
|
-
import "./chunk-
|
|
94
|
-
import "./chunk-O7S3HYE6.js";
|
|
94
|
+
import "./chunk-L2GU3PWU.js";
|
|
95
95
|
import "./chunk-RDGM4RUE.js";
|
|
96
|
+
import "./chunk-O7S3HYE6.js";
|
|
96
97
|
import "./chunk-IWUIOLMF.js";
|
|
97
98
|
import "./chunk-MLUIOBKL.js";
|
|
98
99
|
import "./chunk-LQTVYUT3.js";
|