deepline 0.3.395 → 0.3.396
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/plays/play-description.ts +1 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
- package/dist/cli/{auth-NMQXZRS7.mjs → auth-3LTD62VL.mjs} +4 -4
- package/dist/cli/auth-562JPKOM.js +39 -0
- package/dist/cli/{billing-5MVXZRS6.mjs → billing-DP7ZAJBO.mjs} +5 -5
- package/dist/cli/{billing-Z4JTGUU3.js → billing-PA5OXEM5.js} +76 -76
- package/dist/cli/{chunk-BLYL3KOC.mjs → chunk-23GAA3YO.mjs} +1 -1
- package/dist/cli/{chunk-LZLBR2SF.js → chunk-2VOLOWYZ.js} +1087 -1056
- package/dist/cli/{chunk-EFLQHJZ6.mjs → chunk-3T4MCB5R.mjs} +1026 -995
- package/dist/cli/{chunk-VB6KECLU.mjs → chunk-5WNJF2T3.mjs} +102 -36
- package/dist/cli/{chunk-UKU6JM3S.js → chunk-772W2SAU.js} +8 -8
- package/dist/cli/{chunk-K5T3EN6D.js → chunk-7Z66NHUC.js} +26 -26
- package/dist/cli/{chunk-WCCKMLHL.mjs → chunk-AUYXWELC.mjs} +2 -2
- package/dist/cli/{chunk-PZ5BZ76S.js → chunk-AVHLATII.js} +50 -50
- package/dist/cli/{chunk-MYIBHORT.js → chunk-DC6LTULT.js} +2 -2
- package/dist/cli/{chunk-5VCZ3WRH.mjs → chunk-EIMG75BT.mjs} +1 -0
- package/dist/cli/{chunk-TO2MWPGR.js → chunk-GNN4MY5X.js} +1 -1
- package/dist/cli/{chunk-OCSG6X67.mjs → chunk-I4T4XAA2.mjs} +4 -4
- package/dist/cli/{chunk-ZWH2TFA7.mjs → chunk-JCN4DHF7.mjs} +2 -2
- package/dist/cli/{chunk-R4XZO6Z5.js → chunk-KAEZNPUM.js} +23 -8
- package/dist/cli/{chunk-DRM3CMHL.js → chunk-KXMNM4AQ.js} +2 -1
- package/dist/cli/{chunk-3TRY7KAC.mjs → chunk-LOGGNW4H.mjs} +2 -2
- package/dist/cli/{chunk-RDXFGPJU.js → chunk-LWERJUKN.js} +218 -218
- package/dist/cli/{chunk-UCXK2DS4.js → chunk-ME6XRFLY.js} +15 -15
- package/dist/cli/{chunk-G4IWGRMK.mjs → chunk-MR6XCBQJ.mjs} +2 -2
- package/dist/cli/{chunk-BON3DRC6.mjs → chunk-NHB5YUCS.mjs} +1 -1
- package/dist/cli/{chunk-ZMVJSS6N.js → chunk-NSOTASOP.js} +101 -35
- package/dist/cli/{chunk-7XAM7KDW.mjs → chunk-QHGPA362.mjs} +18 -3
- package/dist/cli/{chunk-VYLJJQ7Y.js → chunk-RMTASUAK.js} +65 -65
- package/dist/cli/{chunk-HRWUQJ4K.js → chunk-RTO5QZWT.js} +6 -6
- package/dist/cli/{chunk-7MVWUXOD.mjs → chunk-TLQ3FZOC.mjs} +3 -3
- package/dist/cli/{chunk-56IFFVIB.js → chunk-V7UP2F4U.js} +4 -4
- package/dist/cli/{chunk-6D7A2FSL.mjs → chunk-VE3U3SQC.mjs} +1 -1
- package/dist/cli/{chunk-36ML3YKA.js → chunk-WQJJNIMQ.js} +13 -13
- package/dist/cli/{chunk-47M6HPGP.mjs → chunk-XKZXO7D3.mjs} +1 -1
- package/dist/cli/{csv-SVOD5UBH.mjs → csv-RLRR74RQ.mjs} +3 -3
- package/dist/cli/{csv-HTS5ZYQ4.js → csv-TF576S77.js} +12 -12
- package/dist/cli/{db-7AP4P52N.js → db-FDBJUTFO.js} +30 -30
- package/dist/cli/{db-7QLNI3Q4.mjs → db-XORGNBIC.mjs} +5 -5
- package/dist/cli/{describe-DBRY5BNK.mjs → describe-6O2ENKTP.mjs} +86 -68
- package/dist/cli/{describe-YKOE54ZO.js → describe-EFWNECHI.js} +100 -82
- package/dist/cli/{executions-GRQXTB2P.js → executions-SFYAXPF4.js} +7 -7
- package/dist/cli/{executions-QNZTPNG4.mjs → executions-YPP7WR77.mjs} +5 -5
- package/dist/cli/{feedback-ZOLA2KY7.js → feedback-5UZFYMGB.js} +7 -7
- package/dist/cli/{feedback-JMCSR624.mjs → feedback-RBGA5ARU.mjs} +3 -3
- package/dist/cli/git-5LDY5ZID.js +23 -0
- package/dist/cli/{git-LJGL2IHS.mjs → git-IRSAJEK2.mjs} +4 -4
- package/dist/cli/index.js +94 -94
- package/dist/cli/index.mjs +38 -38
- package/dist/cli/{legacy-noops-YSCIR2SD.js → legacy-noops-CVAOQY2F.js} +7 -7
- package/dist/cli/{legacy-noops-F23PKVBN.mjs → legacy-noops-NA7N6ZOU.mjs} +4 -4
- package/dist/cli/{monitors-WMZ6HJZX.js → monitors-4OMRXCXP.js} +86 -86
- package/dist/cli/{monitors-S4LOEL7W.mjs → monitors-ILZ2XHYG.mjs} +5 -5
- package/dist/cli/{org-U3WA2NQM.mjs → org-QDDXAE3J.mjs} +5 -5
- package/dist/cli/{org-PFHM5ZLY.js → org-YGNJDD2X.js} +65 -65
- package/dist/cli/{chunk-4KLCLLTO.js → play-L535H26U.js} +266 -323
- package/dist/cli/{chunk-XMAPE2KH.mjs → play-VT6OHB2D.mjs} +72 -129
- package/dist/cli/{providers-XYMHLKCA.js → providers-GPZ6PQAL.js} +8 -8
- package/dist/cli/{providers-QBBRFBOH.mjs → providers-KG4W5MPK.mjs} +5 -5
- package/dist/cli/{quickstart-5JTDGISY.mjs → quickstart-2JDGTXIG.mjs} +3 -3
- package/dist/cli/{quickstart-IYGD6ZY3.js → quickstart-UI27S5LO.js} +5 -5
- package/dist/cli/search-MGWROZ33.js +28 -0
- package/dist/cli/{search-X6W6GRHS.mjs → search-PW3RAUX7.mjs} +6 -6
- package/dist/cli/{secrets-N55B67H6.mjs → secrets-HNOMK5A2.mjs} +5 -5
- package/dist/cli/{secrets-UHG6OQFD.js → secrets-WFAXOUZE.js} +14 -14
- package/dist/cli/{sessions-57L5MGHN.js → sessions-366KROUA.js} +5 -5
- package/dist/cli/{sessions-JTRSTDSS.mjs → sessions-XLX3E5UO.mjs} +4 -4
- package/dist/cli/{settings-ATX4U5AS.js → settings-GADAG2UK.js} +75 -75
- package/dist/cli/{settings-Q24HRAQI.mjs → settings-YNZ4YKCH.mjs} +8 -8
- package/dist/cli/{setup-77ZWLVHT.mjs → setup-PSEHIUXO.mjs} +6 -6
- package/dist/cli/{setup-EJCNOUCE.js → setup-R5YO7GT6.js} +41 -41
- package/dist/cli/skills-JF2LPEGM.js +28 -0
- package/dist/cli/{skills-XIS5AWQI.mjs → skills-LTQBP6CZ.mjs} +4 -4
- package/dist/cli/tools-CP2PEFRN.js +34 -0
- package/dist/cli/{tools-WCKLYEGQ.mjs → tools-UAXDWU63.mjs} +11 -19
- package/dist/cli/update-HZHZOU6C.js +28 -0
- package/dist/cli/{update-UT5WANMV.mjs → update-SMNIBIMS.mjs} +6 -6
- package/dist/cli/{workflow-226QYUN2.js → workflow-AOQVZHMD.js} +16 -16
- package/dist/cli/{workflow-ZMX3L4ML.mjs → workflow-IKGMBGF6.mjs} +6 -6
- package/dist/{client-CivP-PAI.d.ts → client-Bgis7F6-.d.ts} +2 -1
- package/dist/{client-hdFtwhTm.d.mts → client-DiGl8ska.d.mts} +2 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -11
- package/dist/index.mjs +9 -9
- package/dist/install-integrity.json +78 -80
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/play-description.js +4 -2
- package/dist/plays/play-description.mjs +3 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +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-UYCOBAL5.js +0 -39
- package/dist/cli/git-EJQLRK27.js +0 -23
- package/dist/cli/play-AGSECQFN.mjs +0 -159
- package/dist/cli/play-BR2LWGXK.js +0 -159
- package/dist/cli/search-ZVSYH5GY.js +0 -28
- package/dist/cli/skills-SPXUBLII.js +0 -28
- package/dist/cli/tools-DBHUUZJX.js +0 -42
- package/dist/cli/update-VSNFXRHJ.js +0 -28
- package/dist/cli/{chunk-KZZC33PY.mjs → chunk-H5KLUGY7.mjs} +214 -214
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
var _chunkKXMNM4AQjs = require('./chunk-KXMNM4AQ.js');
|
|
7
|
+
|
|
5
8
|
// src/cli/described.ts
|
|
6
9
|
var SHAPE = "{}";
|
|
7
10
|
var RECORD = "Record<string, ";
|
|
@@ -617,42 +620,66 @@ function describedJson(described, view) {
|
|
|
617
620
|
...hidden.length ? { hidden } : {}
|
|
618
621
|
};
|
|
619
622
|
}
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
const path = process.env.DEEPLINE_EXECUTION_OBSERVATION_PATH;
|
|
625
|
-
const invocationId = process.env.DEEPLINE_EXECUTION_OBSERVATION_ID;
|
|
626
|
-
if (!path || !invocationId) return;
|
|
627
|
-
const pending = `${path}.pending`;
|
|
628
|
-
_fs.writeFileSync.call(void 0,
|
|
629
|
-
pending,
|
|
630
|
-
JSON.stringify({
|
|
631
|
-
schema_version: 1,
|
|
632
|
-
invocation_id: invocationId,
|
|
633
|
-
...observation
|
|
634
|
-
}),
|
|
635
|
-
{ mode: 384 }
|
|
636
|
-
);
|
|
637
|
-
_fs.renameSync.call(void 0, pending, path);
|
|
638
|
-
}
|
|
639
|
-
function recordApiResponse(observation) {
|
|
640
|
-
writeObservation({
|
|
641
|
-
kind: "api_response",
|
|
642
|
-
received_at_ms: observation.receivedAtMs,
|
|
643
|
-
state: observation.state,
|
|
644
|
-
http_status: observation.httpStatus
|
|
645
|
-
});
|
|
623
|
+
function buildPlayDashboardUrl(baseUrl, playName) {
|
|
624
|
+
const trimmedBase = baseUrl.replace(/\/$/, "");
|
|
625
|
+
const encodedPlayName = encodeURIComponent(playName);
|
|
626
|
+
return `${trimmedBase}/dashboard/plays/${encodedPlayName}`;
|
|
646
627
|
}
|
|
647
|
-
function
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
628
|
+
function describedPlay(play) {
|
|
629
|
+
const reference = play.reference || play.name;
|
|
630
|
+
const starter = _nullishCoalesce(play.cloneEditStarter, () => ( _chunkKXMNM4AQjs.cloneEditStarter.call(void 0, play)));
|
|
631
|
+
const csv = _nullishCoalesce(play.csvInput, () => ( {}));
|
|
632
|
+
const csvField = typeof csv.inputField === "string" ? csv.inputField : "csv";
|
|
633
|
+
const alongside = /* @__PURE__ */ new Set([
|
|
634
|
+
csvField,
|
|
635
|
+
"columns",
|
|
636
|
+
...Array.isArray(csv.runLevelControlFields) ? csv.runLevelControlFields.map(String) : []
|
|
637
|
+
]);
|
|
638
|
+
const declared = schemaFields(play.inputSchema).map((field) => field.name);
|
|
639
|
+
const rowNames = schemaFields(csv.rowInputSchema).map((field) => field.name);
|
|
640
|
+
const replaced = play.csvInput ? (rowNames.length > 0 ? rowNames : declared).filter(
|
|
641
|
+
(name) => declared.includes(name) && !alongside.has(name)
|
|
642
|
+
) : [];
|
|
643
|
+
const exclusive = replaced.length ? { field: csvField, with: replaced } : void 0;
|
|
644
|
+
const headers = isRecord(csv.defaultColumns) ? csv.defaultColumns : {};
|
|
645
|
+
const rowInputs = schemaFields(csv.rowInputSchema).map((field) => {
|
|
646
|
+
const header = [headers[field.name]].flat().filter((name) => name && name !== field.name).join(" or ");
|
|
647
|
+
return header ? {
|
|
648
|
+
...field,
|
|
649
|
+
description: [field.description, `CSV header: ${header}`].filter(Boolean).join(" - ")
|
|
650
|
+
} : field;
|
|
655
651
|
});
|
|
652
|
+
const rowOutput = _nullishCoalesce(play.rowOutputSchema, () => ( {}));
|
|
653
|
+
const added = isRecord(rowOutput.addedColumns) ? rowOutput.addedColumns : {};
|
|
654
|
+
const rowOutputs = schemaFields(
|
|
655
|
+
Object.keys(added).length ? { properties: added } : rowOutput
|
|
656
|
+
).map((field) => ({ ...field, required: true }));
|
|
657
|
+
return {
|
|
658
|
+
kind: play.ownerType === "deepline" ? "prebuilt_play" : "custom_play",
|
|
659
|
+
id: reference,
|
|
660
|
+
...play.displayName && play.displayName !== play.name ? { displayName: play.displayName } : {},
|
|
661
|
+
...play.description ? { description: play.description } : {},
|
|
662
|
+
...play.observedCost ? { cost: play.observedCost.displayText } : {},
|
|
663
|
+
guidance: [],
|
|
664
|
+
inputs: schemaFields(play.inputSchema),
|
|
665
|
+
outputs: schemaFields(play.outputSchema),
|
|
666
|
+
...rowInputs.length ? { rowInputs } : {},
|
|
667
|
+
...typeof csv.inputField === "string" ? { csvInput: csv.inputField } : {},
|
|
668
|
+
...rowOutputs.length ? {
|
|
669
|
+
rowOutputs,
|
|
670
|
+
rowOutputsAddToSource: Object.keys(added).length > 0 || rowOutput.preservesSourceColumns === true
|
|
671
|
+
} : {},
|
|
672
|
+
runner: {
|
|
673
|
+
via: "play",
|
|
674
|
+
reference,
|
|
675
|
+
// A CSV play's run command is built by the server around its columns.
|
|
676
|
+
...play.csvInput ? { cli: play.runCommand } : {}
|
|
677
|
+
},
|
|
678
|
+
...starter ? { source: starter.command } : {},
|
|
679
|
+
...exclusive ? { exclusive } : {},
|
|
680
|
+
// A prebuilt's cost is what its recent runs were charged; there is no rate.
|
|
681
|
+
..._optionalChain([play, 'access', _12 => _12.observedCost, 'optionalAccess', _13 => _13.displayText]) ? { cost: play.observedCost.displayText } : {}
|
|
682
|
+
};
|
|
656
683
|
}
|
|
657
684
|
|
|
658
685
|
// src/cli/describe-options.ts
|
|
@@ -697,6 +724,45 @@ function addDescribeOptions(command, options = {}) {
|
|
|
697
724
|
return command;
|
|
698
725
|
}
|
|
699
726
|
|
|
727
|
+
// src/cli/execution-observation.ts
|
|
728
|
+
var _fs = require('fs');
|
|
729
|
+
function writeObservation(observation) {
|
|
730
|
+
const path = process.env.DEEPLINE_EXECUTION_OBSERVATION_PATH;
|
|
731
|
+
const invocationId = process.env.DEEPLINE_EXECUTION_OBSERVATION_ID;
|
|
732
|
+
if (!path || !invocationId) return;
|
|
733
|
+
const pending = `${path}.pending`;
|
|
734
|
+
_fs.writeFileSync.call(void 0,
|
|
735
|
+
pending,
|
|
736
|
+
JSON.stringify({
|
|
737
|
+
schema_version: 1,
|
|
738
|
+
invocation_id: invocationId,
|
|
739
|
+
...observation
|
|
740
|
+
}),
|
|
741
|
+
{ mode: 384 }
|
|
742
|
+
);
|
|
743
|
+
_fs.renameSync.call(void 0, pending, path);
|
|
744
|
+
}
|
|
745
|
+
function recordApiResponse(observation) {
|
|
746
|
+
writeObservation({
|
|
747
|
+
kind: "api_response",
|
|
748
|
+
received_at_ms: observation.receivedAtMs,
|
|
749
|
+
state: observation.state,
|
|
750
|
+
http_status: observation.httpStatus
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
function recordPlayTermination(run) {
|
|
754
|
+
if (typeof run.id !== "string" || !["completed", "failed", "cancelled", "canceled"].includes(
|
|
755
|
+
String(run.status)
|
|
756
|
+
) || typeof run.finishedAt !== "number" || !Number.isSafeInteger(run.finishedAt) || run.finishedAt <= 0)
|
|
757
|
+
return;
|
|
758
|
+
writeObservation({
|
|
759
|
+
kind: "play_terminal",
|
|
760
|
+
run: { id: run.id, status: run.status, finishedAt: run.finishedAt }
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
|
|
700
766
|
|
|
701
767
|
|
|
702
768
|
|
|
@@ -711,4 +777,4 @@ function addDescribeOptions(command, options = {}) {
|
|
|
711
777
|
|
|
712
778
|
|
|
713
779
|
|
|
714
|
-
exports.byokLines = byokLines; exports.SCHEMA_LINE_LIMIT = SCHEMA_LINE_LIMIT; exports.schemaField = schemaField; exports.schemaFields = schemaFields; exports.rateLimitSummary = rateLimitSummary; exports.schemaLines = schemaLines; exports.examples = examples; exports.describedLines = describedLines; exports.topLevelField = topLevelField; exports.describedJson = describedJson; exports.
|
|
780
|
+
exports.byokLines = byokLines; exports.SCHEMA_LINE_LIMIT = SCHEMA_LINE_LIMIT; exports.schemaField = schemaField; exports.schemaFields = schemaFields; exports.rateLimitSummary = rateLimitSummary; exports.schemaLines = schemaLines; exports.examples = examples; exports.describedLines = describedLines; exports.topLevelField = topLevelField; exports.describedJson = describedJson; exports.buildPlayDashboardUrl = buildPlayDashboardUrl; exports.describedPlay = describedPlay; exports.addDescribeOptions = addDescribeOptions; exports.recordApiResponse = recordApiResponse; exports.recordPlayTermination = recordPlayTermination;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MR6XCBQJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
printCommandEnvelope,
|
|
6
6
|
renderCommandEnvelopeText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XKZXO7D3.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveConfig,
|
|
10
10
|
sdkCliStateDirPath
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VE3U3SQC.mjs";
|
|
12
12
|
|
|
13
13
|
// src/cli/commands/search.ts
|
|
14
14
|
import { Option } from "commander";
|
|
@@ -238,6 +238,11 @@ function rateLimitDisplay(item) {
|
|
|
238
238
|
);
|
|
239
239
|
return tightest ? `${tightest.requestsPerWindow}/${RATE_WINDOW_UNITS[tightest.windowMs] ?? `${tightest.windowMs / 1e3}s`}` : "\u2014";
|
|
240
240
|
}
|
|
241
|
+
function failureRateDisplay(rate) {
|
|
242
|
+
if (typeof rate !== "number") return "\u2014";
|
|
243
|
+
const percent = Math.round(rate * 100);
|
|
244
|
+
return percent === 0 && rate > 0 ? "<1%" : `${percent}%`;
|
|
245
|
+
}
|
|
241
246
|
function searchRow(item) {
|
|
242
247
|
const { cost, notes } = pricingDisplay(item);
|
|
243
248
|
const observedMax = item.billingSource === "own_provider_credentials" ? "" : observedMaxText(item.pricing);
|
|
@@ -253,6 +258,9 @@ function searchRow(item) {
|
|
|
253
258
|
kind: item.kind,
|
|
254
259
|
cost,
|
|
255
260
|
rateLimit: rateLimitDisplay(item),
|
|
261
|
+
// Production share of errored or rate-limited calls; absent when too few
|
|
262
|
+
// calls or orgs used the tool to say.
|
|
263
|
+
failureRate: failureRateDisplay(item.failureRate),
|
|
256
264
|
summary: clipSummary(item.description ?? ""),
|
|
257
265
|
notes
|
|
258
266
|
};
|
|
@@ -274,6 +282,13 @@ function renderSearchResults(result) {
|
|
|
274
282
|
alignment: "right"
|
|
275
283
|
}
|
|
276
284
|
] : [],
|
|
285
|
+
...rows.some((row) => row.failureRate !== "\u2014") ? [
|
|
286
|
+
{
|
|
287
|
+
header: "FAILURES",
|
|
288
|
+
value: (row) => row.failureRate,
|
|
289
|
+
alignment: "right"
|
|
290
|
+
}
|
|
291
|
+
] : [],
|
|
277
292
|
{ header: "SUMMARY", value: (row) => row.summary }
|
|
278
293
|
];
|
|
279
294
|
const render = result.render;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkRTO5QZWTjs = require('./chunk-RTO5QZWT.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -22,13 +22,13 @@ var _chunkHRWUQJ4Kjs = require('./chunk-HRWUQJ4K.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkV7UP2F4Ujs = require('./chunk-V7UP2F4U.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunkGNN4MY5Xjs = require('./chunk-GNN4MY5X.js');
|
|
32
32
|
|
|
33
33
|
// src/cli/commands/skills.ts
|
|
34
34
|
var _child_process = require('child_process');
|
|
@@ -126,7 +126,7 @@ function skillsSourceUrl(baseUrl) {
|
|
|
126
126
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
127
127
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
128
128
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
129
|
-
const agents = _nullishCoalesce(options.agents, () => (
|
|
129
|
+
const agents = _nullishCoalesce(options.agents, () => ( _chunkV7UP2F4Ujs.DEFAULT_SKILL_AGENTS));
|
|
130
130
|
const values = {
|
|
131
131
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
132
132
|
skills_source_url: skillsSourceUrl(baseUrl),
|
|
@@ -202,7 +202,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
202
202
|
return value === "1" || value === "true" || value === "yes";
|
|
203
203
|
}
|
|
204
204
|
function sdkCompatibilityCachePath(baseUrl, homeDir = _os.homedir.call(void 0, )) {
|
|
205
|
-
return _path.join.call(void 0,
|
|
205
|
+
return _path.join.call(void 0, _chunkV7UP2F4Ujs.sdkCliStateDirPath.call(void 0, baseUrl, homeDir), "compat-cache.json");
|
|
206
206
|
}
|
|
207
207
|
function legacySdkCompatibilityCachePath(homeDir = _os.homedir.call(void 0, )) {
|
|
208
208
|
return _path.join.call(void 0, homeDir, ".cache", "deepline", "sdk-compat-cache.json");
|
|
@@ -210,9 +210,9 @@ function legacySdkCompatibilityCachePath(homeDir = _os.homedir.call(void 0, )) {
|
|
|
210
210
|
function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
211
211
|
return JSON.stringify({
|
|
212
212
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
213
|
-
version:
|
|
214
|
-
apiContract:
|
|
215
|
-
apiMajor:
|
|
213
|
+
version: _chunkV7UP2F4Ujs.SDK_VERSION,
|
|
214
|
+
apiContract: _chunkV7UP2F4Ujs.SDK_API_CONTRACT,
|
|
215
|
+
apiMajor: _chunkV7UP2F4Ujs.SDK_API_MAJOR,
|
|
216
216
|
command: _optionalChain([command, 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]) || null,
|
|
217
217
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
218
218
|
});
|
|
@@ -220,8 +220,8 @@ function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
|
220
220
|
function legacyCompatibilityCacheKey(baseUrl, command) {
|
|
221
221
|
return JSON.stringify({
|
|
222
222
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
223
|
-
version:
|
|
224
|
-
apiContract:
|
|
223
|
+
version: _chunkV7UP2F4Ujs.SDK_VERSION,
|
|
224
|
+
apiContract: _chunkV7UP2F4Ujs.SDK_API_CONTRACT,
|
|
225
225
|
command: _optionalChain([command, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]) || null
|
|
226
226
|
});
|
|
227
227
|
}
|
|
@@ -314,7 +314,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
314
314
|
);
|
|
315
315
|
try {
|
|
316
316
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
317
|
-
url.searchParams.set("version",
|
|
317
|
+
url.searchParams.set("version", _chunkV7UP2F4Ujs.SDK_VERSION);
|
|
318
318
|
if (_optionalChain([options, 'access', _19 => _19.command, 'optionalAccess', _20 => _20.trim, 'call', _21 => _21()])) {
|
|
319
319
|
url.searchParams.set("command", options.command.trim());
|
|
320
320
|
}
|
|
@@ -322,7 +322,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
322
322
|
url.searchParams.set("skills_version", _nullishCoalesce(options.skillsVersion, () => ( "")));
|
|
323
323
|
url.searchParams.set(
|
|
324
324
|
"skills_cli_capability",
|
|
325
|
-
String(
|
|
325
|
+
String(_chunkGNN4MY5Xjs.SDK_RELEASE.packageCapabilities.skillsGuidance)
|
|
326
326
|
);
|
|
327
327
|
}
|
|
328
328
|
if (options.catalog) {
|
|
@@ -331,13 +331,13 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
331
331
|
const response = await fetch(url, {
|
|
332
332
|
method: "GET",
|
|
333
333
|
headers: {
|
|
334
|
-
...
|
|
335
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
336
|
-
"X-Deepline-SDK-Version":
|
|
337
|
-
"X-Deepline-API-Major": String(
|
|
338
|
-
"X-Deepline-API-Contract":
|
|
334
|
+
..._chunkV7UP2F4Ujs.deploymentProtectionHeaders.call(void 0, ),
|
|
335
|
+
"User-Agent": `deepline-ts-sdk/${_chunkV7UP2F4Ujs.SDK_VERSION}`,
|
|
336
|
+
"X-Deepline-SDK-Version": _chunkV7UP2F4Ujs.SDK_VERSION,
|
|
337
|
+
"X-Deepline-API-Major": String(_chunkV7UP2F4Ujs.SDK_API_MAJOR),
|
|
338
|
+
"X-Deepline-API-Contract": _chunkV7UP2F4Ujs.SDK_API_CONTRACT,
|
|
339
339
|
"X-Deepline-CLI-Update-Preferences": "1",
|
|
340
|
-
...options.catalog ? { Authorization: `Bearer ${
|
|
340
|
+
...options.catalog ? { Authorization: `Bearer ${_chunkV7UP2F4Ujs.resolveApiKeyForBaseUrl.call(void 0, baseUrl)}` } : {}
|
|
341
341
|
},
|
|
342
342
|
signal: controller.signal
|
|
343
343
|
});
|
|
@@ -590,7 +590,7 @@ function buildEnvironmentContext() {
|
|
|
590
590
|
node_version: process.version,
|
|
591
591
|
runtime: "Node.js",
|
|
592
592
|
hostname: _os.hostname.call(void 0, ),
|
|
593
|
-
agent_runtime:
|
|
593
|
+
agent_runtime: _chunkV7UP2F4Ujs.detectAgentRuntime.call(void 0, )
|
|
594
594
|
};
|
|
595
595
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
596
596
|
const normalized = _optionalChain([process, 'access', _32 => _32.env, 'access', _33 => _33[key], 'optionalAccess', _34 => _34.trim, 'call', _35 => _35()]);
|
|
@@ -612,15 +612,15 @@ function buildEnvironmentContext() {
|
|
|
612
612
|
}
|
|
613
613
|
function failureReportHeaders(apiKey) {
|
|
614
614
|
return {
|
|
615
|
-
...
|
|
615
|
+
..._chunkV7UP2F4Ujs.deploymentProtectionHeaders.call(void 0, ),
|
|
616
616
|
Authorization: `Bearer ${apiKey}`,
|
|
617
617
|
"Content-Type": "application/json",
|
|
618
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
618
|
+
"User-Agent": `deepline-ts-sdk/${_chunkV7UP2F4Ujs.SDK_VERSION}`,
|
|
619
619
|
"X-Deepline-Client-Family": "sdk",
|
|
620
620
|
"X-Deepline-CLI-Family": "sdk",
|
|
621
|
-
"X-Deepline-Agent-Runtime":
|
|
622
|
-
"X-Deepline-CLI-Version":
|
|
623
|
-
"X-Deepline-SDK-Version":
|
|
621
|
+
"X-Deepline-Agent-Runtime": _chunkV7UP2F4Ujs.detectAgentRuntime.call(void 0, ),
|
|
622
|
+
"X-Deepline-CLI-Version": _chunkV7UP2F4Ujs.SDK_VERSION,
|
|
623
|
+
"X-Deepline-SDK-Version": _chunkV7UP2F4Ujs.SDK_VERSION
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
626
|
async function postFailureReport(input) {
|
|
@@ -648,7 +648,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
648
648
|
if (isFailureReportingDisabled()) return false;
|
|
649
649
|
let apiKey = "";
|
|
650
650
|
try {
|
|
651
|
-
apiKey =
|
|
651
|
+
apiKey = _chunkV7UP2F4Ujs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
652
652
|
} catch (e7) {
|
|
653
653
|
return false;
|
|
654
654
|
}
|
|
@@ -675,7 +675,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
675
675
|
failure_code: failureCode2,
|
|
676
676
|
failure_stage: failureStage,
|
|
677
677
|
error_body: "Automatic Deepline skills installation failed.",
|
|
678
|
-
cli_version:
|
|
678
|
+
cli_version: _chunkV7UP2F4Ujs.SDK_VERSION,
|
|
679
679
|
context: {
|
|
680
680
|
environment: buildEnvironmentContext(),
|
|
681
681
|
skills_sync: {
|
|
@@ -795,7 +795,7 @@ function buildFailureReport(input) {
|
|
|
795
795
|
failure_kind: failureKind,
|
|
796
796
|
failure_code: code,
|
|
797
797
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
798
|
-
cli_version:
|
|
798
|
+
cli_version: _chunkV7UP2F4Ujs.SDK_VERSION,
|
|
799
799
|
context: {
|
|
800
800
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
801
801
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -815,8 +815,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
815
815
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
816
816
|
const exitCode = resolvedExitCode(input);
|
|
817
817
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
818
|
-
const baseUrl =
|
|
819
|
-
const apiKey =
|
|
818
|
+
const baseUrl = _chunkV7UP2F4Ujs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
819
|
+
const apiKey = _chunkV7UP2F4Ujs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
820
820
|
if (!apiKey) return false;
|
|
821
821
|
return postFailureReport({
|
|
822
822
|
baseUrl,
|
|
@@ -837,25 +837,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
837
837
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
838
838
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
839
839
|
function shouldSkipSkillsSync() {
|
|
840
|
-
if (
|
|
840
|
+
if (_chunkV7UP2F4Ujs.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
841
841
|
return true;
|
|
842
842
|
}
|
|
843
843
|
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()]);
|
|
844
844
|
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
845
845
|
}
|
|
846
846
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
847
|
-
return _path.join.call(void 0,
|
|
847
|
+
return _path.join.call(void 0, _chunkV7UP2F4Ujs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
848
848
|
}
|
|
849
849
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
850
850
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
851
|
-
var agentLeaseSegment =
|
|
851
|
+
var agentLeaseSegment = _chunkV7UP2F4Ujs.skillsAgentPathSegment;
|
|
852
852
|
function sortedLeaseAgents(agents) {
|
|
853
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
853
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkV7UP2F4Ujs.KNOWN_SKILL_AGENTS] : agents;
|
|
854
854
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
855
855
|
}
|
|
856
856
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
857
857
|
return _path.join.call(void 0,
|
|
858
|
-
|
|
858
|
+
_chunkV7UP2F4Ujs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
859
859
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
860
860
|
);
|
|
861
861
|
}
|
|
@@ -1014,7 +1014,7 @@ var SkillsStateUnavailableError = class extends Error {
|
|
|
1014
1014
|
constructor(baseUrl, error) {
|
|
1015
1015
|
const detail = error instanceof Error ? error.message : String(error);
|
|
1016
1016
|
super(
|
|
1017
|
-
`Could not save skills state in ${
|
|
1017
|
+
`Could not save skills state in ${_chunkV7UP2F4Ujs.sdkCliStateDirPath.call(void 0, baseUrl)}: ${detail}`
|
|
1018
1018
|
);
|
|
1019
1019
|
this.name = "SkillsStateUnavailableError";
|
|
1020
1020
|
}
|
|
@@ -1099,7 +1099,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
1101
1101
|
return _path.join.call(void 0,
|
|
1102
|
-
|
|
1102
|
+
_chunkV7UP2F4Ujs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1103
1103
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
1104
1104
|
);
|
|
1105
1105
|
}
|
|
@@ -1133,8 +1133,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
1133
1133
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
1134
1134
|
}
|
|
1135
1135
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
1136
|
-
if (shouldSkipSkillsSync() ||
|
|
1137
|
-
const agents =
|
|
1136
|
+
if (shouldSkipSkillsSync() || _chunkV7UP2F4Ujs.hasActivePluginSkills.call(void 0, )) return;
|
|
1137
|
+
const agents = _chunkV7UP2F4Ujs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1138
1138
|
if (agents.length === 0) return;
|
|
1139
1139
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1140
1140
|
}
|
|
@@ -1150,7 +1150,7 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError) {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
1152
1152
|
return _path.join.call(void 0,
|
|
1153
|
-
|
|
1153
|
+
_chunkV7UP2F4Ujs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1154
1154
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
1155
1155
|
);
|
|
1156
1156
|
}
|
|
@@ -1179,7 +1179,7 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
1179
1179
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
1180
1180
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
1181
1181
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
1182
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess', _65 => _65.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames,
|
|
1182
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _65 => _65.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunkV7UP2F4Ujs.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
1183
1183
|
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.`;
|
|
1184
1184
|
notice(
|
|
1185
1185
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
@@ -1267,7 +1267,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
1267
1267
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
1268
1268
|
}
|
|
1269
1269
|
function isDefaultAgentSet(agents) {
|
|
1270
|
-
return agents.length ===
|
|
1270
|
+
return agents.length === _chunkV7UP2F4Ujs.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkV7UP2F4Ujs.DEFAULT_SKILL_AGENTS[index]);
|
|
1271
1271
|
}
|
|
1272
1272
|
function safeSkillFilePath(value) {
|
|
1273
1273
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -1424,10 +1424,10 @@ async function fetchSkillsUpdate(baseUrl, localVersion) {
|
|
|
1424
1424
|
method: "POST",
|
|
1425
1425
|
headers: { "Content-Type": "application/json" },
|
|
1426
1426
|
body: JSON.stringify({
|
|
1427
|
-
sdk_cli: { version:
|
|
1427
|
+
sdk_cli: { version: _chunkV7UP2F4Ujs.SDK_VERSION },
|
|
1428
1428
|
skills: {
|
|
1429
1429
|
version: localVersion,
|
|
1430
|
-
capability:
|
|
1430
|
+
capability: _chunkGNN4MY5Xjs.SDK_RELEASE.packageCapabilities.skillsGuidance
|
|
1431
1431
|
}
|
|
1432
1432
|
}),
|
|
1433
1433
|
signal: controller.signal
|
|
@@ -1466,7 +1466,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
function noInstallerProbePath(baseUrl) {
|
|
1468
1468
|
return _path.join.call(void 0,
|
|
1469
|
-
|
|
1469
|
+
_chunkV7UP2F4Ujs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1470
1470
|
"skills-sync-no-installer-unknown.json"
|
|
1471
1471
|
);
|
|
1472
1472
|
}
|
|
@@ -1545,7 +1545,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1545
1545
|
function resolveSkillsInstallSpawn(install, platform2 = process.platform) {
|
|
1546
1546
|
return resolveShellSpawn(install.command, install.args, platform2);
|
|
1547
1547
|
}
|
|
1548
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1548
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunkV7UP2F4Ujs.DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1549
1549
|
const commands = [];
|
|
1550
1550
|
const probes = _nullishCoalesce(knownProbes, () => ( probeInstallers()));
|
|
1551
1551
|
if (probes.bunx === "available") {
|
|
@@ -1697,11 +1697,11 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1697
1697
|
}
|
|
1698
1698
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1699
1699
|
if (shouldSkipSkillsSync()) return;
|
|
1700
|
-
const usingPluginSkills =
|
|
1700
|
+
const usingPluginSkills = _chunkV7UP2F4Ujs.hasActivePluginSkills.call(void 0, );
|
|
1701
1701
|
if (usingPluginSkills) {
|
|
1702
1702
|
return;
|
|
1703
1703
|
}
|
|
1704
|
-
const agents =
|
|
1704
|
+
const agents = _chunkV7UP2F4Ujs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1705
1705
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1706
1706
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1707
1707
|
}
|
|
@@ -1729,7 +1729,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1729
1729
|
return;
|
|
1730
1730
|
}
|
|
1731
1731
|
try {
|
|
1732
|
-
const localVersion =
|
|
1732
|
+
const localVersion = _chunkV7UP2F4Ujs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1733
1733
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1734
1734
|
needsUpdate: options.update.needs_update,
|
|
1735
1735
|
remoteVersion: options.update.remote.version
|
|
@@ -1895,7 +1895,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1895
1895
|
}
|
|
1896
1896
|
}
|
|
1897
1897
|
runLegacySkillsCleanup(agents);
|
|
1898
|
-
if (!
|
|
1898
|
+
if (!_chunkV7UP2F4Ujs.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
1899
1899
|
notice(
|
|
1900
1900
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
1901
1901
|
);
|
|
@@ -1954,7 +1954,7 @@ function inferActiveSkillsScope(entrypoint = _nullishCoalesce(process.argv[1], (
|
|
|
1954
1954
|
return /[\\/]\.deepline[\\/]runtime[\\/]/.test(entrypoint) ? "local" : "global";
|
|
1955
1955
|
}
|
|
1956
1956
|
function resolveLocalRoot() {
|
|
1957
|
-
const target =
|
|
1957
|
+
const target = _chunkV7UP2F4Ujs.resolveProjectPinTarget.call(void 0, );
|
|
1958
1958
|
if (!target.ok) {
|
|
1959
1959
|
throw new Error(
|
|
1960
1960
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -1965,7 +1965,7 @@ function resolveLocalRoot() {
|
|
|
1965
1965
|
return target.dir;
|
|
1966
1966
|
}
|
|
1967
1967
|
function detectSkillsAgents(input) {
|
|
1968
|
-
const runtime = _nullishCoalesce(input.runtime, () => (
|
|
1968
|
+
const runtime = _nullishCoalesce(input.runtime, () => ( _chunkV7UP2F4Ujs.detectAgentRuntime.call(void 0, )));
|
|
1969
1969
|
const knownAgent = RUNTIME_TO_SKILLS_AGENT[runtime];
|
|
1970
1970
|
if (knownAgent) return [knownAgent];
|
|
1971
1971
|
const roots = [
|
|
@@ -1980,7 +1980,7 @@ function detectSkillsAgents(input) {
|
|
|
1980
1980
|
return detected.length > 0 ? detected : ["*"];
|
|
1981
1981
|
}
|
|
1982
1982
|
function skillsStatePathForScope(baseUrl, scope, root) {
|
|
1983
|
-
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0,
|
|
1983
|
+
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0, _chunkV7UP2F4Ujs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-install.json");
|
|
1984
1984
|
}
|
|
1985
1985
|
function buildSkillsPlan(input) {
|
|
1986
1986
|
const scopeArgs = input.scope === "global" ? ["--global"] : [];
|
|
@@ -2102,7 +2102,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2102
2102
|
scope = normalizeScope(options.scope);
|
|
2103
2103
|
root = scope === "local" ? resolveLocalRoot() : null;
|
|
2104
2104
|
} catch (error) {
|
|
2105
|
-
|
|
2105
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2106
2106
|
{
|
|
2107
2107
|
ok: false,
|
|
2108
2108
|
status: "failed",
|
|
@@ -2114,22 +2114,22 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2114
2114
|
);
|
|
2115
2115
|
return 2;
|
|
2116
2116
|
}
|
|
2117
|
-
const baseUrl =
|
|
2117
|
+
const baseUrl = _chunkV7UP2F4Ujs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
2118
2118
|
const catalog = {
|
|
2119
2119
|
skillNames: [...DEFAULT_SDK_SKILL_NAMES],
|
|
2120
|
-
version:
|
|
2120
|
+
version: _chunkV7UP2F4Ujs.SDK_VERSION
|
|
2121
2121
|
};
|
|
2122
2122
|
const agents = options.agent ? [options.agent] : detectSkillsAgents({ scope, root });
|
|
2123
2123
|
const plan = buildSkillsPlan({ baseUrl, scope, root, agents, ...catalog });
|
|
2124
2124
|
if (options.dryRun) {
|
|
2125
|
-
|
|
2125
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2126
2126
|
{ ok: true, status: "planned", dryRun: true, ...plan },
|
|
2127
2127
|
{ json: options.json }
|
|
2128
2128
|
);
|
|
2129
2129
|
return 0;
|
|
2130
2130
|
}
|
|
2131
2131
|
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !hasFailedAutomaticSkillsSync(baseUrl, agents)) {
|
|
2132
|
-
|
|
2132
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2133
2133
|
{
|
|
2134
2134
|
ok: true,
|
|
2135
2135
|
status: "current",
|
|
@@ -2164,7 +2164,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2164
2164
|
.../* @__PURE__ */ new Set([...plan.skillNames, ...LEGACY_SKILL_NAMES_TO_REMOVE])
|
|
2165
2165
|
];
|
|
2166
2166
|
const agentRoots = workspaceSkillRootsForAgents(plan.agents);
|
|
2167
|
-
|
|
2167
|
+
_chunkV7UP2F4Ujs.ensureProjectPrivatePathsIgnored.call(void 0, root, [
|
|
2168
2168
|
".deepline/",
|
|
2169
2169
|
...agentRoots.flatMap(
|
|
2170
2170
|
(agentRoot) => managedNames.map((name) => `${agentRoot}/skills/${name}/`)
|
|
@@ -2182,7 +2182,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2182
2182
|
} };
|
|
2183
2183
|
} catch (error) {
|
|
2184
2184
|
if (!(error instanceof SkillsStateUnavailableError)) throw error;
|
|
2185
|
-
|
|
2185
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2186
2186
|
{
|
|
2187
2187
|
ok: false,
|
|
2188
2188
|
status: "failed",
|
|
@@ -2198,7 +2198,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2198
2198
|
return 5;
|
|
2199
2199
|
}
|
|
2200
2200
|
if (!lease) {
|
|
2201
|
-
|
|
2201
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2202
2202
|
{
|
|
2203
2203
|
ok: false,
|
|
2204
2204
|
status: "failed",
|
|
@@ -2244,7 +2244,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2244
2244
|
throw new Error("Could not install the current Deepline skills.");
|
|
2245
2245
|
}
|
|
2246
2246
|
} catch (error) {
|
|
2247
|
-
|
|
2247
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2248
2248
|
{
|
|
2249
2249
|
ok: false,
|
|
2250
2250
|
status: "failed",
|
|
@@ -2283,7 +2283,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2283
2283
|
{
|
|
2284
2284
|
schemaVersion: 1,
|
|
2285
2285
|
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2286
|
-
cliVersion:
|
|
2286
|
+
cliVersion: _chunkV7UP2F4Ujs.SDK_VERSION,
|
|
2287
2287
|
scope,
|
|
2288
2288
|
agents,
|
|
2289
2289
|
skillsVersion: plan.version,
|
|
@@ -2298,7 +2298,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2298
2298
|
if (scope === "global") {
|
|
2299
2299
|
clearFailedAutomaticSkillsSync(baseUrl, agents);
|
|
2300
2300
|
}
|
|
2301
|
-
|
|
2301
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2302
2302
|
{
|
|
2303
2303
|
ok: true,
|
|
2304
2304
|
status: "complete",
|
|
@@ -2347,7 +2347,7 @@ Examples:
|
|
|
2347
2347
|
).action(async (options) => {
|
|
2348
2348
|
const claim = _optionalChain([options, 'access', _88 => _88.claim, 'optionalAccess', _89 => _89.trim, 'call', _90 => _90()]);
|
|
2349
2349
|
if (!claim) {
|
|
2350
|
-
|
|
2350
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2351
2351
|
{
|
|
2352
2352
|
ok: false,
|
|
2353
2353
|
status: "failed",
|
|
@@ -2360,7 +2360,7 @@ Examples:
|
|
|
2360
2360
|
process.exitCode = 2;
|
|
2361
2361
|
return;
|
|
2362
2362
|
}
|
|
2363
|
-
await syncSdkSkillsIfNeeded(
|
|
2363
|
+
await syncSdkSkillsIfNeeded(_chunkV7UP2F4Ujs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, ""), {
|
|
2364
2364
|
mode: "inline",
|
|
2365
2365
|
notices: "defer",
|
|
2366
2366
|
claim
|