@skaile/workspaces 4.9.4 → 4.11.0
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/CHANGELOG.md +12 -0
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-WHWQJOAQ.js → asset-feeds-3TOP4ZKE.js} +7 -7
- package/dist/{asset-feeds-WHWQJOAQ.js.map → asset-feeds-3TOP4ZKE.js.map} +1 -1
- package/dist/asset-manager/catalog-deployer.js +3 -3
- package/dist/asset-manager/index.js +6 -6
- package/dist/asset-manager/installer.js +4 -4
- package/dist/bridge/drivers/claude-sdk.js +7 -7
- package/dist/bridge/drivers/codex.js +5 -5
- package/dist/bridge/drivers/continue.js +6 -6
- package/dist/bridge/drivers/echo.js +3 -3
- package/dist/bridge/drivers/gemini.js +4 -4
- package/dist/bridge/drivers/goose.js +6 -6
- package/dist/bridge/drivers/omp.js +1 -1
- package/dist/bridge/drivers/opencode.js +6 -6
- package/dist/bridge/drivers/qwen.js +4 -4
- package/dist/bridge/index.js +8 -8
- package/dist/{chunk-FUCYTGAE.js → chunk-35G4M33T.js} +10 -4
- package/dist/chunk-35G4M33T.js.map +1 -0
- package/dist/{chunk-3GKBSHUG.js → chunk-35PMOWAD.js} +3 -3
- package/dist/{chunk-3GKBSHUG.js.map → chunk-35PMOWAD.js.map} +1 -1
- package/dist/{chunk-LDQB5VEC.js → chunk-3T5DRUNZ.js} +2 -2
- package/dist/{chunk-LDQB5VEC.js.map → chunk-3T5DRUNZ.js.map} +1 -1
- package/dist/{chunk-WPW5XS6I.js → chunk-3YTFHHMI.js} +2 -2
- package/dist/{chunk-WPW5XS6I.js.map → chunk-3YTFHHMI.js.map} +1 -1
- package/dist/{chunk-FTSXFA7P.js → chunk-6XKQEDF7.js} +5 -5
- package/dist/{chunk-FTSXFA7P.js.map → chunk-6XKQEDF7.js.map} +1 -1
- package/dist/{chunk-TXXPJ5CQ.js → chunk-7SNYWCQS.js} +2 -2
- package/dist/{chunk-TXXPJ5CQ.js.map → chunk-7SNYWCQS.js.map} +1 -1
- package/dist/{chunk-2LT4CWA5.js → chunk-7ZJXFQ42.js} +3 -3
- package/dist/{chunk-2LT4CWA5.js.map → chunk-7ZJXFQ42.js.map} +1 -1
- package/dist/{chunk-7LHSC2DS.js → chunk-A3X4LDOD.js} +4 -4
- package/dist/{chunk-7LHSC2DS.js.map → chunk-A3X4LDOD.js.map} +1 -1
- package/dist/{chunk-PROIKXJR.js → chunk-AT2TJEWG.js} +6 -6
- package/dist/{chunk-PROIKXJR.js.map → chunk-AT2TJEWG.js.map} +1 -1
- package/dist/{chunk-YCIW4YOT.js → chunk-BXV6RLF4.js} +3 -3
- package/dist/{chunk-YCIW4YOT.js.map → chunk-BXV6RLF4.js.map} +1 -1
- package/dist/{chunk-AF3ETSXF.js → chunk-CJXSTOGW.js} +4 -4
- package/dist/{chunk-AF3ETSXF.js.map → chunk-CJXSTOGW.js.map} +1 -1
- package/dist/{chunk-R5NALZHK.js → chunk-DMUY5C3X.js} +7 -7
- package/dist/{chunk-R5NALZHK.js.map → chunk-DMUY5C3X.js.map} +1 -1
- package/dist/{chunk-YMHRKIMQ.js → chunk-GUZNTYHE.js} +4 -4
- package/dist/{chunk-YMHRKIMQ.js.map → chunk-GUZNTYHE.js.map} +1 -1
- package/dist/{chunk-HRVXHRL4.js → chunk-GXACG5ZE.js} +132 -69
- package/dist/chunk-GXACG5ZE.js.map +1 -0
- package/dist/{chunk-P2G6XSJ3.js → chunk-HO4UO25I.js} +4 -2
- package/dist/chunk-HO4UO25I.js.map +1 -0
- package/dist/{chunk-KQTMJP3X.js → chunk-IECQMSQ5.js} +3 -3
- package/dist/{chunk-KQTMJP3X.js.map → chunk-IECQMSQ5.js.map} +1 -1
- package/dist/{chunk-XEWX4V7T.js → chunk-IGGHUTOW.js} +5 -5
- package/dist/{chunk-XEWX4V7T.js.map → chunk-IGGHUTOW.js.map} +1 -1
- package/dist/{chunk-GFU367UH.js → chunk-JECDED7B.js} +4 -4
- package/dist/{chunk-GFU367UH.js.map → chunk-JECDED7B.js.map} +1 -1
- package/dist/{chunk-OIXSGSKM.js → chunk-JM2LRJ46.js} +3 -3
- package/dist/{chunk-OIXSGSKM.js.map → chunk-JM2LRJ46.js.map} +1 -1
- package/dist/{chunk-US3NCUQF.js → chunk-KJM7Y2FW.js} +5 -5
- package/dist/{chunk-US3NCUQF.js.map → chunk-KJM7Y2FW.js.map} +1 -1
- package/dist/{chunk-SPAG2BWG.js → chunk-L3PZINDD.js} +7 -7
- package/dist/{chunk-SPAG2BWG.js.map → chunk-L3PZINDD.js.map} +1 -1
- package/dist/{chunk-JUZJUKWM.js → chunk-MMLXSVQ3.js} +3 -3
- package/dist/{chunk-JUZJUKWM.js.map → chunk-MMLXSVQ3.js.map} +1 -1
- package/dist/{chunk-R4OMDCGZ.js → chunk-NQ3OMJFK.js} +3 -3
- package/dist/{chunk-R4OMDCGZ.js.map → chunk-NQ3OMJFK.js.map} +1 -1
- package/dist/{chunk-AOE4KOMJ.js → chunk-O3DHAGBO.js} +3 -3
- package/dist/{chunk-AOE4KOMJ.js.map → chunk-O3DHAGBO.js.map} +1 -1
- package/dist/{chunk-QAH24E5U.js → chunk-O64WU6WS.js} +4 -4
- package/dist/{chunk-QAH24E5U.js.map → chunk-O64WU6WS.js.map} +1 -1
- package/dist/{chunk-7F4FGEMI.js → chunk-PBCNRS7Q.js} +5 -5
- package/dist/{chunk-7F4FGEMI.js.map → chunk-PBCNRS7Q.js.map} +1 -1
- package/dist/{chunk-5HZWDH3L.js → chunk-S2MT6SDZ.js} +295 -38
- package/dist/chunk-S2MT6SDZ.js.map +1 -0
- package/dist/{chunk-3BDWW7OE.js → chunk-SIGVAFRJ.js} +9 -9
- package/dist/{chunk-3BDWW7OE.js.map → chunk-SIGVAFRJ.js.map} +1 -1
- package/dist/{chunk-F4PCBWPB.js → chunk-UXUDNBJM.js} +3 -3
- package/dist/{chunk-F4PCBWPB.js.map → chunk-UXUDNBJM.js.map} +1 -1
- package/dist/{chunk-ZVYWMD6Q.js → chunk-VLXODO37.js} +4 -4
- package/dist/{chunk-ZVYWMD6Q.js.map → chunk-VLXODO37.js.map} +1 -1
- package/dist/{chunk-UM4LDXV5.js → chunk-WILO77HE.js} +3 -3
- package/dist/{chunk-UM4LDXV5.js.map → chunk-WILO77HE.js.map} +1 -1
- package/dist/{chunk-S4RYZDBB.js → chunk-WXB6YEHZ.js} +3 -3
- package/dist/{chunk-S4RYZDBB.js.map → chunk-WXB6YEHZ.js.map} +1 -1
- package/dist/{chunk-SDNGG6FB.js → chunk-YZSMZK37.js} +3 -3
- package/dist/{chunk-SDNGG6FB.js.map → chunk-YZSMZK37.js.map} +1 -1
- package/dist/cli/index.js +53 -53
- package/dist/connectors/config.js +4 -4
- package/dist/connectors/index.js +12 -12
- package/dist/connectors/src/connector-manager.d.ts +21 -1
- package/dist/connectors/src/connector-manager.d.ts.map +1 -1
- package/dist/connectors/src/fleet-utils.d.ts +38 -0
- package/dist/connectors/src/fleet-utils.d.ts.map +1 -1
- package/dist/connectors/src/index.d.ts +2 -2
- package/dist/connectors/src/index.d.ts.map +1 -1
- package/dist/{connectors-2OHRZDJZ.js → connectors-T57XL7EA.js} +3 -3
- package/dist/{connectors-2OHRZDJZ.js.map → connectors-T57XL7EA.js.map} +1 -1
- package/dist/connectors-shared/index.js +2 -2
- package/dist/core/index.js +3 -3
- package/dist/core/runtime-assets.js +2 -2
- package/dist/core/src/index.d.ts +1 -1
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +50 -0
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/workspace-config.js +1 -1
- package/dist/deploy/index.js +3 -3
- package/dist/{ensure-sources-QOQSDYIW.js → ensure-sources-2OC2X3ZM.js} +9 -9
- package/dist/{ensure-sources-QOQSDYIW.js.map → ensure-sources-2OC2X3ZM.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +12 -12
- package/dist/factory-assets/connectors/deploy.js +12 -12
- package/dist/factory-assets/connectors/devserver.js +12 -12
- package/dist/factory-assets/connectors/flow/adapter.js +12 -12
- package/dist/factory-assets/connectors/flow/engine.js +4 -4
- package/dist/factory-assets/connectors/flow/run-flow.js +13 -13
- package/dist/factory-assets/connectors/flow.js +12 -12
- package/dist/factory-assets/connectors/git.js +12 -12
- package/dist/factory-assets/connectors/gmail.js +12 -12
- package/dist/factory-assets/connectors/googledrive.js +12 -12
- package/dist/factory-assets/connectors/local.js +12 -12
- package/dist/factory-assets/connectors/mattermost.js +12 -12
- package/dist/factory-assets/connectors/memory.js +12 -12
- package/dist/factory-assets/connectors/minio.js +12 -12
- package/dist/factory-assets/connectors/postgres.js +12 -12
- package/dist/factory-assets/connectors/s3.js +12 -12
- package/dist/factory-assets/connectors/sharepoint.js +12 -12
- package/dist/factory-assets/connectors/sqlite.js +12 -12
- package/dist/factory-assets/connectors/static-server.js +12 -12
- package/dist/factory-assets/connectors/tunnel.js +12 -12
- package/dist/factory-assets/connectors/webdav.js +12 -12
- package/dist/factory-assets/connectors/xstate-store.js +12 -12
- package/dist/factory-assets/connectors/xstate.js +12 -12
- package/dist/{flows-SYYQDDCT.js → flows-H6FL4NZU.js} +6 -6
- package/dist/{flows-SYYQDDCT.js.map → flows-H6FL4NZU.js.map} +1 -1
- package/dist/{helpers-HGDWKXLE.js → helpers-RPJUSSG3.js} +9 -9
- package/dist/{helpers-HGDWKXLE.js.map → helpers-RPJUSSG3.js.map} +1 -1
- package/dist/library/index.js +4 -4
- package/dist/library/install.js +3 -3
- package/dist/{library-publish-6QYWX635.js → library-publish-AAD6GTIF.js} +13 -13
- package/dist/{library-publish-6QYWX635.js.map → library-publish-AAD6GTIF.js.map} +1 -1
- package/dist/{open-library-R74XCRPC.js → open-library-HDOM4MLS.js} +11 -11
- package/dist/{open-library-R74XCRPC.js.map → open-library-HDOM4MLS.js.map} +1 -1
- package/dist/{paths-NHONUGUU.js → paths-RL6NZW5X.js} +6 -6
- package/dist/{paths-NHONUGUU.js.map → paths-RL6NZW5X.js.map} +1 -1
- package/dist/{plugin-store-4RALGK5S.js → plugin-store-ZTAJCMTY.js} +5 -5
- package/dist/{plugin-store-4RALGK5S.js.map → plugin-store-ZTAJCMTY.js.map} +1 -1
- package/dist/{project-OFUZ5D3S.js → project-2B52FKAY.js} +10 -10
- package/dist/{project-OFUZ5D3S.js.map → project-2B52FKAY.js.map} +1 -1
- package/dist/resolver/index.js +3 -3
- package/dist/runner/index.js +18 -18
- package/dist/runner/src/assistant-home.d.ts +86 -0
- package/dist/runner/src/assistant-home.d.ts.map +1 -0
- package/dist/runner/src/session-builder.d.ts +1 -1
- package/dist/runner/src/session-builder.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +6 -6
- package/dist/sdk/bridge.js +8 -8
- package/dist/sdk/core.js +3 -3
- package/dist/sdk/flow.js +4 -4
- package/dist/sdk/index.js +18 -18
- package/dist/sdk/resolver.js +3 -3
- package/dist/sdk/runner.js +18 -18
- package/dist/sdk/session.js +2 -2
- package/dist/sdk/types.js +1 -1
- package/dist/session/index.js +2 -2
- package/dist/{setup-OYXGVHBF.js → setup-MVBITSVT.js} +15 -15
- package/dist/{setup-OYXGVHBF.js.map → setup-MVBITSVT.js.map} +1 -1
- package/dist/{skills-VUPPILR5.js → skills-Y6MU2NRI.js} +5 -5
- package/dist/{skills-VUPPILR5.js.map → skills-Y6MU2NRI.js.map} +1 -1
- package/dist/{source-MEQTWW3S.js → source-53PY7DXF.js} +12 -12
- package/dist/{source-MEQTWW3S.js.map → source-53PY7DXF.js.map} +1 -1
- package/dist/{source-manifest-publish-EPPOGSLD.js → source-manifest-publish-ALRZKEBO.js} +14 -14
- package/dist/{source-manifest-publish-EPPOGSLD.js.map → source-manifest-publish-ALRZKEBO.js.map} +1 -1
- package/dist/tui/index.js +18 -18
- package/dist/types/index.js +1 -1
- package/dist/types/src/events.d.ts +2 -2
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +6 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +7 -7
- package/dist/workspace-plugin/adapters/omp.js +14 -14
- package/dist/workspace-plugin/index.js +1 -1
- package/dist/workspace-plugin/src/tools/connectors.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-5HZWDH3L.js.map +0 -1
- package/dist/chunk-FUCYTGAE.js.map +0 -1
- package/dist/chunk-HRVXHRL4.js.map +0 -1
- package/dist/chunk-P2G6XSJ3.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { declaredConnectErrorKind, ClassifiedConnectError, withConnectErrorKind } from './chunk-
|
|
2
|
-
import { OAuthRequiredError, ConnectorFieldMissingError, LegacyAuthGrammarError, resolveAuthRef, readUnavailableMarker, ConnectorStartupError } from './chunk-
|
|
3
|
-
import { EventNormalizer } from './chunk-
|
|
4
|
-
import { resolveModelTier } from './chunk-
|
|
5
|
-
import { createDriver } from './chunk-
|
|
1
|
+
import { declaredConnectErrorKind, ClassifiedConnectError, withConnectErrorKind } from './chunk-YZSMZK37.js';
|
|
2
|
+
import { OAuthRequiredError, ConnectorFieldMissingError, LegacyAuthGrammarError, resolveAuthRef, readUnavailableMarker, ConnectorStartupError } from './chunk-MMLXSVQ3.js';
|
|
3
|
+
import { EventNormalizer } from './chunk-VLXODO37.js';
|
|
4
|
+
import { resolveModelTier } from './chunk-BXV6RLF4.js';
|
|
5
|
+
import { createDriver } from './chunk-3T5DRUNZ.js';
|
|
6
6
|
import { pluginRegistry } from './chunk-6E6PKKAD.js';
|
|
7
7
|
import { computeStimulus } from './chunk-IFGTRL2I.js';
|
|
8
|
-
import { interpolateNodeInstruction, resolveNodeBindings, getConsumedOutputSchema, validateConsumedNodeOutput, appendAttempt, resolveTerminalFailureStatus, remainingActiveExecutionMs, deriveCheckEvidence, computeFlowStateFromSnapshots, availableRouterFrontier, evaluateRouterSelection, routerSelectionOutput, planRouterSkips, unsettledRouterBranchIds, countFailedAttempts, hasAutomaticRetryBudget, persistedRouterSelection } from './chunk-
|
|
8
|
+
import { interpolateNodeInstruction, resolveNodeBindings, getConsumedOutputSchema, validateConsumedNodeOutput, appendAttempt, resolveTerminalFailureStatus, remainingActiveExecutionMs, deriveCheckEvidence, computeFlowStateFromSnapshots, availableRouterFrontier, evaluateRouterSelection, routerSelectionOutput, planRouterSkips, unsettledRouterBranchIds, countFailedAttempts, hasAutomaticRetryBudget, persistedRouterSelection } from './chunk-O3DHAGBO.js';
|
|
9
9
|
import { INPUT_SCHEMA_SHAPES_HINT, coerceInputSchema } from './chunk-KLMXMW6Z.js';
|
|
10
10
|
import { classifierDecision, withoutReservedClassifierFields, parseFlowDefinition } from './chunk-REYJKU7T.js';
|
|
11
11
|
import { describeStimulus, buildOrchestratorPrompt, renderSubpromptPrompt, renderStimulusPrompt } from './chunk-2D5BYAL6.js';
|
|
12
12
|
import { deterministicNodeKindLabel, nodeInstruction, flowDefaults, isAgentNode, isGateNode, isCheckNode, nodeRequiresApproval, isSubFlowNode, isFunctionNode, isSubpromptNode, isRouterNode, isActiveRuntimeNode, nodeIsOptional, nodeLabel, nodeAssets } from './chunk-ELPR5XBG.js';
|
|
13
|
-
import { withActivityLabelDefs } from './chunk-
|
|
13
|
+
import { withActivityLabelDefs } from './chunk-O64WU6WS.js';
|
|
14
14
|
import { processAlive } from './chunk-4GY63JU6.js';
|
|
15
15
|
import { withFsDeadline, tryWithFsDeadline, FsDeadlineError, fsDeadlineMs } from './chunk-MKZOK4JU.js';
|
|
16
16
|
import { portableSpawn } from './chunk-KSIRR5PL.js';
|
|
17
17
|
import { createLogger } from './chunk-W4IPN3DD.js';
|
|
18
18
|
import { resolve, relative, sep, isAbsolute, join, dirname } from 'path';
|
|
19
|
-
import { mkdir, rename, writeFile, readFile, stat, cp,
|
|
19
|
+
import { mkdir, rename, writeFile, readFile, stat, cp, chmod, rm, readdir, realpath } from 'fs/promises';
|
|
20
20
|
import * as z4 from 'zod';
|
|
21
21
|
import { execFile } from 'child_process';
|
|
22
22
|
import { promisify } from 'util';
|
|
@@ -6579,6 +6579,92 @@ function ensureBuiltinsRegistered() {
|
|
|
6579
6579
|
registerBuiltinConnectors();
|
|
6580
6580
|
}
|
|
6581
6581
|
}
|
|
6582
|
+
var MOUNTINFO_PATH = "/proc/self/mountinfo";
|
|
6583
|
+
function testMountinfoOverride() {
|
|
6584
|
+
return process.env.VITEST ? process.env.SKAILE_FLEET_MOUNTINFO_PATH : void 0;
|
|
6585
|
+
}
|
|
6586
|
+
function isFleetManaged(connectorId) {
|
|
6587
|
+
const raw = process.env.SKAILE_FLEET_MANAGED_MOUNTS ?? "";
|
|
6588
|
+
if (raw.length === 0) return false;
|
|
6589
|
+
return raw.split(",").map((segment) => segment.trim()).filter((segment) => segment.length > 0).includes(connectorId);
|
|
6590
|
+
}
|
|
6591
|
+
function decodeMountinfoPath(field) {
|
|
6592
|
+
return field.replace(
|
|
6593
|
+
/\\(\d{3})/g,
|
|
6594
|
+
(_, octal) => String.fromCharCode(Number.parseInt(octal, 8))
|
|
6595
|
+
);
|
|
6596
|
+
}
|
|
6597
|
+
async function isMountpoint(dir, mountinfoPath) {
|
|
6598
|
+
let table;
|
|
6599
|
+
try {
|
|
6600
|
+
table = await readFile(mountinfoPath, "utf8");
|
|
6601
|
+
} catch {
|
|
6602
|
+
return null;
|
|
6603
|
+
}
|
|
6604
|
+
const target = await realpath(dir);
|
|
6605
|
+
for (const line of table.split("\n")) {
|
|
6606
|
+
const mountPoint = line.split(" ")[4];
|
|
6607
|
+
if (mountPoint !== void 0 && decodeMountinfoPath(mountPoint) === target) return true;
|
|
6608
|
+
}
|
|
6609
|
+
return false;
|
|
6610
|
+
}
|
|
6611
|
+
async function probeFleetMount(dir, mountinfoPath, { list }) {
|
|
6612
|
+
const st = await stat(dir);
|
|
6613
|
+
if (!st.isDirectory()) {
|
|
6614
|
+
throw new Error(`fleet mountpoint ${dir} is not a directory`);
|
|
6615
|
+
}
|
|
6616
|
+
if (list) await readdir(dir);
|
|
6617
|
+
if (await isMountpoint(dir, mountinfoPath) === false) {
|
|
6618
|
+
throw new Error(
|
|
6619
|
+
`fleet mountpoint ${dir} is a plain directory, not a mount \u2014 the host bind is absent or landed on a different path`
|
|
6620
|
+
);
|
|
6621
|
+
}
|
|
6622
|
+
}
|
|
6623
|
+
async function ensureFleetMounted(dir, log, options) {
|
|
6624
|
+
const timeoutMs = options?.timeoutMs ?? 3e3;
|
|
6625
|
+
const pollIntervalMs = options?.pollIntervalMs ?? 100;
|
|
6626
|
+
const mountinfoPath = options?.mountinfoPath ?? testMountinfoOverride() ?? MOUNTINFO_PATH;
|
|
6627
|
+
const deadline = Date.now() + timeoutMs;
|
|
6628
|
+
let lastErr = null;
|
|
6629
|
+
while (Date.now() < deadline) {
|
|
6630
|
+
try {
|
|
6631
|
+
await probeFleetMount(dir, mountinfoPath, { list: true });
|
|
6632
|
+
log.info("fleet bind mount verified", { dir });
|
|
6633
|
+
return;
|
|
6634
|
+
} catch (err) {
|
|
6635
|
+
lastErr = err;
|
|
6636
|
+
await new Promise((resolve7) => setTimeout(resolve7, pollIntervalMs));
|
|
6637
|
+
}
|
|
6638
|
+
}
|
|
6639
|
+
throw new Error(
|
|
6640
|
+
`fleet mount ${dir} not ready after ${timeoutMs}ms \u2014 check SKAILE_FLEET_MANAGED_MOUNTS env var and host bind: ${lastErr instanceof Error ? lastErr.message : String(lastErr)}`
|
|
6641
|
+
);
|
|
6642
|
+
}
|
|
6643
|
+
var LIVENESS_TIMEOUT_MS = 2e3;
|
|
6644
|
+
async function checkFleetMountLiveness(dir, options) {
|
|
6645
|
+
const timeoutMs = options?.timeoutMs ?? fsDeadlineMs(LIVENESS_TIMEOUT_MS);
|
|
6646
|
+
const mountinfoPath = options?.mountinfoPath ?? testMountinfoOverride() ?? MOUNTINFO_PATH;
|
|
6647
|
+
try {
|
|
6648
|
+
await withFsDeadline(
|
|
6649
|
+
`fleet liveness ${dir}`,
|
|
6650
|
+
() => probeFleetMount(dir, mountinfoPath, { list: false }),
|
|
6651
|
+
timeoutMs
|
|
6652
|
+
);
|
|
6653
|
+
return { state: "live" };
|
|
6654
|
+
} catch (err) {
|
|
6655
|
+
if (err instanceof FsDeadlineError) {
|
|
6656
|
+
return {
|
|
6657
|
+
state: "unresponsive",
|
|
6658
|
+
reason: `host mount at ${dir} did not answer within ${timeoutMs}ms; it may be slow or wedged, so its status is unverified`
|
|
6659
|
+
};
|
|
6660
|
+
}
|
|
6661
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
6662
|
+
return {
|
|
6663
|
+
state: "dead",
|
|
6664
|
+
reason: `host mount at ${dir} is gone (${detail}); the session needs a restart to re-attach it`
|
|
6665
|
+
};
|
|
6666
|
+
}
|
|
6667
|
+
}
|
|
6582
6668
|
|
|
6583
6669
|
// connectors/src/connector-manager.ts
|
|
6584
6670
|
var KNOWN_PREFIXES = ["env:", "forge:", "op:", "kp:", "oauth:"];
|
|
@@ -7387,8 +7473,42 @@ var ConnectorManager = class {
|
|
|
7387
7473
|
if (!entry.connector.filesystem) {
|
|
7388
7474
|
throw new Error(`Connector "${id}" has no filesystem face`);
|
|
7389
7475
|
}
|
|
7476
|
+
await this.assertMountNotDead(id);
|
|
7390
7477
|
return entry.connector.filesystem.sync(entry.handle, options);
|
|
7391
7478
|
}
|
|
7479
|
+
/**
|
|
7480
|
+
* Refuse to sync a fleet mount whose path is provably gone. Fleet drivers'
|
|
7481
|
+
* sync is a no-op success, so without this a dead host bind would report a
|
|
7482
|
+
* clean sync while every write lands nowhere. An `unresponsive` probe does
|
|
7483
|
+
* not refuse: a slow cloud mount must not be locked out of sync.
|
|
7484
|
+
*/
|
|
7485
|
+
async assertMountNotDead(id) {
|
|
7486
|
+
const liveness = await this.checkMountLiveness(id);
|
|
7487
|
+
if (liveness?.state === "dead") {
|
|
7488
|
+
throw new Error(`Cannot sync mount "${id}": ${liveness.reason}`);
|
|
7489
|
+
}
|
|
7490
|
+
}
|
|
7491
|
+
/**
|
|
7492
|
+
* Re-check that a connected, host fleet-managed mount's path is still live.
|
|
7493
|
+
*
|
|
7494
|
+
* The handle's `status` is set once at connect and never revisited, so it
|
|
7495
|
+
* keeps saying `connected` after the host bind breaks. Status and sync
|
|
7496
|
+
* surfaces call this to report the real state. Bounded by a short deadline
|
|
7497
|
+
* (`unresponsive` when it expires), never remounts, never mutates the handle.
|
|
7498
|
+
*
|
|
7499
|
+
* @returns `null` when the check does not apply: unknown id, not yet
|
|
7500
|
+
* connected, no mount path, or not fleet-managed (the driver's handle state
|
|
7501
|
+
* carries no `fleetManaged: true`).
|
|
7502
|
+
*/
|
|
7503
|
+
async checkMountLiveness(id) {
|
|
7504
|
+
const entry = this.active.get(id);
|
|
7505
|
+
if (!entry || entry.handle.status !== "connected") return null;
|
|
7506
|
+
const mountPath = entry.handle.mountPath;
|
|
7507
|
+
if (!mountPath) return null;
|
|
7508
|
+
const state = entry.handle.state;
|
|
7509
|
+
if (state?.fleetManaged !== true) return null;
|
|
7510
|
+
return checkFleetMountLiveness(mountPath);
|
|
7511
|
+
}
|
|
7392
7512
|
/**
|
|
7393
7513
|
* Pull the latest remote state for all connected filesystem-face connectors.
|
|
7394
7514
|
* Errors from individual connectors are captured and returned rather than thrown.
|
|
@@ -7399,6 +7519,7 @@ var ConnectorManager = class {
|
|
|
7399
7519
|
if (!entry.connector.filesystem) continue;
|
|
7400
7520
|
if (entry.handle.status !== "connected") continue;
|
|
7401
7521
|
try {
|
|
7522
|
+
await this.assertMountNotDead(id);
|
|
7402
7523
|
await entry.connector.filesystem.sync(entry.handle, options);
|
|
7403
7524
|
results.push({ id, ok: true });
|
|
7404
7525
|
} catch (err) {
|
|
@@ -8217,64 +8338,6 @@ printf 'password=%s\\n' "$pass"
|
|
|
8217
8338
|
printf '\\n'
|
|
8218
8339
|
`;
|
|
8219
8340
|
}
|
|
8220
|
-
var MOUNTINFO_PATH = "/proc/self/mountinfo";
|
|
8221
|
-
function testMountinfoOverride() {
|
|
8222
|
-
return process.env.VITEST ? process.env.SKAILE_FLEET_MOUNTINFO_PATH : void 0;
|
|
8223
|
-
}
|
|
8224
|
-
function isFleetManaged(connectorId) {
|
|
8225
|
-
const raw = process.env.SKAILE_FLEET_MANAGED_MOUNTS ?? "";
|
|
8226
|
-
if (raw.length === 0) return false;
|
|
8227
|
-
return raw.split(",").map((segment) => segment.trim()).filter((segment) => segment.length > 0).includes(connectorId);
|
|
8228
|
-
}
|
|
8229
|
-
function decodeMountinfoPath(field) {
|
|
8230
|
-
return field.replace(
|
|
8231
|
-
/\\(\d{3})/g,
|
|
8232
|
-
(_, octal) => String.fromCharCode(Number.parseInt(octal, 8))
|
|
8233
|
-
);
|
|
8234
|
-
}
|
|
8235
|
-
async function isMountpoint(dir, mountinfoPath) {
|
|
8236
|
-
let table;
|
|
8237
|
-
try {
|
|
8238
|
-
table = await readFile(mountinfoPath, "utf8");
|
|
8239
|
-
} catch {
|
|
8240
|
-
return null;
|
|
8241
|
-
}
|
|
8242
|
-
const target = await realpath(dir);
|
|
8243
|
-
for (const line of table.split("\n")) {
|
|
8244
|
-
const mountPoint = line.split(" ")[4];
|
|
8245
|
-
if (mountPoint !== void 0 && decodeMountinfoPath(mountPoint) === target) return true;
|
|
8246
|
-
}
|
|
8247
|
-
return false;
|
|
8248
|
-
}
|
|
8249
|
-
async function ensureFleetMounted(dir, log, options) {
|
|
8250
|
-
const timeoutMs = options?.timeoutMs ?? 3e3;
|
|
8251
|
-
const pollIntervalMs = options?.pollIntervalMs ?? 100;
|
|
8252
|
-
const mountinfoPath = options?.mountinfoPath ?? testMountinfoOverride() ?? MOUNTINFO_PATH;
|
|
8253
|
-
const deadline = Date.now() + timeoutMs;
|
|
8254
|
-
let lastErr = null;
|
|
8255
|
-
while (Date.now() < deadline) {
|
|
8256
|
-
try {
|
|
8257
|
-
const st = await stat(dir);
|
|
8258
|
-
if (!st.isDirectory()) {
|
|
8259
|
-
throw new Error(`fleet mountpoint ${dir} is not a directory`);
|
|
8260
|
-
}
|
|
8261
|
-
await readdir(dir);
|
|
8262
|
-
if (await isMountpoint(dir, mountinfoPath) === false) {
|
|
8263
|
-
throw new Error(
|
|
8264
|
-
`fleet mountpoint ${dir} is a plain directory, not a mount \u2014 the host bind is absent or landed on a different path`
|
|
8265
|
-
);
|
|
8266
|
-
}
|
|
8267
|
-
log.info("fleet bind mount verified", { dir });
|
|
8268
|
-
return;
|
|
8269
|
-
} catch (err) {
|
|
8270
|
-
lastErr = err;
|
|
8271
|
-
await new Promise((resolve7) => setTimeout(resolve7, pollIntervalMs));
|
|
8272
|
-
}
|
|
8273
|
-
}
|
|
8274
|
-
throw new Error(
|
|
8275
|
-
`fleet mount ${dir} not ready after ${timeoutMs}ms \u2014 check SKAILE_FLEET_MANAGED_MOUNTS env var and host bind: ${lastErr instanceof Error ? lastErr.message : String(lastErr)}`
|
|
8276
|
-
);
|
|
8277
|
-
}
|
|
8278
8341
|
async function ensureDirMode(dir, log) {
|
|
8279
8342
|
await mkdir(dir, { recursive: true });
|
|
8280
8343
|
try {
|
|
@@ -11430,6 +11493,6 @@ function describeFlowOperations() {
|
|
|
11430
11493
|
return new FlowAdapter().tools.describeOperations({ access: "read-write" });
|
|
11431
11494
|
}
|
|
11432
11495
|
|
|
11433
|
-
export { AbstractConnector, BUILTIN_CONNECTOR_CATALOG, BoxConnector, ClassifierSubpromptRunner, ConnectorManager, DeployConnector, DevServerConnector, FlowAdapter, GitConnector, GmailConnector, GoogleDriveConnector, LocalConnector, LogBuffer, MAX_REARM_MS, MIN_REFRESH_DELAY_MS, ManagedGitconfigCollisionError, MattermostConnector, MemoryConnector, MinIOConnector, NO_ACTIVE_FLOW_ERROR, PortPool, PostgresConnector, REFRESH_LEAD_MS, S3Connector, SQLiteConnector, SessionInlineSubFlowRunner, SessionNodeExecutor, SessionSubpromptRunner, SharePointConnector, StaticServerConnector, TunnelConnector, WebDAVConnector, XStateConnector, XStateStoreConnector, __test, atomicReplaceCredential, buildConnectorPromptSection, buildConnectorToolDefs, buildFlowPromptEvent, buildFlowToolDefs, buildLazyFlowToolDefs, buildLazySdkFlowTools, buildSdkConnectorTools, buildSdkFlowTools, classifierQuestion, classifyConnectError, createConnector, createConnector10, createConnector11, createConnector12, createConnector13, createConnector14, createConnector15, createConnector16, createConnector17, createConnector18, createConnector19, createConnector2, createConnector20, createConnector3, createConnector4, createConnector5, createConnector6, createConnector7, createConnector8, createConnector9, createFsWatcher, createWorktree, defaultSpawn, describeFlowOperations, driveOrchestratorTurn, ensureDirMode, ensureFleetMounted, ensureRefreshAttemptStamp, findGitRoot, findMissingPackages, getConnector, installNpmPackages, isFleetManaged, isPackageResolvable, listConnectors, listWorktrees, readGitSyncStatus, registerBuiltinConnectors, removeMountBlock, removeUnavailableMountBlock, renderCredentialHelperScript, tryGetConnector, worktreeRegistry, writeHelperScript, writeMountBlock, writeUnavailableMountBlock };
|
|
11434
|
-
//# sourceMappingURL=chunk-
|
|
11435
|
-
//# sourceMappingURL=chunk-
|
|
11496
|
+
export { AbstractConnector, BUILTIN_CONNECTOR_CATALOG, BoxConnector, ClassifierSubpromptRunner, ConnectorManager, DeployConnector, DevServerConnector, FlowAdapter, GitConnector, GmailConnector, GoogleDriveConnector, LocalConnector, LogBuffer, MAX_REARM_MS, MIN_REFRESH_DELAY_MS, ManagedGitconfigCollisionError, MattermostConnector, MemoryConnector, MinIOConnector, NO_ACTIVE_FLOW_ERROR, PortPool, PostgresConnector, REFRESH_LEAD_MS, S3Connector, SQLiteConnector, SessionInlineSubFlowRunner, SessionNodeExecutor, SessionSubpromptRunner, SharePointConnector, StaticServerConnector, TunnelConnector, WebDAVConnector, XStateConnector, XStateStoreConnector, __test, atomicReplaceCredential, buildConnectorPromptSection, buildConnectorToolDefs, buildFlowPromptEvent, buildFlowToolDefs, buildLazyFlowToolDefs, buildLazySdkFlowTools, buildSdkConnectorTools, buildSdkFlowTools, checkFleetMountLiveness, classifierQuestion, classifyConnectError, createConnector, createConnector10, createConnector11, createConnector12, createConnector13, createConnector14, createConnector15, createConnector16, createConnector17, createConnector18, createConnector19, createConnector2, createConnector20, createConnector3, createConnector4, createConnector5, createConnector6, createConnector7, createConnector8, createConnector9, createFsWatcher, createWorktree, defaultSpawn, describeFlowOperations, driveOrchestratorTurn, ensureDirMode, ensureFleetMounted, ensureRefreshAttemptStamp, findGitRoot, findMissingPackages, getConnector, installNpmPackages, isFleetManaged, isPackageResolvable, listConnectors, listWorktrees, readGitSyncStatus, registerBuiltinConnectors, removeMountBlock, removeUnavailableMountBlock, renderCredentialHelperScript, tryGetConnector, worktreeRegistry, writeHelperScript, writeMountBlock, writeUnavailableMountBlock };
|
|
11497
|
+
//# sourceMappingURL=chunk-GXACG5ZE.js.map
|
|
11498
|
+
//# sourceMappingURL=chunk-GXACG5ZE.js.map
|