opencode-gitlab-dap 1.10.1 → 1.11.0
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 +31 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3597,17 +3597,37 @@ async function searchWikiPages(instanceUrl, token, scope, id, query) {
|
|
|
3597
3597
|
var z5 = import_plugin5.tool.schema;
|
|
3598
3598
|
var PREFIX = "agents";
|
|
3599
3599
|
var ARCHIVE_DIR = `${PREFIX}/memory/archive`;
|
|
3600
|
+
var MEMORY_TYPES = [
|
|
3601
|
+
"facts",
|
|
3602
|
+
"decisions",
|
|
3603
|
+
"patterns",
|
|
3604
|
+
"architecture",
|
|
3605
|
+
"conventions",
|
|
3606
|
+
"troubleshooting",
|
|
3607
|
+
"people-and-contexts"
|
|
3608
|
+
];
|
|
3600
3609
|
var MEMORY_DIRS = {
|
|
3601
|
-
all:
|
|
3602
|
-
|
|
3603
|
-
decisions: [`${PREFIX}/memory/decisions`],
|
|
3604
|
-
patterns: [`${PREFIX}/memory/patterns`],
|
|
3610
|
+
all: MEMORY_TYPES.map((t) => `${PREFIX}/memory/${t}`),
|
|
3611
|
+
...Object.fromEntries(MEMORY_TYPES.map((t) => [t, [`${PREFIX}/memory/${t}`]])),
|
|
3605
3612
|
archive: [ARCHIVE_DIR]
|
|
3606
3613
|
};
|
|
3614
|
+
var RECORD_TYPES = [
|
|
3615
|
+
"fact",
|
|
3616
|
+
"decision",
|
|
3617
|
+
"pattern",
|
|
3618
|
+
"architecture",
|
|
3619
|
+
"convention",
|
|
3620
|
+
"troubleshooting",
|
|
3621
|
+
"people"
|
|
3622
|
+
];
|
|
3607
3623
|
var RECORD_DIR = {
|
|
3608
3624
|
fact: `${PREFIX}/memory/facts`,
|
|
3609
3625
|
decision: `${PREFIX}/memory/decisions`,
|
|
3610
|
-
pattern: `${PREFIX}/memory/patterns
|
|
3626
|
+
pattern: `${PREFIX}/memory/patterns`,
|
|
3627
|
+
architecture: `${PREFIX}/memory/architecture`,
|
|
3628
|
+
convention: `${PREFIX}/memory/conventions`,
|
|
3629
|
+
troubleshooting: `${PREFIX}/memory/troubleshooting`,
|
|
3630
|
+
people: `${PREFIX}/memory/people-and-contexts`
|
|
3611
3631
|
};
|
|
3612
3632
|
var PROJECT_ID_DESC = 'FULL project path with namespace (e.g., "gitlab-org/gitlab"). Must contain a slash. Never use just the project name.';
|
|
3613
3633
|
function today() {
|
|
@@ -3642,11 +3662,11 @@ function makeMemoryTools(ctx) {
|
|
|
3642
3662
|
}
|
|
3643
3663
|
return {
|
|
3644
3664
|
gitlab_memory_load: (0, import_plugin5.tool)({
|
|
3645
|
-
description: "Load project memory to understand context, known facts, past decisions, and observed patterns.\nUse this at the start of complex tasks to check what is already known about the project.\nReturns accumulated knowledge from previous sessions.\nEach entry includes its slug (page path) which can be used with gitlab_memory_update or gitlab_memory_archive.\n\nBOOTSTRAP WORKFLOW \u2014 when user says 'bootstrap project memory':\n1. Get project path from run_git_command('remote', ['-v']) \u2014 NEVER guess.\n2. Call this tool to check if memory exists.\n3. If empty: gather knowledge (README, gitlab_get_project, gitlab_list_issues, gitlab_list_merge_requests, gitlab_list_pipelines, gitlab_list_project_members), then
|
|
3665
|
+
description: "Load project memory to understand context, known facts, past decisions, and observed patterns.\nUse this at the start of complex tasks to check what is already known about the project.\nReturns accumulated knowledge from previous sessions.\nEach entry includes its slug (page path) which can be used with gitlab_memory_update or gitlab_memory_archive.\n\nBOOTSTRAP WORKFLOW \u2014 when user says 'bootstrap project memory':\n1. Get project path from run_git_command('remote', ['-v']) \u2014 NEVER guess.\n2. Call this tool to check if memory exists.\n3. If empty: gather knowledge (README, gitlab_get_project, gitlab_list_issues, gitlab_list_merge_requests, gitlab_list_pipelines, gitlab_list_project_members), then record using ALL THREE types:\n - type='fact': project overview, tech stack, dependencies, CI/CD config, open issues summary, open MRs summary\n - type='architecture': system design, module structure, key abstractions, data flow\n - type='decision': key architectural choices found in the codebase (framework choices, config patterns, deployment strategy)\n - type='convention': coding standards, naming patterns, commit conventions, review process\n - type='pattern': recurring observations (CI patterns, common failures, release cycle)\n - type='troubleshooting': known issues, workarounds, pipeline failures, common errors\n - type='people': team members, roles, ownership areas, key contacts\n Fire parallel gitlab_memory_record calls \u2014 each creates its own page.\n4. If exists: show summary, gather current state, compare with stored records, use gitlab_memory_update for stale, gitlab_memory_archive for outdated, gitlab_memory_record for new.\n5. Log session with gitlab_memory_log_session.",
|
|
3646
3666
|
args: {
|
|
3647
3667
|
project_id: z5.string().describe(PROJECT_ID_DESC),
|
|
3648
|
-
type: z5.enum(["all",
|
|
3649
|
-
'Which memory to load: "all" (default), "facts", "decisions", "patterns", or "archive"
|
|
3668
|
+
type: z5.enum(["all", ...MEMORY_TYPES, "archive"]).optional().describe(
|
|
3669
|
+
'Which memory to load: "all" (default), "facts", "decisions", "patterns", "architecture", "conventions", "troubleshooting", "people-and-contexts", or "archive"'
|
|
3650
3670
|
),
|
|
3651
3671
|
scope: z5.enum(["projects", "groups"]).optional().describe("Scope (default: projects)"),
|
|
3652
3672
|
group_id: z5.string().optional().describe("Group path (required when scope is groups)")
|
|
@@ -3687,10 +3707,10 @@ ${entries}`
|
|
|
3687
3707
|
}
|
|
3688
3708
|
}),
|
|
3689
3709
|
gitlab_memory_record: (0, import_plugin5.tool)({
|
|
3690
|
-
description: "Record
|
|
3710
|
+
description: "Record knowledge in project memory. Each record creates its own page \u2014 safe for parallel writes.\nTypes:\n fact \u2014 stable truths (tech stack, dependencies, deploy targets, project metadata)\n decision \u2014 architectural choices with reasoning (why X over Y)\n pattern \u2014 recurring observations that may evolve into skills\n architecture \u2014 system design, module structure, data flow, key abstractions\n convention \u2014 coding standards, naming patterns, review process, commit conventions\n troubleshooting \u2014 known issues, workarounds, debugging tips, common errors\n people \u2014 team members, roles, ownership areas, contact context",
|
|
3691
3711
|
args: {
|
|
3692
3712
|
project_id: z5.string().describe(PROJECT_ID_DESC),
|
|
3693
|
-
type: z5.enum([
|
|
3713
|
+
type: z5.enum([...RECORD_TYPES]).describe("Type of knowledge to record"),
|
|
3694
3714
|
content: z5.string().describe("The knowledge to record (markdown)"),
|
|
3695
3715
|
scope: z5.enum(["projects", "groups"]).optional().describe("Scope (default: projects)"),
|
|
3696
3716
|
group_id: z5.string().optional().describe("Group path (required when scope is groups)")
|
|
@@ -3804,9 +3824,7 @@ ${entries}`
|
|
|
3804
3824
|
description: "Review all memory records and get consolidation instructions.\nLoads all records of the specified type and returns them with their slugs,\nalong with instructions to identify and fix stale, duplicate, or contradictory entries.\nUse this periodically to keep project memory clean and accurate.",
|
|
3805
3825
|
args: {
|
|
3806
3826
|
project_id: z5.string().describe(PROJECT_ID_DESC),
|
|
3807
|
-
type: z5.enum(["all",
|
|
3808
|
-
'Which memory to consolidate: "all" (default), "facts", "decisions", or "patterns"'
|
|
3809
|
-
),
|
|
3827
|
+
type: z5.enum(["all", ...MEMORY_TYPES]).optional().describe('Which memory to consolidate: "all" (default) or a specific type'),
|
|
3810
3828
|
scope: z5.enum(["projects", "groups"]).optional().describe("Scope (default: projects)"),
|
|
3811
3829
|
group_id: z5.string().optional().describe("Group path (required when scope is groups)")
|
|
3812
3830
|
},
|