@linghun/tui 0.1.0 → 0.1.2
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/agent-completion-finalizer.js +3 -3
- package/dist/background-control-runtime.js +56 -55
- package/dist/cache-command-runtime.js +3 -3
- package/dist/capability-runtime.js +35 -34
- package/dist/{chunk-TJLC3QAS.js → chunk-36ZWUJQS.js} +1 -1
- package/dist/{chunk-JDWXC2OQ.js → chunk-3MRYQO7X.js} +4 -4
- package/dist/{chunk-2FVEKTKN.js → chunk-3PG7I3LA.js} +4 -4
- package/dist/{chunk-J7ZE2JKP.js → chunk-42ZZUF7P.js} +3 -3
- package/dist/{chunk-DTK5NBTV.js → chunk-4BFCUJX6.js} +95 -11
- package/dist/{chunk-YH6UIHNF.js → chunk-4QWCNMP6.js} +2 -2
- package/dist/{chunk-WKMBK5UP.js → chunk-4TO2LDMP.js} +1 -1
- package/dist/chunk-4UER2AKI.js +636 -0
- package/dist/{chunk-WHFDDZHY.js → chunk-5IFNLTOF.js} +4 -4
- package/dist/{chunk-W3KHJNSH.js → chunk-6CHUZ2NF.js} +2 -2
- package/dist/{chunk-I3NTAIMF.js → chunk-6DBBXNEG.js} +3 -3
- package/dist/{chunk-GDQQNPBP.js → chunk-6GXIGN5W.js} +1 -1
- package/dist/{chunk-QLRTQHTR.js → chunk-6JGRNES6.js} +2 -2
- package/dist/{chunk-D7TCSOAZ.js → chunk-7BHMBWG2.js} +3 -3
- package/dist/{chunk-KO64OFSG.js → chunk-7C6T7RKJ.js} +1 -1
- package/dist/{chunk-4WHZ6JKD.js → chunk-7R4YXN7Z.js} +335 -63
- package/dist/{chunk-LDABZV5V.js → chunk-7RZE45OT.js} +1 -1
- package/dist/{chunk-MLUIOBKL.js → chunk-7ZMDQZ22.js} +4 -4
- package/dist/{chunk-X7A22JHP.js → chunk-A4H3UTJZ.js} +1 -1
- package/dist/{chunk-LVIM2PA7.js → chunk-AGI6GFFL.js} +3 -3
- package/dist/{chunk-D3UTL2QX.js → chunk-ATY7WBIT.js} +1 -1
- package/dist/{chunk-ZOSK2UEU.js → chunk-BBK5BA5C.js} +99 -117
- package/dist/{chunk-SRZIA6B4.js → chunk-BNC4F63N.js} +1 -1
- package/dist/{chunk-WQMSRO4D.js → chunk-CJRJR7TP.js} +5 -5
- package/dist/{chunk-OEYW3JE3.js → chunk-DIDRFIIW.js} +2 -2
- package/dist/{chunk-AKPXMCVF.js → chunk-EKYXI6C7.js} +11 -7
- package/dist/{chunk-GMUCSNUD.js → chunk-FGGY5KNM.js} +7 -7
- package/dist/{chunk-APJIC2O5.js → chunk-GTIZNO5O.js} +84 -0
- package/dist/{chunk-UOHZQIVL.js → chunk-GXFYUZAM.js} +1 -1
- package/dist/{chunk-DDXS2RDZ.js → chunk-HGCTHBUY.js} +1 -1
- package/dist/{chunk-QTDGRZMZ.js → chunk-HJOC5WUV.js} +1 -1
- package/dist/{chunk-ECFLCY5V.js → chunk-HPIHFENG.js} +2 -2
- package/dist/{chunk-SYBNJZEL.js → chunk-HPMBSOQ4.js} +1 -1
- package/dist/{chunk-QB4VWH7W.js → chunk-HPQ2IHOW.js} +4 -4
- package/dist/{chunk-RVY34HK4.js → chunk-HZ5XNKWS.js} +5 -2
- package/dist/{chunk-4K6UB524.js → chunk-IPZZGDUU.js} +1 -1
- package/dist/{chunk-JHGWGH2C.js → chunk-J6CYFWSW.js} +89 -7
- package/dist/{chunk-6CI6TKLN.js → chunk-JAVRQ3LM.js} +1 -1
- package/dist/{chunk-VCSRBS47.js → chunk-JLAJZPOC.js} +1 -1
- package/dist/{chunk-THZBFYAH.js → chunk-JY3LI63F.js} +2 -2
- package/dist/{chunk-RMLTVKOY.js → chunk-L4YVE3RG.js} +2 -2
- package/dist/{chunk-P277M7Z5.js → chunk-LBC75QAB.js} +1 -1
- package/dist/{chunk-F6TVBCZV.js → chunk-LWW2IAFC.js} +1 -1
- package/dist/{chunk-64MJP6FK.js → chunk-NK4NMYF5.js} +52 -10
- package/dist/{chunk-DNQN74CC.js → chunk-NL4M3V5D.js} +33 -0
- package/dist/{chunk-OF3K3CU5.js → chunk-O2U4XQVM.js} +2 -2
- package/dist/{chunk-LQTVYUT3.js → chunk-OJTMM5CV.js} +2 -2
- package/dist/{chunk-HW2TBXVK.js → chunk-OPVRII63.js} +1 -1
- package/dist/{chunk-ZZ2CNCXJ.js → chunk-OSFBVVEP.js} +4 -4
- package/dist/{chunk-F43AMWLZ.js → chunk-PDTJVJVD.js} +1 -1
- package/dist/{chunk-UDQT5CWK.js → chunk-PI6T2AGS.js} +1 -1
- package/dist/{chunk-JO5ANTMR.js → chunk-PPUOHBAK.js} +84 -37
- package/dist/{chunk-N7G2X2LK.js → chunk-QD4SCW4A.js} +235 -198
- package/dist/{chunk-SOPYWTFV.js → chunk-RRUI3VWQ.js} +1 -1
- package/dist/{chunk-IN42UISW.js → chunk-SRJ4XWOR.js} +10 -5
- package/dist/{chunk-6RJVTUWI.js → chunk-T6UOCF5D.js} +5 -1
- package/dist/{chunk-VTQL23UM.js → chunk-TVNWAEJR.js} +1 -1
- package/dist/chunk-TY4KIVA6.js +50 -0
- package/dist/{chunk-UT2TYK2A.js → chunk-TYTVAFGB.js} +1 -1
- package/dist/{chunk-OMZYPQVA.js → chunk-UGYFQF6M.js} +1 -1
- package/dist/{chunk-TYF4GJR3.js → chunk-UIKN3CDF.js} +4 -4
- package/dist/{chunk-JGDIO2NF.js → chunk-UO3KYTBU.js} +1 -1
- package/dist/{chunk-KI7C6ZOD.js → chunk-VIJ7GDKI.js} +1 -1
- package/dist/{chunk-NKFKOEYX.js → chunk-WCMHJ6SS.js} +1 -1
- package/dist/{chunk-EORRZP3F.js → chunk-WX2OTJXL.js} +1 -1
- package/dist/{chunk-BOV4K7FP.js → chunk-WXTHKLNH.js} +9 -1
- package/dist/{chunk-CRQORMFF.js → chunk-X37FSYAX.js} +1 -1
- package/dist/{chunk-JQCRCDOC.js → chunk-X7E34LKV.js} +15 -15
- package/dist/chunk-X7HMDZZQ.js +85 -0
- package/dist/{chunk-B4GQTZMT.js → chunk-YDTJ7UBG.js} +4 -4
- package/dist/{chunk-K56D3X7S.js → chunk-YKOXJQGX.js} +34 -2
- package/dist/{chunk-3GCIXKCI.js → chunk-YLOJWSHB.js} +9 -5
- package/dist/{chunk-GKZYTPN2.js → chunk-YMEMN5FG.js} +1 -1
- package/dist/chunk-YQNK7HK3.js +87 -0
- package/dist/{chunk-M4AIK2SP.js → chunk-Z265MCGC.js} +15 -11
- package/dist/{chunk-FTAEPAVY.js → chunk-ZF36LULR.js} +4 -4
- package/dist/{chunk-66BNE332.js → chunk-ZJDPYOTK.js} +4 -4
- package/dist/{chunk-RM5QMOFY.js → chunk-ZKPQ4KLK.js} +1 -1
- package/dist/command-panel-runtime.js +34 -33
- package/dist/compact-cache-command-runtime.js +56 -55
- package/dist/compact-preflight-runtime.js +21 -21
- package/dist/connector-runtime.js +36 -35
- package/dist/deep-compact-runtime.js +6 -6
- package/dist/deferred-tools-catalog.js +5 -5
- package/dist/details-status-runtime.js +34 -33
- package/dist/evidence-runtime.d.ts.map +1 -1
- package/dist/evidence-runtime.js +12 -12
- package/dist/extension-command-runtime.js +7 -7
- package/dist/extension-slash-runtime.js +35 -34
- package/dist/failure-learning-command-runtime.js +36 -35
- package/dist/failure-learning-presenter.js +4 -4
- package/dist/failure-learning-runtime.js +3 -3
- package/dist/final-answer-gate.js +2 -2
- package/dist/git-command-runtime.js +35 -34
- package/dist/handoff-session-runtime.js +8 -8
- 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-result-presenter.js +5 -5
- package/dist/index-runtime.js +5 -5
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +531 -78
- 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 +34 -33
- package/dist/job-runner-presenter.js +3 -3
- package/dist/job-runtime.js +9 -9
- package/dist/mcp-index-command-runtime.js +5 -5
- package/dist/mcp-index-runtime.js +39 -38
- package/dist/mcp-sse-runtime.js +3 -3
- package/dist/mcp-stdio-runtime.js +4 -4
- package/dist/memory-command-runtime.js +36 -35
- package/dist/memory-extraction-runtime.js +3 -3
- package/dist/memory-rules-runtime.js +3 -3
- 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 +35 -34
- package/dist/model-loop-runtime.d.ts +1 -1
- package/dist/model-loop-runtime.d.ts.map +1 -1
- package/dist/model-loop-runtime.js +1 -1
- package/dist/model-prompt-runtime.d.ts.map +1 -1
- package/dist/model-prompt-runtime.js +10 -10
- 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 +56 -55
- package/dist/model-tool-runtime.d.ts +3 -2
- package/dist/model-tool-runtime.d.ts.map +1 -1
- package/dist/model-tool-runtime.js +58 -55
- package/dist/pending-details-presenter.js +3 -3
- package/dist/permission-approval-runtime.js +56 -55
- package/dist/permission-continuation-runtime.d.ts.map +1 -1
- package/dist/permission-continuation-runtime.js +4 -4
- package/dist/process-command-runtime.d.ts.map +1 -1
- package/dist/process-command-runtime.js +4 -4
- 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/provider-loop-runtime.js +3 -3
- package/dist/remote-command-runtime.js +35 -34
- package/dist/runner-runtime.js +8 -8
- package/dist/runtime-status-presenter.js +3 -3
- package/dist/runtime-status-snapshot.js +4 -4
- package/dist/shell/components/AgentProgressTree.js +2 -2
- package/dist/shell/components/BackgroundTaskOverlay.js +2 -2
- package/dist/shell/components/BtwPanel.js +2 -2
- package/dist/shell/components/CommandPanel.js +2 -2
- package/dist/shell/components/Composer.d.ts +16 -2
- package/dist/shell/components/Composer.d.ts.map +1 -1
- package/dist/shell/components/Composer.js +9 -7
- package/dist/shell/components/ConfigPanel.js +2 -2
- package/dist/shell/components/HelpPanel.js +2 -2
- package/dist/shell/components/HistorySearchPanel.js +2 -2
- package/dist/shell/components/MessageMarkdown.d.ts +23 -0
- package/dist/shell/components/MessageMarkdown.d.ts.map +1 -1
- package/dist/shell/components/MessageMarkdown.js +5 -3
- package/dist/shell/components/MouseInputRouter.js +5 -80
- package/dist/shell/components/OutputLine.d.ts.map +1 -1
- package/dist/shell/components/OutputLine.js +5 -3
- package/dist/shell/components/ProductBlock.d.ts.map +1 -1
- package/dist/shell/components/ProductBlock.js +5 -5
- package/dist/shell/components/ScrollViewport.js +3 -82
- package/dist/shell/components/SessionsPanel.js +2 -2
- package/dist/shell/components/ShellApp.d.ts.map +1 -1
- package/dist/shell/components/ShellApp.js +29 -24
- package/dist/shell/components/SlashSuggestions.js +2 -2
- package/dist/shell/components/StatusFooter.js +2 -2
- package/dist/shell/components/StatusTray.d.ts.map +1 -1
- package/dist/shell/components/StatusTray.js +2 -1
- package/dist/shell/components/StructuredDiff.js +2 -2
- package/dist/shell/components/TaskListView.js +2 -2
- package/dist/shell/components/TaskSuggestionBar.js +2 -2
- package/dist/shell/components/WorkflowProgressView.js +2 -2
- package/dist/shell/components/useAnchoredCursor.d.ts +6 -9
- package/dist/shell/components/useAnchoredCursor.d.ts.map +1 -1
- package/dist/shell/components/useAnchoredCursor.js +1 -1
- package/dist/shell/ink-renderer.d.ts.map +1 -1
- package/dist/shell/ink-renderer.js +29 -24
- package/dist/shell/models/transcript-selection-state.js +2 -2
- package/dist/shell/plain-renderer.d.ts.map +1 -1
- package/dist/shell/plain-renderer.js +2 -2
- package/dist/shell/text-utils.d.ts +16 -0
- package/dist/shell/text-utils.d.ts.map +1 -1
- package/dist/shell/text-utils.js +3 -1
- package/dist/shell/view-model.js +14 -14
- package/dist/slash-command-runtime.js +56 -55
- package/dist/slash-dispatch.js +4 -4
- package/dist/startup-runtime.js +2 -2
- package/dist/tool-output-presenter.d.ts.map +1 -1
- package/dist/tool-output-presenter.js +1 -1
- package/dist/tui-agent-job-runtime.js +11 -11
- 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 +10 -10
- package/dist/tui-memory-runtime.js +5 -5
- package/dist/tui-output-surface.js +15 -15
- package/dist/tui-permission-runtime.js +5 -5
- package/dist/tui-state-runtime.js +4 -4
- package/dist/verification-command-runtime.js +12 -12
- package/dist/workflow-command-runtime.d.ts.map +1 -1
- package/dist/workflow-command-runtime.js +34 -33
- package/package.json +5 -5
- package/dist/chunk-GW5YDCRZ.js +0 -42
|
@@ -9,21 +9,21 @@ import {
|
|
|
9
9
|
getDurableJobPaths,
|
|
10
10
|
getDurableJobsRoot,
|
|
11
11
|
listDurableJobs
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UIKN3CDF.js";
|
|
13
13
|
import {
|
|
14
14
|
formatJobNextAction,
|
|
15
15
|
mapDurableJobToBackgroundResult,
|
|
16
16
|
mapDurableJobToBackgroundStatus
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-PI6T2AGS.js";
|
|
18
18
|
import {
|
|
19
19
|
MAX_BACKGROUND_TASKS
|
|
20
20
|
} from "./chunk-RDGM4RUE.js";
|
|
21
21
|
import {
|
|
22
22
|
formatIndexRuntimeRef
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TYTVAFGB.js";
|
|
24
24
|
import {
|
|
25
25
|
truncateDisplay
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-UGYFQF6M.js";
|
|
27
27
|
|
|
28
28
|
// src/tui-agent-job-runtime.ts
|
|
29
29
|
function isAgentType(value) {
|
|
@@ -1,32 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createVerificationPlan,
|
|
3
|
-
createVerificationUnavailableReport,
|
|
4
|
-
runVerificationPlan
|
|
5
|
-
} from "./chunk-WQMSRO4D.js";
|
|
6
1
|
import {
|
|
7
2
|
bridgeWorkflowPlanToMainChainRequests,
|
|
8
3
|
decideWorkflowStepCapability
|
|
9
4
|
} from "./chunk-V7GDHHBL.js";
|
|
10
|
-
import {
|
|
11
|
-
createLogArtifactRegistry,
|
|
12
|
-
findEvidence,
|
|
13
|
-
formatAgentDetails,
|
|
14
|
-
formatEvidenceDetails,
|
|
15
|
-
parseLogArtifactRequest
|
|
16
|
-
} from "./chunk-THZBFYAH.js";
|
|
17
|
-
import {
|
|
18
|
-
createShellBlockOutputForTest,
|
|
19
|
-
writeErrorLine
|
|
20
|
-
} from "./chunk-ECFLCY5V.js";
|
|
21
5
|
import {
|
|
22
6
|
decidePermission
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import {
|
|
25
|
-
formatModeBehavior
|
|
26
|
-
} from "./chunk-4K6UB524.js";
|
|
7
|
+
} from "./chunk-HGCTHBUY.js";
|
|
27
8
|
import {
|
|
28
|
-
|
|
29
|
-
|
|
9
|
+
createVerificationPlan,
|
|
10
|
+
createVerificationUnavailableReport,
|
|
11
|
+
runVerificationPlan
|
|
12
|
+
} from "./chunk-CJRJR7TP.js";
|
|
30
13
|
import {
|
|
31
14
|
createAgentBackgroundTask,
|
|
32
15
|
createAgentContextSummary,
|
|
@@ -52,7 +35,24 @@ import {
|
|
|
52
35
|
registerBackgroundAbortController,
|
|
53
36
|
rememberBackgroundTask,
|
|
54
37
|
upsertJobBackgroundTask
|
|
55
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-OSFBVVEP.js";
|
|
39
|
+
import {
|
|
40
|
+
createLogArtifactRegistry,
|
|
41
|
+
findEvidence,
|
|
42
|
+
formatAgentDetails,
|
|
43
|
+
formatEvidenceDetails,
|
|
44
|
+
parseLogArtifactRequest
|
|
45
|
+
} from "./chunk-JY3LI63F.js";
|
|
46
|
+
import {
|
|
47
|
+
createShellBlockOutputForTest,
|
|
48
|
+
writeErrorLine
|
|
49
|
+
} from "./chunk-HPIHFENG.js";
|
|
50
|
+
import {
|
|
51
|
+
formatModeBehavior
|
|
52
|
+
} from "./chunk-IPZZGDUU.js";
|
|
53
|
+
import {
|
|
54
|
+
createVerificationLevelForReadiness
|
|
55
|
+
} from "./chunk-PBIPV4LD.js";
|
|
56
56
|
import {
|
|
57
57
|
JOB_RECOVERY_HEARTBEAT_STALE_MS,
|
|
58
58
|
appendJobLog,
|
|
@@ -68,27 +68,30 @@ import {
|
|
|
68
68
|
rescheduleDurableJobAgents,
|
|
69
69
|
updateDurableJobEffectiveAgentCap,
|
|
70
70
|
writeDurableJobReport
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-UIKN3CDF.js";
|
|
72
72
|
import {
|
|
73
73
|
markJobRunnerTerminal,
|
|
74
74
|
refreshRunnerStatusForJob,
|
|
75
75
|
startRunnerForDurableJob,
|
|
76
76
|
stopRunnerForDurableJob
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-YDTJ7UBG.js";
|
|
78
78
|
import {
|
|
79
79
|
formatLogArtifactSlice,
|
|
80
80
|
readLogArtifactSlice
|
|
81
81
|
} from "./chunk-L4XXW6Y5.js";
|
|
82
|
+
import {
|
|
83
|
+
formatEngineeringProfileStrategyHint
|
|
84
|
+
} from "./chunk-4UER2AKI.js";
|
|
82
85
|
import {
|
|
83
86
|
formatWorkflows
|
|
84
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-AGI6GFFL.js";
|
|
85
88
|
import {
|
|
86
89
|
messages
|
|
87
90
|
} from "./chunk-RBOQJFIZ.js";
|
|
88
91
|
import {
|
|
89
92
|
formatPermissionModeLabel,
|
|
90
93
|
formatRuntimeStatusLine
|
|
91
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-VIJ7GDKI.js";
|
|
92
95
|
import {
|
|
93
96
|
formatBackgroundDetails,
|
|
94
97
|
formatBackgroundOutputDetails,
|
|
@@ -96,13 +99,13 @@ import {
|
|
|
96
99
|
formatBackgroundTaskPanelDetails,
|
|
97
100
|
formatBackgroundTaskPanelRow,
|
|
98
101
|
formatJobRunnerInline
|
|
99
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-PI6T2AGS.js";
|
|
100
103
|
import {
|
|
101
104
|
appendSystemEvent,
|
|
102
105
|
appendToolResultEvent,
|
|
103
106
|
createEvidenceRecord,
|
|
104
107
|
createToolEndEvent
|
|
105
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-NK4NMYF5.js";
|
|
106
109
|
import {
|
|
107
110
|
WORKFLOW_ARCHITECTURE_REVIEW_FILE_LIMIT
|
|
108
111
|
} from "./chunk-RDGM4RUE.js";
|
|
@@ -112,14 +115,14 @@ import {
|
|
|
112
115
|
import {
|
|
113
116
|
loadOrCreateHandoffPacket,
|
|
114
117
|
validateHandoffPacket
|
|
115
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-7ZMDQZ22.js";
|
|
116
119
|
import {
|
|
117
120
|
AGENT_CONTROL_DESCRIPTION,
|
|
118
121
|
AGENT_CONTROL_TOOL_NAME,
|
|
119
122
|
createAgentControlInputSchema,
|
|
120
123
|
createModelToolDefinitionsForTools,
|
|
121
124
|
evaluateStructuredFinalAnswerClaims
|
|
122
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-YKOXJQGX.js";
|
|
123
126
|
import {
|
|
124
127
|
summarizeWorktreeCreateOutcome
|
|
125
128
|
} from "./chunk-6USL33ZO.js";
|
|
@@ -129,7 +132,7 @@ import {
|
|
|
129
132
|
import {
|
|
130
133
|
createIndexStatusSnapshot,
|
|
131
134
|
formatIndexRuntimeRef
|
|
132
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-TYTVAFGB.js";
|
|
133
136
|
import {
|
|
134
137
|
isFallbackWorkspaceReferenceSnapshot
|
|
135
138
|
} from "./chunk-ZJK25VFP.js";
|
|
@@ -168,14 +171,14 @@ import {
|
|
|
168
171
|
enqueueAgentCompletionNotice,
|
|
169
172
|
formatAgentCompletionDigest,
|
|
170
173
|
markAgentCompletionNoticeReported
|
|
171
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-HPMBSOQ4.js";
|
|
172
175
|
import {
|
|
173
176
|
formatError,
|
|
174
177
|
sanitizeDiagnosticText,
|
|
175
178
|
sanitizeDisplayPaths,
|
|
176
179
|
truncateDisplay,
|
|
177
180
|
writeLine
|
|
178
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-UGYFQF6M.js";
|
|
179
182
|
import {
|
|
180
183
|
checkBoundaries,
|
|
181
184
|
estimateFileMetrics
|
|
@@ -413,6 +416,17 @@ function buildWorkflowPlannerContextInput(context) {
|
|
|
413
416
|
} : {}
|
|
414
417
|
};
|
|
415
418
|
}
|
|
419
|
+
function snapshotEngineeringSignal(context) {
|
|
420
|
+
const signal = context.lastMetaSchedulerDecision?.policyDecision.engineeringSignal;
|
|
421
|
+
if (!signal) return void 0;
|
|
422
|
+
return {
|
|
423
|
+
profile: signal.profile,
|
|
424
|
+
strategyHint: signal.strategyHint,
|
|
425
|
+
artifactTargets: signal.artifactTargets.slice(),
|
|
426
|
+
...signal.failureCategory ? { failureCategory: signal.failureCategory } : {},
|
|
427
|
+
...signal.finalBoundaryHint ? { finalBoundaryHint: signal.finalBoundaryHint } : {}
|
|
428
|
+
};
|
|
429
|
+
}
|
|
416
430
|
function syncSelectedWorkflowRun(context) {
|
|
417
431
|
const runs = context.workflows.activeRuns ?? [];
|
|
418
432
|
if (runs.length === 0) {
|
|
@@ -559,6 +573,7 @@ function recoverWorkflowRunState(state) {
|
|
|
559
573
|
startedAt: state.startedAt,
|
|
560
574
|
endedAt: state.endedAt,
|
|
561
575
|
result: status === "completed" ? "partial" : status === "stale" ? "stale" : state.result,
|
|
576
|
+
...state.engineeringSignal ? { engineeringSignal: state.engineeringSignal } : {},
|
|
562
577
|
phaseGateConfirmed: state.phaseGateConfirmed === true,
|
|
563
578
|
confirmedPhaseStopPoints: Array.isArray(state.confirmedPhaseStopPoints) ? state.confirmedPhaseStopPoints.filter((item) => typeof item === "string") : []
|
|
564
579
|
};
|
|
@@ -795,6 +810,7 @@ async function runWorkflowPlanSteps(goal, plan, context, output, options = {}) {
|
|
|
795
810
|
}),
|
|
796
811
|
nextAction: "\u7B49\u5F85 step_result\uFF1B\u5931\u8D25\u65F6\u67E5\u770B /failures \u548C transcript\u3002"
|
|
797
812
|
};
|
|
813
|
+
const engineeringSignal = snapshotEngineeringSignal(context);
|
|
798
814
|
const workflowRun = upsertWorkflowRun(context, {
|
|
799
815
|
id: runId,
|
|
800
816
|
goal,
|
|
@@ -803,6 +819,7 @@ async function runWorkflowPlanSteps(goal, plan, context, output, options = {}) {
|
|
|
803
819
|
steps: stepStates,
|
|
804
820
|
startedAt,
|
|
805
821
|
result: "partial",
|
|
822
|
+
...engineeringSignal ? { engineeringSignal } : {},
|
|
806
823
|
phaseGateConfirmed: true,
|
|
807
824
|
confirmedPhaseStopPoints,
|
|
808
825
|
multiAgent: options.multiAgent === true
|
|
@@ -1028,6 +1045,7 @@ async function runRegistryWorkflow(workflow, goal, runInBackground, context, out
|
|
|
1028
1045
|
}),
|
|
1029
1046
|
nextAction: "\u67E5\u770B /workflows registry\u3001/background \u6216 /details background\u3002"
|
|
1030
1047
|
};
|
|
1048
|
+
const engineeringSignal = snapshotEngineeringSignal(context);
|
|
1031
1049
|
const workflowRun = upsertWorkflowRun(context, {
|
|
1032
1050
|
id: runId,
|
|
1033
1051
|
goal: goal || workflow.description,
|
|
@@ -1036,6 +1054,7 @@ async function runRegistryWorkflow(workflow, goal, runInBackground, context, out
|
|
|
1036
1054
|
steps: stepStates,
|
|
1037
1055
|
startedAt,
|
|
1038
1056
|
result: "partial",
|
|
1057
|
+
...engineeringSignal ? { engineeringSignal } : {},
|
|
1039
1058
|
phaseGateConfirmed: true,
|
|
1040
1059
|
confirmedPhaseStopPoints: [workflow.id]
|
|
1041
1060
|
});
|
|
@@ -1157,6 +1176,7 @@ async function executeRegistryWorkflowRun(workflow, goal, runId, stepStates, tas
|
|
|
1157
1176
|
async function executeRegistryWorkflowStep(workflow, step, goal, context, output, workflowRunId) {
|
|
1158
1177
|
const beforeEvidence = context.evidence.map((item) => item.id);
|
|
1159
1178
|
let handledKnownAction = false;
|
|
1179
|
+
const run = workflowRunId ? getWorkflowRun(context, workflowRunId) : context.workflows.activeRun;
|
|
1160
1180
|
try {
|
|
1161
1181
|
const isRegistryMutating = step.action === "write" || step.action === "bash" || step.action === "agent";
|
|
1162
1182
|
if (isRegistryMutating) {
|
|
@@ -1172,7 +1192,6 @@ async function executeRegistryWorkflowStep(workflow, step, goal, context, output
|
|
|
1172
1192
|
evidenceRefs: []
|
|
1173
1193
|
};
|
|
1174
1194
|
}
|
|
1175
|
-
const run = workflowRunId ? getWorkflowRun(context, workflowRunId) : context.workflows.activeRun;
|
|
1176
1195
|
if (!run?.confirmedPhaseStopPoints?.includes(workflow.id)) {
|
|
1177
1196
|
return {
|
|
1178
1197
|
status: "blocked",
|
|
@@ -1191,7 +1210,10 @@ async function executeRegistryWorkflowStep(workflow, step, goal, context, output
|
|
|
1191
1210
|
const role = step.role ?? "worker";
|
|
1192
1211
|
const task = step.task ?? (goal || workflow.description);
|
|
1193
1212
|
const previousAgentIds = new Set(context.agents.map((agent2) => agent2.id));
|
|
1194
|
-
await handleForkCommand([role, task], context, output
|
|
1213
|
+
await handleForkCommand([role, task], context, output, {
|
|
1214
|
+
...workflowRunId ? { workflowRunId } : {},
|
|
1215
|
+
...run?.engineeringSignal ? { engineeringSignal: run.engineeringSignal } : {}
|
|
1216
|
+
});
|
|
1195
1217
|
const agent = context.agents.find((item) => !previousAgentIds.has(item.id));
|
|
1196
1218
|
if (!agent) {
|
|
1197
1219
|
return {
|
|
@@ -1379,7 +1401,10 @@ async function executeWorkflowStep(request, context, output, workflowRunId, work
|
|
|
1379
1401
|
};
|
|
1380
1402
|
}
|
|
1381
1403
|
const previousAgentIds = new Set(context.agents.map((agent2) => agent2.id));
|
|
1382
|
-
await handleForkCommand([req.role, req.task], context, output, {
|
|
1404
|
+
await handleForkCommand([req.role, req.task], context, output, {
|
|
1405
|
+
workflowRunId,
|
|
1406
|
+
...run?.engineeringSignal ? { engineeringSignal: run.engineeringSignal } : {}
|
|
1407
|
+
});
|
|
1383
1408
|
const agent = context.agents.find((item) => !previousAgentIds.has(item.id));
|
|
1384
1409
|
const agentTask = agent ? context.backgroundTasks.find((task) => task.id === agent.id) : void 0;
|
|
1385
1410
|
if (agentTask && workflowRunId) {
|
|
@@ -2611,6 +2636,22 @@ var AGENT_ASSIGNABLE_STATUSES = /* @__PURE__ */ new Set(["running", "idle", "com
|
|
|
2611
2636
|
function getAgentRunsDir(context) {
|
|
2612
2637
|
return resolveStoragePaths2(context.config, context.projectPath).agentRuns;
|
|
2613
2638
|
}
|
|
2639
|
+
function snapshotEngineeringSignal2(context) {
|
|
2640
|
+
const signal = context.lastMetaSchedulerDecision?.policyDecision.engineeringSignal;
|
|
2641
|
+
if (!signal) {
|
|
2642
|
+
return {
|
|
2643
|
+
profile: "generic",
|
|
2644
|
+
strategyHint: formatEngineeringProfileStrategyHint("generic")
|
|
2645
|
+
};
|
|
2646
|
+
}
|
|
2647
|
+
return {
|
|
2648
|
+
profile: signal.profile,
|
|
2649
|
+
strategyHint: signal.strategyHint,
|
|
2650
|
+
artifactTargets: signal.artifactTargets.slice(),
|
|
2651
|
+
...signal.failureCategory ? { failureCategory: signal.failureCategory } : {},
|
|
2652
|
+
...signal.finalBoundaryHint ? { finalBoundaryHint: signal.finalBoundaryHint } : {}
|
|
2653
|
+
};
|
|
2654
|
+
}
|
|
2614
2655
|
function formatAgentCompletionSummary(agent, context) {
|
|
2615
2656
|
const text = messages[context.language];
|
|
2616
2657
|
const elapsed = Date.now() - Date.parse(agent.startedAt);
|
|
@@ -3381,6 +3422,7 @@ async function startDurableJobAgentRun(context, job, assignment, output) {
|
|
|
3381
3422
|
parentSessionId,
|
|
3382
3423
|
forkedFrom: packet.id,
|
|
3383
3424
|
task,
|
|
3425
|
+
engineeringSignal: snapshotEngineeringSignal2(context),
|
|
3384
3426
|
model: effectiveModel,
|
|
3385
3427
|
permissionMode: getAgentPermissionMode(assignment.type, context.permissionMode),
|
|
3386
3428
|
status: routeUsable ? "running" : "blocked",
|
|
@@ -4114,6 +4156,7 @@ async function handleForkCommand(args, context, output, runtimeOptions = {}) {
|
|
|
4114
4156
|
return;
|
|
4115
4157
|
}
|
|
4116
4158
|
const workflowTaskId = runtimeOptions.workflowRunId ?? getWorkflowRuns(context).find((run) => run.status === "running")?.id;
|
|
4159
|
+
const engineeringSignal = runtimeOptions.engineeringSignal ?? snapshotEngineeringSignal2(context);
|
|
4117
4160
|
const guard = deps().checkBackgroundStartGuard(context, "agent", false, workflowTaskId);
|
|
4118
4161
|
if (guard) {
|
|
4119
4162
|
writeLine(output, guard);
|
|
@@ -4171,6 +4214,7 @@ Task: ${task}` : task;
|
|
|
4171
4214
|
parentSessionId,
|
|
4172
4215
|
forkedFrom: packet.id,
|
|
4173
4216
|
task: effectiveTask,
|
|
4217
|
+
engineeringSignal,
|
|
4174
4218
|
model: effectiveModel,
|
|
4175
4219
|
...registryAgent ? { registryAgentId: registryAgent.id } : {},
|
|
4176
4220
|
...registryAllowedTools ? { allowedTools: registryAllowedTools } : {},
|
|
@@ -5138,6 +5182,8 @@ async function denyAgentToolUse(agent, toolCall, toolName, context, parentSessio
|
|
|
5138
5182
|
}
|
|
5139
5183
|
function createAgentLoopSystemPrompt(agent, context) {
|
|
5140
5184
|
const readonlyAuditHint = createReadonlyAuditToolHint(agent);
|
|
5185
|
+
const engineeringProfile = agent.engineeringSignal?.profile ?? context.lastMetaSchedulerDecision?.policyDecision.engineeringSignal.profile ?? "generic";
|
|
5186
|
+
const engineeringStrategy = agent.engineeringSignal?.strategyHint ?? context.lastMetaSchedulerDecision?.policyDecision.engineeringSignal.strategyHint ?? formatEngineeringProfileStrategyHint(engineeringProfile);
|
|
5141
5187
|
const roleHint = agent.type === "explorer" ? "Explore with read-only tools first. Return concise findings and evidence." : agent.type === "planner" ? "Build a practical plan. Use Todo when it helps, but do not stop at a stub." : agent.type === "worker" ? "Execute the assigned work with real tools. Stop and report blocked if permission is required." : "Verify with real project commands and report PASS/FAIL/PARTIAL honestly.";
|
|
5142
5188
|
return [
|
|
5143
5189
|
`You are a Linghun ${agent.type} child agent running in an isolated sidechain transcript.`,
|
|
@@ -5151,6 +5197,7 @@ function createAgentLoopSystemPrompt(agent, context) {
|
|
|
5151
5197
|
"Use structured tools only; never write raw tool_use/tool_result protocol as text.",
|
|
5152
5198
|
readonlyAuditHint,
|
|
5153
5199
|
"Respect the actual OS/shell before Bash. On Windows/PowerShell, prefer PowerShell cmdlets or Node one-liners; avoid Unix-only find|sed|head pipelines unless verified available.",
|
|
5200
|
+
`EngineeringTaskProfile: profile=${engineeringProfile}; strategy=${engineeringStrategy}; not validation evidence.`,
|
|
5154
5201
|
"If a required tool is denied, asks for approval, or fails, report blocked instead of claiming completion."
|
|
5155
5202
|
].join("\n");
|
|
5156
5203
|
}
|