opencode-gitlab-dap 1.15.7 → 1.15.9
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/index.cjs +12 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3466,7 +3466,7 @@ var RECORD_DIR = {
|
|
|
3466
3466
|
people: `${PREFIX}/memory/people-and-contexts`,
|
|
3467
3467
|
plan: `${PREFIX}/memory/plans`
|
|
3468
3468
|
};
|
|
3469
|
-
var PROJECT_ID_DESC =
|
|
3469
|
+
var PROJECT_ID_DESC = "Project path from git remote";
|
|
3470
3470
|
function today() {
|
|
3471
3471
|
return (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
3472
3472
|
}
|
|
@@ -3869,7 +3869,7 @@ var SKILLS_PREFIX = `${PREFIX2}/skills`;
|
|
|
3869
3869
|
var DRAFTS_PREFIX = `${PREFIX2}/skills-drafts`;
|
|
3870
3870
|
var SKILLS_INDEX = `${SKILLS_PREFIX}/index`;
|
|
3871
3871
|
var DRAFTS_INDEX = `${DRAFTS_PREFIX}/index`;
|
|
3872
|
-
var PROJECT_ID_DESC2 =
|
|
3872
|
+
var PROJECT_ID_DESC2 = "Project path from git remote";
|
|
3873
3873
|
function resolveScope2(args) {
|
|
3874
3874
|
if (args.scope === "groups" && args.group_id) {
|
|
3875
3875
|
return { scope: "groups", id: args.group_id };
|
|
@@ -3926,11 +3926,12 @@ async function readIndex(instanceUrl, token, scope, id, indexSlug) {
|
|
|
3926
3926
|
}
|
|
3927
3927
|
}
|
|
3928
3928
|
async function writeIndex(instanceUrl, token, scope, id, indexSlug, entries) {
|
|
3929
|
-
const content = formatIndex(entries);
|
|
3929
|
+
const content = formatIndex(entries) || "# Skills Index";
|
|
3930
3930
|
try {
|
|
3931
3931
|
await updateWikiPage(instanceUrl, token, scope, id, indexSlug, content);
|
|
3932
|
-
} catch {
|
|
3933
|
-
|
|
3932
|
+
} catch (updateErr) {
|
|
3933
|
+
if (!updateErr.message?.includes("404")) throw updateErr;
|
|
3934
|
+
await createWikiPage(instanceUrl, token, scope, id, indexSlug, content);
|
|
3934
3935
|
}
|
|
3935
3936
|
}
|
|
3936
3937
|
async function upsertIndexEntry(instanceUrl, token, scope, id, indexSlug, entry) {
|
|
@@ -3953,7 +3954,8 @@ async function removeIndexEntry(instanceUrl, token, scope, id, indexSlug, name)
|
|
|
3953
3954
|
async function upsertPage(instanceUrl, token, scope, id, slug, content) {
|
|
3954
3955
|
try {
|
|
3955
3956
|
await updateWikiPage(instanceUrl, token, scope, id, slug, content);
|
|
3956
|
-
} catch {
|
|
3957
|
+
} catch (updateErr) {
|
|
3958
|
+
if (!updateErr.message?.includes("404")) throw updateErr;
|
|
3957
3959
|
await createWikiPage(instanceUrl, token, scope, id, slug, content);
|
|
3958
3960
|
}
|
|
3959
3961
|
}
|
|
@@ -4457,7 +4459,8 @@ Install: \`gitlab_skill_install(name="${r.identifier}", source="skills.sh")\``
|
|
|
4457
4459
|
execute: async (args) => {
|
|
4458
4460
|
const auth = authAndValidate(args.project_id);
|
|
4459
4461
|
const { scope, id } = resolveScope2(args);
|
|
4460
|
-
const
|
|
4462
|
+
const workDir = ctx.getDirectory();
|
|
4463
|
+
const targetDir = join2(workDir, ".agents", "skills", args.name);
|
|
4461
4464
|
try {
|
|
4462
4465
|
let skillContent = null;
|
|
4463
4466
|
for (const prefix of [SKILLS_PREFIX, DRAFTS_PREFIX]) {
|
|
@@ -4544,7 +4547,7 @@ Install: \`gitlab_skill_install(name="${r.identifier}", source="skills.sh")\``
|
|
|
4544
4547
|
}
|
|
4545
4548
|
}
|
|
4546
4549
|
}
|
|
4547
|
-
ensureGitignore(
|
|
4550
|
+
ensureGitignore(workDir);
|
|
4548
4551
|
const parts = ["SKILL.md"];
|
|
4549
4552
|
if (refCount > 0) parts.push(`${refCount} reference(s)`);
|
|
4550
4553
|
if (scriptCount > 0) parts.push(`${scriptCount} script(s)`);
|
|
@@ -4702,6 +4705,7 @@ var plugin = async (input) => {
|
|
|
4702
4705
|
getFlowAgents: () => flowAgents,
|
|
4703
4706
|
getCachedAgents: () => cachedAgents,
|
|
4704
4707
|
getNamespaceId: () => namespaceId,
|
|
4708
|
+
getDirectory: () => input.directory,
|
|
4705
4709
|
refreshAgents
|
|
4706
4710
|
};
|
|
4707
4711
|
return {
|