@@ -61,6 +61,18 @@ const MODEL_NOT_SUPPORTED_PATTERN = /The requested model is not supported/;
6161// because the missing token will still be absent on every subsequent attempt.
6262const NO_AUTH_INFO_PATTERN = / N o a u t h e n t i c a t i o n i n f o r m a t i o n f o u n d / ;
6363
64+ /**
65+ * @typedef {(path: import("node:fs").PathOrFileDescriptor, data: string | Uint8Array, options?: import("node:fs").WriteFileOptions) => void } NodeAppendFileSync
66+ */
67+
68+ /**
69+ * @typedef {(path: string, data: string, encoding: string) => void } StringAppendLineWriter
70+ */
71+
72+ /**
73+ * @typedef {NodeAppendFileSync | StringAppendLineWriter } AppendFileSyncLike
74+ */
75+
6476/**
6577 * Emit a timestamped diagnostic log line to stderr.
6678 * All driver messages are prefixed with "[copilot-driver]" so they are easy to
@@ -137,7 +149,7 @@ function buildInfrastructureIncompletePayload(details) {
137149
138150/**
139151 * Append one safe-output entry line.
140- * @param {(path: string, data: string, encoding: string) => void } appendFileSync
152+ * @param {AppendFileSyncLike } appendFileSync
141153 * @param {string } safeOutputsPath
142154 * @param {string } payload
143155 */
@@ -151,7 +163,7 @@ function appendSafeOutputLine(appendFileSync, safeOutputsPath, payload) {
151163 * @param {string } details
152164 * @param {{
153165 * safeOutputsPath?: string,
154- * appendFileSync?: (path: string, data: string, encoding: string) => void ,
166+ * appendFileSync?: AppendFileSyncLike ,
155167 * logger?: (message: string) => void
156168 * }= } options
157169 */
0 commit comments