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.cjs
CHANGED
|
@@ -3635,7 +3635,7 @@ var RECORD_DIR = {
|
|
|
3635
3635
|
people: `${PREFIX}/memory/people-and-contexts`,
|
|
3636
3636
|
plan: `${PREFIX}/memory/plans`
|
|
3637
3637
|
};
|
|
3638
|
-
var PROJECT_ID_DESC =
|
|
3638
|
+
var PROJECT_ID_DESC = "Project path from git remote";
|
|
3639
3639
|
function today() {
|
|
3640
3640
|
return (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
3641
3641
|
}
|
|
@@ -4028,7 +4028,7 @@ var SKILLS_PREFIX = `${PREFIX2}/skills`;
|
|
|
4028
4028
|
var DRAFTS_PREFIX = `${PREFIX2}/skills-drafts`;
|
|
4029
4029
|
var SKILLS_INDEX = `${SKILLS_PREFIX}/index`;
|
|
4030
4030
|
var DRAFTS_INDEX = `${DRAFTS_PREFIX}/index`;
|
|
4031
|
-
var PROJECT_ID_DESC2 =
|
|
4031
|
+
var PROJECT_ID_DESC2 = "Project path from git remote";
|
|
4032
4032
|
function resolveScope2(args) {
|
|
4033
4033
|
if (args.scope === "groups" && args.group_id) {
|
|
4034
4034
|
return { scope: "groups", id: args.group_id };
|
|
@@ -4085,11 +4085,12 @@ async function readIndex(instanceUrl, token, scope, id, indexSlug) {
|
|
|
4085
4085
|
}
|
|
4086
4086
|
}
|
|
4087
4087
|
async function writeIndex(instanceUrl, token, scope, id, indexSlug, entries) {
|
|
4088
|
-
const content = formatIndex(entries);
|
|
4088
|
+
const content = formatIndex(entries) || "# Skills Index";
|
|
4089
4089
|
try {
|
|
4090
4090
|
await updateWikiPage(instanceUrl, token, scope, id, indexSlug, content);
|
|
4091
|
-
} catch {
|
|
4092
|
-
|
|
4091
|
+
} catch (updateErr) {
|
|
4092
|
+
if (!updateErr.message?.includes("404")) throw updateErr;
|
|
4093
|
+
await createWikiPage(instanceUrl, token, scope, id, indexSlug, content);
|
|
4093
4094
|
}
|
|
4094
4095
|
}
|
|
4095
4096
|
async function upsertIndexEntry(instanceUrl, token, scope, id, indexSlug, entry) {
|
|
@@ -4112,7 +4113,8 @@ async function removeIndexEntry(instanceUrl, token, scope, id, indexSlug, name)
|
|
|
4112
4113
|
async function upsertPage(instanceUrl, token, scope, id, slug, content) {
|
|
4113
4114
|
try {
|
|
4114
4115
|
await updateWikiPage(instanceUrl, token, scope, id, slug, content);
|
|
4115
|
-
} catch {
|
|
4116
|
+
} catch (updateErr) {
|
|
4117
|
+
if (!updateErr.message?.includes("404")) throw updateErr;
|
|
4116
4118
|
await createWikiPage(instanceUrl, token, scope, id, slug, content);
|
|
4117
4119
|
}
|
|
4118
4120
|
}
|
|
@@ -4616,7 +4618,8 @@ Install: \`gitlab_skill_install(name="${r.identifier}", source="skills.sh")\``
|
|
|
4616
4618
|
execute: async (args) => {
|
|
4617
4619
|
const auth = authAndValidate(args.project_id);
|
|
4618
4620
|
const { scope, id } = resolveScope2(args);
|
|
4619
|
-
const
|
|
4621
|
+
const workDir = ctx.getDirectory();
|
|
4622
|
+
const targetDir = (0, import_path2.join)(workDir, ".agents", "skills", args.name);
|
|
4620
4623
|
try {
|
|
4621
4624
|
let skillContent = null;
|
|
4622
4625
|
for (const prefix of [SKILLS_PREFIX, DRAFTS_PREFIX]) {
|
|
@@ -4703,7 +4706,7 @@ Install: \`gitlab_skill_install(name="${r.identifier}", source="skills.sh")\``
|
|
|
4703
4706
|
}
|
|
4704
4707
|
}
|
|
4705
4708
|
}
|
|
4706
|
-
ensureGitignore(
|
|
4709
|
+
ensureGitignore(workDir);
|
|
4707
4710
|
const parts = ["SKILL.md"];
|
|
4708
4711
|
if (refCount > 0) parts.push(`${refCount} reference(s)`);
|
|
4709
4712
|
if (scriptCount > 0) parts.push(`${scriptCount} script(s)`);
|
|
@@ -4861,6 +4864,7 @@ var plugin = async (input) => {
|
|
|
4861
4864
|
getFlowAgents: () => flowAgents,
|
|
4862
4865
|
getCachedAgents: () => cachedAgents,
|
|
4863
4866
|
getNamespaceId: () => namespaceId,
|
|
4867
|
+
getDirectory: () => input.directory,
|
|
4864
4868
|
refreshAgents
|
|
4865
4869
|
};
|
|
4866
4870
|
return {
|