@equinor/fusion-framework-cli 13.0.0-cli-search-index.5 → 13.0.1

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 +136 -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 +26 -22
  24. package/package.json +16 -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,165 @@
1
1
  # Change Log
2
2
 
3
- ## 13.0.0-cli-search-index.4
3
+ ## 13.0.1
4
4
 
5
5
  ### Patch Changes
6
6
 
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.
7
+ - [#3898](https://github.com/equinor/fusion-framework/pull/3898) [`037e2e2`](https://github.com/equinor/fusion-framework/commit/037e2e29b6696e8925f054f5a1656ece24e55878) Thanks [@odinr](https://github.com/odinr)! - Internal: Add CLI plugin packages as dev dependencies for local development. These packages are used in `fusion-cli.config.ts` for building and running the CLI from source, but do not affect the published package.
8
8
 
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
9
+ - [#3880](https://github.com/equinor/fusion-framework/pull/3880) [`528c7d7`](https://github.com/equinor/fusion-framework/commit/528c7d7f4fd93a72878e38843a2efb011a976ae6) Thanks [@dependabot](https://github.com/apps/dependabot)! - Internal: bump inquirer from 13.0.1 to 13.1.0. This update includes improved TypeScript type inference for `select` prompts and adds support for `default` option in `rawlist` prompts.
14
10
 
15
- No public API changes; internal improvements only.
11
+ - Updated dependencies [[`d7a9d12`](https://github.com/equinor/fusion-framework/commit/d7a9d127db9daff7d645d55eb08f37d1c36fa825)]:
12
+ - @equinor/fusion-framework-dev-portal@1.3.0
16
13
 
17
- ## 13.0.0-cli-search-index.3
14
+ ## 13.0.0
18
15
 
19
- ### Minor Changes
16
+ ### Major Changes
17
+
18
+ - [`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.
19
+
20
+ **Plugin System:**
21
+
22
+ - Support for optional plugins via `fusion-cli.config.ts` configuration file
23
+ - Automatic plugin discovery and loading from project root or CLI package directory
24
+ - Plugin registration via package name or direct function imports
25
+ - Support for `.ts`, `.js`, and `.json` config file formats
26
+ - Multiple plugin resolution strategies for different installation methods
27
+
28
+ **New Exports:**
29
+
30
+ - `configureFramework` - Separated framework configuration from initialization for advanced use cases
31
+ - `defineFusionCli` - Type-safe utility for defining CLI plugin configurations
32
+
33
+ **Enhancements:**
34
+
35
+ - Non-interactive mode support for `create app` command with `--git-protocol`, `--cleanup`/`--no-cleanup`, and `--no-open` options
36
+ - Automatic `.env` file loading via dotenv for environment variable support
37
+ - Improved error handling and plugin resolution strategies
38
+
39
+ **Documentation:**
20
40
 
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.
41
+ - Added comprehensive AI commands documentation (internal use only)
42
+ - Updated README with plugin system usage instructions
22
43
 
23
- Enhanced file status tracking to handle new, modified, and removed files. Removed files are automatically deleted from the vector store during processing.
44
+ **Quick Usage:**
24
45
 
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.
46
+ 1. Install a plugin package:
26
47
 
27
- The new command enables semantic search using vector embeddings with support for:
48
+ ```sh
49
+ pnpm add -D @equinor/fusion-framework-cli-plugin-ai-chat
50
+ ```
51
+
52
+ 2. Create `fusion-cli.config.ts` in your project root:
53
+
54
+ ```typescript
55
+ import { defineFusionCli } from "@equinor/fusion-framework-cli";
28
56
 
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
57
+ export default defineFusionCli(() => ({
58
+ plugins: [
59
+ "@equinor/fusion-framework-cli-plugin-ai-chat",
60
+ // Or use direct imports:
61
+ // import aiChatPlugin from '@equinor/fusion-framework-cli-plugin-ai-chat';
62
+ // plugins: [aiChatPlugin],
63
+ ],
64
+ }));
65
+ ```
34
66
 
35
- Usage: `ffc ai search <query> [options]`
67
+ 3. Plugins are automatically loaded when CLI starts:
36
68
 
37
- ## 13.0.0-cli-search-index.2
69
+ ```sh
70
+ # Plugin commands are now available
71
+ ffc ai chat
72
+ ```
73
+
74
+ 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.
75
+
76
+ ### Patch Changes
77
+
78
+ - Updated dependencies [[`24403fc`](https://github.com/equinor/fusion-framework/commit/24403fc96d24d942f0c9632ed900b1a0f4065c1e)]:
79
+ - @equinor/fusion-framework-module-msal-node@2.0.2
80
+
81
+ ## 12.5.1
38
82
 
39
83
  ### Patch Changes
40
84
 
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.
85
+ - [#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
42
86
 
43
- ## 13.0.0-cli-search-index.1
87
+ - Updated dependencies []:
88
+ - @equinor/fusion-framework-dev-portal@1.2.6
89
+
90
+ ## 12.5.0
44
91
 
45
92
  ### Minor Changes
46
93
 
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.
94
+ - [#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
48
95
 
49
- This provides a public API for configuring Fusion AI settings including metadata processing, embedding chunking, and pattern matching.
96
+ ### Patch Changes
50
97
 
51
- ## 13.0.0-cli-search-index.0
98
+ - Updated dependencies []:
99
+ - @equinor/fusion-framework-dev-portal@1.2.6
52
100
 
53
- ### Major Changes
101
+ ## 12.4.6
102
+
103
+ ### Patch Changes
104
+
105
+ - [`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.
106
+
107
+ - Updated dependencies [[`41f8e9b`](https://github.com/equinor/fusion-framework/commit/41f8e9b7a9b2680553e089d04095a9db7821567e)]:
108
+ - @equinor/fusion-imports@1.1.8
109
+ - @equinor/fusion-framework-dev-server@1.1.18
110
+ - @equinor/fusion-framework-dev-portal@1.2.6
111
+
112
+ ## 12.4.5
113
+
114
+ ### Patch Changes
115
+
116
+ - Updated dependencies []:
117
+ - @equinor/fusion-framework-dev-server@1.1.17
118
+ - @equinor/fusion-framework-dev-portal@1.2.6
119
+
120
+ ## 12.4.4
121
+
122
+ ### Patch Changes
123
+
124
+ - Updated dependencies []:
125
+ - @equinor/fusion-framework-dev-server@1.1.16
126
+ - @equinor/fusion-framework-dev-portal@1.2.6
127
+
128
+ ## 12.4.3
129
+
130
+ ### Patch Changes
131
+
132
+ - [#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
133
+
134
+ Updated inquirer to v13.0.1 and migrated deprecated `list` prompt type to `select` for compatibility with inquirer v13 breaking changes.
135
+
136
+ - [#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
137
+
138
+ - 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)]:
139
+ - @equinor/fusion-imports@1.1.7
140
+ - @equinor/fusion-framework-module-msal-node@2.0.1
141
+ - @equinor/fusion-framework-dev-portal@1.2.6
142
+ - @equinor/fusion-framework-dev-server@1.1.15
143
+
144
+ ## 12.4.2
145
+
146
+ ### Patch Changes
147
+
148
+ - Updated dependencies []:
149
+ - @equinor/fusion-framework-dev-portal@1.2.5
150
+ - @equinor/fusion-framework-dev-server@1.1.14
151
+
152
+ ## 12.4.1
153
+
154
+ ### Patch Changes
155
+
156
+ - Updated dependencies []:
157
+ - @equinor/fusion-framework-dev-portal@1.2.5
158
+ - @equinor/fusion-framework-dev-server@1.1.13
159
+
160
+ ## 12.4.0
161
+
162
+ ### Minor Changes
54
163
 
55
164
  - [`393f163`](https://github.com/equinor/fusion-framework/commit/393f1637ed33b84a6330b5eb122ab549805416bd) Thanks [@Noggling](https://github.com/Noggling)! - **Portal Tags Now Support Any String Value**
56
165
 
@@ -105,35 +214,6 @@
105
214
 
106
215
  This change provides much greater flexibility for deployment workflows while maintaining the same API structure and functionality.
107
216
 
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
217
  ## 12.3.10
138
218
 
139
219
  ### 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: