@equinor/fusion-framework-cli 13.0.0-cli-search-index.4 → 13.0.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +125 -56
  2. package/README.md +24 -0
  3. package/bin/build/bin.mjs +1 -1
  4. package/bin/build/cli.mjs +6 -6
  5. package/dist/esm/lib/dev-server.js +1 -0
  6. package/dist/esm/lib/dev-server.js.map +1 -1
  7. package/dist/esm/lib/fusion-cli-config.js +21 -0
  8. package/dist/esm/lib/fusion-cli-config.js.map +1 -0
  9. package/dist/esm/lib/index.js +1 -0
  10. package/dist/esm/lib/index.js.map +1 -1
  11. package/dist/esm/version.js +1 -1
  12. package/dist/types/cli/commands/create/_helpers/cleanup-template-files.d.ts +4 -2
  13. package/dist/types/cli/commands/create/_helpers/open-in-ide.d.ts +3 -2
  14. package/dist/types/cli/commands/create/_helpers/select-git-protocol.d.ts +7 -2
  15. package/dist/types/cli/commands/create/_helpers/setup-repository.d.ts +6 -2
  16. package/dist/types/cli/commands/create/app.d.ts +4 -1
  17. package/dist/types/cli/commands/index.d.ts +1 -1
  18. package/dist/types/cli/plugins/loader.d.ts +2 -0
  19. package/dist/types/lib/dev-server.d.ts +1 -0
  20. package/dist/types/lib/fusion-cli-config.d.ts +84 -0
  21. package/dist/types/lib/index.d.ts +1 -0
  22. package/dist/types/version.d.ts +1 -1
  23. package/docs/ai-commands.md +28 -24
  24. package/package.json +12 -33
  25. package/dist/esm/lib/ai/fusion-ai.js +0 -2
  26. package/dist/esm/lib/ai/fusion-ai.js.map +0 -1
  27. package/dist/esm/lib/ai/index.js +0 -2
  28. package/dist/esm/lib/ai/index.js.map +0 -1
  29. package/dist/types/cli/commands/ai/chat.d.ts +0 -2
  30. package/dist/types/cli/commands/ai/embeddings.d.ts +0 -2
  31. package/dist/types/cli/commands/ai/index.d.ts +0 -30
  32. package/dist/types/cli/commands/ai/search.d.ts +0 -48
  33. package/dist/types/cli/commands/ai/utils/generate-cunk-id.d.ts +0 -8
  34. package/dist/types/cli/commands/ai/utils/git/file-changes.d.ts +0 -21
  35. package/dist/types/cli/commands/ai/utils/git/git-client.d.ts +0 -17
  36. package/dist/types/cli/commands/ai/utils/git/index.d.ts +0 -5
  37. package/dist/types/cli/commands/ai/utils/git/metadata.d.ts +0 -7
  38. package/dist/types/cli/commands/ai/utils/git/status.d.ts +0 -12
  39. package/dist/types/cli/commands/ai/utils/git/types.d.ts +0 -33
  40. package/dist/types/cli/commands/ai/utils/markdown/index.d.ts +0 -2
  41. package/dist/types/cli/commands/ai/utils/markdown/parser.d.ts +0 -21
  42. package/dist/types/cli/commands/ai/utils/markdown/types.d.ts +0 -11
  43. package/dist/types/cli/commands/ai/utils/setup-framework.d.ts +0 -10
  44. package/dist/types/cli/commands/ai/utils/ts-doc/constants.d.ts +0 -5
  45. package/dist/types/cli/commands/ai/utils/ts-doc/extractors.d.ts +0 -28
  46. package/dist/types/cli/commands/ai/utils/ts-doc/index.d.ts +0 -2
  47. package/dist/types/cli/commands/ai/utils/ts-doc/parser.d.ts +0 -23
  48. package/dist/types/cli/commands/ai/utils/ts-doc/types.d.ts +0 -20
  49. package/dist/types/cli/commands/ai/utils/types.d.ts +0 -7
  50. package/dist/types/cli/commands/create/_helpers/start-dev-server.d.ts +0 -17
  51. package/dist/types/cli/options/ai.d.ts +0 -105
  52. package/dist/types/lib/ai/fusion-ai.d.ts +0 -20
  53. package/dist/types/lib/ai/index.d.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -1,56 +1,154 @@
1
1
  # Change Log
2
2
 
3
- ## 13.0.0-cli-search-index.4
3
+ ## 13.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`e2d2a76`](https://github.com/equinor/fusion-framework/commit/e2d2a76d08b86c3a9d8783fed1606551df9d5633) Thanks [@odinr](https://github.com/odinr)! - Add plugin system for extensible CLI architecture and new framework configuration utilities.
8
+
9
+ **Plugin System:**
10
+
11
+ - Support for optional plugins via `fusion-cli.config.ts` configuration file
12
+ - Automatic plugin discovery and loading from project root or CLI package directory
13
+ - Plugin registration via package name or direct function imports
14
+ - Support for `.ts`, `.js`, and `.json` config file formats
15
+ - Multiple plugin resolution strategies for different installation methods
16
+
17
+ **New Exports:**
18
+
19
+ - `configureFramework` - Separated framework configuration from initialization for advanced use cases
20
+ - `defineFusionCli` - Type-safe utility for defining CLI plugin configurations
21
+
22
+ **Enhancements:**
23
+
24
+ - Non-interactive mode support for `create app` command with `--git-protocol`, `--cleanup`/`--no-cleanup`, and `--no-open` options
25
+ - Automatic `.env` file loading via dotenv for environment variable support
26
+ - Improved error handling and plugin resolution strategies
27
+
28
+ **Documentation:**
29
+
30
+ - Added comprehensive AI commands documentation (internal use only)
31
+ - Updated README with plugin system usage instructions
32
+
33
+ **Quick Usage:**
34
+
35
+ 1. Install a plugin package:
36
+
37
+ ```sh
38
+ pnpm add -D @equinor/fusion-framework-cli-plugin-ai-chat
39
+ ```
40
+
41
+ 2. Create `fusion-cli.config.ts` in your project root:
42
+
43
+ ```typescript
44
+ import { defineFusionCli } from "@equinor/fusion-framework-cli";
45
+
46
+ export default defineFusionCli(() => ({
47
+ plugins: [
48
+ "@equinor/fusion-framework-cli-plugin-ai-chat",
49
+ // Or use direct imports:
50
+ // import aiChatPlugin from '@equinor/fusion-framework-cli-plugin-ai-chat';
51
+ // plugins: [aiChatPlugin],
52
+ ],
53
+ }));
54
+ ```
55
+
56
+ 3. Plugins are automatically loaded when CLI starts:
57
+
58
+ ```sh
59
+ # Plugin commands are now available
60
+ ffc ai chat
61
+ ```
62
+
63
+ Plugins can be registered by package name (string) or direct function imports. The config file supports `.ts`, `.js`, or `.json` formats. If no config file exists, the CLI works normally without plugins.
4
64
 
5
65
  ### Patch Changes
6
66
 
7
- - [#3757](https://github.com/equinor/fusion-framework/pull/3757) [`91fbb14`](https://github.com/equinor/fusion-framework/commit/91fbb14c3618d4d494e0468fdef691a8cb48253d) Thanks [@odinr](https://github.com/odinr)! - Refactor `ai embeddings` command pipeline to improve performance and maintainability.
67
+ - Updated dependencies [[`24403fc`](https://github.com/equinor/fusion-framework/commit/24403fc96d24d942f0c9632ed900b1a0f4065c1e)]:
68
+ - @equinor/fusion-framework-module-msal-node@2.0.2
69
+
70
+ ## 12.5.1
8
71
 
9
- - Optimize file deletion with batch operations instead of one-by-one processing
10
- - Improve RxJS stream handling with better separation of removed vs new/modified files
11
- - Enhance result tracking to report deleted files and added document IDs
12
- - Add clearer logging and comments throughout the pipeline
13
- - Ensure deletions happen before additions using concat operator
72
+ ### Patch Changes
14
73
 
15
- No public API changes; internal improvements only.
74
+ - [#3845](https://github.com/equinor/fusion-framework/pull/3845) [`5114ac4`](https://github.com/equinor/fusion-framework/commit/5114ac4f71a60935d0194b9b2766f95adff0ba1e) Thanks [@asbjornhaland](https://github.com/asbjornhaland)! - Fix tsconfig references
75
+
76
+ - Updated dependencies []:
77
+ - @equinor/fusion-framework-dev-portal@1.2.6
16
78
 
17
- ## 13.0.0-cli-search-index.3
79
+ ## 12.5.0
18
80
 
19
81
  ### Minor Changes
20
82
 
21
- - [#3757](https://github.com/equinor/fusion-framework/pull/3757) [`551765f`](https://github.com/equinor/fusion-framework/commit/551765fc100332dd5d9e7ef2b14dfb51269bf888) Thanks [@odinr](https://github.com/odinr)! - Add `--clean` option to `ai embeddings` command to delete all existing documents from the vector store before processing.
83
+ - [#3842](https://github.com/equinor/fusion-framework/pull/3842) [`d38cd60`](https://github.com/equinor/fusion-framework/commit/d38cd60472380d60282c2a5672dc6e3bba3e7ca9) Thanks [@asbjornhaland](https://github.com/asbjornhaland)! - Add module fusion-framework-module-analytics
84
+
85
+ ### Patch Changes
86
+
87
+ - Updated dependencies []:
88
+ - @equinor/fusion-framework-dev-portal@1.2.6
89
+
90
+ ## 12.4.6
22
91
 
23
- Enhanced file status tracking to handle new, modified, and removed files. Removed files are automatically deleted from the vector store during processing.
92
+ ### Patch Changes
24
93
 
25
- - [#3757](https://github.com/equinor/fusion-framework/pull/3757) [`d09f820`](https://github.com/equinor/fusion-framework/commit/d09f8205cc091aa6af8d8527e3ed74d92ab9dc30) Thanks [@odinr](https://github.com/odinr)! - Add `ai search` command to search the vector store and validate embeddings.
94
+ - [`41f8e9b`](https://github.com/equinor/fusion-framework/commit/41f8e9b7a9b2680553e089d04095a9db7821567e) Thanks [@odinr](https://github.com/odinr)! - Internal: upgrade build tooling dependency `esbuild` to 0.27.0 in `@equinor/fusion-imports`. No public API changes and no runtime impact to consumers.
26
95
 
27
- The new command enables semantic search using vector embeddings with support for:
96
+ - Updated dependencies [[`41f8e9b`](https://github.com/equinor/fusion-framework/commit/41f8e9b7a9b2680553e089d04095a9db7821567e)]:
97
+ - @equinor/fusion-imports@1.1.8
98
+ - @equinor/fusion-framework-dev-server@1.1.18
99
+ - @equinor/fusion-framework-dev-portal@1.2.6
28
100
 
29
- - Configurable result limits
30
- - OData filter expressions for metadata-based filtering
31
- - JSON output option for programmatic use
32
- - Raw metadata output option
33
- - Verbose output mode
101
+ ## 12.4.5
34
102
 
35
- Usage: `ffc ai search <query> [options]`
103
+ ### Patch Changes
104
+
105
+ - Updated dependencies []:
106
+ - @equinor/fusion-framework-dev-server@1.1.17
107
+ - @equinor/fusion-framework-dev-portal@1.2.6
36
108
 
37
- ## 13.0.0-cli-search-index.2
109
+ ## 12.4.4
38
110
 
39
111
  ### Patch Changes
40
112
 
41
- - [#3757](https://github.com/equinor/fusion-framework/pull/3757) [`acb5554`](https://github.com/equinor/fusion-framework/commit/acb55542ea92c7d559ca15d6397321379c2f234a) Thanks [@odinr](https://github.com/odinr)! - Internal: refactor AI framework setup to use ModulesConfigurator directly instead of configureFramework, removing need for dummy auth configuration and improving type safety. Also removes logging of sensitive API key information.
113
+ - Updated dependencies []:
114
+ - @equinor/fusion-framework-dev-server@1.1.16
115
+ - @equinor/fusion-framework-dev-portal@1.2.6
42
116
 
43
- ## 13.0.0-cli-search-index.1
117
+ ## 12.4.3
44
118
 
45
- ### Minor Changes
119
+ ### Patch Changes
46
120
 
47
- - [#3757](https://github.com/equinor/fusion-framework/pull/3757) [`ccc6745`](https://github.com/equinor/fusion-framework/commit/ccc6745995c36771933b50461ea27e9b07c56a17) Thanks [@odinr](https://github.com/odinr)! - Add new `lib/ai` export path exposing `configureFusionAI` and `FusionAIConfig` for programmatic AI configuration.
121
+ - [#3768](https://github.com/equinor/fusion-framework/pull/3768) [`28cffb2`](https://github.com/equinor/fusion-framework/commit/28cffb2d0a779bc190eb6d615f4bf6f86bb001c3) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: bump inquirer from 12.10.0 to 13.0.1
48
122
 
49
- This provides a public API for configuring Fusion AI settings including metadata processing, embedding chunking, and pattern matching.
123
+ Updated inquirer to v13.0.1 and migrated deprecated `list` prompt type to `select` for compatibility with inquirer v13 breaking changes.
50
124
 
51
- ## 13.0.0-cli-search-index.0
125
+ - [#3779](https://github.com/equinor/fusion-framework/pull/3779) [`ee6aa77`](https://github.com/equinor/fusion-framework/commit/ee6aa7764776000edab9233ad9a4716b2d85c4eb) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: bump vite from 7.1.12 to 7.2.4
52
126
 
53
- ### Major Changes
127
+ - Updated dependencies [[`a768715`](https://github.com/equinor/fusion-framework/commit/a7687155c0666655afd932887e475415a7b76b31), [`0d31799`](https://github.com/equinor/fusion-framework/commit/0d31799be8da15b7ee4ddca643d6dc684092b905), [`ee6aa77`](https://github.com/equinor/fusion-framework/commit/ee6aa7764776000edab9233ad9a4716b2d85c4eb)]:
128
+ - @equinor/fusion-imports@1.1.7
129
+ - @equinor/fusion-framework-module-msal-node@2.0.1
130
+ - @equinor/fusion-framework-dev-portal@1.2.6
131
+ - @equinor/fusion-framework-dev-server@1.1.15
132
+
133
+ ## 12.4.2
134
+
135
+ ### Patch Changes
136
+
137
+ - Updated dependencies []:
138
+ - @equinor/fusion-framework-dev-portal@1.2.5
139
+ - @equinor/fusion-framework-dev-server@1.1.14
140
+
141
+ ## 12.4.1
142
+
143
+ ### Patch Changes
144
+
145
+ - Updated dependencies []:
146
+ - @equinor/fusion-framework-dev-portal@1.2.5
147
+ - @equinor/fusion-framework-dev-server@1.1.13
148
+
149
+ ## 12.4.0
150
+
151
+ ### Minor Changes
54
152
 
55
153
  - [`393f163`](https://github.com/equinor/fusion-framework/commit/393f1637ed33b84a6330b5eb122ab549805416bd) Thanks [@Noggling](https://github.com/Noggling)! - **Portal Tags Now Support Any String Value**
56
154
 
@@ -105,35 +203,6 @@
105
203
 
106
204
  This change provides much greater flexibility for deployment workflows while maintaining the same API structure and functionality.
107
205
 
108
- ### Minor Changes
109
-
110
- - [#3757](https://github.com/equinor/fusion-framework/pull/3757) [`db880d1`](https://github.com/equinor/fusion-framework/commit/db880d1fbdb62ba4667f11229d1e6c3a4cea06fc) Thanks [@odinr](https://github.com/odinr)! - Add new `ai` command with `chat` and `embeddings` subcommands for LLM integration and document processing.
111
-
112
- The CLI now supports interactive AI chat and document embedding utilities for processing codebase documentation and generating vector embeddings for search indexing.
113
-
114
- **New Commands:**
115
-
116
- - `ffc ai chat` - Interactive chat with AI models
117
- - `ffc ai embeddings` - Document embedding utilities for AI processing
118
-
119
- **Features:**
120
-
121
- - Interactive chat interface with conversation history
122
- - Document chunking and embedding generation
123
- - Support for markdown and TypeScript documentation parsing
124
- - Git metadata extraction for context-aware embeddings
125
- - Vector store integration for search indexing
126
-
127
- ### Patch Changes
128
-
129
- - [#3757](https://github.com/equinor/fusion-framework/pull/3757) [`db880d1`](https://github.com/equinor/fusion-framework/commit/db880d1fbdb62ba4667f11229d1e6c3a4cea06fc) Thanks [@odinr](https://github.com/odinr)! - preview release
130
-
131
- - Updated dependencies [[`db880d1`](https://github.com/equinor/fusion-framework/commit/db880d1fbdb62ba4667f11229d1e6c3a4cea06fc)]:
132
- - @equinor/fusion-framework-dev-portal@1.2.6-cli-search-index.0
133
- - @equinor/fusion-framework-dev-server@1.1.13-cli-search-index.0
134
- - @equinor/fusion-framework-module-msal-node@2.0.1-cli-search-index.0
135
- - @equinor/fusion-imports@1.1.7-cli-search-index.0
136
-
137
206
  ## 12.3.10
138
207
 
139
208
  ### Patch Changes
package/README.md CHANGED
@@ -14,6 +14,7 @@ Fusion Framework CLI is a command-line tool for developing, building, and publis
14
14
  - Environment-specific configuration handling
15
15
  - Integrated authentication and authorization
16
16
  - CI/CD pipeline support with automated publishing
17
+ - **Plugin system**: Extensible architecture with optional plugins (e.g., AI/LLM commands)
17
18
 
18
19
  ## Prerequisites
19
20
 
@@ -101,6 +102,29 @@ pnpm fusion-framework-cli app config --publish --env <environment>
101
102
  | `pnpm fusion-framework-cli portal ...` | Working with Fusion portal templates |
102
103
  | `pnpm fusion-framework-cli disco ...` | Service discovery and resolution |
103
104
 
105
+ **Optional Plugins:**
106
+ | Command | Description |
107
+ |---------|-------------|
108
+ | `pnpm fusion-framework-cli ai ...` | AI/LLM commands (requires `@equinor/fusion-framework-cli-plugin-ai`) |
109
+
110
+ **Plugin System:**
111
+
112
+ The CLI supports optional plugins that extend functionality. To use plugins:
113
+
114
+ 1. Install the plugin package: `pnpm add -D @equinor/fusion-framework-cli-plugin-ai`
115
+ 2. Create a `fusion-cli.config.ts` file in your project root:
116
+ ```typescript
117
+ import { defineFusionCli } from '@equinor/fusion-framework-cli';
118
+
119
+ export default defineFusionCli(() => ({
120
+ plugins: [
121
+ '@equinor/fusion-framework-cli-plugin-ai',
122
+ ],
123
+ }));
124
+ ```
125
+
126
+ Plugins are automatically discovered and loaded when the CLI starts. The config file can be `.ts`, `.js`, or `.json`. If no config file exists, the CLI works normally without plugins.
127
+
104
128
  ## Example: package.json
105
129
 
106
130
  A minimal example for a Fusion Framework app: