wednesdayai 0.5.0 → 0.5.1-dev.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-scope-DaYoimRo.js → agent-scope-VTjBKG-0.js} +3 -3
- package/dist/{agent-turn-runner-B9ZpICYG.js → agent-turn-runner-CZilDjoa.js} +4 -4
- package/dist/{agent-turn-runner-D17nO0vK.js → agent-turn-runner-DGW1XTSZ.js} +6 -6
- package/dist/{api-key-rotation-CFBqEjJo.js → api-key-rotation-C7Uer3wX.js} +2 -2
- package/dist/{audio-preflight-IAvClu-y.js → audio-preflight-5kfGz36M.js} +29 -29
- package/dist/{audio-preflight-0IORdIpv.js → audio-preflight-CyoX7lif.js} +5 -5
- package/dist/{audio-transcription-runner-XF9vtq2K.js → audio-transcription-runner-6owLZL6w.js} +1 -1
- package/dist/{audio-transcription-runner-DO37G4ea.js → audio-transcription-runner-CBRRwnRT.js} +26 -26
- package/dist/build-info.json +4 -4
- package/dist/bundled/boot-md/handler.js +60 -60
- package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-journal/handler.js +60 -60
- package/dist/bundled/session-memory/handler.js +60 -60
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-osbmoIZV.js → channel-activity-CgARXGuN.js} +3 -3
- package/dist/{chat-content-D9t717tu.js → chat-content-CjKyPXfO.js} +34 -34
- package/dist/{chat-content-CF94bdqd.js → chat-content-Dp_TK_pI.js} +3 -3
- package/dist/{chrome-Bz--jRWP.js → chrome-C9hAxf3E.js} +5 -5
- package/dist/{chrome-Cb_eHwXe.js → chrome-DKYaSdXE.js} +23 -23
- package/dist/{chunk-BGAIfwvG.js → chunk-CmQRdRrT.js} +3 -3
- package/dist/{command-queue-Blj57uZh.js → command-queue-DiOM6aJb.js} +1 -1
- package/dist/{command-queue-CHDYFklA.js → command-queue-arMRWvX5.js} +1 -1
- package/dist/{commands-registry-CHyanyMK.js → commands-registry-Bpqy7T_m.js} +2 -2
- package/dist/{deliver-ItqNbpAj.js → deliver-DGxrgy4y.js} +1 -1
- package/dist/{deliver-B1z53DPr.js → deliver-hdhBsluU.js} +29 -29
- package/dist/{diagnostic-DHSjiKQ1.js → diagnostic-DWnW43D8.js} +5 -5
- package/dist/{diagnostic-BsxoGiFO.js → diagnostic-f8CKHXWb.js} +1 -1
- package/dist/{errors-CCOle-CH.js → errors-h4QgDEJU.js} +1 -1
- package/dist/extensionAPI.js +12 -12
- package/dist/{fetch-CJta9EH3.js → fetch-BkWHUyJz.js} +8 -8
- package/dist/{fetch-guard-CnaMeBGo.js → fetch-guard-BUJnD_0T.js} +3 -3
- package/dist/{frontmatter-DlRD-Jnx.js → frontmatter-IfoWyoLV.js} +3 -3
- package/dist/{fs-safe-DpdLT3fB.js → fs-safe-joAzTKB9.js} +26 -26
- package/dist/{image-ops-YU6OONEl.js → image-ops-d6AhYSNh.js} +1 -1
- package/dist/{ir-BdHn6F6Y.js → ir-B0cUtyev.js} +5 -5
- package/dist/{legacy-names-me5dD9PP.js → legacy-names-Dh4RlQMQ.js} +1 -1
- package/dist/llm-slug-generator.js +60 -60
- package/dist/{logger-BrQxLcMY.js → logger-vVASmiVr.js} +1 -1
- package/dist/{manager-xwMosvyt.js → manager-SEkHJEk4.js} +18 -18
- package/dist/{markdown-tables-BVgH365V.js → markdown-tables-pw9wiTpN.js} +2 -2
- package/dist/{model-selection-CYypdqr8.js → model-selection-BTxcwzNF.js} +83 -83
- package/dist/{models-config-D7vsT5RL.js → models-config-CrYtS7l_.js} +2 -2
- package/dist/{outbound-attachment-C_QOYkXN.js → outbound-attachment-ecpn937X.js} +2 -2
- package/dist/{outbound-message-hooks-BYTh0d2Q.js → outbound-message-hooks-BA0MXlRL.js} +5 -5
- package/dist/{path-alias-guards-BdGLz9X0.js → path-alias-guards-BzCkdlOk.js} +1 -1
- package/dist/{pi-embedded-BtqsPDuE.js → pi-embedded-C3a3mJgO.js} +272 -272
- package/dist/{pi-embedded-D6nR71l7.js → pi-embedded-cc9FvjV6.js} +28 -28
- package/dist/{pi-embedded-utils-C-iiawNt.js → pi-embedded-utils-Bu-pLHgt.js} +3 -3
- package/dist/{pi-embedded-utils-Bb82klSc.js → pi-embedded-utils-DKfjTsdf.js} +1 -1
- package/dist/{pi-model-discovery-fTAJjO1L.js → pi-model-discovery-BHTeo1nC.js} +7 -7
- package/dist/plugin-sdk/{agent-turn-execute-R1HDfkzv.js → agent-turn-execute-5UY7VtoM.js} +12 -12
- package/dist/plugin-sdk/{agent-turn-runner-BJKm0xiy.js → agent-turn-runner-Cn8kBLTA.js} +4 -4
- package/dist/plugin-sdk/{audio-preflight-BB1yTgKL.js → audio-preflight-DmcETAqz.js} +5 -5
- package/dist/plugin-sdk/{audio-transcription-runner-reKaz0zD.js → audio-transcription-runner-CmY7S8fK.js} +1 -1
- package/dist/plugin-sdk/{chrome-WLpY6l2E.js → chrome-6h5M_drY.js} +8 -8
- package/dist/plugin-sdk/{command-queue-CAp1zb7F.js → command-queue-DIuk1L2E.js} +1 -1
- package/dist/plugin-sdk/{deliver-DlvbM-qn.js → deliver-C9GFYFwr.js} +1 -1
- package/dist/plugin-sdk/{deliver-BmT0wV-k.js → deliver-DPfI8dVE.js} +3 -3
- package/dist/plugin-sdk/{diagnostic-RXIEvDQf.js → diagnostic-DRY8-0JL.js} +1 -1
- package/dist/plugin-sdk/{pi-embedded-helpers-21OqohWy.js → pi-embedded-helpers-D5vYvfne.js} +3 -3
- package/dist/plugin-sdk/{pi-embedded-utils-BW2p1kKO.js → pi-embedded-utils-CGDgVtzV.js} +1 -1
- package/dist/plugin-sdk/{provider-dispatcher-rwnQ0CEc.js → provider-dispatcher-DryAXJsi.js} +12 -12
- package/dist/plugin-sdk/{provider-image-3obRwbTZ.js → provider-image-CVcMld07.js} +4 -4
- package/dist/plugin-sdk/{provider-image-B68yYRAm.js → provider-image-Df0uD0Oe.js} +1 -1
- package/dist/plugin-sdk/{pw-ai-CSRaN1ac.js → pw-ai-DMALp-EA.js} +1 -1
- package/dist/plugin-sdk/{runs-5hM5yurH.js → runs-BASRXkuM.js} +3 -3
- package/dist/plugin-sdk/{runs-DvLuGamE.js → runs-yMaO6qGS.js} +5 -5
- package/dist/plugin-sdk/{send-Zxl5JOn5.js → send-BqbtJqgu.js} +1 -1
- package/dist/plugin-sdk/{send-CzwcnXPR.js → send-CmZ4gvBw.js} +2 -2
- package/dist/plugin-sdk/{subagent-registry-Y727Of1U.js → subagent-registry-GgT4DYT1.js} +12 -12
- package/dist/plugin-sdk/testing.js +12 -12
- package/dist/plugin-sdk/{tools-joKDe6rw.js → tools-Bigk4qN-.js} +32 -32
- package/dist/{provider-image-Do7qMZhI.js → provider-image-BZgdxPq1.js} +1 -1
- package/dist/{provider-image-DEcMOAkN.js → provider-image-BoLaTMGA.js} +6 -6
- package/dist/{proxy-DaAwoyLn.js → proxy-CPi-EHQf.js} +1 -1
- package/dist/{proxy-env-DbK61KfJ.js → proxy-env-D-BYfN9f.js} +1 -1
- package/dist/{proxy-fetch-DfICXirF.js → proxy-fetch-SAeVJOzX.js} +1 -1
- package/dist/{pw-ai-BPTONp50.js → pw-ai-BX6tMIuu.js} +14 -14
- package/dist/{pw-ai-vX880pfn.js → pw-ai-ZhKSFpfJ.js} +1 -1
- package/dist/{qmd-manager-BwE9yS9R.js → qmd-manager-D8ak7kq1.js} +12 -12
- package/dist/{query-expansion-D98bVcfg.js → query-expansion-Cfj6kuQN.js} +13 -13
- package/dist/{recorder-DsunFllM.js → recorder-9g0HAfTV.js} +2 -2
- package/dist/{redact-CO0RqVMz.js → redact-CteA3IBL.js} +1 -1
- package/dist/{replies-pB9HCyld.js → replies-BbIj7g9M.js} +5 -5
- package/dist/{reply-directives-mulrKdb0.js → reply-directives-DBlsFghT.js} +2 -2
- package/dist/{reply-prefix-JmOFNTVH.js → reply-prefix-B4-hQLj2.js} +1 -1
- package/dist/{resolve-route-5h1UlQhK.js → resolve-route-BVQQmyE-.js} +5 -5
- package/dist/{runs-DEhpITiC.js → runs-Dar4NRlC.js} +3 -3
- package/dist/{runs-CYEm5TJX.js → runs-n_IyEnjI.js} +9 -9
- package/dist/{send-Bcmcrt2M.js → send-BaBji8OV.js} +6 -6
- package/dist/{send-CaxLshmb.js → send-Blzch_-J.js} +6 -6
- package/dist/{send-i_w4A0N2.js → send-D3AqPouq.js} +7 -7
- package/dist/{send-LdGFidPd.js → send-D4CyRJfb.js} +8 -8
- package/dist/{send-mGol3d2c.js → send-Owye3CdT.js} +27 -27
- package/dist/{send-C4CkAZXl.js → send-tEYUiTsj.js} +1 -1
- package/dist/{session-meta-CmQ6a7H5.js → session-meta-n_Hhzi0B.js} +1 -1
- package/dist/{sessions-ZdGPevHF.js → sessions-C8YjZYd5.js} +5 -5
- package/dist/{skill-commands-XRDXSro6.js → skill-commands-DyocWgx1.js} +8 -8
- package/dist/{skills-CXVcffYI.js → skills-BNWKnQc8.js} +21 -21
- package/dist/{store-CYs-lya8.js → store-BkbDrlDX.js} +7 -7
- package/dist/{subsystem-Bv4j-uIg.js → subsystem-D_zHSy02.js} +67 -67
- package/dist/{tables-BbGV4Ys1.js → tables-B_gp2rXG.js} +1 -1
- package/dist/{tokens-BdntrBR4.js → tokens-B3OPeQh5.js} +1 -1
- package/dist/{tool-loop-detection-CdZfb_CR.js → tool-loop-detection-ST5jhih3.js} +2 -2
- package/dist/{user-run-recording-Dr98Mjnd.js → user-run-recording-CMwTVvoc.js} +2 -2
- package/dist/{workspace-yHh5Lf7Z.js → workspace-CkXKTYV4.js} +27 -27
- package/extensions/acpx/package.json +1 -1
- package/extensions/anthropic/package.json +1 -1
- package/extensions/bifrost/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/deepgram/package.json +1 -1
- package/extensions/deepinfra/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/diffs/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/dream-cycle/package.json +1 -1
- package/extensions/elevenlabs/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/gemini-search/package.json +1 -1
- package/extensions/google/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/grok-search/package.json +1 -1
- package/extensions/groq/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/kimi-search/package.json +1 -1
- package/extensions/learning-core/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +6 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/mistral/package.json +1 -1
- package/extensions/moonshot/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +6 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +6 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/openai/package.json +1 -1
- package/extensions/openai-realtime/package.json +1 -1
- package/extensions/openrouter/package.json +1 -1
- package/extensions/perplexity-search/package.json +1 -1
- package/extensions/searxng-search/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +6 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +6 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zai/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +6 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +6 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/dist/github-copilot-token-DYYKoDuV.js +0 -106
- package/dist/paths-BIDPYPVC.js +0 -233
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { u as expandHomePrefix } from "./paths-
|
|
2
|
-
import { B as hasNodeErrorCode, H as isPathInside, I as sameFileIdentity, U as isSymlinkOpenError, V as isNotFoundPathError } from "./subsystem-
|
|
3
|
-
import { i as logWarn } from "./logger-
|
|
4
|
-
import { n as assertNoPathAliasEscape } from "./path-alias-guards-
|
|
1
|
+
import { u as expandHomePrefix } from "./paths-B_gs59ga.js";
|
|
2
|
+
import { B as hasNodeErrorCode, H as isPathInside, I as sameFileIdentity, U as isSymlinkOpenError, V as isNotFoundPathError } from "./subsystem-D_zHSy02.js";
|
|
3
|
+
import { i as logWarn } from "./logger-vVASmiVr.js";
|
|
4
|
+
import { n as assertNoPathAliasEscape } from "./path-alias-guards-BzCkdlOk.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { constants } from "node:fs";
|
|
7
7
|
import os from "node:os";
|
|
8
|
-
import fs
|
|
8
|
+
import fs from "node:fs/promises";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
10
|
import { pipeline } from "node:stream/promises";
|
|
11
11
|
|
|
@@ -25,19 +25,19 @@ const ensureTrailingSep = (value) => value.endsWith(path.sep) ? value : value +
|
|
|
25
25
|
async function expandRelativePathWithHome(relativePath) {
|
|
26
26
|
let home = process.env.HOME || process.env.USERPROFILE || os.homedir();
|
|
27
27
|
try {
|
|
28
|
-
home = await fs
|
|
28
|
+
home = await fs.realpath(home);
|
|
29
29
|
} catch {}
|
|
30
30
|
return expandHomePrefix(relativePath, { home });
|
|
31
31
|
}
|
|
32
32
|
async function openVerifiedLocalFile(filePath, options) {
|
|
33
33
|
try {
|
|
34
|
-
if ((await fs
|
|
34
|
+
if ((await fs.lstat(filePath)).isDirectory()) throw new SafeOpenError("not-file", "not a file");
|
|
35
35
|
} catch (err) {
|
|
36
36
|
if (err instanceof SafeOpenError) throw err;
|
|
37
37
|
}
|
|
38
38
|
let handle;
|
|
39
39
|
try {
|
|
40
|
-
handle = await fs
|
|
40
|
+
handle = await fs.open(filePath, OPEN_READ_FLAGS);
|
|
41
41
|
} catch (err) {
|
|
42
42
|
if (isNotFoundPathError(err)) throw new SafeOpenError("not-found", "file not found");
|
|
43
43
|
if (isSymlinkOpenError(err)) throw new SafeOpenError("symlink", "symlink open blocked", { cause: err });
|
|
@@ -45,13 +45,13 @@ async function openVerifiedLocalFile(filePath, options) {
|
|
|
45
45
|
throw err;
|
|
46
46
|
}
|
|
47
47
|
try {
|
|
48
|
-
const [stat, lstat] = await Promise.all([handle.stat(), fs
|
|
48
|
+
const [stat, lstat] = await Promise.all([handle.stat(), fs.lstat(filePath)]);
|
|
49
49
|
if (lstat.isSymbolicLink()) throw new SafeOpenError("symlink", "symlink not allowed");
|
|
50
50
|
if (!stat.isFile()) throw new SafeOpenError("not-file", "not a file");
|
|
51
51
|
if (options?.rejectHardlinks && stat.nlink > 1) throw new SafeOpenError("invalid-path", "hardlinked path not allowed");
|
|
52
52
|
if (!sameFileIdentity(stat, lstat)) throw new SafeOpenError("path-mismatch", "path changed during read");
|
|
53
|
-
const realPath = await fs
|
|
54
|
-
const realStat = await fs
|
|
53
|
+
const realPath = await fs.realpath(filePath);
|
|
54
|
+
const realStat = await fs.stat(realPath);
|
|
55
55
|
if (options?.rejectHardlinks && realStat.nlink > 1) throw new SafeOpenError("invalid-path", "hardlinked path not allowed");
|
|
56
56
|
if (!sameFileIdentity(stat, realStat)) throw new SafeOpenError("path-mismatch", "path mismatch");
|
|
57
57
|
return {
|
|
@@ -69,7 +69,7 @@ async function openVerifiedLocalFile(filePath, options) {
|
|
|
69
69
|
async function resolvePathWithinRoot(params) {
|
|
70
70
|
let rootReal;
|
|
71
71
|
try {
|
|
72
|
-
rootReal = await fs
|
|
72
|
+
rootReal = await fs.realpath(params.rootDir);
|
|
73
73
|
} catch (err) {
|
|
74
74
|
if (isNotFoundPathError(err)) throw new SafeOpenError("not-found", "root dir not found");
|
|
75
75
|
throw err;
|
|
@@ -170,7 +170,7 @@ function buildAtomicWriteTempPath(targetPath) {
|
|
|
170
170
|
return path.join(dir, `.${base}.${process.pid}.${randomUUID()}.tmp`);
|
|
171
171
|
}
|
|
172
172
|
async function writeTempFileForAtomicReplace(params) {
|
|
173
|
-
const tempHandle = await fs
|
|
173
|
+
const tempHandle = await fs.open(params.tempPath, OPEN_WRITE_CREATE_FLAGS, params.mode);
|
|
174
174
|
try {
|
|
175
175
|
if (typeof params.data === "string") await tempHandle.writeFile(params.data, params.encoding ?? "utf8");
|
|
176
176
|
else await tempHandle.writeFile(params.data);
|
|
@@ -180,7 +180,7 @@ async function writeTempFileForAtomicReplace(params) {
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
async function verifyAtomicWriteResult(params) {
|
|
183
|
-
const rootWithSep = ensureTrailingSep(await fs
|
|
183
|
+
const rootWithSep = ensureTrailingSep(await fs.realpath(params.rootDir));
|
|
184
184
|
const opened = await openVerifiedLocalFile(params.targetPath, { rejectHardlinks: true });
|
|
185
185
|
try {
|
|
186
186
|
if (!sameFileIdentity(opened.stat, params.expectedStat)) throw new SafeOpenError("path-mismatch", "path changed during write");
|
|
@@ -191,13 +191,13 @@ async function verifyAtomicWriteResult(params) {
|
|
|
191
191
|
}
|
|
192
192
|
async function resolveOpenedFileRealPathForHandle(handle, ioPath) {
|
|
193
193
|
try {
|
|
194
|
-
return await fs
|
|
194
|
+
return await fs.realpath(ioPath);
|
|
195
195
|
} catch (err) {
|
|
196
196
|
if (!isNotFoundPathError(err)) throw err;
|
|
197
197
|
}
|
|
198
198
|
const fdCandidates = process.platform === "linux" ? [`/proc/self/fd/${handle.fd}`, `/dev/fd/${handle.fd}`] : process.platform === "win32" ? [] : [`/dev/fd/${handle.fd}`];
|
|
199
199
|
for (const fdPath of fdCandidates) try {
|
|
200
|
-
return await fs
|
|
200
|
+
return await fs.realpath(fdPath);
|
|
201
201
|
} catch {}
|
|
202
202
|
throw new SafeOpenError("path-mismatch", "unable to resolve opened file path");
|
|
203
203
|
}
|
|
@@ -212,10 +212,10 @@ async function openWritableFileWithinRoot(params) {
|
|
|
212
212
|
} catch (err) {
|
|
213
213
|
throw new SafeOpenError("invalid-path", "path alias escape blocked", { cause: err });
|
|
214
214
|
}
|
|
215
|
-
if (params.mkdir !== false) await fs
|
|
215
|
+
if (params.mkdir !== false) await fs.mkdir(path.dirname(resolved), { recursive: true });
|
|
216
216
|
let ioPath = resolved;
|
|
217
217
|
try {
|
|
218
|
-
const resolvedRealPath = await fs
|
|
218
|
+
const resolvedRealPath = await fs.realpath(resolved);
|
|
219
219
|
if (!isPathInside(rootWithSep, resolvedRealPath)) throw new SafeOpenError("outside-workspace", "file is outside workspace root");
|
|
220
220
|
ioPath = resolvedRealPath;
|
|
221
221
|
} catch (err) {
|
|
@@ -227,10 +227,10 @@ async function openWritableFileWithinRoot(params) {
|
|
|
227
227
|
let createdForWrite = false;
|
|
228
228
|
try {
|
|
229
229
|
try {
|
|
230
|
-
handle = await fs
|
|
230
|
+
handle = await fs.open(ioPath, OPEN_WRITE_EXISTING_FLAGS, fileMode);
|
|
231
231
|
} catch (err) {
|
|
232
232
|
if (!isNotFoundPathError(err)) throw err;
|
|
233
|
-
handle = await fs
|
|
233
|
+
handle = await fs.open(ioPath, OPEN_WRITE_CREATE_FLAGS, fileMode);
|
|
234
234
|
createdForWrite = true;
|
|
235
235
|
}
|
|
236
236
|
} catch (err) {
|
|
@@ -244,7 +244,7 @@ async function openWritableFileWithinRoot(params) {
|
|
|
244
244
|
if (!stat.isFile()) throw new SafeOpenError("invalid-path", "path is not a regular file under root");
|
|
245
245
|
if (stat.nlink > 1) throw new SafeOpenError("invalid-path", "hardlinked path not allowed");
|
|
246
246
|
try {
|
|
247
|
-
const lstat = await fs
|
|
247
|
+
const lstat = await fs.lstat(ioPath);
|
|
248
248
|
if (lstat.isSymbolicLink() || !lstat.isFile()) throw new SafeOpenError("invalid-path", "path is not a regular file under root");
|
|
249
249
|
if (!sameFileIdentity(stat, lstat)) throw new SafeOpenError("path-mismatch", "path changed during write");
|
|
250
250
|
} catch (err) {
|
|
@@ -252,7 +252,7 @@ async function openWritableFileWithinRoot(params) {
|
|
|
252
252
|
}
|
|
253
253
|
const realPath = await resolveOpenedFileRealPathForHandle(handle, ioPath);
|
|
254
254
|
openedRealPath = realPath;
|
|
255
|
-
const realStat = await fs
|
|
255
|
+
const realStat = await fs.stat(realPath);
|
|
256
256
|
if (!sameFileIdentity(stat, realStat)) throw new SafeOpenError("path-mismatch", "path mismatch");
|
|
257
257
|
if (realStat.nlink > 1) throw new SafeOpenError("invalid-path", "hardlinked path not allowed");
|
|
258
258
|
if (!isPathInside(rootWithSep, realPath)) throw new SafeOpenError("outside-workspace", "file is outside workspace root");
|
|
@@ -267,7 +267,7 @@ async function openWritableFileWithinRoot(params) {
|
|
|
267
267
|
const cleanupCreatedPath = createdForWrite && err instanceof SafeOpenError;
|
|
268
268
|
const cleanupPath = openedRealPath ?? ioPath;
|
|
269
269
|
await handle.close().catch(() => {});
|
|
270
|
-
if (cleanupCreatedPath) await fs
|
|
270
|
+
if (cleanupCreatedPath) await fs.rm(cleanupPath, { force: true }).catch(() => {});
|
|
271
271
|
throw err;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
@@ -290,7 +290,7 @@ async function writeFileWithinRoot(params) {
|
|
|
290
290
|
encoding: params.encoding,
|
|
291
291
|
mode: targetMode || 384
|
|
292
292
|
});
|
|
293
|
-
await fs
|
|
293
|
+
await fs.rename(tempPath, destinationPath);
|
|
294
294
|
tempPath = null;
|
|
295
295
|
try {
|
|
296
296
|
await verifyAtomicWriteResult({
|
|
@@ -303,7 +303,7 @@ async function writeFileWithinRoot(params) {
|
|
|
303
303
|
throw err;
|
|
304
304
|
}
|
|
305
305
|
} finally {
|
|
306
|
-
if (tempPath) await fs
|
|
306
|
+
if (tempPath) await fs.rm(tempPath, { force: true }).catch(() => {});
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
async function copyFileWithinRoot(params) {
|
|
@@ -331,7 +331,7 @@ async function copyFileWithinRoot(params) {
|
|
|
331
331
|
});
|
|
332
332
|
await pipeline(sourceStream, targetStream);
|
|
333
333
|
} catch (err) {
|
|
334
|
-
if (target?.createdForWrite) await fs
|
|
334
|
+
if (target?.createdForWrite) await fs.rm(target.openedRealPath, { force: true }).catch(() => {});
|
|
335
335
|
throw err;
|
|
336
336
|
} finally {
|
|
337
337
|
if (!sourceClosedByStream) await source.handle.close().catch(() => {});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as logVerbose, h as shouldLogVerbose, st as resolveUserPath } from "./subsystem-
|
|
2
|
-
import { _ as maxBytesForKind, a as hasAlphaChannel, c as detectMime, l as extensionForMime, m as kindFromMime, o as optimizeImageToPng, r as convertHeicToJpeg, s as resizeToJpeg } from "./image-ops-
|
|
3
|
-
import { o as readLocalFileSafely, t as SafeOpenError } from "./fs-safe-
|
|
4
|
-
import { a as getDefaultMediaLocalRoots, n as fetchRemoteMedia } from "./fetch-
|
|
5
|
-
import { a as chunkText } from "./chunk-
|
|
1
|
+
import { f as logVerbose, h as shouldLogVerbose, st as resolveUserPath } from "./subsystem-D_zHSy02.js";
|
|
2
|
+
import { _ as maxBytesForKind, a as hasAlphaChannel, c as detectMime, l as extensionForMime, m as kindFromMime, o as optimizeImageToPng, r as convertHeicToJpeg, s as resizeToJpeg } from "./image-ops-d6AhYSNh.js";
|
|
3
|
+
import { o as readLocalFileSafely, t as SafeOpenError } from "./fs-safe-joAzTKB9.js";
|
|
4
|
+
import { a as getDefaultMediaLocalRoots, n as fetchRemoteMedia } from "./fetch-BkWHUyJz.js";
|
|
5
|
+
import { a as chunkText } from "./chunk-CmQRdRrT.js";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { a as resolveAgentEffectiveModelPrimary, c as resolveAgentWorkspaceDir, i as resolveAgentDir, l as resolveDefaultAgentId } from "./agent-scope-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
4
|
-
import "./workspace-
|
|
5
|
-
import "./logger-
|
|
6
|
-
import { Aa as DEFAULT_PROVIDER, ka as DEFAULT_MODEL, l as parseModelRef } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
8
|
-
import "./legacy-names-
|
|
9
|
-
import "./send-
|
|
10
|
-
import "./send-
|
|
11
|
-
import { t as runEmbeddedPiAgent } from "./pi-embedded-
|
|
12
|
-
import "./tokens-
|
|
13
|
-
import "./sessions-
|
|
1
|
+
import { a as resolveAgentEffectiveModelPrimary, c as resolveAgentWorkspaceDir, i as resolveAgentDir, l as resolveDefaultAgentId } from "./agent-scope-VTjBKG-0.js";
|
|
2
|
+
import "./paths-B_gs59ga.js";
|
|
3
|
+
import { t as createSubsystemLogger } from "./subsystem-D_zHSy02.js";
|
|
4
|
+
import "./workspace-CkXKTYV4.js";
|
|
5
|
+
import "./logger-vVASmiVr.js";
|
|
6
|
+
import { Aa as DEFAULT_PROVIDER, ka as DEFAULT_MODEL, l as parseModelRef } from "./model-selection-BTxcwzNF.js";
|
|
7
|
+
import "./github-copilot-token-DHoyZ4I0.js";
|
|
8
|
+
import "./legacy-names-Dh4RlQMQ.js";
|
|
9
|
+
import "./send-D3AqPouq.js";
|
|
10
|
+
import "./send-D4CyRJfb.js";
|
|
11
|
+
import { t as runEmbeddedPiAgent } from "./pi-embedded-C3a3mJgO.js";
|
|
12
|
+
import "./tokens-B3OPeQh5.js";
|
|
13
|
+
import "./sessions-C8YjZYd5.js";
|
|
14
14
|
import "./diagnostic-events-DGRcTqIH.js";
|
|
15
|
-
import "./diagnostic-
|
|
15
|
+
import "./diagnostic-DWnW43D8.js";
|
|
16
16
|
import "./diagnostic-session-state-Bnyx-w0F.js";
|
|
17
|
-
import "./redact-
|
|
18
|
-
import "./command-queue-
|
|
19
|
-
import "./send-
|
|
20
|
-
import "./image-ops-
|
|
21
|
-
import "./pi-model-discovery-
|
|
22
|
-
import "./chat-content-
|
|
23
|
-
import "./chrome-
|
|
24
|
-
import "./frontmatter-
|
|
25
|
-
import "./skills-
|
|
26
|
-
import "./path-alias-guards-
|
|
27
|
-
import "./errors-
|
|
28
|
-
import "./fs-safe-
|
|
29
|
-
import "./proxy-env-
|
|
30
|
-
import "./store-
|
|
17
|
+
import "./redact-CteA3IBL.js";
|
|
18
|
+
import "./command-queue-DiOM6aJb.js";
|
|
19
|
+
import "./send-Owye3CdT.js";
|
|
20
|
+
import "./image-ops-d6AhYSNh.js";
|
|
21
|
+
import "./pi-model-discovery-BHTeo1nC.js";
|
|
22
|
+
import "./chat-content-CjKyPXfO.js";
|
|
23
|
+
import "./chrome-C9hAxf3E.js";
|
|
24
|
+
import "./frontmatter-IfoWyoLV.js";
|
|
25
|
+
import "./skills-BNWKnQc8.js";
|
|
26
|
+
import "./path-alias-guards-BzCkdlOk.js";
|
|
27
|
+
import "./errors-h4QgDEJU.js";
|
|
28
|
+
import "./fs-safe-joAzTKB9.js";
|
|
29
|
+
import "./proxy-env-D-BYfN9f.js";
|
|
30
|
+
import "./store-BkbDrlDX.js";
|
|
31
31
|
import "./thinking-CcoiS9V4.js";
|
|
32
|
-
import "./models-config-
|
|
33
|
-
import "./audio-transcription-runner-
|
|
34
|
-
import "./pi-embedded-utils-
|
|
35
|
-
import "./provider-image-
|
|
36
|
-
import "./fetch-
|
|
37
|
-
import "./fetch-guard-
|
|
38
|
-
import "./proxy-fetch-
|
|
39
|
-
import "./api-key-rotation-
|
|
40
|
-
import "./reply-prefix-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./markdown-tables-
|
|
43
|
-
import "./ir-
|
|
32
|
+
import "./models-config-CrYtS7l_.js";
|
|
33
|
+
import "./audio-transcription-runner-CBRRwnRT.js";
|
|
34
|
+
import "./pi-embedded-utils-Bu-pLHgt.js";
|
|
35
|
+
import "./provider-image-BoLaTMGA.js";
|
|
36
|
+
import "./fetch-BkWHUyJz.js";
|
|
37
|
+
import "./fetch-guard-BUJnD_0T.js";
|
|
38
|
+
import "./proxy-fetch-SAeVJOzX.js";
|
|
39
|
+
import "./api-key-rotation-C7Uer3wX.js";
|
|
40
|
+
import "./reply-prefix-B4-hQLj2.js";
|
|
41
|
+
import "./chunk-CmQRdRrT.js";
|
|
42
|
+
import "./markdown-tables-pw9wiTpN.js";
|
|
43
|
+
import "./ir-B0cUtyev.js";
|
|
44
44
|
import "./render-2Ztmr_V0.js";
|
|
45
|
-
import "./commands-registry-
|
|
46
|
-
import "./user-run-recording-
|
|
47
|
-
import "./recorder-
|
|
48
|
-
import "./agent-turn-runner-
|
|
49
|
-
import "./skill-commands-
|
|
50
|
-
import "./runs-
|
|
51
|
-
import "./outbound-message-hooks-
|
|
52
|
-
import "./deliver-
|
|
45
|
+
import "./commands-registry-Bpqy7T_m.js";
|
|
46
|
+
import "./user-run-recording-CMwTVvoc.js";
|
|
47
|
+
import "./recorder-9g0HAfTV.js";
|
|
48
|
+
import "./agent-turn-runner-DGW1XTSZ.js";
|
|
49
|
+
import "./skill-commands-DyocWgx1.js";
|
|
50
|
+
import "./runs-n_IyEnjI.js";
|
|
51
|
+
import "./outbound-message-hooks-BA0MXlRL.js";
|
|
52
|
+
import "./deliver-hdhBsluU.js";
|
|
53
53
|
import "./fetch-BVyUaG_D.js";
|
|
54
|
-
import "./channel-activity-
|
|
55
|
-
import "./tables-
|
|
56
|
-
import "./reply-directives-
|
|
57
|
-
import "./send-
|
|
58
|
-
import "./outbound-attachment-
|
|
59
|
-
import "./send-
|
|
60
|
-
import "./resolve-route-
|
|
61
|
-
import "./proxy-
|
|
62
|
-
import "./replies-
|
|
63
|
-
import "./session-meta-
|
|
64
|
-
import "./manager-
|
|
65
|
-
import "./query-expansion-
|
|
54
|
+
import "./channel-activity-CgARXGuN.js";
|
|
55
|
+
import "./tables-B_gp2rXG.js";
|
|
56
|
+
import "./reply-directives-DBlsFghT.js";
|
|
57
|
+
import "./send-BaBji8OV.js";
|
|
58
|
+
import "./outbound-attachment-ecpn937X.js";
|
|
59
|
+
import "./send-Blzch_-J.js";
|
|
60
|
+
import "./resolve-route-BVQQmyE-.js";
|
|
61
|
+
import "./proxy-CPi-EHQf.js";
|
|
62
|
+
import "./replies-BbIj7g9M.js";
|
|
63
|
+
import "./session-meta-n_Hhzi0B.js";
|
|
64
|
+
import "./manager-SEkHJEk4.js";
|
|
65
|
+
import "./query-expansion-Cfj6kuQN.js";
|
|
66
66
|
|
|
67
67
|
//#region src/hooks/llm-slug-generator.ts
|
|
68
68
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as info, g as warn, o as defaultRuntime, p as logVerboseConsole, t as createSubsystemLogger, u as danger, x as getLogger } from "./subsystem-
|
|
1
|
+
import { d as info, g as warn, o as defaultRuntime, p as logVerboseConsole, t as createSubsystemLogger, u as danger, x as getLogger } from "./subsystem-D_zHSy02.js";
|
|
2
2
|
|
|
3
3
|
//#region src/logger.ts
|
|
4
4
|
const subsystemPrefixRe = /^([a-z][a-z0-9-]{1,20}):\s+(.*)$/i;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { c as resolveAgentWorkspaceDir, i as resolveAgentDir, r as resolveAgentConfig } from "./agent-scope-
|
|
3
|
-
import { l as resolveStateDir } from "./paths-
|
|
4
|
-
import { $ as clampNumber, Q as clampInt, pt as truncateUtf16Safe, st as resolveUserPath, t as createSubsystemLogger } from "./subsystem-
|
|
5
|
-
import { A as requireApiKey, Hn as resolveSessionTranscriptsDirForAgent, M as resolveEnvApiKey, Ta as normalizeResolvedSecretInputString, U as loadConfig, ca as isTruthyEnvValue, j as resolveApiKeyForProvider, x as retryAsync, xa as normalizeOptionalSecretInput } from "./model-selection-
|
|
2
|
+
import { c as resolveAgentWorkspaceDir, i as resolveAgentDir, r as resolveAgentConfig } from "./agent-scope-VTjBKG-0.js";
|
|
3
|
+
import { l as resolveStateDir } from "./paths-B_gs59ga.js";
|
|
4
|
+
import { $ as clampNumber, Q as clampInt, pt as truncateUtf16Safe, st as resolveUserPath, t as createSubsystemLogger } from "./subsystem-D_zHSy02.js";
|
|
5
|
+
import { A as requireApiKey, Hn as resolveSessionTranscriptsDirForAgent, M as resolveEnvApiKey, Ta as normalizeResolvedSecretInputString, U as loadConfig, ca as isTruthyEnvValue, j as resolveApiKeyForProvider, x as retryAsync, xa as normalizeOptionalSecretInput } from "./model-selection-BTxcwzNF.js";
|
|
6
6
|
import { n as onSessionTranscriptUpdate } from "./transcript-events-C9cNWasT.js";
|
|
7
|
-
import { i as formatErrorMessage } from "./errors-
|
|
7
|
+
import { i as formatErrorMessage } from "./errors-h4QgDEJU.js";
|
|
8
8
|
import { t as resolveNetworkSsrFPolicy } from "./ssrf-config-Cj-XaaTu.js";
|
|
9
|
-
import { t as fetchWithSsrFGuard } from "./fetch-guard-
|
|
10
|
-
import { n as executeWithApiKeyRotation, t as collectProviderApiKeysForExecution } from "./api-key-rotation-
|
|
11
|
-
import { _ as runWithConcurrency, a as resolveSessionMemoryStores, c as chunkMarkdown, d as hashText, f as isMemoryPath, g as remapChunkLines, h as parseEmbedding, i as listSessionMemoryRows, l as cosineSimilarity, m as normalizeExtraMemoryPaths, n as requireNodeSqlite, o as sessionMemorySourceId, p as listMemoryFiles, r as buildSessionMemoryEntry, s as buildFileEntry, t as extractKeywords, u as ensureDir, v as isFileMissingError, y as statRegularFile } from "./query-expansion-
|
|
9
|
+
import { t as fetchWithSsrFGuard } from "./fetch-guard-BUJnD_0T.js";
|
|
10
|
+
import { n as executeWithApiKeyRotation, t as collectProviderApiKeysForExecution } from "./api-key-rotation-C7Uer3wX.js";
|
|
11
|
+
import { _ as runWithConcurrency, a as resolveSessionMemoryStores, c as chunkMarkdown, d as hashText, f as isMemoryPath, g as remapChunkLines, h as parseEmbedding, i as listSessionMemoryRows, l as cosineSimilarity, m as normalizeExtraMemoryPaths, n as requireNodeSqlite, o as sessionMemorySourceId, p as listMemoryFiles, r as buildSessionMemoryEntry, s as buildFileEntry, t as extractKeywords, u as ensureDir, v as isFileMissingError, y as statRegularFile } from "./query-expansion-Cfj6kuQN.js";
|
|
12
12
|
import path from "node:path";
|
|
13
|
-
import
|
|
13
|
+
import syncFs from "node:fs";
|
|
14
14
|
import os from "node:os";
|
|
15
|
-
import fs
|
|
15
|
+
import fs from "node:fs/promises";
|
|
16
16
|
import { randomUUID } from "node:crypto";
|
|
17
17
|
import chokidar from "chokidar";
|
|
18
18
|
import { createInterface } from "node:readline";
|
|
@@ -748,7 +748,7 @@ function canAutoSelectLocal(options) {
|
|
|
748
748
|
if (/^(hf:|https?:)/i.test(modelPath)) return false;
|
|
749
749
|
const resolved = resolveUserPath(modelPath);
|
|
750
750
|
try {
|
|
751
|
-
return
|
|
751
|
+
return syncFs.statSync(resolved).isFile();
|
|
752
752
|
} catch {
|
|
753
753
|
return false;
|
|
754
754
|
}
|
|
@@ -1076,7 +1076,7 @@ async function extractTimestamp(params) {
|
|
|
1076
1076
|
if (!params.workspaceDir) return null;
|
|
1077
1077
|
const absolutePath = path.isAbsolute(params.filePath) ? params.filePath : path.resolve(params.workspaceDir, params.filePath);
|
|
1078
1078
|
try {
|
|
1079
|
-
const stat = await fs
|
|
1079
|
+
const stat = await fs.stat(absolutePath);
|
|
1080
1080
|
if (!Number.isFinite(stat.mtimeMs)) return null;
|
|
1081
1081
|
return new Date(stat.mtimeMs);
|
|
1082
1082
|
} catch {
|
|
@@ -2247,7 +2247,7 @@ var MemoryManagerSyncOps = class {
|
|
|
2247
2247
|
const source = `${sourceBase}${suffix}`;
|
|
2248
2248
|
const target = `${targetBase}${suffix}`;
|
|
2249
2249
|
try {
|
|
2250
|
-
await fs
|
|
2250
|
+
await fs.rename(source, target);
|
|
2251
2251
|
} catch (err) {
|
|
2252
2252
|
if (err.code !== "ENOENT") throw err;
|
|
2253
2253
|
}
|
|
@@ -2258,7 +2258,7 @@ var MemoryManagerSyncOps = class {
|
|
|
2258
2258
|
"",
|
|
2259
2259
|
"-wal",
|
|
2260
2260
|
"-shm"
|
|
2261
|
-
].map((suffix) => fs
|
|
2261
|
+
].map((suffix) => fs.rm(`${basePath}${suffix}`, { force: true })));
|
|
2262
2262
|
}
|
|
2263
2263
|
ensureSchema() {
|
|
2264
2264
|
const result = ensureMemoryIndexSchema({
|
|
@@ -2282,7 +2282,7 @@ var MemoryManagerSyncOps = class {
|
|
|
2282
2282
|
]);
|
|
2283
2283
|
const additionalPaths = normalizeExtraMemoryPaths(this.workspaceDir, this.settings.extraPaths);
|
|
2284
2284
|
for (const entry of additionalPaths) try {
|
|
2285
|
-
const stat =
|
|
2285
|
+
const stat = syncFs.lstatSync(entry);
|
|
2286
2286
|
if (stat.isSymbolicLink()) continue;
|
|
2287
2287
|
if (stat.isDirectory()) {
|
|
2288
2288
|
watchPaths.add(path.join(entry, "**", "*.md"));
|
|
@@ -3305,7 +3305,7 @@ var MemoryManagerEmbeddingOps = class extends MemoryManagerSyncOps {
|
|
|
3305
3305
|
});
|
|
3306
3306
|
return;
|
|
3307
3307
|
}
|
|
3308
|
-
const content = options.content ?? ("absPath" in entry ? await fs
|
|
3308
|
+
const content = options.content ?? ("absPath" in entry ? await fs.readFile(entry.absPath, "utf-8") : void 0);
|
|
3309
3309
|
if (content === void 0) throw new Error(`memory index: session source ${entry.path} produced no content`);
|
|
3310
3310
|
const chunks = enforceEmbeddingMaxInputTokens(this.provider, chunkMarkdown(content, this.settings.chunking).filter((chunk) => chunk.text.trim().length > 0), EMBEDDING_BATCH_MAX_TOKENS);
|
|
3311
3311
|
if (options.source === "sessions" && "lineMap" in entry) remapChunkLines(chunks, entry.lineMap);
|
|
@@ -3745,7 +3745,7 @@ var MemoryIndexManager = class MemoryIndexManager extends MemoryManagerEmbedding
|
|
|
3745
3745
|
if (!allowedWorkspace && this.settings.extraPaths.length > 0) {
|
|
3746
3746
|
const additionalPaths = normalizeExtraMemoryPaths(this.workspaceDir, this.settings.extraPaths);
|
|
3747
3747
|
for (const additionalPath of additionalPaths) try {
|
|
3748
|
-
const stat = await fs
|
|
3748
|
+
const stat = await fs.lstat(additionalPath);
|
|
3749
3749
|
if (stat.isSymbolicLink()) continue;
|
|
3750
3750
|
if (stat.isDirectory()) {
|
|
3751
3751
|
if (absPath === additionalPath || absPath.startsWith(`${additionalPath}${path.sep}`)) {
|
|
@@ -3770,7 +3770,7 @@ var MemoryIndexManager = class MemoryIndexManager extends MemoryManagerEmbedding
|
|
|
3770
3770
|
};
|
|
3771
3771
|
let content;
|
|
3772
3772
|
try {
|
|
3773
|
-
content = await fs
|
|
3773
|
+
content = await fs.readFile(absPath, "utf-8");
|
|
3774
3774
|
} catch (err) {
|
|
3775
3775
|
if (isFileMissingError(err)) return {
|
|
3776
3776
|
text: "",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { V as normalizeAccountId } from "./workspace-
|
|
3
|
-
import { Jn as normalizeChannelId, kr as resolveAccountEntry } from "./model-selection-
|
|
2
|
+
import { V as normalizeAccountId } from "./workspace-CkXKTYV4.js";
|
|
3
|
+
import { Jn as normalizeChannelId, kr as resolveAccountEntry } from "./model-selection-BTxcwzNF.js";
|
|
4
4
|
|
|
5
5
|
//#region src/config/markdown-tables.ts
|
|
6
6
|
var markdown_tables_exports = /* @__PURE__ */ __exportAll({ resolveMarkdownTableMode: () => resolveMarkdownTableMode });
|