@openclaw/feishu 2026.10.6 → 2026.10.8
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/.setup/{channel-DykAJJhn.mjs → channel-C6xKXhoV.mjs} +2 -2
- package/dist/.setup/{channel.runtime-CC15v8AP.mjs → channel.runtime-u62eAaRZ.mjs} +1 -1
- package/dist/.setup/{monitor-Cy9ofY1Q.mjs → monitor-BkQxhpUk.mjs} +1 -1
- package/dist/.setup/{monitor.account-UbN1RhlP.mjs → monitor.account-lTPltlCL.mjs} +19 -30
- package/dist/.setup/{setup-api-CRjDSHmn.mjs → setup-api-DfO9XC1M.mjs} +1 -1
- package/dist/.source-module-urls/6579f1b33dd01f8f0aaea28311ed6df1a635f9ad1e6fa86dcba53bca46407e55.json +1 -0
- package/dist/api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/setup-api.js +1 -1
- package/dist/setup-entry.js +1 -1
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +48 -0
- package/node_modules/@openclaw/fs-safe/README.md +14 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +28 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +11 -5
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +4 -2
- package/node_modules/@openclaw/fs-safe/dist/archive.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.js +4 -3
- package/node_modules/@openclaw/fs-safe/dist/copy-link.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-link.js +169 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-metadata.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-metadata.js +39 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +3 -6
- package/node_modules/@openclaw/fs-safe/dist/copy.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.js +29 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +27 -2
- package/node_modules/@openclaw/fs-safe/dist/entry-publication.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +4 -2
- package/node_modules/@openclaw/fs-safe/dist/file-hash.js +4 -3
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-write-lease.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/file-write-lease.js +42 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/hardlink-fallback.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/hardlink-fallback.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +16 -3
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +57 -18
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-move-fallback.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-move-fallback.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +19 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +4 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +18 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts +5 -3
- package/node_modules/@openclaw/fs-safe/dist/native.js +25 -6
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +9 -1
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +36 -47
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +5 -3
- package/node_modules/@openclaw/fs-safe/dist/pipe.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/pipe.js +26 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +2 -5
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +92 -10
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +12 -11
- package/node_modules/@openclaw/fs-safe/dist/root-copy.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/root-copy.js +128 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.js +12 -4
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +6 -92
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-native.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-native.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.cs +11 -5
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +9 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-test-hooks.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-test-hooks.js +51 -0
- package/node_modules/@openclaw/fs-safe/docs/archive.md +16 -0
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +35 -5
- package/node_modules/@openclaw/fs-safe/docs/copy.md +22 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +4 -2
- package/node_modules/@openclaw/fs-safe/docs/errors.md +8 -0
- package/node_modules/@openclaw/fs-safe/docs/guest.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/install.md +13 -5
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +5 -5
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +15 -5
- package/node_modules/@openclaw/fs-safe/docs/native.md +51 -2
- package/node_modules/@openclaw/fs-safe/docs/pipe.md +81 -0
- package/node_modules/@openclaw/fs-safe/docs/platform-capabilities.md +63 -0
- package/node_modules/@openclaw/fs-safe/docs/quickstart.md +23 -3
- package/node_modules/@openclaw/fs-safe/docs/reading.md +7 -1
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +5 -5
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +31 -13
- package/node_modules/@openclaw/fs-safe/docs/store.md +11 -0
- package/node_modules/@openclaw/fs-safe/docs/types.md +45 -80
- package/node_modules/@openclaw/fs-safe/docs/writing.md +121 -14
- package/node_modules/@openclaw/fs-safe/package.json +18 -10
- package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-freebsd-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-freebsd-arm64/package.json +29 -0
- package/node_modules/@openclaw/fs-safe-freebsd-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-freebsd-x64/package.json +29 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-win32-arm64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-arm64-msvc/package.json +29 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
- package/package.json +5 -5
|
@@ -848,7 +848,7 @@ const feishuDoctor = {
|
|
|
848
848
|
//#endregion
|
|
849
849
|
//#region extensions/feishu/src/gateway.ts
|
|
850
850
|
const feishuGatewayAdapter = { startAccount: async (ctx) => {
|
|
851
|
-
const { monitorFeishuProvider } = await import("./monitor-
|
|
851
|
+
const { monitorFeishuProvider } = await import("./monitor-BkQxhpUk.mjs");
|
|
852
852
|
const account = resolveFeishuRuntimeAccount({
|
|
853
853
|
cfg: ctx.cfg,
|
|
854
854
|
accountId: ctx.accountId
|
|
@@ -1889,7 +1889,7 @@ const meta = {
|
|
|
1889
1889
|
order: 70,
|
|
1890
1890
|
preferSessionLookupForAnnounceTarget: true
|
|
1891
1891
|
};
|
|
1892
|
-
const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
1892
|
+
const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-u62eAaRZ.mjs"), "feishuChannelRuntime");
|
|
1893
1893
|
async function resolveFeishuMessageSender(kind) {
|
|
1894
1894
|
const unavailableMessage = `Feishu ${kind} sending is not available.`;
|
|
1895
1895
|
try {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as resolveFeishuAccount } from "./doctor-contract-oIpUWtNO.mjs";
|
|
2
|
-
import { d as listFeishuDirectoryPeers, o as feishuOutbound, u as listFeishuDirectoryGroups } from "./channel-
|
|
2
|
+
import { d as listFeishuDirectoryPeers, o as feishuOutbound, u as listFeishuDirectoryGroups } from "./channel-C6xKXhoV.mjs";
|
|
3
3
|
import { $ as assertFeishuApiSuccess, A as sendMessageFeishu, C as sendStickerFeishu, D as getMessageFeishu, E as editMessageFeishu, H as createConfiguredFeishuClient, k as sendCardFeishu } from "./reply-delivery-result-iCCrdxE1.mjs";
|
|
4
4
|
import { r as createFeishuClient } from "./client-wwr8PGPH.mjs";
|
|
5
5
|
import { a as getFeishuMemberInfo, i as getChatMembers, n as buildFeishuDirectChatMembers, r as getChatInfo, t as assertFeishuChatMember } from "./chat-fC3dvxFs.mjs";
|
|
@@ -123,7 +123,7 @@ async function fetchBotIdentityForMonitor(account, options = {}) {
|
|
|
123
123
|
}
|
|
124
124
|
//#endregion
|
|
125
125
|
//#region extensions/feishu/src/monitor.ts
|
|
126
|
-
const loadMonitorAccountRuntime = createLazyRuntimeModule(() => import("./monitor.account-
|
|
126
|
+
const loadMonitorAccountRuntime = createLazyRuntimeModule(() => import("./monitor.account-lTPltlCL.mjs"));
|
|
127
127
|
async function monitorFeishuProvider(opts = {}) {
|
|
128
128
|
const cfg = opts.config;
|
|
129
129
|
if (!cfg) throw new Error("Config is required for Feishu monitor");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as normalizeFeishuExternalKey, g as resolveFeishuRuntimeAccount, h as resolveFeishuAccount, s as normalizeFeishuWebhookPath } from "./doctor-contract-oIpUWtNO.mjs";
|
|
2
2
|
import { o as resolveConfiguredFeishuGroupSessionScope, t as buildFeishuConversationId, u as resolveReceiveIdType } from "./conversation-id-D00i9uy5.mjs";
|
|
3
|
-
import { c as resolveFeishuLegacyWebhookListener, l as gateway_config_runtime_exports, s as describeFeishuWebhookPathConflict } from "./channel-
|
|
3
|
+
import { c as resolveFeishuLegacyWebhookListener, l as gateway_config_runtime_exports, s as describeFeishuWebhookPathConflict } from "./channel-C6xKXhoV.mjs";
|
|
4
4
|
import { A as sendMessageFeishu, At as resolveFeishuGroupConversationIngressAccess, B as parseInteractiveCardContent, D as getMessageFeishu, Dt as normalizeFeishuAllowEntry, Et as hasExplicitFeishuGroupConfig, F as isFeishuBroadcastMention, Ft as resolveFeishuChatType, I as isMentionForwardRequest, K as deliverCommentThreadText, L as normalizeMentions, Lt as createFeishuCardInteractionEnvelope, N as formatFeishuMediaContent, Nt as resolveFeishuReplyPolicy, O as listFeishuThreadMessages, Ot as resolveFeishuDmIngressAccess, P as extractMentionTargets, Pt as normalizeFeishuChatType, R as isFeishuGroupChatType, Rt as decodeFeishuCardAction, S as sendMediaFeishu, T as chunkFeishuCardMarkdown, U as buildFeishuMediaFallbackText, V as parsePostContent, W as resolveFeishuIdentityEmoji, a as shouldSendNoVisibleReplyFallback, at as parseCommentContentElements, b as withinCardTableLimit, ct as normalizeCommentFileType, d as consumeFeishuPresentationFallbackMarker, dt as resolveFeishuCardTemplate, gt as shouldUseFeishuCard, i as noVisibleFeishuReplyDelivery, j as sendStructuredCardFeishu, jt as resolveFeishuGroupSenderActivationIngressAccess, k as sendCardFeishu, kt as resolveFeishuGroupConfig, mt as materializeFeishuPostMarkdownSoftBreaks, n as createFeishuReplyDeliveryResult, nt as encodeQuery, ot as requestFeishuApi, pt as chunkFeishuPostMarkdown, r as mergeFeishuReplyDeliveryResults, rt as extractReplyText, st as buildFeishuCommentTarget, t as createFeishuPartialReplyDeliveryError, tt as createCommentTypingReactionLifecycle, u as buildFeishuPresentationFallback, v as renderFeishuReplyPayload, w as shouldSuppressFeishuTextForVoiceMedia, x as saveMessageResourceFeishu, y as resolveFeishuRichReply, z as normalizeFeishuEventChatType } from "./reply-delivery-result-iCCrdxE1.mjs";
|
|
5
5
|
import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.mjs";
|
|
6
6
|
import { a as getFeishuUserAgent, f as resolveConfiguredHttpTimeoutMs, i as createFeishuWSClient, n as createEventDispatcher, r as createFeishuClient } from "./client-wwr8PGPH.mjs";
|
|
@@ -9,7 +9,7 @@ import { t as createFeishuThreadBindingManager } from "./thread-bindings-Pii2fAS
|
|
|
9
9
|
import { evaluateSupplementalContextVisibility, normalizeAgentId as normalizeAgentId$1, resolveChannelContextVisibilityMode } from "../runtime-api.js";
|
|
10
10
|
import { t as readFeishuJsonResponse } from "./json-response-DXajw_FU.mjs";
|
|
11
11
|
import { a as waitForAbortableDelay, i as raceWithTimeoutAndAbort } from "./probe-DXnFxq5j.mjs";
|
|
12
|
-
import { t as fetchBotIdentityForMonitor } from "./monitor-
|
|
12
|
+
import { t as fetchBotIdentityForMonitor } from "./monitor-BkQxhpUk.mjs";
|
|
13
13
|
import { resolveAgentConfig } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
14
14
|
import { DEFAULT_INGRESS_ADOPTION_STALL_MS, bindIngressLifecycleToReplyOptions, createChannelIngressError, createChannelIngressMonitor, createChannelMessageReplyPipeline, createReplyPrefixContext, formatChannelProgressDraftLineForEntry, resolveAgentOutboundIdentity, resolveChannelPreviewStreamMode, resolveChannelStreamingBlockEnabled, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
|
|
15
15
|
import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
|
|
@@ -1137,18 +1137,6 @@ function truncateSummary(text, max = 50) {
|
|
|
1137
1137
|
function shouldPushStreamingUpdate(previousText, nextText) {
|
|
1138
1138
|
return !previousText || /[\n。!?!?;;::]$/.test(nextText) || nextText.length - previousText.length >= STREAMING_SIGNIFICANT_DELTA_CHARS;
|
|
1139
1139
|
}
|
|
1140
|
-
/** Merges cumulative or overlapping streaming snapshots without duplicating content. */
|
|
1141
|
-
function mergeStreamingText(previousText, nextText) {
|
|
1142
|
-
const previous = typeof previousText === "string" ? previousText : "";
|
|
1143
|
-
const next = typeof nextText === "string" ? nextText : "";
|
|
1144
|
-
if (!next) return previous;
|
|
1145
|
-
if (!previous || next === previous) return next;
|
|
1146
|
-
if (next.includes(previous)) return next;
|
|
1147
|
-
if (previous.includes(next)) return previous;
|
|
1148
|
-
const maxOverlap = Math.min(previous.length, next.length);
|
|
1149
|
-
for (let overlap = maxOverlap; overlap > 0; overlap -= 1) if (previous.slice(-overlap) === next.slice(0, overlap)) return `${previous}${next.slice(overlap)}`;
|
|
1150
|
-
return `${previous}${next}`;
|
|
1151
|
-
}
|
|
1152
1140
|
var FeishuStreamingSession = class {
|
|
1153
1141
|
constructor(client, creds, log) {
|
|
1154
1142
|
this.state = null;
|
|
@@ -1640,7 +1628,6 @@ function createFeishuReplyDispatcher(params) {
|
|
|
1640
1628
|
let reasoningText = "";
|
|
1641
1629
|
let statusLine = "";
|
|
1642
1630
|
let snapshotBaseText = "";
|
|
1643
|
-
let lastSnapshotTextLength = 0;
|
|
1644
1631
|
let hasStreamingFinalText = false;
|
|
1645
1632
|
const deliveredFinalTexts = /* @__PURE__ */ new Set();
|
|
1646
1633
|
const closedStreamingSettlements = /* @__PURE__ */ new Map();
|
|
@@ -1680,14 +1667,7 @@ function createFeishuReplyDispatcher(params) {
|
|
|
1680
1667
|
if (options?.dedupeWithLastPartial && nextText === lastPartial) return;
|
|
1681
1668
|
if (options?.dedupeWithLastPartial) lastPartial = nextText;
|
|
1682
1669
|
if ((options?.mode ?? "snapshot") === "delta") streamText = `${streamText}${nextText}`;
|
|
1683
|
-
else {
|
|
1684
|
-
const currentSnapshotText = snapshotBaseText ? streamText.slice(snapshotBaseText.length) : streamText;
|
|
1685
|
-
if (lastSnapshotTextLength >= 20 && nextText.length < lastSnapshotTextLength * .5 && !currentSnapshotText.includes(nextText)) {
|
|
1686
|
-
snapshotBaseText = streamText;
|
|
1687
|
-
streamText = `${snapshotBaseText}${nextText}`;
|
|
1688
|
-
} else streamText = `${snapshotBaseText}${mergeStreamingText(currentSnapshotText, nextText)}`;
|
|
1689
|
-
lastSnapshotTextLength = nextText.length;
|
|
1690
|
-
}
|
|
1670
|
+
else streamText = `${snapshotBaseText}${nextText}`;
|
|
1691
1671
|
flushStreamingCardUpdate(buildCombinedStreamText(reasoningText, streamText));
|
|
1692
1672
|
};
|
|
1693
1673
|
const startStreaming = () => {
|
|
@@ -1737,7 +1717,6 @@ function createFeishuReplyDispatcher(params) {
|
|
|
1737
1717
|
reasoningText = "";
|
|
1738
1718
|
statusLine = "";
|
|
1739
1719
|
snapshotBaseText = "";
|
|
1740
|
-
lastSnapshotTextLength = 0;
|
|
1741
1720
|
hasStreamingFinalText = false;
|
|
1742
1721
|
};
|
|
1743
1722
|
const rememberClosedStreamingSettlement = (generation, content, result, error, disposition = "closed") => {
|
|
@@ -2173,7 +2152,7 @@ function createFeishuReplyDispatcher(params) {
|
|
|
2173
2152
|
...payload,
|
|
2174
2153
|
text: payloadText
|
|
2175
2154
|
});
|
|
2176
|
-
const text = info?.kind === "final" && !hasIndependentPresentation ? mergeStreamingFinalText(streamText, reply.text
|
|
2155
|
+
const text = info?.kind === "final" && !hasIndependentPresentation ? mergeStreamingFinalText(streamText, payload.isError ? reply.text : `${snapshotBaseText}${reply.text}`, payload.isError === true && hasStreamingFinalText) : reply.text;
|
|
2177
2156
|
const hasText = reply.hasText;
|
|
2178
2157
|
const hasMedia = reply.hasMedia;
|
|
2179
2158
|
const ttsSupplement = getReplyPayloadTtsSupplement(payload);
|
|
@@ -2252,8 +2231,6 @@ function createFeishuReplyDispatcher(params) {
|
|
|
2252
2231
|
if (info?.kind === "final") {
|
|
2253
2232
|
streamText = text;
|
|
2254
2233
|
hasStreamingFinalText = true;
|
|
2255
|
-
snapshotBaseText = "";
|
|
2256
|
-
lastSnapshotTextLength = text.length;
|
|
2257
2234
|
flushStreamingCardUpdate(buildCombinedStreamText(reasoningText, streamText));
|
|
2258
2235
|
}
|
|
2259
2236
|
}
|
|
@@ -2290,6 +2267,7 @@ function createFeishuReplyDispatcher(params) {
|
|
|
2290
2267
|
replyOptions: {
|
|
2291
2268
|
onModelSelected,
|
|
2292
2269
|
disableBlockStreaming: !coreBlockStreamingEnabled,
|
|
2270
|
+
preserveProgressCallbackStartOrder: previewStreamingEnabled ? true : void 0,
|
|
2293
2271
|
onPartialReply: previewStreamingEnabled ? (payload) => {
|
|
2294
2272
|
if (!payload.text) return false;
|
|
2295
2273
|
const cleaned = stripReasoningTagsFromText(payload.text, {
|
|
@@ -2326,7 +2304,11 @@ function createFeishuReplyDispatcher(params) {
|
|
|
2326
2304
|
if (statusLineLocal) return updateStreamingStatusLine(statusLineLocal);
|
|
2327
2305
|
return false;
|
|
2328
2306
|
} : void 0,
|
|
2329
|
-
onAssistantMessageStart: previewStreamingEnabled ? () =>
|
|
2307
|
+
onAssistantMessageStart: previewStreamingEnabled ? () => {
|
|
2308
|
+
snapshotBaseText = streamText ? `${streamText}\n\n` : "";
|
|
2309
|
+
lastPartial = "";
|
|
2310
|
+
return updateStreamingStatusLine("", false);
|
|
2311
|
+
} : void 0,
|
|
2330
2312
|
onCompactionStart: previewStreamingEnabled ? () => updateStreamingStatusLine("📦 **Compacting context...**") : void 0,
|
|
2331
2313
|
onCompactionEnd: previewStreamingEnabled ? () => updateStreamingStatusLine("") : void 0
|
|
2332
2314
|
},
|
|
@@ -3523,8 +3505,15 @@ function buildFeishuActionCard(params) {
|
|
|
3523
3505
|
tag: "markdown",
|
|
3524
3506
|
content: params.content
|
|
3525
3507
|
}, {
|
|
3526
|
-
tag: "
|
|
3527
|
-
|
|
3508
|
+
tag: "column_set",
|
|
3509
|
+
flex_mode: "none",
|
|
3510
|
+
horizontal_spacing: "default",
|
|
3511
|
+
columns: params.actions.map((button) => ({
|
|
3512
|
+
tag: "column",
|
|
3513
|
+
width: "auto",
|
|
3514
|
+
vertical_align: "center",
|
|
3515
|
+
elements: [button]
|
|
3516
|
+
}))
|
|
3528
3517
|
}] }
|
|
3529
3518
|
};
|
|
3530
3519
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { t as feishuPlugin, i as feishuSetupAdapter, n as feishuSetupWizard } from "./channel-
|
|
1
|
+
export { t as feishuPlugin, i as feishuSetupAdapter, n as feishuSetupWizard } from "./channel-C6xKXhoV.mjs";
|
|
2
2
|
import "../setup-api.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"entries":[{"output":"api.js","source":"extensions/feishu/api.ts"},{"output":"channel-entry.js","source":"extensions/feishu/channel-entry.ts"},{"output":"channel-plugin-api.js","source":"extensions/feishu/channel-plugin-api.ts"},{"output":"configured-state.js","source":"extensions/feishu/configured-state.ts"},{"output":"contract-api.js","source":"extensions/feishu/contract-api.ts"},{"output":"doctor-contract-api.js","source":"extensions/feishu/doctor-contract-api.ts"},{"output":"index.js","source":"extensions/feishu/index.ts"},{"output":"runtime-api.js","source":"extensions/feishu/runtime-api.ts"},{"output":"runtime-setter-api.js","source":"extensions/feishu/runtime-setter-api.ts"},{"output":"secret-contract-api.js","source":"extensions/feishu/secret-contract-api.ts"},{"output":"security-contract-api.js","source":"extensions/feishu/security-contract-api.ts"},{"output":"session-binding-contract-api.js","source":"extensions/feishu/session-binding-contract-api.ts"},{"output":"session-key-api.js","source":"extensions/feishu/session-key-api.ts"},{"output":"setup-api.js","source":"extensions/feishu/setup-api.ts"},{"output":"setup-entry.js","source":"extensions/feishu/setup-entry.ts"},{"output":"subagent-hooks-api.js","source":"extensions/feishu/subagent-hooks-api.ts"}],"chunks":[{"output":".setup/app-registration-DQOq5urV.mjs","sha256":"54be3b1e1b5f48fe2fbd3866c3df67f7553e096ee385586fc3cee09a3261a10c","facadeSource":"extensions/feishu/src/app-registration.ts","sources":["extensions/feishu/src/app-registration.ts"]},{"output":".setup/channel-C6xKXhoV.mjs","sha256":"7f9edb5b63297a2f64645cf9478f7d9cc6faf29235b9ca1bee3ce12413e23879","facadeSource":null,"sources":["extensions/feishu/src/approval-auth.ts","extensions/feishu/src/channel.ts","extensions/feishu/src/comment-send.ts","extensions/feishu/src/directory.static.ts","extensions/feishu/src/doctor-agent-roster.ts","extensions/feishu/src/doctor.ts","extensions/feishu/src/gateway.ts","extensions/feishu/src/outbound.ts","extensions/feishu/src/session-route.ts","extensions/feishu/src/setup-core.ts","extensions/feishu/src/setup-surface.ts","extensions/feishu/src/sticker-catalog.ts","extensions/feishu/src/webhook-route.ts","packages/normalization-core/src/string-coerce.ts","src/gateway/gateway-http-route-contracts.ts","src/gateway/security-path.ts","src/gateway/server/plugins-http/path-context.ts","src/plugins/http-path-prefix.ts"]},{"output":".setup/channel.runtime-u62eAaRZ.mjs","sha256":"f281e7d92eea49fca177b65b5d1e03f0d81b3a927216935d92c9d01ed4a9f5cd","facadeSource":"extensions/feishu/src/channel.runtime.ts","sources":["extensions/feishu/src/channel.runtime.ts","extensions/feishu/src/directory.ts","extensions/feishu/src/pins.ts","extensions/feishu/src/reactions.ts"]},{"output":".setup/chat-fC3dvxFs.mjs","sha256":"ffe45f89ef98366018fde46bec839488b9f62fb037ec657f48f6dfee6e505d13","facadeSource":null,"sources":["extensions/feishu/src/chat-schema.ts","extensions/feishu/src/chat.ts"]},{"output":".setup/client-wwr8PGPH.mjs","sha256":"7fe1c0bcab43c7c169a0e0a64f6720abe26bcd5eed9037699794d4df4f2e57b0","facadeSource":null,"sources":["extensions/feishu/src/client-timeout.ts","extensions/feishu/src/client.ts","extensions/feishu/src/send-context.ts"]},{"output":".setup/conversation-id-D00i9uy5.mjs","sha256":"29b3ace15023a63cfd8efae73065c3f33a83a9a08414510497327cced1f00a4a","facadeSource":null,"sources":["extensions/feishu/src/conversation-id.ts","extensions/feishu/src/targets.ts"]},{"output":".setup/doctor-contract-oIpUWtNO.mjs","sha256":"95a4eaabce224e5fcd57919ccad401f8171f8369851f708fd3918ad71046bef7","facadeSource":null,"sources":["extensions/feishu/src/accounts.ts","extensions/feishu/src/config-schema.ts","extensions/feishu/src/doctor-contract.ts","extensions/feishu/src/external-keys.ts","extensions/feishu/src/webhook-path.ts","packages/normalization-core/src/record-coerce.ts","src/config/channel-config-normalization.ts","src/plugin-sdk/legacy-webhook-listener-migration.ts"]},{"output":".setup/json-response-DXajw_FU.mjs","sha256":"12da2dfb99f465a20dbe02d33ca55a78b8ed74e5c350c42d6c065e2fa4d3ba99","facadeSource":null,"sources":["extensions/feishu/src/json-response.ts"]},{"output":".setup/message-action-contract-Bhxj8Zrf.mjs","sha256":"56a0369786447a3c509a3610df29d81cae95c1e9e00a5b4b83288e0970fc07eb","facadeSource":null,"sources":["extensions/feishu/src/message-action-contract.ts"]},{"output":".setup/monitor-BkQxhpUk.mjs","sha256":"8ac322790615ca8b8eeb1cd536ee258e653de147cdda284f329d9086351e049d","facadeSource":"extensions/feishu/src/monitor.ts","sources":["extensions/feishu/src/bot-identity-cache.ts","extensions/feishu/src/monitor-startup-timeout.ts","extensions/feishu/src/monitor.startup.ts","extensions/feishu/src/monitor.ts"]},{"output":".setup/monitor.account-lTPltlCL.mjs","sha256":"ec9d77bfcaf19bad9e888e62bc7c3a1dce8b3c1b4cfbcb1eca9a2b26070cfdf4","facadeSource":"extensions/feishu/src/monitor.account.ts","sources":["extensions/feishu/src/bot-agent-body.ts","extensions/feishu/src/bot-broadcast.ts","extensions/feishu/src/bot-content.ts","extensions/feishu/src/bot-group-name-state.ts","extensions/feishu/src/bot-group-name.ts","extensions/feishu/src/bot-name.ts","extensions/feishu/src/bot-sender-name.ts","extensions/feishu/src/bot-thread-mentions.ts","extensions/feishu/src/bot.ts","extensions/feishu/src/card-action-state.ts","extensions/feishu/src/card-action.ts","extensions/feishu/src/card-ux-approval.ts","extensions/feishu/src/card-ux-launcher.ts","extensions/feishu/src/card-ux-shared.ts","extensions/feishu/src/comment-dispatcher.ts","extensions/feishu/src/comment-handler.ts","extensions/feishu/src/dedup-state.ts","extensions/feishu/src/dedup.ts","extensions/feishu/src/dedupe-key.ts","extensions/feishu/src/dynamic-agent.ts","extensions/feishu/src/feishu-ingress.ts","extensions/feishu/src/monitor-rate-limit-key.ts","extensions/feishu/src/monitor.account.ts","extensions/feishu/src/monitor.bot-identity.ts","extensions/feishu/src/monitor.bot-menu-handler.ts","extensions/feishu/src/monitor.comment-notice-handler.ts","extensions/feishu/src/monitor.comment.ts","extensions/feishu/src/monitor.message-handler.ts","extensions/feishu/src/monitor.state.ts","extensions/feishu/src/monitor.synthetic-error.ts","extensions/feishu/src/monitor.transport.ts","extensions/feishu/src/monitor.vc-meeting-invited-handler.ts","extensions/feishu/src/reasoning-preview.ts","extensions/feishu/src/reply-dispatcher-state.ts","extensions/feishu/src/reply-dispatcher.ts","extensions/feishu/src/sequential-key.ts","extensions/feishu/src/sequential-queue.ts","extensions/feishu/src/streaming-card.ts","extensions/feishu/src/streaming-update.ts","extensions/feishu/src/synthetic-event-target.ts","extensions/feishu/src/typing-backoff.ts","extensions/feishu/src/typing.ts","src/channels/mention-gating.ts"]},{"output":".setup/probe-DXnFxq5j.mjs","sha256":"1f8d87f07c17ecf27fc0f85e087ddcfbdeb6a0bf5a78043d7ad6ea008aa9c2af","facadeSource":null,"sources":["extensions/feishu/src/async.ts","extensions/feishu/src/probe.ts"]},{"output":".setup/reply-delivery-result-iCCrdxE1.mjs","sha256":"34da625e537906289b40e2241a1db52376836b7ef7841058a7ff1fe264919702","facadeSource":null,"sources":["extensions/feishu/src/api-response.ts","extensions/feishu/src/card-interaction.ts","extensions/feishu/src/chat-type.ts","extensions/feishu/src/comment-reaction.ts","extensions/feishu/src/comment-shared.ts","extensions/feishu/src/comment-target.ts","extensions/feishu/src/configured-client.ts","extensions/feishu/src/drive-schema.ts","extensions/feishu/src/drive.ts","extensions/feishu/src/identity-header.ts","extensions/feishu/src/interactive-message-content.ts","extensions/feishu/src/markdown.ts","extensions/feishu/src/media-chunk-idle.ts","extensions/feishu/src/media-fallback.ts","extensions/feishu/src/media.ts","extensions/feishu/src/mention.ts","extensions/feishu/src/message-content.ts","extensions/feishu/src/native-card.ts","extensions/feishu/src/policy.ts","extensions/feishu/src/post.ts","extensions/feishu/src/presentation-card.ts","extensions/feishu/src/read-policy.ts","extensions/feishu/src/reply-delivery-result.ts","extensions/feishu/src/send-rate-limit.ts","extensions/feishu/src/send-result.ts","extensions/feishu/src/send-target.ts","extensions/feishu/src/send.ts","extensions/feishu/src/tool-account.ts","extensions/feishu/src/tool-registration.ts","extensions/feishu/src/tool-result.ts","extensions/feishu/src/tools-config.ts","extensions/feishu/src/types.ts"]},{"output":".setup/runtime-C5JxBWZp.mjs","sha256":"e15497a9738c244b2498c97b98e65b74e22ad68d9e552d32a87d8dcfc15e5b3e","facadeSource":null,"sources":["extensions/feishu/src/runtime.ts"]},{"output":".setup/runtime-setter-api-BrQHE03y.mjs","sha256":"ac04c67457d89b0cd7f9ad1851c2d23734d66a6d03e9d21dc31dcb8f67358a2a","facadeSource":"extensions/feishu/runtime-setter-api.ts","sources":[]},{"output":".setup/secret-contract-api-D2-avpLT.mjs","sha256":"d660623174d65b3d8fd0574b0304ebfe03310e5134a0a58cf0f39446dad4b75b","facadeSource":"extensions/feishu/secret-contract-api.ts","sources":[]},{"output":".setup/secret-contract-CI1wCr9i.mjs","sha256":"18d52a3d2d2736975d6e2058a12245117f534a55e277e4d3fce3656df18243b4","facadeSource":null,"sources":["extensions/feishu/src/secret-contract.ts"]},{"output":".setup/security-audit-b86aSgH2.mjs","sha256":"7072064b78cd0d11485a26c3b002a7a8e37afbd9bf5a00a3e81b0c6da4e583d8","facadeSource":null,"sources":["extensions/feishu/src/security-audit.ts"]},{"output":".setup/session-conversation-BSBNK5Mq.mjs","sha256":"2cfe413f65e5c158b5f1326a9dfc1d18f2809482d1949d452899a13f1d10f392","facadeSource":null,"sources":["extensions/feishu/src/session-conversation.ts"]},{"output":".setup/setup-api-DfO9XC1M.mjs","sha256":"a3a7196b0319ddf559f5e57276ce2f865a19c3dee4ec70ee77f255d3e66b587c","facadeSource":"extensions/feishu/setup-api.ts","sources":[]},{"output":".setup/subagent-hooks-CGq_-NJZ.mjs","sha256":"6f493a05b3f7cbaafe986d38187f8d1956df0eef29c3a7877674819e87b9215e","facadeSource":null,"sources":["extensions/feishu/src/subagent-hooks.ts"]},{"output":".setup/thread-bindings-Pii2fAST.mjs","sha256":"3fd70c0c939b6ba5822a2b9b9f0e96b018914f185860102e583f1d8920ff6e33","facadeSource":null,"sources":["extensions/feishu/src/thread-bindings.ts"]},{"output":"api.js","sha256":"a5d5a50b534a1d18d3917490af4126c05254706287578d3256ff1594ce0a53ae","facadeSource":"extensions/feishu/api.ts","sources":["extensions/feishu/src/bitable.ts","extensions/feishu/src/doc-schema.ts","extensions/feishu/src/docx-batch-insert.ts","extensions/feishu/src/docx-color-text.ts","extensions/feishu/src/docx-markdown.ts","extensions/feishu/src/docx-table-ops.ts","extensions/feishu/src/docx-upload-input.ts","extensions/feishu/src/docx.ts","extensions/feishu/src/perm-schema.ts","extensions/feishu/src/perm.ts","extensions/feishu/src/wiki-schema.ts","extensions/feishu/src/wiki.ts"]},{"output":"channel-entry.js","sha256":"d6944f7c3ba5a235e4fc4323a7e2b95943eb4b0bf97a4e804da843469b2b0a05","facadeSource":"extensions/feishu/channel-entry.ts","sources":["extensions/feishu/channel-entry.ts"]},{"output":"channel-plugin-api.js","sha256":"4da3e924cee0b1fbba48aaab76967373e07717e255e3033ee31592ccbc941483","facadeSource":"extensions/feishu/channel-plugin-api.ts","sources":[]},{"output":"configured-state.js","sha256":"7012f87a9f29cd5fb4d016c58d1ac9e1df190fc9ea2d1e87f7b6b6642a91503b","facadeSource":"extensions/feishu/configured-state.ts","sources":["extensions/feishu/configured-state.ts"]},{"output":"contract-api.js","sha256":"b50feb45842abc80ee1092d2b400328253eca9de4d6b88ad756b568b44f735d8","facadeSource":"extensions/feishu/contract-api.ts","sources":[]},{"output":"doctor-contract-api.js","sha256":"39c2d1125deb041166490cc622660fad6cd68ba482484fd9c6a2d72e90fce7a4","facadeSource":"extensions/feishu/doctor-contract-api.ts","sources":[]},{"output":"index.js","sha256":"17f2e4d25ca24f4f7694b2f109e20d1c7411a5ca8583e600373473673dc61706","facadeSource":"extensions/feishu/index.ts","sources":["extensions/feishu/index.ts"]},{"output":"runtime-api.js","sha256":"b54662c3e65653080377c95668de2ce1f488a0c2e69a20171ea47273cf0b5e9c","facadeSource":"extensions/feishu/runtime-api.ts","sources":[]},{"output":"runtime-setter-api.js","sha256":"57e2fe216c919a7d59af4e002cbe42afd1f3d5f88eb5585df32c0ddcd2213b8e","facadeSource":"extensions/feishu/runtime-setter-api.ts","sources":[]},{"output":"secret-contract-api.js","sha256":"0612d518992cb8600c9215dc298306cedcc0973b14644b6026d493ec03d3c376","facadeSource":"extensions/feishu/secret-contract-api.ts","sources":[]},{"output":"security-contract-api.js","sha256":"847e275058ffd3574de067506cd3c54dacbfe03149f7bf1413c6529997e5a58a","facadeSource":"extensions/feishu/security-contract-api.ts","sources":[]},{"output":"session-binding-contract-api.js","sha256":"fc6c16056354645cf7cc1e1b93e8f9b27ce71236e9a9535b6362f8f74787b2e6","facadeSource":"extensions/feishu/session-binding-contract-api.ts","sources":[]},{"output":"session-key-api.js","sha256":"a6d91839514398bb7829338e44fe6ee7ee26d098212d72a2af0dfcc16bf8badf","facadeSource":"extensions/feishu/session-key-api.ts","sources":[]},{"output":"setup-api.js","sha256":"71fe8beb6e2d0a8f7b221d8b1c46f6335e20c882ec65a4dea89859f90903148c","facadeSource":"extensions/feishu/setup-api.ts","sources":[]},{"output":"setup-entry.js","sha256":"5ea45e57d6ef3c38420a6a2c5c633a6de459358d5c2e4810cee0c165948f0d4c","facadeSource":"extensions/feishu/setup-entry.ts","sources":["extensions/feishu/setup-entry.ts"]},{"output":"subagent-hooks-api.js","sha256":"5114108db4864ed755c565b42402e1066ceba8a4aede675477de07943a93fb8e","facadeSource":"extensions/feishu/subagent-hooks-api.ts","sources":["extensions/feishu/subagent-hooks-api.ts"]}],"unrenderedSources":["extensions/feishu/api.ts","extensions/feishu/channel-plugin-api.ts","extensions/feishu/config-doctor-api.ts","extensions/feishu/contract-api.ts","extensions/feishu/doctor-contract-api.ts","extensions/feishu/runtime-api.ts","extensions/feishu/runtime-setter-api.ts","extensions/feishu/secret-contract-api.ts","extensions/feishu/security-contract-api.ts","extensions/feishu/session-binding-contract-api.ts","extensions/feishu/session-key-api.ts","extensions/feishu/setup-api.ts"]}
|
package/dist/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./.setup/conversation-id-D00i9uy5.mjs";
|
|
2
|
-
import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./.setup/channel-
|
|
2
|
+
import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./.setup/channel-C6xKXhoV.mjs";
|
|
3
3
|
import { $ as assertFeishuApiSuccess, J as registerFeishuTool, Q as resolveFeishuToolAccount, X as unknownToolActionResult, Y as feishuExternalToolResult, Z as createFeishuToolClient, _t as visitFeishuMarkdown, ft as chunkFeishuMarkdown, ht as parseFeishuMarkdown, q as registerFeishuDriveTools } from "./.setup/reply-delivery-result-iCCrdxE1.mjs";
|
|
4
4
|
import { t as getFeishuRuntime } from "./.setup/runtime-C5JxBWZp.mjs";
|
|
5
5
|
import { f as resolveConfiguredHttpTimeoutMs, r as createFeishuClient } from "./.setup/client-wwr8PGPH.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as feishuPlugin } from "./.setup/channel-
|
|
1
|
+
export { t as feishuPlugin } from "./.setup/channel-C6xKXhoV.mjs";
|
package/dist/setup-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as feishuPlugin, i as feishuSetupAdapter, n as feishuSetupWizard } from "./.setup/channel-
|
|
1
|
+
export { t as feishuPlugin, i as feishuSetupAdapter, n as feishuSetupWizard } from "./.setup/channel-C6xKXhoV.mjs";
|
package/dist/setup-entry.js
CHANGED
|
@@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url";
|
|
|
4
4
|
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
plugin: {
|
|
7
|
-
specifier: fileURLToPath(new URL(".setup/setup-api-
|
|
7
|
+
specifier: fileURLToPath(new URL(".setup/setup-api-DfO9XC1M.mjs", import.meta.url).href),
|
|
8
8
|
exportName: "feishuPlugin"
|
|
9
9
|
},
|
|
10
10
|
secrets: {
|
|
@@ -2,6 +2,54 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.26.0 - 2026-10-10
|
|
6
|
+
|
|
7
|
+
### Highlights
|
|
8
|
+
|
|
9
|
+
- **New platforms:** native packages for FreeBSD x64/arm64 and Windows ARM64. ([#905](https://github.com/openclaw/fs-safe/pull/905), [#893](https://github.com/openclaw/fs-safe/pull/893))
|
|
10
|
+
- **Native capabilities:** anonymous pipes, Linux write leases, Darwin ACL inspection, ReFS block cloning, and metadata- and link-preserving `Root.copyIn`. ([#892](https://github.com/openclaw/fs-safe/pull/892), [#896](https://github.com/openclaw/fs-safe/pull/896), [#920](https://github.com/openclaw/fs-safe/pull/920), [#921](https://github.com/openclaw/fs-safe/pull/921))
|
|
11
|
+
- **Android/Termux publication:** staged no-replace copies and writes work when the OS refuses hard links. ([#888](https://github.com/openclaw/fs-safe/pull/888))
|
|
12
|
+
- **Performance:** faster deep archive extraction, borrowed-handle copies and overwrites, sidecar locks, and Linux descriptor verification, with identity checks retained. ([#912](https://github.com/openclaw/fs-safe/pull/912), [#906](https://github.com/openclaw/fs-safe/pull/906), [#902](https://github.com/openclaw/fs-safe/pull/902), [#901](https://github.com/openclaw/fs-safe/pull/901), [#899](https://github.com/openclaw/fs-safe/pull/899))
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
- **ReFS file copies:** support guarded `Root.copyIn` block cloning on Windows ReFS and Dev Drive, with exclusive publication, cancellation cleanup, and automatic byte-copy fallback for unavailable clone capabilities. ([#920](https://github.com/openclaw/fs-safe/pull/920))
|
|
17
|
+
- **Guarded file copying:** add `Root.copyIn` metadata preservation and exclusive literal-link copying, including dangling Windows file and directory links; keep permission selection separate from timestamps and attributes. ([#921](https://github.com/openclaw/fs-safe/pull/921))
|
|
18
|
+
|
|
19
|
+
- **Native filesystem capabilities:** add Linux write leases on caller-owned descriptors, no-follow Darwin ACL inspection with separate file and directory inheritance facts, and Windows sharing-lock, attribute, and physical-extent test fixtures. ([#896](https://github.com/openclaw/fs-safe/pull/896))
|
|
20
|
+
- **Anonymous pipes:** add `@openclaw/fs-safe/pipe` with native-owned, reopenable close-on-exec pipe ends for one-shot child input on POSIX, including safe stream closure in Workers. ([#892](https://github.com/openclaw/fs-safe/pull/892))
|
|
21
|
+
|
|
22
|
+
### Fixes
|
|
23
|
+
|
|
24
|
+
- **Windows creation diagnostics:** retain native Win32 error numbers through private directory and file creation failures, including the command fallback, without changing semantic error codes. ([#919](https://github.com/openclaw/fs-safe/pull/919))
|
|
25
|
+
- **FreeBSD native packages:** add x64 and arm64 packages for FreeBSD 14.4+, with native anonymous pipes and canonicalization, and explicit capability absence for unported operations. ([#905](https://github.com/openclaw/fs-safe/pull/905))
|
|
26
|
+
- **Partial native bindings:** select guarded fallbacks when an operation's native capabilities are absent, and report typed capability errors in required mode before mutation. ([#905](https://github.com/openclaw/fs-safe/pull/905))
|
|
27
|
+
- **Android/Termux publication:** publish staged no-replace copies and writes when hardlinks are refused, using a verified empty placeholder before atomic replacement; include `EACCES` in the public hardlink-to-copy fallback classifier. Reported in [openclaw/openclaw#167791](https://github.com/openclaw/openclaw/issues/167791). ([#888](https://github.com/openclaw/fs-safe/pull/888))
|
|
28
|
+
- **Native ZIP names:** preserve CP437 decoding for unflagged legacy filenames after the ZIP 9 upgrade, including collision rejection and bounded entry selection; continue rejecting invalid Unicode Path checksums and encodings before decoder normalization. ([#885](https://github.com/openclaw/fs-safe/pull/885))
|
|
29
|
+
- **Native ZIP Unicode fields:** retain rejection of invalid Unicode Comment CRCs and UTF-8 before callbacks or bounded reads, and validate sequential Unicode fields in decoder order without repeated hashing of the original name. ([#887](https://github.com/openclaw/fs-safe/pull/887))
|
|
30
|
+
- **Portable ZIP extraction:** accept safe relative root-directory markers such as `./` from libarchive and other producers without turning them into absolute paths; root markers remain skipped before callbacks and publication. ([#886](https://github.com/openclaw/fs-safe/pull/886))
|
|
31
|
+
- **Durable JSON queues on Android/Termux:** claim, failed-entry quarantine, and retirement recovery report typed `helper-unavailable` errors when hardlinks are refused, preserving pending, claimed, and retirement evidence for retry. ([#889](https://github.com/openclaw/fs-safe/pull/889))
|
|
32
|
+
- **Windows exclusive publication:** preserve dangling destination symlinks when a refused hard link falls back to placeholder publication. ([#894](https://github.com/openclaw/fs-safe/pull/894))
|
|
33
|
+
- **Native mkdir collisions:** `Root.mkdir` consistently reports `not-file` for an existing regular-file destination in native require mode. ([#895](https://github.com/openclaw/fs-safe/pull/895))
|
|
34
|
+
- **Guest directory publication:** report a changed source identity instead of a false destination collision when a Linux fallback rename refuses a substituted source. ([#898](https://github.com/openclaw/fs-safe/pull/898))
|
|
35
|
+
- **Native recursive removal:** honor a zero entry budget before ignoring a missing target, including with `force`. ([#904](https://github.com/openclaw/fs-safe/pull/904))
|
|
36
|
+
|
|
37
|
+
### Performance
|
|
38
|
+
|
|
39
|
+
- **Linux opened-file verification:** read ordinary procfs descriptor paths directly instead of walking realpath, keeping identity checks and deleted-path canonicalization; `readLocalFileSafely` is 25–28% faster on deep paths. ([#899](https://github.com/openclaw/fs-safe/pull/899))
|
|
40
|
+
- **Borrowed handles and locks:** keep descriptor metadata inspection off the asynchronous I/O queue for small overwrites (26–28% faster) and copies (31–34% faster), and skip a redundant parent `mkdir` when acquiring sidecar locks (15–18% faster). ([#901](https://github.com/openclaw/fs-safe/pull/901), [#902](https://github.com/openclaw/fs-safe/pull/902), [#906](https://github.com/openclaw/fs-safe/pull/906))
|
|
41
|
+
- **Deep archive extraction:** native extraction verifies every retained ancestor through its open descriptor instead of repeated realpath walks: about 16% faster at depth 8 and 5–6% at depth 4, with every ancestor substitution check retained. ([#912](https://github.com/openclaw/fs-safe/pull/912))
|
|
42
|
+
|
|
43
|
+
### Docs and Tooling
|
|
44
|
+
|
|
45
|
+
- **Docs accuracy:** correct native-mode migration guidance for removed Python settings and bundled TAR fallbacks, clarify Root streaming ownership, create-only visibility, and Linux no-clobber move fallback limits, and fix the JSON-store and stale-lock examples so denied process probes keep live locks; README and docs examples are now type-checked in CI. ([#897](https://github.com/openclaw/fs-safe/pull/897), [#900](https://github.com/openclaw/fs-safe/pull/900), [#903](https://github.com/openclaw/fs-safe/pull/903))
|
|
46
|
+
|
|
47
|
+
### Compatibility
|
|
48
|
+
|
|
49
|
+
- **Windows ARM64:** add a native ARM64 package with real Windows 11 ARM64 and x64-emulation validation, including private ACL creation and Worker descriptor ownership. ([#893](https://github.com/openclaw/fs-safe/pull/893))
|
|
50
|
+
|
|
51
|
+
- **Native ZIP metadata:** invalid UTF-8-flagged names now reject instead of decoding lossily or falling back to CP437. Public ZIP extraction, preflight, and reads already reject these names during physical admission. ([#885](https://github.com/openclaw/fs-safe/pull/885))
|
|
52
|
+
|
|
5
53
|
## 0.25.0 - 2026-10-08
|
|
6
54
|
|
|
7
55
|
### Highlights
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
Capability-style filesystem roots for Node.js apps that handle untrusted relative paths.
|
|
12
12
|
|
|
13
|
+
Platform-specific additions include [Linux write leases, Darwin ACL inspection,
|
|
14
|
+
and Windows test fixtures](docs/platform-capabilities.md).
|
|
15
|
+
|
|
13
16
|
Think Go's `os.Root` / `OpenInRoot` or Rust's [`cap-std`](https://github.com/bytecodealliance/cap-std), but for Node. Hand `root()` a trusted directory and you get back a handle whose every method resolves relative paths against it and defends against `..`, symlink swaps, hardlink aliases, and TOCTOU rename races. The exact containment strength is reported per mechanism: Linux `openat2` opens are kernel-atomic; guarded Linux fallback, macOS, Windows, and JavaScript paths are best-effort.
|
|
14
17
|
|
|
15
18
|
```ts
|
|
@@ -113,9 +116,14 @@ operation; per-call options handle exceptions. See the [Root reference](docs/roo
|
|
|
113
116
|
|
|
114
117
|
`write()` replaces contents by default. Use `create()` or `overwrite: false`
|
|
115
118
|
when an existing destination should be an error. `move()` defaults to no clobber
|
|
116
|
-
and requires native support
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
and requires native support. On Linux, `auto` can replace a concurrently created
|
|
120
|
+
empty directory if no-replace rename is unsupported; use native `require` for
|
|
121
|
+
strict refusal. See the [move fallback contract](docs/writing.md#fs-move-from-to-options).
|
|
122
|
+
Pass `overwrite: true` when replacement is intended.
|
|
123
|
+
|
|
124
|
+
Staged JavaScript copies and creates also work when hardlinks are refused
|
|
125
|
+
(including Android/Termux), using a verified empty placeholder before atomic
|
|
126
|
+
replacement. See the [visibility and concurrency tradeoffs](docs/writing.md#publication-without-hardlinks).
|
|
119
127
|
|
|
120
128
|
See [Writing](docs/writing.md) for copy sources, mutation authority, symlink
|
|
121
129
|
policy, writable handles, and bounded removal, and [Creation](docs/creation.md)
|
|
@@ -159,6 +167,8 @@ and error exports. Prefer focused subpaths when a consumer needs a narrower
|
|
|
159
167
|
contract. Low-level helpers that OpenClaw needs to compose higher-level APIs are grouped under
|
|
160
168
|
`@openclaw/fs-safe/advanced` instead of being separate public leaf contracts.
|
|
161
169
|
|
|
170
|
+
Use [`@openclaw/fs-safe/pipe`](docs/pipe.md) for native-owned, reopenable anonymous pipes and one-shot child input.
|
|
171
|
+
|
|
162
172
|
See the [complete subpath catalogue](docs/install.md#subpath-exports) for every entry point and its contents.
|
|
163
173
|
|
|
164
174
|
## Failure semantics in the name
|
|
@@ -236,7 +246,7 @@ updates:
|
|
|
236
246
|
import { fileStore } from "@openclaw/fs-safe/store";
|
|
237
247
|
|
|
238
248
|
const files = fileStore({ rootDir: "/safe/workspace/state", private: true });
|
|
239
|
-
const store = files.json("settings.json", { lock: true });
|
|
249
|
+
const store = files.json<{ enabled: boolean }>("settings.json", { lock: true });
|
|
240
250
|
|
|
241
251
|
await store.updateOr({ enabled: false }, (current) => ({ ...current, enabled: true }));
|
|
242
252
|
```
|
|
@@ -17,6 +17,7 @@ import { syncFileBestEffortSync } from "./file-sync.js";
|
|
|
17
17
|
import { finalizeArchivePublication } from "./archive-durability.js";
|
|
18
18
|
import { assertNoWindowsPathAlias } from "./windows-path-alias.js";
|
|
19
19
|
import { inspectFileIdentitySync } from "./strict-file-identity.js";
|
|
20
|
+
import { ArchiveSecurityError } from "./archive-errors.js";
|
|
20
21
|
export async function withStagedArchivePublication(params, extract) {
|
|
21
22
|
await withStagedArchiveDestination({
|
|
22
23
|
destinationRealDir: params.destinationGuard.realPath,
|
|
@@ -101,6 +102,23 @@ async function mergeTree(params, publication, durable = true, entryUmask = 0) {
|
|
|
101
102
|
assertDirectoryIdentityGuard(destinationGuard);
|
|
102
103
|
check();
|
|
103
104
|
for (const ancestor of ancestors) {
|
|
105
|
+
// Verify every retained ancestor, including its current name and physical path.
|
|
106
|
+
// Shallow chains cost less to verify directly than crossing the native bridge.
|
|
107
|
+
if (ancestors.length >= 4 && ancestor.owner.verifyCanonical) {
|
|
108
|
+
let verified;
|
|
109
|
+
try {
|
|
110
|
+
verified = await ancestor.owner.verifyCanonical();
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
if (error instanceof FsSafeError || isNotFoundPathError(error)) {
|
|
114
|
+
throw createArchiveSymlinkTraversalError(path.relative(destinationDir, ancestor.guard.dir));
|
|
115
|
+
}
|
|
116
|
+
throw error;
|
|
117
|
+
}
|
|
118
|
+
check();
|
|
119
|
+
if (verified)
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
104
122
|
assertDirectoryIdentityGuard(ancestor.guard);
|
|
105
123
|
check();
|
|
106
124
|
await ancestor.owner.verify(check);
|
|
@@ -156,15 +174,22 @@ async function mergeTree(params, publication, durable = true, entryUmask = 0) {
|
|
|
156
174
|
await ownExtractionDestinationMutation(params.deadline, async () => {
|
|
157
175
|
await assertGuards();
|
|
158
176
|
assertSourceFrontier();
|
|
159
|
-
const
|
|
177
|
+
const guard = await createDirectoryIdentityGuard(destinationPath).catch((error) => {
|
|
178
|
+
if (error instanceof ArchiveSecurityError && error.code === "destination-symlink") {
|
|
179
|
+
throw createArchiveSymlinkTraversalError(originalPath);
|
|
180
|
+
}
|
|
181
|
+
throw error;
|
|
182
|
+
});
|
|
183
|
+
check();
|
|
184
|
+
const owner = await pinNodeDirectoryForMode(destinationPath, {
|
|
185
|
+
expectedIdentity: guard.stat, canonicalPath: guard.realPath,
|
|
186
|
+
}).catch((error) => {
|
|
160
187
|
if (error instanceof FsSafeError && (error.code === "not-file" || error.code === "path-mismatch")) {
|
|
161
188
|
throw createArchiveSymlinkTraversalError(originalPath);
|
|
162
189
|
}
|
|
163
190
|
throw error;
|
|
164
191
|
});
|
|
165
192
|
try {
|
|
166
|
-
check();
|
|
167
|
-
const guard = await createDirectoryIdentityGuard(destinationPath);
|
|
168
193
|
check();
|
|
169
194
|
await owner.verify(check);
|
|
170
195
|
ancestors.push({ guard, owner });
|
|
Binary file
|
|
@@ -17,7 +17,7 @@ import { FsSafeError } from "./errors.js";
|
|
|
17
17
|
import { inspectFileIdentity } from "./strict-file-identity.js";
|
|
18
18
|
import { resolveReadOpenFlags } from "./read-open-flags.js";
|
|
19
19
|
import { realpathSync } from "./realpath.js";
|
|
20
|
-
import { getNativeBinding } from "./native.js";
|
|
20
|
+
import { assertNativeCapabilities, getNativeBinding } from "./native.js";
|
|
21
21
|
import { admitZipBuffer } from "./archive-zip-admission.js";
|
|
22
22
|
import { validateNativeZipManifest } from "./archive-zip-manifest.js";
|
|
23
23
|
import { resolveExtractLimits, resolveTarMeterLimits } from "./archive-limits.js";
|
|
@@ -199,9 +199,15 @@ async function readNativeBufferEntry(native, buffer, kind, requested, displayPat
|
|
|
199
199
|
try {
|
|
200
200
|
const signal = new AbortController().signal;
|
|
201
201
|
const limits = resolveTarMeterLimits();
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
let reader;
|
|
203
|
+
if (kind === "zip") {
|
|
204
|
+
assertNativeCapabilities(native, "openZipBufferNative");
|
|
205
|
+
reader = await native.openZipBufferNative(buffer, limits, AbortSignal.any([signal]));
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
assertNativeCapabilities(native, "openTarBufferNative");
|
|
209
|
+
reader = await native.openTarBufferNative(buffer, kind, limits, AbortSignal.any([signal]));
|
|
210
|
+
}
|
|
205
211
|
const manifest = reader.entries;
|
|
206
212
|
if (kind === "zip")
|
|
207
213
|
validateNativeZipManifest(manifest, zipEntries);
|
|
@@ -227,7 +233,7 @@ export async function readArchiveEntry(archivePath, entryPath, options) {
|
|
|
227
233
|
const zipEntries = [];
|
|
228
234
|
if (kind === "zip")
|
|
229
235
|
admitZipBuffer(buffer, resolveExtractLimits(), entry => { zipEntries.push(entry); });
|
|
230
|
-
const native = getNativeBinding();
|
|
236
|
+
const native = getNativeBinding(kind === "zip" ? "openZipBufferNative" : "openTarBufferNative");
|
|
231
237
|
if (native)
|
|
232
238
|
return await readNativeBufferEntry(native, buffer, kind, requestedEntry, entryPath, maxBytes, zipEntries);
|
|
233
239
|
return kind === "zip" ? await readZipEntry(buffer, requestedEntry, maxBytes, zipEntries)
|
|
@@ -118,11 +118,13 @@ export async function loadAdmittedZipArchive(buffer, admitted) {
|
|
|
118
118
|
const entries = new Map();
|
|
119
119
|
for (const [name, entry, physical] of normalized) {
|
|
120
120
|
const appendSlash = physical.kind === "directory" && !name.endsWith("/");
|
|
121
|
-
|
|
121
|
+
// JSZip reduces a relative root marker such as "./" to an empty name.
|
|
122
|
+
// Keep its directory spelling relative when restoring the terminal slash.
|
|
123
|
+
const normalizedName = appendSlash ? `${name || "."}/` : name;
|
|
122
124
|
if (Object.hasOwn(files, normalizedName))
|
|
123
125
|
collision();
|
|
124
126
|
if (appendSlash) {
|
|
125
|
-
entry.name = `${entry.name}/`;
|
|
127
|
+
entry.name = `${entry.name || "."}/`;
|
|
126
128
|
}
|
|
127
129
|
files[normalizedName] = entry;
|
|
128
130
|
entries.set(physical.portableKey, createAdmittedZipEntry(entry, normalizedName, physical));
|
|
@@ -154,7 +154,7 @@ export async function extractArchive(params) {
|
|
|
154
154
|
const label = kind === "zip" ? "extract zip" : "extract tar";
|
|
155
155
|
const limits = resolveExtractLimits(params.limits);
|
|
156
156
|
const tarLimits = resolveTarMeterLimits(limits);
|
|
157
|
-
const native = getNativeBinding();
|
|
157
|
+
const native = getNativeBinding("inspectArchiveNative", "extractArchiveNative");
|
|
158
158
|
assertNoWindowsPathAlias(archivePath, "filesystem", "archive source uses a Windows filesystem namespace alias");
|
|
159
159
|
assertNoWindowsPathAlias(destDir, "filesystem", "archive destination uses a Windows filesystem namespace alias");
|
|
160
160
|
// Read the declared public fields before private adapters copy options: class
|
|
@@ -282,7 +282,7 @@ export async function inspectTarArchive(params) {
|
|
|
282
282
|
const onFiltered = resolveArchiveFilteredEntryPolicy(params.onFiltered);
|
|
283
283
|
const limits = resolveExtractLimits(params.limits);
|
|
284
284
|
const tarLimits = resolveTarMeterLimits(limits);
|
|
285
|
-
const native = getNativeBinding();
|
|
285
|
+
const native = getNativeBinding("inspectArchiveNative");
|
|
286
286
|
assertNoWindowsPathAlias(archivePath, "filesystem", "archive source uses a Windows filesystem namespace alias");
|
|
287
287
|
return await withExtractionDeadline(params.timeoutMs, "inspect tar", async (deadline) => {
|
|
288
288
|
const staged = await stageArchiveFileForExtraction({ archivePath, limits, deadline });
|
|
@@ -6,7 +6,7 @@ import { getNativeBinding, requireNativeBinding } from "./native.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export async function readCloneFileMetadata(files) {
|
|
8
8
|
const paths = files.map(assertAbsolutePathInput);
|
|
9
|
-
const native = process.platform === "darwin" ? requireNativeBinding() : getNativeBinding();
|
|
9
|
+
const native = process.platform === "darwin" ? requireNativeBinding("readCloneFileMetadata") : getNativeBinding("readCloneFileMetadata");
|
|
10
10
|
if (!native)
|
|
11
11
|
return paths.map(() => undefined);
|
|
12
12
|
const results = await native.readCloneFileMetadata(paths);
|
|
@@ -3,12 +3,14 @@ import type { FileHandle } from "node:fs/promises";
|
|
|
3
3
|
import { type CopyCloneMode } from "./copy-policy.js";
|
|
4
4
|
import { type NativeBinding } from "./native.js";
|
|
5
5
|
import { type NativeFileCopyResult } from "./native-binding.js";
|
|
6
|
+
import type { CopyMetadata } from "./copy-metadata.js";
|
|
6
7
|
export type CopyFileInput = {
|
|
7
8
|
kind: "file";
|
|
8
9
|
handle: FileHandle;
|
|
9
10
|
size: number;
|
|
10
11
|
clone: CopyCloneMode;
|
|
11
12
|
signal?: AbortSignal;
|
|
13
|
+
metadata?: CopyMetadata;
|
|
12
14
|
verifySource(): Promise<void>;
|
|
13
15
|
};
|
|
14
16
|
export declare function resolveFileCopyCloneMode(mode?: CopyCloneMode): CopyCloneMode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs, {} from "node:fs";
|
|
2
2
|
import { resolveCopyCloneMode } from "./copy-policy.js";
|
|
3
3
|
import { FsSafeError } from "./errors.js";
|
|
4
|
-
import { getNativeBinding } from "./native.js";
|
|
4
|
+
import { getNativeBinding, selectNativeBinding } from "./native.js";
|
|
5
5
|
import { captureNativeFdClose } from "./native-binding.js";
|
|
6
6
|
import { inspectFileIdentity } from "./strict-file-identity.js";
|
|
7
7
|
import { transferFileHandle } from "./file-handle-transfer.js";
|
|
@@ -29,7 +29,8 @@ export async function writeCopyFileToFd(fd, input, maxBytes, assertBeforeMutatio
|
|
|
29
29
|
}
|
|
30
30
|
export async function createNativeCopyFile(native, input, parentFd, basename, maxBytes) {
|
|
31
31
|
input.signal?.throwIfAborted();
|
|
32
|
-
|
|
32
|
+
const copier = selectNativeBinding(native, "copyFileExclusive");
|
|
33
|
+
if (!copier) {
|
|
33
34
|
if (input.clone === "always") {
|
|
34
35
|
throw new FsSafeError("helper-unavailable", "native file cloning is unavailable");
|
|
35
36
|
}
|
|
@@ -39,7 +40,7 @@ export async function createNativeCopyFile(native, input, parentFd, basename, ma
|
|
|
39
40
|
const nativeSignal = input.signal ? AbortSignal.any([input.signal]) : undefined;
|
|
40
41
|
try {
|
|
41
42
|
// The caller adopts this descriptor before observing a later cancellation.
|
|
42
|
-
return await
|
|
43
|
+
return await copier.copyFileExclusive(input.handle.fd, parentFd, basename, input.clone, maxBytes !== undefined && Number.isFinite(maxBytes) ? maxBytes : undefined, nativeSignal);
|
|
43
44
|
}
|
|
44
45
|
catch (error) {
|
|
45
46
|
const code = error?.code;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type BigIntStats } from "node:fs";
|
|
2
|
+
import { type AnyAsyncDirectoryGuard } from "./directory-guard.js";
|
|
3
|
+
import type { NativeBinding } from "./native-binding.js";
|
|
4
|
+
import type { PinnedWriteParams } from "./pinned-write-types.js";
|
|
5
|
+
export type CopyLinkInput = {
|
|
6
|
+
kind: "link";
|
|
7
|
+
stageBeforePublish: true;
|
|
8
|
+
sourcePath: string;
|
|
9
|
+
identity: BigIntStats;
|
|
10
|
+
target?: Buffer;
|
|
11
|
+
preserveMetadata: boolean;
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
verifySource(): Promise<void>;
|
|
14
|
+
};
|
|
15
|
+
/** Shared by tree byte copying and per-file copying; never resolves the target. */
|
|
16
|
+
export declare function readCopyLinkTarget(source: string): Promise<Buffer>;
|
|
17
|
+
export declare function assertCopyLinkAvailable(): void;
|
|
18
|
+
export declare function admitCopyLink(sourcePath: string, preserveMetadata: boolean, signal?: AbortSignal): Promise<CopyLinkInput | undefined>;
|
|
19
|
+
/** The caller has admitted the destination parent under Root's mutation policy. */
|
|
20
|
+
export declare function copyLinkAtParent(params: PinnedWriteParams, input: CopyLinkInput, parent: AnyAsyncDirectoryGuard, native?: {
|
|
21
|
+
binding: NativeBinding;
|
|
22
|
+
fd: number;
|
|
23
|
+
}): Promise<{
|
|
24
|
+
dev: bigint;
|
|
25
|
+
ino: bigint;
|
|
26
|
+
}>;
|