@angular/cli 22.0.0-next.5 → 22.0.0-next.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.
Files changed (46) hide show
  1. package/lib/config/schema.json +9 -1
  2. package/package.json +19 -19
  3. package/src/commands/mcp/host.js +27 -2
  4. package/src/commands/mcp/host.js.map +1 -1
  5. package/src/commands/mcp/mcp-server.js +0 -6
  6. package/src/commands/mcp/mcp-server.js.map +1 -1
  7. package/src/commands/mcp/resources/ai-tutor.md +5 -7
  8. package/src/commands/mcp/tools/projects.js +1 -1
  9. package/src/commands/mcp/tools/projects.js.map +1 -1
  10. package/src/commands/mcp/tools/test.js +13 -4
  11. package/src/commands/mcp/tools/test.js.map +1 -1
  12. package/src/package-managers/package-manager-descriptor.d.ts +7 -1
  13. package/src/package-managers/package-manager-descriptor.js +2 -0
  14. package/src/package-managers/package-manager-descriptor.js.map +1 -1
  15. package/src/package-managers/package-manager.d.ts +4 -0
  16. package/src/package-managers/package-manager.js +26 -1
  17. package/src/package-managers/package-manager.js.map +1 -1
  18. package/src/package-managers/parsers.d.ts +3 -1
  19. package/src/package-managers/parsers.js +41 -6
  20. package/src/package-managers/parsers.js.map +1 -1
  21. package/src/utilities/package-metadata.d.ts +0 -10
  22. package/src/utilities/package-metadata.js +0 -49
  23. package/src/utilities/package-metadata.js.map +1 -1
  24. package/src/utilities/version.js +1 -1
  25. package/lib/code-examples.db +0 -0
  26. package/src/commands/mcp/tools/examples/database-discovery.d.ts +0 -34
  27. package/src/commands/mcp/tools/examples/database-discovery.js +0 -87
  28. package/src/commands/mcp/tools/examples/database-discovery.js.map +0 -1
  29. package/src/commands/mcp/tools/examples/database.d.ts +0 -35
  30. package/src/commands/mcp/tools/examples/database.js +0 -125
  31. package/src/commands/mcp/tools/examples/database.js.map +0 -1
  32. package/src/commands/mcp/tools/examples/index.d.ts +0 -26
  33. package/src/commands/mcp/tools/examples/index.js +0 -149
  34. package/src/commands/mcp/tools/examples/index.js.map +0 -1
  35. package/src/commands/mcp/tools/examples/query-escaper.d.ts +0 -20
  36. package/src/commands/mcp/tools/examples/query-escaper.js +0 -68
  37. package/src/commands/mcp/tools/examples/query-escaper.js.map +0 -1
  38. package/src/commands/mcp/tools/examples/runtime-database.d.ts +0 -10
  39. package/src/commands/mcp/tools/examples/runtime-database.js +0 -192
  40. package/src/commands/mcp/tools/examples/runtime-database.js.map +0 -1
  41. package/src/commands/mcp/tools/examples/schemas.d.ts +0 -29
  42. package/src/commands/mcp/tools/examples/schemas.js +0 -101
  43. package/src/commands/mcp/tools/examples/schemas.js.map +0 -1
  44. package/src/commands/mcp/tools/examples/utils.d.ts +0 -14
  45. package/src/commands/mcp/tools/examples/utils.js +0 -31
  46. package/src/commands/mcp/tools/examples/utils.js.map +0 -1
@@ -1,149 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || (function () {
26
- var ownKeys = function(o) {
27
- ownKeys = Object.getOwnPropertyNames || function (o) {
28
- var ar = [];
29
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
- return ar;
31
- };
32
- return ownKeys(o);
33
- };
34
- return function (mod) {
35
- if (mod && mod.__esModule) return mod;
36
- var result = {};
37
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
- __setModuleDefault(result, mod);
39
- return result;
40
- };
41
- })();
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.FIND_EXAMPLE_TOOL = void 0;
44
- const tool_registry_1 = require("../tool-registry");
45
- const database_1 = require("./database");
46
- const database_discovery_1 = require("./database-discovery");
47
- const runtime_database_1 = require("./runtime-database");
48
- const schemas_1 = require("./schemas");
49
- const utils_1 = require("./utils");
50
- exports.FIND_EXAMPLE_TOOL = (0, tool_registry_1.declareTool)({
51
- name: 'find_examples',
52
- title: 'Find Angular Code Examples',
53
- description: `
54
- <Purpose>
55
- Augments your knowledge base with a curated database of official, best-practice code examples,
56
- focusing on **modern, new, and recently updated** Angular features. This tool acts as a RAG
57
- (Retrieval-Augmented Generation) source, providing ground-truth information on the latest Angular
58
- APIs and patterns. You **MUST** use it to understand and apply current standards when working with
59
- new or evolving features.
60
- </Purpose>
61
- <Use Cases>
62
- * **Knowledge Augmentation:** Learning about new or updated Angular features (e.g., query: 'signal input' or 'deferrable views').
63
- * **Modern Implementation:** Finding the correct modern syntax for features
64
- (e.g., query: 'functional route guard' or 'http client with fetch').
65
- * **Refactoring to Modern Patterns:** Upgrading older code by finding examples of new syntax
66
- (e.g., query: 'built-in control flow' to replace "*ngIf").
67
- * **Advanced Filtering:** Combining a full-text search with filters to narrow results.
68
- (e.g., query: 'forms', required_packages: ['@angular/forms'], keywords: ['validation'])
69
- </Use Cases>
70
- <Operational Notes>
71
- * **Project-Specific Use (Recommended):** For tasks inside a user's project, you **MUST** provide the
72
- \`workspacePath\` argument to get examples that match the project's Angular version. Get this
73
- path from \`list_projects\`.
74
- * **General Use:** If no project context is available (e.g., for general questions or learning),
75
- you can call the tool without the \`workspacePath\` argument. It will return the latest
76
- generic examples.
77
- * **Tool Selection:** This database primarily contains examples for new and recently updated Angular
78
- features. For established, core features, the main documentation (via the
79
- \`search_documentation\` tool) may be a better source of information.
80
- * The examples in this database are the single source of truth for modern Angular coding patterns.
81
- * The search query uses a powerful full-text search syntax (FTS5). Refer to the 'query'
82
- parameter description for detailed syntax rules and examples.
83
- * You can combine the main 'query' with optional filters like 'keywords', 'required_packages',
84
- and 'related_concepts' to create highly specific searches.
85
- </Operational Notes>`,
86
- inputSchema: schemas_1.findExampleInputSchema.shape,
87
- outputSchema: schemas_1.findExampleOutputSchema.shape,
88
- isReadOnly: true,
89
- isLocalOnly: true,
90
- shouldRegister: ({ logger }) => {
91
- // sqlite database support requires Node.js 22.16+
92
- const [nodeMajor, nodeMinor] = process.versions.node.split('.', 2).map(Number);
93
- if (nodeMajor < 22 || (nodeMajor === 22 && nodeMinor < 16)) {
94
- logger.warn(`MCP tool 'find_examples' requires Node.js 22.16 (or higher). ` +
95
- ' Registration of this tool has been skipped.');
96
- return false;
97
- }
98
- return true;
99
- },
100
- factory: createFindExampleHandler,
101
- });
102
- async function createFindExampleHandler({ logger, exampleDatabasePath, host }) {
103
- const runtimeDb = process.env['NG_MCP_EXAMPLES_DIR']
104
- ? await (0, runtime_database_1.setupRuntimeExamples)(process.env['NG_MCP_EXAMPLES_DIR'], host)
105
- : undefined;
106
- (0, utils_1.suppressSqliteWarning)();
107
- return async (input) => {
108
- // If the dev-time override is present, use it and bypass all other logic.
109
- if (runtimeDb) {
110
- return (0, database_1.queryDatabase)([runtimeDb], input);
111
- }
112
- const resolvedDbs = [];
113
- // First, try to get all available version-specific guides.
114
- if (input.workspacePath) {
115
- const versionSpecificDbs = await (0, database_discovery_1.getVersionSpecificExampleDatabases)(input.workspacePath, logger, host);
116
- for (const db of versionSpecificDbs) {
117
- resolvedDbs.push({ path: db.dbPath, source: db.source });
118
- }
119
- }
120
- // If no version-specific guides were found for any reason, fall back to the bundled version.
121
- if (resolvedDbs.length === 0 && exampleDatabasePath) {
122
- resolvedDbs.push({ path: exampleDatabasePath, source: 'bundled' });
123
- }
124
- if (resolvedDbs.length === 0) {
125
- // This should be prevented by the registration logic in mcp-server.ts
126
- throw new Error('No example databases are available.');
127
- }
128
- const { DatabaseSync } = await Promise.resolve().then(() => __importStar(require('node:sqlite')));
129
- const dbConnections = [];
130
- for (const { path, source } of resolvedDbs) {
131
- const db = new DatabaseSync(path, { readOnly: true });
132
- try {
133
- (0, database_1.validateDatabaseSchema)(db, source);
134
- dbConnections.push(db);
135
- }
136
- catch (e) {
137
- logger.warn(e.message);
138
- // If a database is invalid, we should not query it, but we should not fail the whole tool.
139
- // We will just skip this database and try to use the others.
140
- continue;
141
- }
142
- }
143
- if (dbConnections.length === 0) {
144
- throw new Error('All available example databases were invalid. Cannot perform query.');
145
- }
146
- return (0, database_1.queryDatabase)(dbConnections, input);
147
- };
148
- }
149
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,oDAAoE;AACpE,yCAAmE;AACnE,6DAA0E;AAC1E,yDAA0D;AAC1D,uCAAmG;AACnG,mCAAgD;AAEnC,QAAA,iBAAiB,GAAG,IAAA,2BAAW,EAAC;IAC3C,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,4BAA4B;IACnC,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgCM;IACnB,WAAW,EAAE,gCAAsB,CAAC,KAAK;IACzC,YAAY,EAAE,iCAAuB,CAAC,KAAK;IAC3C,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,IAAI;IACjB,cAAc,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;QAC7B,kDAAkD;QAClD,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CA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F;QAC7F,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,mBAAmB,EAAE,CAAC;YACpD,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;QACrE,CAAC;QAED,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,sEAAsE;YACtE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACzD,CAAC;QAED,MAAM,EAAE,YAAY,EAAE,GAAG,wDAAa,aAAa,GAAC,CAAC;QACrD,MAAM,aAAa,GAAmB,EAAE,CAAC;QAEzC,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,WAAW,EAAE,CAAC;YAC3C,MAAM,EAAE,GAAG,IAAI,YAAY,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YACtD,IAAI,CAAC;gBACH,IAAA,iCAAsB,EAAC,EAAE,EAAE,MAAM,CAAC,CAAC;gBACnC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACzB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,IAAI,CAAE,CAAW,CAAC,OAAO,CAAC,CAAC;gBAClC,2FAA2F;gBAC3F,6DAA6D;gBAC7D,SAAS;YACX,CAAC;QACH,CAAC;QAED,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;QACzF,CAAC;QAED,OAAO,IAAA,wBAAa,EAAC,aAAa,EAAE,KAAK,CAAC,CAAC;IAC7C,CAAC,CAAC;AACJ,CAAC"}
@@ -1,20 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- /**
9
- * Escapes a search query for FTS5 by tokenizing and quoting terms.
10
- *
11
- * This function processes a raw search string and prepares it for an FTS5 full-text search.
12
- * It correctly handles quoted phrases, logical operators (AND, OR, NOT), parentheses,
13
- * and prefix searches (ending with an asterisk), ensuring that individual search
14
- * terms are properly quoted to be treated as literals by the search engine.
15
- * This is primarily intended to avoid unintentional usage of FTS5 query syntax by consumers.
16
- *
17
- * @param query The raw search query string.
18
- * @returns A sanitized query string suitable for FTS5.
19
- */
20
- export declare function escapeSearchQuery(query: string): string;
@@ -1,68 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.escapeSearchQuery = escapeSearchQuery;
11
- /**
12
- * Escapes a search query for FTS5 by tokenizing and quoting terms.
13
- *
14
- * This function processes a raw search string and prepares it for an FTS5 full-text search.
15
- * It correctly handles quoted phrases, logical operators (AND, OR, NOT), parentheses,
16
- * and prefix searches (ending with an asterisk), ensuring that individual search
17
- * terms are properly quoted to be treated as literals by the search engine.
18
- * This is primarily intended to avoid unintentional usage of FTS5 query syntax by consumers.
19
- *
20
- * @param query The raw search query string.
21
- * @returns A sanitized query string suitable for FTS5.
22
- */
23
- function escapeSearchQuery(query) {
24
- // This regex tokenizes the query string into parts:
25
- // 1. Quoted phrases (e.g., "foo bar")
26
- // 2. Parentheses ( and )
27
- // 3. FTS5 operators (AND, OR, NOT, NEAR)
28
- // 4. Words, which can include a trailing asterisk for prefix search (e.g., foo*)
29
- const tokenizer = /"([^"]*)"|([()])|\b(AND|OR|NOT|NEAR)\b|([^\s()]+)/g;
30
- let match;
31
- const result = [];
32
- let lastIndex = 0;
33
- while ((match = tokenizer.exec(query)) !== null) {
34
- // Add any whitespace or other characters between tokens
35
- if (match.index > lastIndex) {
36
- result.push(query.substring(lastIndex, match.index));
37
- }
38
- const [, quoted, parenthesis, operator, term] = match;
39
- if (quoted !== undefined) {
40
- // It's a quoted phrase, keep it as is.
41
- result.push(`"${quoted}"`);
42
- }
43
- else if (parenthesis) {
44
- // It's a parenthesis, keep it as is.
45
- result.push(parenthesis);
46
- }
47
- else if (operator) {
48
- // It's an operator, keep it as is.
49
- result.push(operator);
50
- }
51
- else if (term) {
52
- // It's a term that needs to be quoted.
53
- if (term.endsWith('*')) {
54
- result.push(`"${term.slice(0, -1)}"*`);
55
- }
56
- else {
57
- result.push(`"${term}"`);
58
- }
59
- }
60
- lastIndex = tokenizer.lastIndex;
61
- }
62
- // Add any remaining part of the string
63
- if (lastIndex < query.length) {
64
- result.push(query.substring(lastIndex));
65
- }
66
- return result.join('');
67
- }
68
- //# sourceMappingURL=query-escaper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"query-escaper.js","sourceRoot":"","sources":["query-escaper.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAcH,8CA6CC;AAzDD;;;;;;;;;;;GAWG;AACH,SAAgB,iBAAiB,CAAC,KAAa;IAC7C,oDAAoD;IACpD,sCAAsC;IACtC,yBAAyB;IACzB,yCAAyC;IACzC,iFAAiF;IACjF,MAAM,SAAS,GAAG,oDAAoD,CAAC;IACvE,IAAI,KAAK,CAAC;IACV,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAChD,wDAAwD;QACxD,IAAI,KAAK,CAAC,KAAK,GAAG,SAAS,EAAE,CAAC;YAC5B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QACvD,CAAC;QAED,MAAM,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC;QAEtD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,uCAAuC;YACvC,MAAM,CAAC,IAAI,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC;QAC7B,CAAC;aAAM,IAAI,WAAW,EAAE,CAAC;YACvB,qCAAqC;YACrC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC3B,CAAC;aAAM,IAAI,QAAQ,EAAE,CAAC;YACpB,mCAAmC;YACnC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACxB,CAAC;aAAM,IAAI,IAAI,EAAE,CAAC;YAChB,uCAAuC;YACvC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBACvB,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACzC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;QACD,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;IAClC,CAAC;IAED,uCAAuC;IACvC,IAAI,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QAC7B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzB,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import type { DatabaseSync } from 'node:sqlite';
9
- import type { McpToolContext } from '../tool-registry';
10
- export declare function setupRuntimeExamples(examplesPath: string, host: McpToolContext['host']): Promise<DatabaseSync>;
@@ -1,192 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || (function () {
26
- var ownKeys = function(o) {
27
- ownKeys = Object.getOwnPropertyNames || function (o) {
28
- var ar = [];
29
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
- return ar;
31
- };
32
- return ownKeys(o);
33
- };
34
- return function (mod) {
35
- if (mod && mod.__esModule) return mod;
36
- var result = {};
37
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
- __setModuleDefault(result, mod);
39
- return result;
40
- };
41
- })();
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.setupRuntimeExamples = setupRuntimeExamples;
44
- const node_path_1 = require("node:path");
45
- const zod_1 = require("zod");
46
- /**
47
- * A simple YAML front matter parser.
48
- *
49
- * This function extracts the YAML block enclosed by `---` at the beginning of a string
50
- * and parses it into a JavaScript object. It is not a full YAML parser and only
51
- * supports simple key-value pairs and string arrays.
52
- *
53
- * @param content The string content to parse.
54
- * @returns A record containing the parsed front matter data.
55
- */
56
- function parseFrontmatter(content) {
57
- const match = content.match(/^---\r?\n(.*?)\r?\n---/s);
58
- if (!match) {
59
- return {};
60
- }
61
- const frontmatter = match[1];
62
- const data = {};
63
- const lines = frontmatter.split(/\r?\n/);
64
- let currentKey = '';
65
- let isArray = false;
66
- const arrayValues = [];
67
- for (const line of lines) {
68
- const keyValueMatch = line.match(/^([^:]+):\s*(.*)/);
69
- if (keyValueMatch) {
70
- if (currentKey && isArray) {
71
- data[currentKey] = arrayValues.slice();
72
- arrayValues.length = 0;
73
- }
74
- const [, key, value] = keyValueMatch;
75
- currentKey = key.trim();
76
- isArray = value.trim() === '';
77
- if (!isArray) {
78
- const trimmedValue = value.trim();
79
- if (trimmedValue === 'true') {
80
- data[currentKey] = true;
81
- }
82
- else if (trimmedValue === 'false') {
83
- data[currentKey] = false;
84
- }
85
- else {
86
- data[currentKey] = trimmedValue;
87
- }
88
- }
89
- }
90
- else {
91
- const arrayItemMatch = line.match(/^\s*-\s*(.*)/);
92
- if (arrayItemMatch && currentKey && isArray) {
93
- let value = arrayItemMatch[1].trim();
94
- // Unquote if the value is quoted.
95
- if ((value.startsWith("'") && value.endsWith("'")) ||
96
- (value.startsWith('"') && value.endsWith('"'))) {
97
- value = value.slice(1, -1);
98
- }
99
- arrayValues.push(value);
100
- }
101
- }
102
- }
103
- if (currentKey && isArray) {
104
- data[currentKey] = arrayValues;
105
- }
106
- return data;
107
- }
108
- async function setupRuntimeExamples(examplesPath, host) {
109
- const { DatabaseSync } = await Promise.resolve().then(() => __importStar(require('node:sqlite')));
110
- const db = new DatabaseSync(':memory:');
111
- // Create a relational table to store the structured example data.
112
- db.exec(`
113
- CREATE TABLE metadata (
114
- key TEXT PRIMARY KEY NOT NULL,
115
- value TEXT NOT NULL
116
- );
117
- `);
118
- db.exec(`
119
- INSERT INTO metadata (key, value) VALUES
120
- ('schema_version', '1'),
121
- ('created_at', '${new Date().toISOString()}');
122
- `);
123
- db.exec(`
124
- CREATE TABLE examples (
125
- id INTEGER PRIMARY KEY,
126
- title TEXT NOT NULL,
127
- summary TEXT NOT NULL,
128
- keywords TEXT,
129
- required_packages TEXT,
130
- related_concepts TEXT,
131
- related_tools TEXT,
132
- experimental INTEGER NOT NULL DEFAULT 0,
133
- content TEXT NOT NULL
134
- );
135
- `);
136
- // Create an FTS5 virtual table to provide full-text search capabilities.
137
- db.exec(`
138
- CREATE VIRTUAL TABLE examples_fts USING fts5(
139
- title,
140
- summary,
141
- keywords,
142
- required_packages,
143
- related_concepts,
144
- related_tools,
145
- content,
146
- content='examples',
147
- content_rowid='id',
148
- tokenize = 'porter ascii'
149
- );
150
- `);
151
- // Create triggers to keep the FTS table synchronized with the examples table.
152
- db.exec(`
153
- CREATE TRIGGER examples_after_insert AFTER INSERT ON examples BEGIN
154
- INSERT INTO examples_fts(rowid, title, summary, keywords, required_packages, related_concepts, related_tools, content)
155
- VALUES (
156
- new.id, new.title, new.summary, new.keywords, new.required_packages, new.related_concepts,
157
- new.related_tools, new.content
158
- );
159
- END;
160
- `);
161
- const insertStatement = db.prepare('INSERT INTO examples(' +
162
- 'title, summary, keywords, required_packages, related_concepts, related_tools, experimental, content' +
163
- ') VALUES(?, ?, ?, ?, ?, ?, ?, ?);');
164
- const frontmatterSchema = zod_1.z.object({
165
- title: zod_1.z.string(),
166
- summary: zod_1.z.string(),
167
- keywords: zod_1.z.array(zod_1.z.string()).optional(),
168
- required_packages: zod_1.z.array(zod_1.z.string()).optional(),
169
- related_concepts: zod_1.z.array(zod_1.z.string()).optional(),
170
- related_tools: zod_1.z.array(zod_1.z.string()).optional(),
171
- experimental: zod_1.z.boolean().optional(),
172
- });
173
- db.exec('BEGIN TRANSACTION');
174
- for await (const entry of host.glob('**/*.md', { cwd: examplesPath })) {
175
- if (!entry.isFile()) {
176
- continue;
177
- }
178
- const content = await host.readFile((0, node_path_1.join)(entry.parentPath, entry.name), 'utf-8');
179
- const frontmatter = parseFrontmatter(content);
180
- const validation = frontmatterSchema.safeParse(frontmatter);
181
- if (!validation.success) {
182
- // eslint-disable-next-line no-console
183
- console.warn(`Skipping invalid example file ${entry.name}:`, validation.error.issues);
184
- continue;
185
- }
186
- const { title, summary, keywords, required_packages, related_concepts, related_tools, experimental, } = validation.data;
187
- insertStatement.run(title, summary, JSON.stringify(keywords ?? []), JSON.stringify(required_packages ?? []), JSON.stringify(related_concepts ?? []), JSON.stringify(related_tools ?? []), experimental ? 1 : 0, content);
188
- }
189
- db.exec('END TRANSACTION');
190
- return db;
191
- }
192
- //# sourceMappingURL=runtime-database.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-database.js","sourceRoot":"","sources":["runtime-database.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4EH,oDAsHC;AAhMD,yCAAiC;AAEjC,6BAAwB;AAGxB;;;;;;;;;GASG;AACH,SAAS,gBAAgB,CAAC,OAAe;IACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACvD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC7B,MAAM,IAAI,GAA4B,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAEzC,IAAI,UAAU,GAAG,EAAE,CAAC;IACpB,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,MAAM,WAAW,GAAa,EAAE,CAAC;IAEjC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QACrD,IAAI,aAAa,EAAE,CAAC;YAClB,IAAI,UAAU,IAAI,OAAO,EAAE,CAAC;gBAC1B,IAAI,CAAC,UAAU,CAAC,GAAG,WAAW,CAAC,KAAK,EAAE,CAAC;gBACvC,WAAW,CA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AAC,aAAa,IAAI,EAAE,CAAC,EACnC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACpB,OAAO,CACR,CAAC;IACJ,CAAC;IACD,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAE3B,OAAO,EAAE,CAAC;AACZ,CAAC"}
@@ -1,29 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import { z } from 'zod';
9
- export declare const findExampleInputSchema: z.ZodObject<{
10
- workspacePath: z.ZodOptional<z.ZodString>;
11
- query: z.ZodString;
12
- keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
- required_packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
- related_concepts: z.ZodOptional<z.ZodArray<z.ZodString>>;
15
- includeExperimental: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
16
- }, z.core.$strip>;
17
- export type FindExampleInput = z.infer<typeof findExampleInputSchema>;
18
- export declare const findExampleOutputSchema: z.ZodObject<{
19
- examples: z.ZodArray<z.ZodObject<{
20
- title: z.ZodString;
21
- summary: z.ZodString;
22
- keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
23
- required_packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
24
- related_concepts: z.ZodOptional<z.ZodArray<z.ZodString>>;
25
- related_tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
- content: z.ZodString;
27
- snippet: z.ZodOptional<z.ZodString>;
28
- }, z.core.$strip>>;
29
- }, z.core.$strip>;
@@ -1,101 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.findExampleOutputSchema = exports.findExampleInputSchema = void 0;
11
- const zod_1 = require("zod");
12
- exports.findExampleInputSchema = zod_1.z.object({
13
- workspacePath: zod_1.z
14
- .string()
15
- .optional()
16
- .describe('The absolute path to the `angular.json` file for the workspace. This is used to find the ' +
17
- 'version-specific code examples that correspond to the installed version of the ' +
18
- 'Angular framework. You **MUST** get this path from the `list_projects` tool. ' +
19
- 'If omitted, the tool will search the generic code examples bundled with the CLI.'),
20
- query: zod_1.z
21
- .string()
22
- .describe("The primary, conceptual search query. This should capture the user's main goal or question " +
23
- "(e.g., 'lazy loading a route' or 'how to use signal inputs'). The query will be processed " +
24
- 'by a powerful full-text search engine.\n\n' +
25
- 'Key Syntax Features (see https://www.sqlite.org/fts5.html for full documentation):\n' +
26
- ' - AND (default): Space-separated terms are combined with AND.\n' +
27
- ' - Example: \'standalone component\' (finds results with both "standalone" and "component")\n' +
28
- ' - OR: Use the OR operator to find results with either term.\n' +
29
- " - Example: 'validation OR validator'\n" +
30
- ' - NOT: Use the NOT operator to exclude terms.\n' +
31
- " - Example: 'forms NOT reactive'\n" +
32
- ' - Grouping: Use parentheses () to group expressions.\n' +
33
- " - Example: '(validation OR validator) AND forms'\n" +
34
- ' - Phrase Search: Use double quotes "" for exact phrases.\n' +
35
- ' - Example: \'"template-driven forms"\'\n' +
36
- ' - Prefix Search: Use an asterisk * for prefix matching.\n' +
37
- ' - Example: \'rout*\' (matches "route", "router", "routing")'),
38
- keywords: zod_1.z
39
- .array(zod_1.z.string())
40
- .optional()
41
- .describe('A list of specific, exact keywords to narrow the search. Use this for precise terms like '),
42
- required_packages: zod_1.z
43
- .array(zod_1.z.string())
44
- .optional()
45
- .describe("A list of NPM packages that an example must use. Use this when the user's request is " +
46
- 'specific to a feature within a certain package (e.g., if the user asks about `ngModel`, ' +
47
- 'you should filter by `@angular/forms`).'),
48
- related_concepts: zod_1.z
49
- .array(zod_1.z.string())
50
- .optional()
51
- .describe('A list of high-level concepts to filter by. Use this to find examples related to broader ' +
52
- 'architectural ideas or patterns (e.g., `signals`, `dependency injection`, `routing`).'),
53
- includeExperimental: zod_1.z
54
- .boolean()
55
- .optional()
56
- .default(false)
57
- .describe('By default, this tool returns only production-safe examples. Set this to `true` **only if** ' +
58
- 'the user explicitly asks for a bleeding-edge feature or if a stable solution to their ' +
59
- 'problem cannot be found. If you set this to `true`, you **MUST** preface your answer by ' +
60
- 'warning the user that the example uses experimental APIs that are not suitable for production.'),
61
- });
62
- exports.findExampleOutputSchema = zod_1.z.object({
63
- examples: zod_1.z.array(zod_1.z.object({
64
- title: zod_1.z
65
- .string()
66
- .describe('The title of the example. Use this as a heading when presenting the example to the user.'),
67
- summary: zod_1.z
68
- .string()
69
- .describe("A one-sentence summary of the example's purpose. Use this to help the user decide " +
70
- 'if the example is relevant to them.'),
71
- keywords: zod_1.z
72
- .array(zod_1.z.string())
73
- .optional()
74
- .describe('A list of keywords for the example. You can use these to explain why this example ' +
75
- "was a good match for the user's query."),
76
- required_packages: zod_1.z
77
- .array(zod_1.z.string())
78
- .optional()
79
- .describe('A list of NPM packages required for the example to work. Before presenting the code, ' +
80
- 'you should inform the user if any of these packages need to be installed.'),
81
- related_concepts: zod_1.z
82
- .array(zod_1.z.string())
83
- .optional()
84
- .describe('A list of related concepts. You can suggest these to the user as topics for ' +
85
- 'follow-up questions.'),
86
- related_tools: zod_1.z
87
- .array(zod_1.z.string())
88
- .optional()
89
- .describe('A list of related MCP tools. You can suggest these as potential next steps for the user.'),
90
- content: zod_1.z
91
- .string()
92
- .describe('A complete, self-contained Angular code example in Markdown format. This should be ' +
93
- 'presented to the user inside a markdown code block.'),
94
- snippet: zod_1.z
95
- .string()
96
- .optional()
97
- .describe('A contextual snippet from the content showing the matched search term. This field is ' +
98
- 'critical for efficiently evaluating a result`s relevance. It enables two primary '),
99
- })),
100
- });
101
- //# sourceMappingURL=schemas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["schemas.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;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AE,OAAC;aACL,MAAM,EAAE;aACR,QAAQ,CACP,0FAA0F,CAC3F;QACH,OAAO,EAAE,OAAC;aACP,MAAM,EAAE;aACR,QAAQ,CACP,oFAAoF;YAClF,qCAAqC,CACxC;QACH,QAAQ,EAAE,OAAC;aACR,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;aACjB,QAAQ,EAAE;aACV,QAAQ,CACP,oFAAoF;YAClF,wCAAwC,CAC3C;QACH,iBAAiB,EAAE,OAAC;aACjB,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;aACjB,QAAQ,EAAE;aACV,QAAQ,CACP,uFAAuF;YACrF,2EAA2E,CAC9E;QACH,gBAAgB,EAAE,OAAC;aAChB,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;aACjB,QAAQ,EAAE;aACV,QAAQ,CACP,8EAA8E;YAC5E,sBAAsB,CACzB;QACH,aAAa,EAAE,OAAC;aACb,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;aACjB,QAAQ,EAAE;aACV,QAAQ,CACP,0FAA0F,CAC3F;QACH,OAAO,EAAE,OAAC;aACP,MAAM,EAAE;aACR,QAAQ,CACP,qFAAqF;YACnF,qDAAqD,CACxD;QACH,OAAO,EAAE,OAAC;aACP,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,uFAAuF;YACrF,mFAAmF,CACtF;KACJ,CAAC,CACH;CACF,CAAC,CAAC"}
@@ -1,14 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- /**
9
- * Suppresses the experimental warning emitted by Node.js for the `node:sqlite` module.
10
- *
11
- * This is a workaround to prevent the console from being cluttered with warnings
12
- * about the experimental status of the SQLite module, which is used by this tool.
13
- */
14
- export declare function suppressSqliteWarning(): void;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.suppressSqliteWarning = suppressSqliteWarning;
11
- /**
12
- * Suppresses the experimental warning emitted by Node.js for the `node:sqlite` module.
13
- *
14
- * This is a workaround to prevent the console from being cluttered with warnings
15
- * about the experimental status of the SQLite module, which is used by this tool.
16
- */
17
- function suppressSqliteWarning() {
18
- const originalProcessEmit = process.emit;
19
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
- process.emit = function (event, error) {
21
- if (event === 'warning' &&
22
- error instanceof Error &&
23
- error.name === 'ExperimentalWarning' &&
24
- error.message.includes('SQLite')) {
25
- return false;
26
- }
27
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, prefer-rest-params
28
- return originalProcessEmit.apply(process, arguments);
29
- };
30
- }
31
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["utils.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAQH,sDAgBC;AAtBD;;;;;GAKG;AACH,SAAgB,qBAAqB;IACnC,MAAM,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IACzC,8DAA8D;IAC9D,OAAO,CAAC,IAAI,GAAG,UAAU,KAAa,EAAE,KAAe;QACrD,IACE,KAAK,KAAK,SAAS;YACnB,KAAK,YAAY,KAAK;YACtB,KAAK,CAAC,IAAI,KAAK,qBAAqB;YACpC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAChC,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,kFAAkF;QAClF,OAAO,mBAAmB,CAAC,KAAK,CAAC,OAAO,EAAE,SAAgB,CAAC,CAAC;IAC9D,CAAC,CAAC;AACJ,CAAC"}