deepline 0.3.338 → 0.3.340
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/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +20 -2
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +20 -7
- package/dist/cli/{auth-MTF2TRBC.mjs → auth-AAHQCTJW.mjs} +4 -4
- package/dist/cli/auth-WDM5N7LQ.js +31 -0
- package/dist/cli/{billing-HXXPKDYV.mjs → billing-2X4SP44P.mjs} +4 -4
- package/dist/cli/{billing-OXEY6DAU.js → billing-SBU4F4VS.js} +71 -71
- package/dist/cli/{chunk-7WL23HDH.mjs → chunk-2IZ6RE5L.mjs} +1 -1
- package/dist/cli/{chunk-OTJMWSIK.mjs → chunk-6D77EBSR.mjs} +5 -5
- package/dist/cli/{chunk-FOODYFMR.js → chunk-6ONNP4XL.js} +1 -1
- package/dist/cli/{chunk-6CEPAFCE.mjs → chunk-77YWQTE6.mjs} +4 -4
- package/dist/cli/{chunk-BYIWZOSA.js → chunk-A4LUPRGL.js} +6 -6
- package/dist/cli/{chunk-FBU4A2ZE.mjs → chunk-AN3X5XIR.mjs} +2 -2
- package/dist/cli/{chunk-NUJIZBLA.js → chunk-AYAEVVB5.js} +4 -4
- package/dist/cli/{chunk-CVSUI4Z2.js → chunk-B2HJ2OFH.js} +48 -48
- package/dist/cli/{chunk-ID5OGCLU.mjs → chunk-DX37W6IS.mjs} +3 -3
- package/dist/cli/{chunk-XWTEOTGL.js → chunk-EQFYORNR.js} +26 -26
- package/dist/cli/{chunk-EV4QJE4J.mjs → chunk-IIOBMOMH.mjs} +18 -7
- package/dist/cli/{chunk-SSRGN56V.mjs → chunk-LR66EFVU.mjs} +1 -1
- package/dist/cli/{chunk-MIHJFRGP.mjs → chunk-M3KIBSVO.mjs} +2 -2
- package/dist/cli/{chunk-J47TX67H.mjs → chunk-N3X2DMF2.mjs} +1 -1
- package/dist/cli/{chunk-5OHHWYOV.js → chunk-NPPD5XT6.js} +45 -45
- package/dist/cli/{chunk-N3EOKUQV.mjs → chunk-OD7LIBSF.mjs} +2 -2
- package/dist/cli/{chunk-UQV5M6HN.js → chunk-OJVAVQLB.js} +18 -7
- package/dist/cli/{chunk-YMLGJ2B7.mjs → chunk-PLSVHYRC.mjs} +1 -1
- package/dist/cli/{chunk-NR5ILIKI.js → chunk-URO52CD6.js} +2 -2
- package/dist/cli/{chunk-HJEHCSFH.js → chunk-VLV2PVA2.js} +8 -8
- package/dist/cli/{chunk-CGVCELEC.mjs → chunk-VMEJLJJD.mjs} +1 -1
- package/dist/cli/{chunk-UVGGJ2CV.mjs → chunk-WDB7AIXJ.mjs} +59 -74
- package/dist/cli/{chunk-KLAWLBSP.js → chunk-X6A7PAR6.js} +60 -60
- package/dist/cli/{chunk-AHO5IXHM.js → chunk-XCB2WE4D.js} +15 -15
- package/dist/cli/{chunk-KRZDVQZH.js → chunk-YAYAOUH3.js} +8 -8
- package/dist/cli/{chunk-7EQ3WFD2.js → chunk-YLDIZ7A3.js} +9 -9
- package/dist/cli/{chunk-FYR7GGUF.js → chunk-YODUXBLR.js} +293 -308
- package/dist/cli/{chunk-NHTICK5G.mjs → chunk-YRDTRTU4.mjs} +2 -2
- package/dist/cli/client-2MTAJ6XW.js +20 -0
- package/dist/cli/{client-LXBODS53.mjs → client-LKEH3EYO.mjs} +3 -3
- package/dist/cli/{csv-3346Z7MA.mjs → csv-WDWQGVDN.mjs} +3 -3
- package/dist/cli/{csv-5UMO4TMZ.js → csv-ZQIEH4Q3.js} +12 -12
- package/dist/cli/{db-RBWIVEB3.js → db-CRQSATVK.js} +29 -29
- package/dist/cli/{db-HVAQDN7U.mjs → db-KKC6CT3W.mjs} +4 -4
- package/dist/cli/{describe-LAAOJYI2.js → describe-HGYOEBYE.js} +16 -16
- package/dist/cli/{describe-OKSZOU3V.mjs → describe-YEVXHHHH.mjs} +9 -9
- package/dist/cli/{executions-5WENZ6MO.js → executions-ISG5EEOO.js} +6 -6
- package/dist/cli/{executions-T56YNXAC.mjs → executions-MMNCPQNE.mjs} +4 -4
- package/dist/cli/{feedback-RU4EKJYX.mjs → feedback-3HNMWGJA.mjs} +3 -3
- package/dist/cli/{feedback-YZILULGJ.js → feedback-U5SC3CAL.js} +7 -7
- package/dist/cli/git-BULAJZKJ.js +23 -0
- package/dist/cli/{git-LX7NYWDT.mjs → git-REGKM36C.mjs} +4 -4
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-K6W26TQA.js → legacy-noops-GTUAF7TM.js} +7 -7
- package/dist/cli/{legacy-noops-SN44IUWD.mjs → legacy-noops-KUIQG6VC.mjs} +4 -4
- package/dist/cli/{monitors-BQ5SXRDD.mjs → monitors-7IYKWVMJ.mjs} +4 -4
- package/dist/cli/{monitors-R4D7X7PL.js → monitors-V5RFXFO5.js} +85 -85
- package/dist/cli/{org-6GWQHHLF.js → org-77BRBYNS.js} +60 -60
- package/dist/cli/{org-RNR3CGVL.mjs → org-RSN7GZN4.mjs} +4 -4
- package/dist/cli/play-IKPMX4VZ.js +153 -0
- package/dist/cli/{play-CPG4HFXR.mjs → play-ZPWFRN3I.mjs} +8 -8
- package/dist/cli/{providers-AP5NBYJF.js → providers-2LD2BJUO.js} +7 -7
- package/dist/cli/{providers-YEFPQW3K.mjs → providers-TVELPXNI.mjs} +4 -4
- package/dist/cli/{quickstart-IT43KYUN.mjs → quickstart-7RUT33IL.mjs} +3 -3
- package/dist/cli/{quickstart-5D6WSPKU.js → quickstart-CYL2GNSK.js} +5 -5
- package/dist/cli/search-2ZFU42IA.js +26 -0
- package/dist/cli/{search-BVTZBNF3.mjs → search-GJURFP4W.mjs} +5 -5
- package/dist/cli/{secrets-L6Q2JJNX.js → secrets-KWBPK5GP.js} +13 -13
- package/dist/cli/{secrets-7HG77SLP.mjs → secrets-L5LNMMSB.mjs} +4 -4
- package/dist/cli/{sessions-TNXYON2R.js → sessions-5DWIUOGX.js} +5 -5
- package/dist/cli/{sessions-SSBDCVQN.mjs → sessions-5EAEXNJY.mjs} +4 -4
- package/dist/cli/{settings-4FKK3LUF.js → settings-KBPJL4KI.js} +74 -74
- package/dist/cli/{settings-5L23COY7.mjs → settings-OPD6MT4Q.mjs} +7 -7
- package/dist/cli/{setup-EB5JLUFH.js → setup-B5UDLN32.js} +41 -41
- package/dist/cli/{setup-GXXWJFRV.mjs → setup-GFHBMHWJ.mjs} +6 -6
- package/dist/cli/{skills-ETEFVVPT.mjs → skills-3245BDMO.mjs} +4 -4
- package/dist/cli/skills-I5MHLBGC.js +28 -0
- package/dist/cli/tools-QQVNDK7W.js +40 -0
- package/dist/cli/{tools-HDTU55RW.mjs → tools-ZKXMREZU.mjs} +6 -6
- package/dist/cli/update-6OCUCA4T.js +28 -0
- package/dist/cli/{update-FR5QUV5I.mjs → update-NBHQD6N6.mjs} +6 -6
- package/dist/cli/{workflow-BE77YVLP.mjs → workflow-5XYAE4BX.mjs} +5 -5
- package/dist/cli/{workflow-OFWWX4ZP.js → workflow-T3IWKJI2.js} +15 -15
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +76 -76
- package/dist/plays/bundle-play-file.mjs +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-LVTYDMEL.js +0 -31
- package/dist/cli/client-V4OIXTP6.js +0 -20
- package/dist/cli/git-XASJHFDR.js +0 -23
- package/dist/cli/play-2V2Y4P3P.js +0 -153
- package/dist/cli/search-O66KVPGA.js +0 -26
- package/dist/cli/skills-XFMWA4WX.js +0 -28
- package/dist/cli/tools-3TWNYKZY.js +0 -40
- package/dist/cli/update-AEBCM2LT.js +0 -28
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
} from "./chunk-EDWJY6T4.mjs";
|
|
11
11
|
import {
|
|
12
12
|
registerDeprecatedSearchCommand
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DX37W6IS.mjs";
|
|
14
14
|
import {
|
|
15
15
|
handleDeploymentGet,
|
|
16
16
|
handleDeploymentsList
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-M3KIBSVO.mjs";
|
|
18
18
|
import {
|
|
19
19
|
PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY,
|
|
20
20
|
PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
normalizeRunEventOperationRequest,
|
|
40
40
|
parseLogLevel,
|
|
41
41
|
playInputExampleArgs
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-LR66EFVU.mjs";
|
|
43
43
|
import {
|
|
44
44
|
CSV_DATA_INPUT_KEY,
|
|
45
45
|
buildNamedPlayRunRequest,
|
|
@@ -72,10 +72,10 @@ import {
|
|
|
72
72
|
printJsonError,
|
|
73
73
|
renderCommandEnvelopeText,
|
|
74
74
|
shouldEmitJson
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-N3X2DMF2.mjs";
|
|
76
76
|
import {
|
|
77
77
|
fetchWithDeploymentProtection
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-PLSVHYRC.mjs";
|
|
79
79
|
import {
|
|
80
80
|
PLAY_DEFAULT_EXPORT,
|
|
81
81
|
extractDefinedPlayName,
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
listPlayFileExports,
|
|
84
84
|
parsePlaySourceForAnalysis,
|
|
85
85
|
resolveEnabledExecutionProfile
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-IIOBMOMH.mjs";
|
|
87
87
|
import {
|
|
88
88
|
DeeplineError
|
|
89
89
|
} from "./chunk-NXGCO4JB.mjs";
|
|
@@ -10385,66 +10385,53 @@ function normalizePlayPath(filePath) {
|
|
|
10385
10385
|
return resolve6(filePath);
|
|
10386
10386
|
}
|
|
10387
10387
|
}
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10388
|
+
var PlayBundleGraphError = class extends Error {
|
|
10389
|
+
constructor(diagnostics) {
|
|
10390
|
+
super(diagnostics.join("\n"));
|
|
10391
|
+
this.diagnostics = diagnostics;
|
|
10392
|
+
}
|
|
10393
|
+
};
|
|
10394
|
+
function unresolvedPackagedFilesMessage(node) {
|
|
10395
|
+
const details = node.unresolvedFileReferences.map((unresolved) => `${unresolved.sourceFragment}: ${unresolved.message}`).join("; ");
|
|
10396
|
+
return `Failed to package local ctx.csv(...) files in ${node.filePath}: ${details}`;
|
|
10394
10397
|
}
|
|
10395
10398
|
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName = PLAY_DEFAULT_EXPORT, options = {}) {
|
|
10396
10399
|
const playBundler = await loadPlayBundler();
|
|
10397
10400
|
const nodes = /* @__PURE__ */ new Map();
|
|
10398
|
-
const
|
|
10401
|
+
const diagnostics = [];
|
|
10402
|
+
const visited = /* @__PURE__ */ new Set();
|
|
10399
10403
|
const artifactKind = resolveEnabledExecutionProfile(profile).artifactKind;
|
|
10400
10404
|
const rootPath = normalizePlayPath(entryFile);
|
|
10401
10405
|
const visit = async (filePath) => {
|
|
10402
10406
|
const absolutePath = normalizePlayPath(filePath);
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10407
|
+
if (visited.has(absolutePath)) return;
|
|
10408
|
+
visited.add(absolutePath);
|
|
10409
|
+
const bundleResult = await playBundler.bundlePlayFile(absolutePath, {
|
|
10410
|
+
target: artifactKind,
|
|
10411
|
+
...options.cache === false ? { cache: false } : {},
|
|
10412
|
+
...absolutePath === rootPath && entryExportName !== PLAY_DEFAULT_EXPORT ? { exportName: entryExportName } : {}
|
|
10413
|
+
});
|
|
10414
|
+
if (bundleResult.success === false) {
|
|
10415
|
+
diagnostics.push(
|
|
10416
|
+
...bundleResult.errors.map(
|
|
10417
|
+
(error) => `Failed to bundle ${absolutePath}: ${error}`
|
|
10418
|
+
)
|
|
10410
10419
|
);
|
|
10420
|
+
return;
|
|
10411
10421
|
}
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
});
|
|
10419
|
-
if (bundleResult.success === false) {
|
|
10420
|
-
throw new Error(
|
|
10421
|
-
formatBundlingErrors(absolutePath, bundleResult.errors)
|
|
10422
|
-
);
|
|
10423
|
-
}
|
|
10424
|
-
if (bundleResult.unresolvedFileReferences.length > 0) {
|
|
10425
|
-
throw new Error(
|
|
10426
|
-
formatUnresolvedPackagedFiles(
|
|
10427
|
-
absolutePath,
|
|
10428
|
-
bundleResult.unresolvedFileReferences
|
|
10429
|
-
)
|
|
10430
|
-
);
|
|
10431
|
-
}
|
|
10432
|
-
const bundledNode = {
|
|
10433
|
-
...bundleResult,
|
|
10434
|
-
artifact: artifactForProductionCompatibilityCheck(
|
|
10435
|
-
bundleResult.artifact
|
|
10436
|
-
)
|
|
10437
|
-
};
|
|
10438
|
-
nodes.set(absolutePath, bundledNode);
|
|
10439
|
-
for (const dependency of bundledNode.importedPlayDependencies) {
|
|
10440
|
-
await visit(dependency.filePath);
|
|
10441
|
-
}
|
|
10442
|
-
return bundledNode;
|
|
10443
|
-
} finally {
|
|
10444
|
-
visiting.delete(absolutePath);
|
|
10422
|
+
nodes.set(absolutePath, {
|
|
10423
|
+
...bundleResult,
|
|
10424
|
+
artifact: artifactForProductionCompatibilityCheck(bundleResult.artifact)
|
|
10425
|
+
});
|
|
10426
|
+
for (const dependency of bundleResult.importedPlayDependencies) {
|
|
10427
|
+
await visit(dependency.filePath);
|
|
10445
10428
|
}
|
|
10446
10429
|
};
|
|
10447
|
-
|
|
10430
|
+
await visit(rootPath);
|
|
10431
|
+
const root = nodes.get(rootPath);
|
|
10432
|
+
if (!root || diagnostics.length > 0) {
|
|
10433
|
+
throw new PlayBundleGraphError(diagnostics);
|
|
10434
|
+
}
|
|
10448
10435
|
return { root, nodes };
|
|
10449
10436
|
}
|
|
10450
10437
|
async function compileBundledPlayGraphManifests(client, graph) {
|
|
@@ -10506,11 +10493,14 @@ function missingPlayDescriptionMessage(node) {
|
|
|
10506
10493
|
`Object form: definePlay({ id: "${playName}", description: "Look up company details from a domain.", input, run })`
|
|
10507
10494
|
].join(" ");
|
|
10508
10495
|
}
|
|
10509
|
-
function
|
|
10510
|
-
return [...graph.nodes.values()].
|
|
10496
|
+
function collectPlayGraphAuthoringErrors(graph) {
|
|
10497
|
+
return [...graph.nodes.values()].flatMap((node) => [
|
|
10498
|
+
...node.unresolvedFileReferences.length > 0 ? [unresolvedPackagedFilesMessage(node)] : [],
|
|
10499
|
+
...node.playDescription?.trim() ? [] : [missingPlayDescriptionMessage(node)]
|
|
10500
|
+
]);
|
|
10511
10501
|
}
|
|
10512
|
-
function
|
|
10513
|
-
const errors =
|
|
10502
|
+
function assertPlayGraphAuthoring(graph) {
|
|
10503
|
+
const errors = collectPlayGraphAuthoringErrors(graph);
|
|
10514
10504
|
if (errors.length > 0) {
|
|
10515
10505
|
throw new Error(errors.join("\n"));
|
|
10516
10506
|
}
|
|
@@ -14709,20 +14699,12 @@ async function checkOneExportedPlay(input) {
|
|
|
14709
14699
|
stage: "bundle",
|
|
14710
14700
|
result: {
|
|
14711
14701
|
valid: false,
|
|
14712
|
-
errors: [error instanceof Error ? error.message : String(error)]
|
|
14702
|
+
errors: error instanceof PlayBundleGraphError ? error.diagnostics : [error instanceof Error ? error.message : String(error)]
|
|
14713
14703
|
}
|
|
14714
14704
|
};
|
|
14715
14705
|
}
|
|
14716
14706
|
const playName = graph.root.playName ?? fallbackName;
|
|
14717
|
-
const
|
|
14718
|
-
if (descriptionErrors.length > 0) {
|
|
14719
|
-
return {
|
|
14720
|
-
exportName,
|
|
14721
|
-
playName,
|
|
14722
|
-
stage: "authoring",
|
|
14723
|
-
result: { valid: false, errors: descriptionErrors }
|
|
14724
|
-
};
|
|
14725
|
-
}
|
|
14707
|
+
const authoringErrors = collectPlayGraphAuthoringErrors(graph);
|
|
14726
14708
|
const client = new DeeplineClient();
|
|
14727
14709
|
const integrationMode = resolveEvalIntegrationMode();
|
|
14728
14710
|
const importedPlays = [...graph.nodes.values()].filter((node) => node.filePath !== graph.root.filePath).map((node) => ({
|
|
@@ -14740,13 +14722,16 @@ async function checkOneExportedPlay(input) {
|
|
|
14740
14722
|
...importedPlays.length > 0 ? { importedPlays } : {},
|
|
14741
14723
|
...integrationMode ? { integrationMode } : {}
|
|
14742
14724
|
});
|
|
14725
|
+
const valid = result.valid && authoringErrors.length === 0;
|
|
14743
14726
|
return {
|
|
14744
14727
|
exportName,
|
|
14745
14728
|
playName,
|
|
14729
|
+
...authoringErrors.length > 0 ? { stage: "authoring" } : {},
|
|
14746
14730
|
result: {
|
|
14747
14731
|
...result,
|
|
14748
|
-
|
|
14749
|
-
|
|
14732
|
+
valid,
|
|
14733
|
+
errors: valid ? result.errors : addPlayCheckRepairHints({
|
|
14734
|
+
errors: [...authoringErrors, ...result.errors],
|
|
14750
14735
|
sourceCode: graph.root.sourceCode
|
|
14751
14736
|
}),
|
|
14752
14737
|
toolGetterHints: result.toolGetterHints ?? await buildToolGetterHints(client, result.staticPipeline)
|
|
@@ -14788,7 +14773,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14788
14773
|
{ cache: !options.dryRun }
|
|
14789
14774
|
)
|
|
14790
14775
|
);
|
|
14791
|
-
|
|
14776
|
+
assertPlayGraphAuthoring(graph);
|
|
14792
14777
|
if (options.dryRun) {
|
|
14793
14778
|
progress.complete();
|
|
14794
14779
|
renderLocalPlayExecutionPlan(
|
|
@@ -17266,7 +17251,7 @@ async function handlePlaySave(args) {
|
|
|
17266
17251
|
{ targetKind: "file" },
|
|
17267
17252
|
() => collectBundledPlayGraph(resolve6(options.target))
|
|
17268
17253
|
);
|
|
17269
|
-
|
|
17254
|
+
assertPlayGraphAuthoring(graph);
|
|
17270
17255
|
} catch (error) {
|
|
17271
17256
|
console.error(error instanceof Error ? error.message : String(error));
|
|
17272
17257
|
return 7;
|
|
@@ -17391,7 +17376,7 @@ async function handlePlayPublish(args) {
|
|
|
17391
17376
|
{ targetKind: "file" },
|
|
17392
17377
|
() => collectBundledPlayGraph(resolve6(playName))
|
|
17393
17378
|
);
|
|
17394
|
-
|
|
17379
|
+
assertPlayGraphAuthoring(graph);
|
|
17395
17380
|
} catch (error) {
|
|
17396
17381
|
console.error(error instanceof Error ? error.message : String(error));
|
|
17397
17382
|
return 1;
|
|
@@ -18166,7 +18151,7 @@ Examples:
|
|
|
18166
18151
|
process.exitCode = await ownView();
|
|
18167
18152
|
return;
|
|
18168
18153
|
}
|
|
18169
|
-
const { describeAnything } = await import("./describe-
|
|
18154
|
+
const { describeAnything } = await import("./describe-YEVXHHHH.mjs");
|
|
18170
18155
|
process.exitCode = await describeAnything(
|
|
18171
18156
|
name,
|
|
18172
18157
|
{
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkA4LUPRGLjs = require('./chunk-A4LUPRGL.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -22,7 +22,7 @@ var _chunkBYIWZOSAjs = require('./chunk-BYIWZOSA.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkAYAEVVB5js = require('./chunk-AYAEVVB5.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
@@ -117,7 +117,7 @@ function skillsSourceUrl(baseUrl) {
|
|
|
117
117
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
118
118
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
119
119
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
120
|
-
const agents = _nullishCoalesce(options.agents, () => (
|
|
120
|
+
const agents = _nullishCoalesce(options.agents, () => ( _chunkAYAEVVB5js.DEFAULT_SKILL_AGENTS));
|
|
121
121
|
const values = {
|
|
122
122
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
123
123
|
skills_source_url: skillsSourceUrl(baseUrl),
|
|
@@ -193,7 +193,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
193
193
|
return value === "1" || value === "true" || value === "yes";
|
|
194
194
|
}
|
|
195
195
|
function sdkCompatibilityCachePath(baseUrl, homeDir = _os.homedir.call(void 0, )) {
|
|
196
|
-
return _path.join.call(void 0,
|
|
196
|
+
return _path.join.call(void 0, _chunkAYAEVVB5js.sdkCliStateDirPath.call(void 0, baseUrl, homeDir), "compat-cache.json");
|
|
197
197
|
}
|
|
198
198
|
function legacySdkCompatibilityCachePath(homeDir = _os.homedir.call(void 0, )) {
|
|
199
199
|
return _path.join.call(void 0, homeDir, ".cache", "deepline", "sdk-compat-cache.json");
|
|
@@ -201,9 +201,9 @@ function legacySdkCompatibilityCachePath(homeDir = _os.homedir.call(void 0, )) {
|
|
|
201
201
|
function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
202
202
|
return JSON.stringify({
|
|
203
203
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
204
|
-
version:
|
|
205
|
-
apiContract:
|
|
206
|
-
apiMajor:
|
|
204
|
+
version: _chunkAYAEVVB5js.SDK_VERSION,
|
|
205
|
+
apiContract: _chunkAYAEVVB5js.SDK_API_CONTRACT,
|
|
206
|
+
apiMajor: _chunkAYAEVVB5js.SDK_API_MAJOR,
|
|
207
207
|
command: _optionalChain([command, 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]) || null,
|
|
208
208
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
209
209
|
});
|
|
@@ -211,8 +211,8 @@ function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
|
211
211
|
function legacyCompatibilityCacheKey(baseUrl, command) {
|
|
212
212
|
return JSON.stringify({
|
|
213
213
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
214
|
-
version:
|
|
215
|
-
apiContract:
|
|
214
|
+
version: _chunkAYAEVVB5js.SDK_VERSION,
|
|
215
|
+
apiContract: _chunkAYAEVVB5js.SDK_API_CONTRACT,
|
|
216
216
|
command: _optionalChain([command, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]) || null
|
|
217
217
|
});
|
|
218
218
|
}
|
|
@@ -305,7 +305,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
305
305
|
);
|
|
306
306
|
try {
|
|
307
307
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
308
|
-
url.searchParams.set("version",
|
|
308
|
+
url.searchParams.set("version", _chunkAYAEVVB5js.SDK_VERSION);
|
|
309
309
|
if (_optionalChain([options, 'access', _19 => _19.command, 'optionalAccess', _20 => _20.trim, 'call', _21 => _21()])) {
|
|
310
310
|
url.searchParams.set("command", options.command.trim());
|
|
311
311
|
}
|
|
@@ -318,13 +318,13 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
318
318
|
const response = await fetch(url, {
|
|
319
319
|
method: "GET",
|
|
320
320
|
headers: {
|
|
321
|
-
...
|
|
322
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
323
|
-
"X-Deepline-SDK-Version":
|
|
324
|
-
"X-Deepline-API-Major": String(
|
|
325
|
-
"X-Deepline-API-Contract":
|
|
321
|
+
..._chunkAYAEVVB5js.deploymentProtectionHeaders.call(void 0, ),
|
|
322
|
+
"User-Agent": `deepline-ts-sdk/${_chunkAYAEVVB5js.SDK_VERSION}`,
|
|
323
|
+
"X-Deepline-SDK-Version": _chunkAYAEVVB5js.SDK_VERSION,
|
|
324
|
+
"X-Deepline-API-Major": String(_chunkAYAEVVB5js.SDK_API_MAJOR),
|
|
325
|
+
"X-Deepline-API-Contract": _chunkAYAEVVB5js.SDK_API_CONTRACT,
|
|
326
326
|
"X-Deepline-CLI-Update-Preferences": "1",
|
|
327
|
-
...options.catalog ? { Authorization: `Bearer ${
|
|
327
|
+
...options.catalog ? { Authorization: `Bearer ${_chunkAYAEVVB5js.resolveApiKeyForBaseUrl.call(void 0, baseUrl)}` } : {}
|
|
328
328
|
},
|
|
329
329
|
signal: controller.signal
|
|
330
330
|
});
|
|
@@ -577,7 +577,7 @@ function buildEnvironmentContext() {
|
|
|
577
577
|
node_version: process.version,
|
|
578
578
|
runtime: "Node.js",
|
|
579
579
|
hostname: _os.hostname.call(void 0, ),
|
|
580
|
-
agent_runtime:
|
|
580
|
+
agent_runtime: _chunkAYAEVVB5js.detectAgentRuntime.call(void 0, )
|
|
581
581
|
};
|
|
582
582
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
583
583
|
const normalized = _optionalChain([process, 'access', _32 => _32.env, 'access', _33 => _33[key], 'optionalAccess', _34 => _34.trim, 'call', _35 => _35()]);
|
|
@@ -601,12 +601,12 @@ function failureReportHeaders(apiKey) {
|
|
|
601
601
|
return {
|
|
602
602
|
Authorization: `Bearer ${apiKey}`,
|
|
603
603
|
"Content-Type": "application/json",
|
|
604
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
604
|
+
"User-Agent": `deepline-ts-sdk/${_chunkAYAEVVB5js.SDK_VERSION}`,
|
|
605
605
|
"X-Deepline-Client-Family": "sdk",
|
|
606
606
|
"X-Deepline-CLI-Family": "sdk",
|
|
607
|
-
"X-Deepline-Agent-Runtime":
|
|
608
|
-
"X-Deepline-CLI-Version":
|
|
609
|
-
"X-Deepline-SDK-Version":
|
|
607
|
+
"X-Deepline-Agent-Runtime": _chunkAYAEVVB5js.detectAgentRuntime.call(void 0, ),
|
|
608
|
+
"X-Deepline-CLI-Version": _chunkAYAEVVB5js.SDK_VERSION,
|
|
609
|
+
"X-Deepline-SDK-Version": _chunkAYAEVVB5js.SDK_VERSION
|
|
610
610
|
};
|
|
611
611
|
}
|
|
612
612
|
async function postFailureReport(input) {
|
|
@@ -634,7 +634,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
634
634
|
if (isFailureReportingDisabled()) return false;
|
|
635
635
|
let apiKey = "";
|
|
636
636
|
try {
|
|
637
|
-
apiKey =
|
|
637
|
+
apiKey = _chunkAYAEVVB5js.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
638
638
|
} catch (e7) {
|
|
639
639
|
return false;
|
|
640
640
|
}
|
|
@@ -661,7 +661,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
661
661
|
failure_code: failureCode2,
|
|
662
662
|
failure_stage: failureStage,
|
|
663
663
|
error_body: "Automatic Deepline skills installation failed.",
|
|
664
|
-
cli_version:
|
|
664
|
+
cli_version: _chunkAYAEVVB5js.SDK_VERSION,
|
|
665
665
|
context: {
|
|
666
666
|
environment: buildEnvironmentContext(),
|
|
667
667
|
skills_sync: {
|
|
@@ -781,7 +781,7 @@ function buildFailureReport(input) {
|
|
|
781
781
|
failure_kind: failureKind,
|
|
782
782
|
failure_code: code,
|
|
783
783
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
784
|
-
cli_version:
|
|
784
|
+
cli_version: _chunkAYAEVVB5js.SDK_VERSION,
|
|
785
785
|
context: {
|
|
786
786
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
787
787
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -801,8 +801,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
801
801
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
802
802
|
const exitCode = resolvedExitCode(input);
|
|
803
803
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
804
|
-
const baseUrl =
|
|
805
|
-
const apiKey =
|
|
804
|
+
const baseUrl = _chunkAYAEVVB5js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
805
|
+
const apiKey = _chunkAYAEVVB5js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
806
806
|
if (!apiKey) return false;
|
|
807
807
|
return postFailureReport({
|
|
808
808
|
baseUrl,
|
|
@@ -823,25 +823,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
823
823
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
824
824
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
825
825
|
function shouldSkipSkillsSync() {
|
|
826
|
-
if (
|
|
826
|
+
if (_chunkAYAEVVB5js.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
827
827
|
return true;
|
|
828
828
|
}
|
|
829
829
|
const value = _optionalChain([process, 'access', _56 => _56.env, 'access', _57 => _57.DEEPLINE_SKIP_SKILLS_SYNC, 'optionalAccess', _58 => _58.trim, 'call', _59 => _59(), 'access', _60 => _60.toLowerCase, 'call', _61 => _61()]);
|
|
830
830
|
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
831
831
|
}
|
|
832
832
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
833
|
-
return _path.join.call(void 0,
|
|
833
|
+
return _path.join.call(void 0, _chunkAYAEVVB5js.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
834
834
|
}
|
|
835
835
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
836
836
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
837
|
-
var agentLeaseSegment =
|
|
837
|
+
var agentLeaseSegment = _chunkAYAEVVB5js.skillsAgentPathSegment;
|
|
838
838
|
function sortedLeaseAgents(agents) {
|
|
839
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
839
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkAYAEVVB5js.KNOWN_SKILL_AGENTS] : agents;
|
|
840
840
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
841
841
|
}
|
|
842
842
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
843
843
|
return _path.join.call(void 0,
|
|
844
|
-
|
|
844
|
+
_chunkAYAEVVB5js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
845
845
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
846
846
|
);
|
|
847
847
|
}
|
|
@@ -1000,7 +1000,7 @@ var SkillsStateUnavailableError = class extends Error {
|
|
|
1000
1000
|
constructor(baseUrl, error) {
|
|
1001
1001
|
const detail = error instanceof Error ? error.message : String(error);
|
|
1002
1002
|
super(
|
|
1003
|
-
`Could not save skills state in ${
|
|
1003
|
+
`Could not save skills state in ${_chunkAYAEVVB5js.sdkCliStateDirPath.call(void 0, baseUrl)}: ${detail}`
|
|
1004
1004
|
);
|
|
1005
1005
|
this.name = "SkillsStateUnavailableError";
|
|
1006
1006
|
}
|
|
@@ -1085,7 +1085,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
1087
1087
|
return _path.join.call(void 0,
|
|
1088
|
-
|
|
1088
|
+
_chunkAYAEVVB5js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1089
1089
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
1090
1090
|
);
|
|
1091
1091
|
}
|
|
@@ -1119,8 +1119,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
1119
1119
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
1120
1120
|
}
|
|
1121
1121
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
1122
|
-
if (shouldSkipSkillsSync() ||
|
|
1123
|
-
const agents =
|
|
1122
|
+
if (shouldSkipSkillsSync() || _chunkAYAEVVB5js.hasActivePluginSkills.call(void 0, )) return;
|
|
1123
|
+
const agents = _chunkAYAEVVB5js.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1124
1124
|
if (agents.length === 0) return;
|
|
1125
1125
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1126
1126
|
}
|
|
@@ -1136,7 +1136,7 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError) {
|
|
|
1136
1136
|
}
|
|
1137
1137
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
1138
1138
|
return _path.join.call(void 0,
|
|
1139
|
-
|
|
1139
|
+
_chunkAYAEVVB5js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1140
1140
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
1141
1141
|
);
|
|
1142
1142
|
}
|
|
@@ -1165,7 +1165,7 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
1165
1165
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
1166
1166
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
1167
1167
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
1168
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess', _65 => _65.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames,
|
|
1168
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _65 => _65.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunkAYAEVVB5js.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
1169
1169
|
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess', _66 => _66.bunx]) === "missing" && probes.npx === "missing" ? "neither `bunx` nor `npx` was found on PATH. Make one available." : `installer version check failed for ${Object.entries(_nullishCoalesce(probes, () => ( {}))).filter(([, result]) => result === "failed").map(([command]) => `\`${command}\``).join(" and ")}. Check those commands with --version.`;
|
|
1170
1170
|
notice(
|
|
1171
1171
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
@@ -1253,7 +1253,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
1253
1253
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
1254
1254
|
}
|
|
1255
1255
|
function isDefaultAgentSet(agents) {
|
|
1256
|
-
return agents.length ===
|
|
1256
|
+
return agents.length === _chunkAYAEVVB5js.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkAYAEVVB5js.DEFAULT_SKILL_AGENTS[index]);
|
|
1257
1257
|
}
|
|
1258
1258
|
function safeSkillFilePath(value) {
|
|
1259
1259
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -1450,7 +1450,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1450
1450
|
}
|
|
1451
1451
|
function noInstallerProbePath(baseUrl) {
|
|
1452
1452
|
return _path.join.call(void 0,
|
|
1453
|
-
|
|
1453
|
+
_chunkAYAEVVB5js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1454
1454
|
"skills-sync-no-installer-unknown.json"
|
|
1455
1455
|
);
|
|
1456
1456
|
}
|
|
@@ -1529,7 +1529,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1529
1529
|
function resolveSkillsInstallSpawn(install, platform2 = process.platform) {
|
|
1530
1530
|
return resolveShellSpawn(install.command, install.args, platform2);
|
|
1531
1531
|
}
|
|
1532
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1532
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunkAYAEVVB5js.DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1533
1533
|
const commands = [];
|
|
1534
1534
|
const probes = _nullishCoalesce(knownProbes, () => ( probeInstallers()));
|
|
1535
1535
|
if (probes.bunx === "available") {
|
|
@@ -1681,11 +1681,11 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1681
1681
|
}
|
|
1682
1682
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1683
1683
|
if (shouldSkipSkillsSync()) return;
|
|
1684
|
-
const usingPluginSkills =
|
|
1684
|
+
const usingPluginSkills = _chunkAYAEVVB5js.hasActivePluginSkills.call(void 0, );
|
|
1685
1685
|
if (usingPluginSkills) {
|
|
1686
1686
|
return;
|
|
1687
1687
|
}
|
|
1688
|
-
const agents =
|
|
1688
|
+
const agents = _chunkAYAEVVB5js.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1689
1689
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1690
1690
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1691
1691
|
}
|
|
@@ -1713,7 +1713,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1713
1713
|
return;
|
|
1714
1714
|
}
|
|
1715
1715
|
try {
|
|
1716
|
-
const localVersion =
|
|
1716
|
+
const localVersion = _chunkAYAEVVB5js.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1717
1717
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1718
1718
|
needsUpdate: options.update.needs_update,
|
|
1719
1719
|
remoteVersion: options.update.remote.version
|
|
@@ -1879,7 +1879,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1879
1879
|
}
|
|
1880
1880
|
}
|
|
1881
1881
|
runLegacySkillsCleanup(agents);
|
|
1882
|
-
if (!
|
|
1882
|
+
if (!_chunkAYAEVVB5js.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
1883
1883
|
notice(
|
|
1884
1884
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
1885
1885
|
);
|
|
@@ -1938,7 +1938,7 @@ function inferActiveSkillsScope(entrypoint = _nullishCoalesce(process.argv[1], (
|
|
|
1938
1938
|
return /[\\/]\.deepline[\\/]runtime[\\/]/.test(entrypoint) ? "local" : "global";
|
|
1939
1939
|
}
|
|
1940
1940
|
function resolveLocalRoot() {
|
|
1941
|
-
const target =
|
|
1941
|
+
const target = _chunkAYAEVVB5js.resolveProjectPinTarget.call(void 0, );
|
|
1942
1942
|
if (!target.ok) {
|
|
1943
1943
|
throw new Error(
|
|
1944
1944
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -1949,7 +1949,7 @@ function resolveLocalRoot() {
|
|
|
1949
1949
|
return target.dir;
|
|
1950
1950
|
}
|
|
1951
1951
|
function detectSkillsAgents(input) {
|
|
1952
|
-
const runtime = _nullishCoalesce(input.runtime, () => (
|
|
1952
|
+
const runtime = _nullishCoalesce(input.runtime, () => ( _chunkAYAEVVB5js.detectAgentRuntime.call(void 0, )));
|
|
1953
1953
|
const knownAgent = RUNTIME_TO_SKILLS_AGENT[runtime];
|
|
1954
1954
|
if (knownAgent) return [knownAgent];
|
|
1955
1955
|
const roots = [
|
|
@@ -1964,7 +1964,7 @@ function detectSkillsAgents(input) {
|
|
|
1964
1964
|
return detected.length > 0 ? detected : ["*"];
|
|
1965
1965
|
}
|
|
1966
1966
|
function skillsStatePathForScope(baseUrl, scope, root) {
|
|
1967
|
-
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0,
|
|
1967
|
+
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0, _chunkAYAEVVB5js.sdkCliStateDirPath.call(void 0, baseUrl), "skills-install.json");
|
|
1968
1968
|
}
|
|
1969
1969
|
function buildSkillsPlan(input) {
|
|
1970
1970
|
const scopeArgs = input.scope === "global" ? ["--global"] : [];
|
|
@@ -2086,7 +2086,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2086
2086
|
scope = normalizeScope(options.scope);
|
|
2087
2087
|
root = scope === "local" ? resolveLocalRoot() : null;
|
|
2088
2088
|
} catch (error) {
|
|
2089
|
-
|
|
2089
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2090
2090
|
{
|
|
2091
2091
|
ok: false,
|
|
2092
2092
|
status: "failed",
|
|
@@ -2098,22 +2098,22 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2098
2098
|
);
|
|
2099
2099
|
return 2;
|
|
2100
2100
|
}
|
|
2101
|
-
const baseUrl =
|
|
2101
|
+
const baseUrl = _chunkAYAEVVB5js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
2102
2102
|
const catalog = {
|
|
2103
2103
|
skillNames: [...DEFAULT_SDK_SKILL_NAMES],
|
|
2104
|
-
version:
|
|
2104
|
+
version: _chunkAYAEVVB5js.SDK_VERSION
|
|
2105
2105
|
};
|
|
2106
2106
|
const agents = options.agent ? [options.agent] : detectSkillsAgents({ scope, root });
|
|
2107
2107
|
const plan = buildSkillsPlan({ baseUrl, scope, root, agents, ...catalog });
|
|
2108
2108
|
if (options.dryRun) {
|
|
2109
|
-
|
|
2109
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2110
2110
|
{ ok: true, status: "planned", dryRun: true, ...plan },
|
|
2111
2111
|
{ json: options.json }
|
|
2112
2112
|
);
|
|
2113
2113
|
return 0;
|
|
2114
2114
|
}
|
|
2115
2115
|
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !hasFailedAutomaticSkillsSync(baseUrl, agents)) {
|
|
2116
|
-
|
|
2116
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2117
2117
|
{
|
|
2118
2118
|
ok: true,
|
|
2119
2119
|
status: "current",
|
|
@@ -2148,7 +2148,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2148
2148
|
.../* @__PURE__ */ new Set([...plan.skillNames, ...LEGACY_SKILL_NAMES_TO_REMOVE])
|
|
2149
2149
|
];
|
|
2150
2150
|
const agentRoots = workspaceSkillRootsForAgents(plan.agents);
|
|
2151
|
-
|
|
2151
|
+
_chunkAYAEVVB5js.ensureProjectPrivatePathsIgnored.call(void 0, root, [
|
|
2152
2152
|
".deepline/",
|
|
2153
2153
|
...agentRoots.flatMap(
|
|
2154
2154
|
(agentRoot) => managedNames.map((name) => `${agentRoot}/skills/${name}/`)
|
|
@@ -2166,7 +2166,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2166
2166
|
} };
|
|
2167
2167
|
} catch (error) {
|
|
2168
2168
|
if (!(error instanceof SkillsStateUnavailableError)) throw error;
|
|
2169
|
-
|
|
2169
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2170
2170
|
{
|
|
2171
2171
|
ok: false,
|
|
2172
2172
|
status: "failed",
|
|
@@ -2182,7 +2182,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2182
2182
|
return 5;
|
|
2183
2183
|
}
|
|
2184
2184
|
if (!lease) {
|
|
2185
|
-
|
|
2185
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2186
2186
|
{
|
|
2187
2187
|
ok: false,
|
|
2188
2188
|
status: "failed",
|
|
@@ -2228,7 +2228,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2228
2228
|
throw new Error("Could not install the current Deepline skills.");
|
|
2229
2229
|
}
|
|
2230
2230
|
} catch (error) {
|
|
2231
|
-
|
|
2231
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2232
2232
|
{
|
|
2233
2233
|
ok: false,
|
|
2234
2234
|
status: "failed",
|
|
@@ -2267,7 +2267,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2267
2267
|
{
|
|
2268
2268
|
schemaVersion: 1,
|
|
2269
2269
|
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2270
|
-
cliVersion:
|
|
2270
|
+
cliVersion: _chunkAYAEVVB5js.SDK_VERSION,
|
|
2271
2271
|
scope,
|
|
2272
2272
|
agents,
|
|
2273
2273
|
skillsVersion: plan.version,
|
|
@@ -2282,7 +2282,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2282
2282
|
if (scope === "global") {
|
|
2283
2283
|
clearFailedAutomaticSkillsSync(baseUrl, agents);
|
|
2284
2284
|
}
|
|
2285
|
-
|
|
2285
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2286
2286
|
{
|
|
2287
2287
|
ok: true,
|
|
2288
2288
|
status: "complete",
|
|
@@ -2331,7 +2331,7 @@ Examples:
|
|
|
2331
2331
|
).action(async (options) => {
|
|
2332
2332
|
const claim = _optionalChain([options, 'access', _88 => _88.claim, 'optionalAccess', _89 => _89.trim, 'call', _90 => _90()]);
|
|
2333
2333
|
if (!claim) {
|
|
2334
|
-
|
|
2334
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2335
2335
|
{
|
|
2336
2336
|
ok: false,
|
|
2337
2337
|
status: "failed",
|
|
@@ -2344,7 +2344,7 @@ Examples:
|
|
|
2344
2344
|
process.exitCode = 2;
|
|
2345
2345
|
return;
|
|
2346
2346
|
}
|
|
2347
|
-
await syncSdkSkillsIfNeeded(
|
|
2347
|
+
await syncSdkSkillsIfNeeded(_chunkAYAEVVB5js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, ""), {
|
|
2348
2348
|
mode: "inline",
|
|
2349
2349
|
notices: "defer",
|
|
2350
2350
|
claim
|