opencode-gitlab-dap 1.15.5 → 1.15.7
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 +25 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2401,7 +2401,10 @@ function makeSystemTransformHook(flowAgents, getAuthCache) {
|
|
|
2401
2401
|
}
|
|
2402
2402
|
if (getAuthCache()) {
|
|
2403
2403
|
output.system.push(
|
|
2404
|
-
`## Project
|
|
2404
|
+
`## GitLab Project Context
|
|
2405
|
+
CRITICAL: Any tool that requires a project_id MUST use the FULL project path from git remote. Run \`run_git_command("remote", ["-v"])\` FIRST and extract the path (e.g., "git@gitlab.com:my-group/my-project.git" \u2192 "my-group/my-project"). NEVER guess or infer the project path from the repository name alone.
|
|
2406
|
+
|
|
2407
|
+
## Project Knowledge
|
|
2405
2408
|
Project memory tools are available (gitlab_memory_load, gitlab_memory_record, gitlab_memory_recall). Say "bootstrap project memory" to initialize or refresh project knowledge.`
|
|
2406
2409
|
);
|
|
2407
2410
|
}
|
|
@@ -4295,8 +4298,9 @@ function makeSkillTools(ctx) {
|
|
|
4295
4298
|
`${prefix}/${args.name}/SKILL`
|
|
4296
4299
|
);
|
|
4297
4300
|
const pages = await listWikiPages(auth.instanceUrl, auth.token, scope, id);
|
|
4298
|
-
const
|
|
4299
|
-
const
|
|
4301
|
+
const skillPrefix = `${prefix}/${args.name}/`;
|
|
4302
|
+
const skillSlug = `${prefix}/${args.name}/SKILL`;
|
|
4303
|
+
const refs = pages.filter((p) => p.slug.startsWith(skillPrefix) && p.slug !== skillSlug).map((p) => p.slug.slice(skillPrefix.length));
|
|
4300
4304
|
const isDraft = prefix === DRAFTS_PREFIX;
|
|
4301
4305
|
let result = isDraft ? `[DRAFT SKILL]
|
|
4302
4306
|
|
|
@@ -4406,16 +4410,21 @@ Run \`gitlab_skill_setup(name="${args.name}")\` to extract them to .agents/skill
|
|
|
4406
4410
|
}
|
|
4407
4411
|
}),
|
|
4408
4412
|
gitlab_skill_discover: (0, import_plugin6.tool)({
|
|
4409
|
-
description: "Search for skills in the
|
|
4413
|
+
description: "Search for skills in the skills.sh public registry and optionally a group wiki.\nUse gitlab_skill_install to install a discovered skill into your project.\nIMPORTANT: project_id is only needed when searching a group wiki. For skills.sh only, it is optional.",
|
|
4410
4414
|
args: {
|
|
4411
|
-
project_id: z6.string().describe(PROJECT_ID_DESC2),
|
|
4412
4415
|
query: z6.string().describe("Search query (matches skill name and description)"),
|
|
4416
|
+
project_id: z6.string().optional().describe(PROJECT_ID_DESC2 + " Only needed for group wiki search."),
|
|
4413
4417
|
group_id: z6.string().optional().describe("Group path to search for shared skills (optional)")
|
|
4414
4418
|
},
|
|
4415
4419
|
execute: async (args) => {
|
|
4416
|
-
|
|
4420
|
+
let auth = null;
|
|
4421
|
+
if (args.project_id) {
|
|
4422
|
+
auth = authAndValidate(args.project_id);
|
|
4423
|
+
} else if (args.group_id) {
|
|
4424
|
+
return "Error: project_id is required when searching a group wiki.";
|
|
4425
|
+
}
|
|
4417
4426
|
const sections = [];
|
|
4418
|
-
if (args.group_id) {
|
|
4427
|
+
if (args.group_id && auth) {
|
|
4419
4428
|
try {
|
|
4420
4429
|
const entries = await readIndex(
|
|
4421
4430
|
auth.instanceUrl,
|
|
@@ -4493,7 +4502,7 @@ Install: \`gitlab_skill_install(name="${r.identifier}", source="skills.sh")\``
|
|
|
4493
4502
|
const mdFiles = downloaded.files.filter((f) => isMarkdownFile(f.path));
|
|
4494
4503
|
const scriptFiles = downloaded.files.filter((f) => !isMarkdownFile(f.path));
|
|
4495
4504
|
for (const file of mdFiles) {
|
|
4496
|
-
const slug = `${targetPrefix}/${downloaded.name}
|
|
4505
|
+
const slug = `${targetPrefix}/${downloaded.name}/${file.path.replace(/\.[^.]+$/, "")}`;
|
|
4497
4506
|
await upsertPage(
|
|
4498
4507
|
auth.instanceUrl,
|
|
4499
4508
|
auth.token,
|
|
@@ -4632,15 +4641,15 @@ Install: \`gitlab_skill_install(name="${r.identifier}", source="skills.sh")\``
|
|
|
4632
4641
|
const pages = await listWikiPages(auth.instanceUrl, auth.token, scope, id, true);
|
|
4633
4642
|
let refCount = 0;
|
|
4634
4643
|
for (const prefix of [SKILLS_PREFIX, DRAFTS_PREFIX]) {
|
|
4635
|
-
const
|
|
4636
|
-
const
|
|
4637
|
-
(p) => p.slug.startsWith(
|
|
4644
|
+
const skillPagePrefix = `${prefix}/${args.name}/`;
|
|
4645
|
+
const extraPages = pages.filter(
|
|
4646
|
+
(p) => p.slug.startsWith(skillPagePrefix) && p.slug !== `${prefix}/${args.name}/SKILL` && p.content
|
|
4638
4647
|
);
|
|
4639
|
-
for (const
|
|
4640
|
-
const
|
|
4641
|
-
const
|
|
4642
|
-
(0, import_fs2.mkdirSync)(
|
|
4643
|
-
(0, import_fs2.writeFileSync)(
|
|
4648
|
+
for (const page of extraPages) {
|
|
4649
|
+
const relPath = page.slug.slice(skillPagePrefix.length);
|
|
4650
|
+
const filePath = (0, import_path2.join)(targetDir, `${relPath}.md`);
|
|
4651
|
+
(0, import_fs2.mkdirSync)((0, import_path2.dirname)(filePath), { recursive: true });
|
|
4652
|
+
(0, import_fs2.writeFileSync)(filePath, page.content);
|
|
4644
4653
|
refCount++;
|
|
4645
4654
|
}
|
|
4646
4655
|
}
|