opencode-gitlab-dap 1.10.1 → 1.12.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 +34 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +34 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3428,17 +3428,40 @@ 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
|
+
"plans"
|
|
3440
|
+
];
|
|
3431
3441
|
var MEMORY_DIRS = {
|
|
3432
|
-
all:
|
|
3433
|
-
|
|
3434
|
-
decisions: [`${PREFIX}/memory/decisions`],
|
|
3435
|
-
patterns: [`${PREFIX}/memory/patterns`],
|
|
3442
|
+
all: MEMORY_TYPES.map((t) => `${PREFIX}/memory/${t}`),
|
|
3443
|
+
...Object.fromEntries(MEMORY_TYPES.map((t) => [t, [`${PREFIX}/memory/${t}`]])),
|
|
3436
3444
|
archive: [ARCHIVE_DIR]
|
|
3437
3445
|
};
|
|
3446
|
+
var RECORD_TYPES = [
|
|
3447
|
+
"fact",
|
|
3448
|
+
"decision",
|
|
3449
|
+
"pattern",
|
|
3450
|
+
"architecture",
|
|
3451
|
+
"convention",
|
|
3452
|
+
"troubleshooting",
|
|
3453
|
+
"people",
|
|
3454
|
+
"plan"
|
|
3455
|
+
];
|
|
3438
3456
|
var RECORD_DIR = {
|
|
3439
3457
|
fact: `${PREFIX}/memory/facts`,
|
|
3440
3458
|
decision: `${PREFIX}/memory/decisions`,
|
|
3441
|
-
pattern: `${PREFIX}/memory/patterns
|
|
3459
|
+
pattern: `${PREFIX}/memory/patterns`,
|
|
3460
|
+
architecture: `${PREFIX}/memory/architecture`,
|
|
3461
|
+
convention: `${PREFIX}/memory/conventions`,
|
|
3462
|
+
troubleshooting: `${PREFIX}/memory/troubleshooting`,
|
|
3463
|
+
people: `${PREFIX}/memory/people-and-contexts`,
|
|
3464
|
+
plan: `${PREFIX}/memory/plans`
|
|
3442
3465
|
};
|
|
3443
3466
|
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
3467
|
function today() {
|
|
@@ -3473,11 +3496,11 @@ function makeMemoryTools(ctx) {
|
|
|
3473
3496
|
}
|
|
3474
3497
|
return {
|
|
3475
3498
|
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
|
|
3499
|
+
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
3500
|
args: {
|
|
3478
3501
|
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"
|
|
3502
|
+
type: z5.enum(["all", ...MEMORY_TYPES, "archive"]).optional().describe(
|
|
3503
|
+
'Which memory to load: "all" (default), "facts", "decisions", "patterns", "architecture", "conventions", "troubleshooting", "people-and-contexts", or "archive"'
|
|
3481
3504
|
),
|
|
3482
3505
|
scope: z5.enum(["projects", "groups"]).optional().describe("Scope (default: projects)"),
|
|
3483
3506
|
group_id: z5.string().optional().describe("Group path (required when scope is groups)")
|
|
@@ -3518,10 +3541,10 @@ ${entries}`
|
|
|
3518
3541
|
}
|
|
3519
3542
|
}),
|
|
3520
3543
|
gitlab_memory_record: tool5({
|
|
3521
|
-
description: "Record
|
|
3544
|
+
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\n plan \u2014 implementation plans, feature designs, task breakdowns, roadmap items",
|
|
3522
3545
|
args: {
|
|
3523
3546
|
project_id: z5.string().describe(PROJECT_ID_DESC),
|
|
3524
|
-
type: z5.enum([
|
|
3547
|
+
type: z5.enum([...RECORD_TYPES]).describe("Type of knowledge to record"),
|
|
3525
3548
|
content: z5.string().describe("The knowledge to record (markdown)"),
|
|
3526
3549
|
scope: z5.enum(["projects", "groups"]).optional().describe("Scope (default: projects)"),
|
|
3527
3550
|
group_id: z5.string().optional().describe("Group path (required when scope is groups)")
|
|
@@ -3635,9 +3658,7 @@ ${entries}`
|
|
|
3635
3658
|
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
3659
|
args: {
|
|
3637
3660
|
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
|
-
),
|
|
3661
|
+
type: z5.enum(["all", ...MEMORY_TYPES]).optional().describe('Which memory to consolidate: "all" (default) or a specific type'),
|
|
3641
3662
|
scope: z5.enum(["projects", "groups"]).optional().describe("Scope (default: projects)"),
|
|
3642
3663
|
group_id: z5.string().optional().describe("Group path (required when scope is groups)")
|
|
3643
3664
|
},
|