bc-code-intelligence-mcp 1.3.2 → 1.3.3
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/README.md +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/layers/layer-service.d.ts.map +1 -1
- package/dist/layers/layer-service.js +4 -1
- package/dist/layers/layer-service.js.map +1 -1
- package/dist/search/intelligent-search.d.ts.map +1 -1
- package/dist/search/intelligent-search.js +5 -2
- package/dist/search/intelligent-search.js.map +1 -1
- package/dist/services/code-analysis-service.d.ts.map +1 -1
- package/dist/services/code-analysis-service.js +4 -1
- package/dist/services/code-analysis-service.js.map +1 -1
- package/dist/services/knowledge-service.d.ts.map +1 -1
- package/dist/services/knowledge-service.js +11 -5
- package/dist/services/knowledge-service.js.map +1 -1
- package/dist/services/roleplay-engine.d.ts +1 -1
- package/dist/services/roleplay-engine.d.ts.map +1 -1
- package/dist/services/roleplay-engine.js +40 -12
- package/dist/services/roleplay-engine.js.map +1 -1
- package/dist/streamlined-handlers.js +2 -2
- package/dist/streamlined-handlers.js.map +1 -1
- package/dist/tools/specialist-tools.d.ts.map +1 -1
- package/dist/tools/specialist-tools.js +23 -13
- package/dist/tools/specialist-tools.js.map +1 -1
- package/dist/types/bc-knowledge.d.ts +10 -7
- package/dist/types/bc-knowledge.d.ts.map +1 -1
- package/dist/types/bc-knowledge.js +23 -1
- package/dist/types/bc-knowledge.js.map +1 -1
- package/dist/types/roleplay-types.d.ts +1 -0
- package/dist/types/roleplay-types.d.ts.map +1 -1
- package/embedded-knowledge/domains/dean-debug/bc24-no-series-conversion-guide.md +66 -1
- package/embedded-knowledge/domains/shared/al-file-naming-conventions.md +146 -0
- package/package.json +1 -1
|
@@ -8,7 +8,10 @@ import { z } from 'zod';
|
|
|
8
8
|
// YAML Frontmatter Schema - Extended for structured knowledge types
|
|
9
9
|
export const AtomicTopicFrontmatterSchema = z.object({
|
|
10
10
|
title: z.string().optional().describe("Human-readable topic title"),
|
|
11
|
-
domain: z.
|
|
11
|
+
domain: z.union([
|
|
12
|
+
z.string(),
|
|
13
|
+
z.array(z.string())
|
|
14
|
+
]).optional().describe("Knowledge domain(s) - single domain or array for shared topics"),
|
|
12
15
|
difficulty: z.enum(["beginner", "intermediate", "advanced", "expert"]).optional().describe("Complexity level"),
|
|
13
16
|
bc_versions: z.string().optional().describe("Supported BC versions (e.g., '14+', '18+')"),
|
|
14
17
|
tags: z.array(z.string()).optional().describe("Searchable tags for topic discovery"),
|
|
@@ -41,4 +44,23 @@ export const DomainInfoSchema = z.object({
|
|
|
41
44
|
tags: z.array(z.string()),
|
|
42
45
|
sample_files: z.number().optional(),
|
|
43
46
|
});
|
|
47
|
+
// Utility functions for domain handling
|
|
48
|
+
export function isDomainMatch(topicDomain, targetDomain) {
|
|
49
|
+
if (!topicDomain)
|
|
50
|
+
return false;
|
|
51
|
+
if (typeof topicDomain === 'string') {
|
|
52
|
+
return topicDomain === targetDomain;
|
|
53
|
+
}
|
|
54
|
+
if (Array.isArray(topicDomain)) {
|
|
55
|
+
return topicDomain.includes(targetDomain);
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
export function getDomainList(domain) {
|
|
60
|
+
if (!domain)
|
|
61
|
+
return [];
|
|
62
|
+
if (typeof domain === 'string')
|
|
63
|
+
return [domain];
|
|
64
|
+
return domain;
|
|
65
|
+
}
|
|
44
66
|
//# sourceMappingURL=bc-knowledge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bc-knowledge.js","sourceRoot":"","sources":["../../src/types/bc-knowledge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AAEH,oEAAoE;AACpE,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,KAAK,EAAE,CAAC,CAAC,MAA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,CAAC;QAC/B,OAAO,WAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAAqC;IACjE,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IACvB,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAChD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roleplay-types.d.ts","sourceRoot":"","sources":["../../src/types/roleplay-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,eAAe;IAE9B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,UAAU,EAAE,oBAAoB,CAAC;IAGjC,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"roleplay-types.d.ts","sourceRoot":"","sources":["../../src/types/roleplay-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,eAAe;IAE9B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,UAAU,EAAE,oBAAoB,CAAC;IAGjC,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,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EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -59,7 +59,8 @@ NoSeriesMgt.SelectSeries(...)
|
|
|
59
59
|
| Legacy Method | New Method | Conversion Notes |
|
|
60
60
|
|---------------|------------|------------------|
|
|
61
61
|
| `InitSeries()` | `GetNextNo()` | Simplified parameters |
|
|
62
|
-
| `GetNextNo()` | `
|
|
62
|
+
| `GetNextNo(..., false)` | `PeekNextNo()` | Preview only, doesn't consume |
|
|
63
|
+
| `GetNextNo(..., true)` | `GetNextNo()` | Allocates and consumes number |
|
|
63
64
|
| `TestManual()` | `TestManual()` | Same name, new codeunit |
|
|
64
65
|
| `SelectSeries()` | `LookupRelatedNoSeries()` | Different parameter structure |
|
|
65
66
|
|
|
@@ -98,6 +99,70 @@ NextNo := NoSeries.PeekNextNo("No. Series", WorkDate()); // Peek only
|
|
|
98
99
|
ActualNo := NoSeries.GetNextNo("No. Series", WorkDate()); // Allocate
|
|
99
100
|
```
|
|
100
101
|
|
|
102
|
+
#### When to Use GetNextNo vs PeekNextNo
|
|
103
|
+
|
|
104
|
+
**Use `PeekNextNo()` for**:
|
|
105
|
+
- **UI Display**: Showing next number in forms before user commits
|
|
106
|
+
- **Preview Operations**: Preview posting scenarios
|
|
107
|
+
- **Validation Logic**: Checking number availability without consuming
|
|
108
|
+
- **Form Initialization**: Displaying what number would be assigned
|
|
109
|
+
- **Testing/Diagnostics**: Verifying series configuration
|
|
110
|
+
|
|
111
|
+
**Use `GetNextNo()` for**:
|
|
112
|
+
- **Document Creation**: Actually creating/posting business documents
|
|
113
|
+
- **Final Assignment**: Committing to use the number permanently
|
|
114
|
+
- **Transaction Completion**: When business logic is ready to consume the number
|
|
115
|
+
- **Batch Operations**: Allocating numbers for confirmed processing
|
|
116
|
+
|
|
117
|
+
**Decision Framework**:
|
|
118
|
+
```al
|
|
119
|
+
// Ask yourself: "Am I ready to permanently use this number?"
|
|
120
|
+
if IsPreviewMode or IsDisplayOnly or IsValidationCheck then
|
|
121
|
+
NextNo := NoSeries.PeekNextNo("No. Series", WorkDate())
|
|
122
|
+
else
|
|
123
|
+
NextNo := NoSeries.GetNextNo("No. Series", WorkDate());
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
#### Migration Opportunity: Add Preview Posting Support
|
|
127
|
+
|
|
128
|
+
**Legacy Pattern** (many old implementations):
|
|
129
|
+
```al
|
|
130
|
+
// Old code often only supported final posting
|
|
131
|
+
procedure PostDocument()
|
|
132
|
+
begin
|
|
133
|
+
"No." := NoSeriesMgt.GetNextNo("No. Series", WorkDate(), true);
|
|
134
|
+
// ... posting logic
|
|
135
|
+
end;
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Enhanced Pattern** (BC24+ with preview support):
|
|
139
|
+
```al
|
|
140
|
+
procedure PostDocument(Preview: Boolean)
|
|
141
|
+
begin
|
|
142
|
+
if Preview then
|
|
143
|
+
"No." := NoSeries.PeekNextNo("No. Series", WorkDate())
|
|
144
|
+
else
|
|
145
|
+
"No." := NoSeries.GetNextNo("No. Series", WorkDate());
|
|
146
|
+
// ... posting logic
|
|
147
|
+
end;
|
|
148
|
+
|
|
149
|
+
procedure PreviewPosting()
|
|
150
|
+
begin
|
|
151
|
+
PostDocument(true); // Uses PeekNextNo
|
|
152
|
+
end;
|
|
153
|
+
|
|
154
|
+
procedure FinalPosting()
|
|
155
|
+
begin
|
|
156
|
+
PostDocument(false); // Uses GetNextNo
|
|
157
|
+
end;
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Modernization Questions to Ask**:
|
|
161
|
+
- Does this posting routine support preview mode?
|
|
162
|
+
- Could users benefit from seeing the assigned number before committing?
|
|
163
|
+
- Is there a "Preview Posting" action that should show the next number?
|
|
164
|
+
- Would preview posting improve user experience in this scenario?
|
|
165
|
+
|
|
101
166
|
#### Manual Testing Conversion
|
|
102
167
|
**Before**:
|
|
103
168
|
```al
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "AL File Naming Conventions"
|
|
3
|
+
domain: ["sam-coder", "roger-reviewer"]
|
|
4
|
+
difficulty: "beginner"
|
|
5
|
+
bc_versions: "14+"
|
|
6
|
+
tags: ["file-naming", "conventions", "code-style", "organization"]
|
|
7
|
+
type: "improvement-pattern"
|
|
8
|
+
category: "code-organization"
|
|
9
|
+
pattern_type: "good"
|
|
10
|
+
severity: "high"
|
|
11
|
+
impact_level: "medium"
|
|
12
|
+
improvement_suggestion: "Apply consistent AL file naming conventions following alguidelines.dev standards"
|
|
13
|
+
implementation_steps: ["identify-object-name", "apply-object-type-suffix", "validate-naming-pattern"]
|
|
14
|
+
validation_criteria: ["consistent-naming-application", "standards-compliance"]
|
|
15
|
+
technical_areas: ["al-code", "file-organization"]
|
|
16
|
+
related_topics: ["al-variable-naming-conventions", "al-standard-abbreviations"]
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# AL File Naming Conventions
|
|
20
|
+
|
|
21
|
+
## Overview
|
|
22
|
+
|
|
23
|
+
AL file naming conventions ensure consistent project organization and improve developer experience. Following standardized patterns makes codebases more maintainable and professional.
|
|
24
|
+
|
|
25
|
+
**Source**: Based on [alguidelines.dev Rule #2: File Naming Conventions](https://alguidelines.dev/docs/vibe-coding/al-naming-conventions/)
|
|
26
|
+
|
|
27
|
+
**Key Principle**: File names should be descriptive and match the AL object name within the files using the pattern `<ObjectName>.<ObjectType>.al`.
|
|
28
|
+
|
|
29
|
+
## Standard File Naming Pattern
|
|
30
|
+
|
|
31
|
+
### Core Pattern: `<ObjectName>.<ObjectType>.al`
|
|
32
|
+
|
|
33
|
+
**Table Extensions:**
|
|
34
|
+
```
|
|
35
|
+
✅ CORRECT: CustomerExt.TableExt.al
|
|
36
|
+
✅ CORRECT: SalesHeaderExt.TableExt.al
|
|
37
|
+
❌ WRONG: Tab-Ext50100.CustomerExt.al
|
|
38
|
+
❌ WRONG: TableExt50100.CustomerExt.al
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Page Extensions:**
|
|
42
|
+
```
|
|
43
|
+
✅ CORRECT: CustomerCardExt.PageExt.al
|
|
44
|
+
✅ CORRECT: InventorySetupExt.PageExt.al
|
|
45
|
+
❌ WRONG: Pag-Ext50100.CustomerCardExt.al
|
|
46
|
+
❌ WRONG: PageExt50100.CustomerCardExt.al
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Codeunits:**
|
|
50
|
+
```
|
|
51
|
+
✅ CORRECT: CustomerCommentsManager.Codeunit.al
|
|
52
|
+
✅ CORRECT: PostSalesInvoice.Codeunit.al
|
|
53
|
+
❌ WRONG: Cod50100.CustomerCommentsManager.al
|
|
54
|
+
❌ WRONG: Codeunit50100.CustomerCommentsManager.al
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Event Subscribers:**
|
|
58
|
+
```
|
|
59
|
+
✅ CORRECT: SalesEventsSubscriber.Codeunit.al
|
|
60
|
+
✅ CORRECT: CustomerEventsHandler.Codeunit.al
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Object Type Suffixes
|
|
64
|
+
|
|
65
|
+
### Standard Suffixes
|
|
66
|
+
- **Tables**: `.Table.al`
|
|
67
|
+
- **Table Extensions**: `.TableExt.al`
|
|
68
|
+
- **Pages**: `.Page.al`
|
|
69
|
+
- **Page Extensions**: `.PageExt.al`
|
|
70
|
+
- **Page Customizations**: `.PageCust.al`
|
|
71
|
+
- **Reports**: `.Report.al`
|
|
72
|
+
- **Report Extensions**: `.ReportExt.al`
|
|
73
|
+
- **Codeunits**: `.Codeunit.al`
|
|
74
|
+
- **Queries**: `.Query.al`
|
|
75
|
+
- **XMLports**: `.XMLport.al`
|
|
76
|
+
- **Enums**: `.Enum.al`
|
|
77
|
+
- **Enum Extensions**: `.EnumExt.al`
|
|
78
|
+
- **Interfaces**: `.Interface.al`
|
|
79
|
+
- **Control Add-ins**: `.ControlAddin.al`
|
|
80
|
+
- **Dotnet**: `.Dotnet.al`
|
|
81
|
+
- **Profiles**: `.Profile.al`
|
|
82
|
+
- **Permission Sets**: `.PermissionSet.al`
|
|
83
|
+
- **Permission Set Extensions**: `.PermissionSetExt.al`
|
|
84
|
+
|
|
85
|
+
## Best Practices
|
|
86
|
+
|
|
87
|
+
### Object Name Guidelines
|
|
88
|
+
- **Use Pascal Case**: CustomerCommentsManager (not customercommentsmanager)
|
|
89
|
+
- **Be Descriptive**: Clearly indicate object purpose
|
|
90
|
+
- **Avoid Abbreviations**: Use full words unless standard BC terms
|
|
91
|
+
- **Include Context**: For extensions, indicate what you're extending
|
|
92
|
+
|
|
93
|
+
### Organization Patterns
|
|
94
|
+
- **Logical Grouping**: Group related objects by business domain
|
|
95
|
+
- **Consistent Prefixes**: Use company/solution prefixes consistently
|
|
96
|
+
- **Module Structure**: Organize files into logical modules or folders
|
|
97
|
+
|
|
98
|
+
### Extension-Specific Naming
|
|
99
|
+
- **Table Extensions**: `[TableName]Ext.TableExt.al`
|
|
100
|
+
- **Page Extensions**: `[PageName]Ext.PageExt.al`
|
|
101
|
+
- **Clear Extension Purpose**: When extending for specific features, include context
|
|
102
|
+
|
|
103
|
+
## Anti-Patterns to Avoid
|
|
104
|
+
|
|
105
|
+
### Legacy/Incorrect Patterns
|
|
106
|
+
```
|
|
107
|
+
❌ Tab-Ext50000.CustomerExt.al // Old NAV-style naming
|
|
108
|
+
❌ TableExt50000.CustomerExt.al // Object ID in filename
|
|
109
|
+
❌ CustomerExt-50000.al // Mixed patterns
|
|
110
|
+
❌ customer_ext.table_ext.al // Underscore notation
|
|
111
|
+
❌ CustomerExtension.TableExtension.al // Verbose suffixes
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Why These Are Wrong
|
|
115
|
+
- **Object IDs in Filenames**: IDs change, names are stable
|
|
116
|
+
- **Abbreviated Prefixes**: "Tab-Ext" is non-standard and unclear
|
|
117
|
+
- **Inconsistent Casing**: Makes files hard to locate and sort
|
|
118
|
+
- **Verbose Extensions**: ".TableExtension" is unnecessarily long
|
|
119
|
+
|
|
120
|
+
## Implementation Strategy
|
|
121
|
+
|
|
122
|
+
### File Naming Checklist
|
|
123
|
+
1. **Identify Object Name**: Use the actual AL object name from inside the file
|
|
124
|
+
2. **Apply Correct Suffix**: Use standard `.ObjectType.al` pattern
|
|
125
|
+
3. **Validate Consistency**: Ensure all project files follow same convention
|
|
126
|
+
4. **Update References**: Check that any references or documentation align
|
|
127
|
+
|
|
128
|
+
### Refactoring Existing Projects
|
|
129
|
+
- **Rename Systematically**: Update all files to follow standard pattern
|
|
130
|
+
- **Update Git History**: Consider preserving file history during renames
|
|
131
|
+
- **Team Communication**: Ensure all team members understand new conventions
|
|
132
|
+
- **Tool Configuration**: Update any build scripts or tools that reference filenames
|
|
133
|
+
|
|
134
|
+
## Integration with Development Tools
|
|
135
|
+
|
|
136
|
+
### VS Code Integration
|
|
137
|
+
- **File Explorer Sorting**: Consistent naming improves file navigation
|
|
138
|
+
- **Search and Replace**: Standard patterns make project-wide changes easier
|
|
139
|
+
- **Extensions**: AL Language extension works better with standard naming
|
|
140
|
+
|
|
141
|
+
### Source Control Benefits
|
|
142
|
+
- **File Tracking**: Consistent naming improves change tracking
|
|
143
|
+
- **Merge Conflicts**: Reduced conflicts from naming inconsistencies
|
|
144
|
+
- **Review Process**: Easier code review with predictable file organization
|
|
145
|
+
|
|
146
|
+
*This is a foundational standard that affects all AL development. Proper file naming is the first step toward professional, maintainable Business Central extensions.*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bc-code-intelligence-mcp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "BC Code Intelligence MCP Server - Complete Specialist Bundle with AI-driven expert consultation, seamless handoffs, and context-preserving workflows",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|