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.js
CHANGED
|
@@ -3428,17 +3428,37 @@ async function searchWikiPages(instanceUrl, token, scope, id, query) {
|
|
|
3428
3428
|
var z5 = tool5.schema;
|
|
3429
3429
|
var PREFIX = "agents";
|
|
3430
3430
|
var ARCHIVE_DIR = `${PREFIX}/memory/archive`;
|
|
3431
|
+
var MEMORY_TYPES = [
|
|
3432
|
+
"facts",
|
|
3433
|
+
"decisions",
|
|
3434
|
+
"patterns",
|
|
3435
|
+
"architecture",
|
|
3436
|
+
"conventions",
|
|
3437
|
+
"troubleshooting",
|
|
3438
|
+
"people-and-contexts"
|
|
3439
|
+
];
|
|
3431
3440
|
var MEMORY_DIRS = {
|
|
3432
|
-
all:
|
|
3433
|
-
|
|
3434
|
-
decisions: [`${PREFIX}/memory/decisions`],
|
|
3435
|
-
patterns: [`${PREFIX}/memory/patterns`],
|
|
3441
|
+
all: MEMORY_TYPES.map((t) => `${PREFIX}/memory/${t}`),
|
|
3442
|
+
...Object.fromEntries(MEMORY_TYPES.map((t) => [t, [`${PREFIX}/memory/${t}`]])),
|
|
3436
3443
|
archive: [ARCHIVE_DIR]
|
|
3437
3444
|
};
|
|
3445
|
+
var RECORD_TYPES = [
|
|
3446
|
+
"fact",
|
|
3447
|
+
"decision",
|
|
3448
|
+
"pattern",
|
|
3449
|
+
"architecture",
|
|
3450
|
+
"convention",
|
|
3451
|
+
"troubleshooting",
|
|
3452
|
+
"people"
|
|
3453
|
+
];
|
|
3438
3454
|
var RECORD_DIR = {
|
|
3439
3455
|
fact: `${PREFIX}/memory/facts`,
|
|
3440
3456
|
decision: `${PREFIX}/memory/decisions`,
|
|
3441
|
-
pattern: `${PREFIX}/memory/patterns
|
|
3457
|
+
pattern: `${PREFIX}/memory/patterns`,
|
|
3458
|
+
architecture: `${PREFIX}/memory/architecture`,
|
|
3459
|
+
convention: `${PREFIX}/memory/conventions`,
|
|
3460
|
+
troubleshooting: `${PREFIX}/memory/troubleshooting`,
|
|
3461
|
+
people: `${PREFIX}/memory/people-and-contexts`
|
|
3442
3462
|
};
|
|
3443
3463
|
var PROJECT_ID_DESC = 'FULL project path with namespace (e.g., "gitlab-org/gitlab"). Must contain a slash. Never use just the project name.';
|
|
3444
3464
|
function today() {
|
|
@@ -3473,11 +3493,11 @@ function makeMemoryTools(ctx) {
|
|
|
3473
3493
|
}
|
|
3474
3494
|
return {
|
|
3475
3495
|
gitlab_memory_load: tool5({
|
|
3476
|
-
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
|
|
3496
|
+
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.",
|
|
3477
3497
|
args: {
|
|
3478
3498
|
project_id: z5.string().describe(PROJECT_ID_DESC),
|
|
3479
|
-
type: z5.enum(["all",
|
|
3480
|
-
'Which memory to load: "all" (default), "facts", "decisions", "patterns", or "archive"
|
|
3499
|
+
type: z5.enum(["all", ...MEMORY_TYPES, "archive"]).optional().describe(
|
|
3500
|
+
'Which memory to load: "all" (default), "facts", "decisions", "patterns", "architecture", "conventions", "troubleshooting", "people-and-contexts", or "archive"'
|
|
3481
3501
|
),
|
|
3482
3502
|
scope: z5.enum(["projects", "groups"]).optional().describe("Scope (default: projects)"),
|
|
3483
3503
|
group_id: z5.string().optional().describe("Group path (required when scope is groups)")
|
|
@@ -3518,10 +3538,10 @@ ${entries}`
|
|
|
3518
3538
|
}
|
|
3519
3539
|
}),
|
|
3520
3540
|
gitlab_memory_record: tool5({
|
|
3521
|
-
description: "Record
|
|
3541
|
+
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",
|
|
3522
3542
|
args: {
|
|
3523
3543
|
project_id: z5.string().describe(PROJECT_ID_DESC),
|
|
3524
|
-
type: z5.enum([
|
|
3544
|
+
type: z5.enum([...RECORD_TYPES]).describe("Type of knowledge to record"),
|
|
3525
3545
|
content: z5.string().describe("The knowledge to record (markdown)"),
|
|
3526
3546
|
scope: z5.enum(["projects", "groups"]).optional().describe("Scope (default: projects)"),
|
|
3527
3547
|
group_id: z5.string().optional().describe("Group path (required when scope is groups)")
|
|
@@ -3635,9 +3655,7 @@ ${entries}`
|
|
|
3635
3655
|
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.",
|
|
3636
3656
|
args: {
|
|
3637
3657
|
project_id: z5.string().describe(PROJECT_ID_DESC),
|
|
3638
|
-
type: z5.enum(["all",
|
|
3639
|
-
'Which memory to consolidate: "all" (default), "facts", "decisions", or "patterns"'
|
|
3640
|
-
),
|
|
3658
|
+
type: z5.enum(["all", ...MEMORY_TYPES]).optional().describe('Which memory to consolidate: "all" (default) or a specific type'),
|
|
3641
3659
|
scope: z5.enum(["projects", "groups"]).optional().describe("Scope (default: projects)"),
|
|
3642
3660
|
group_id: z5.string().optional().describe("Group path (required when scope is groups)")
|
|
3643
3661
|
},
|