@thacio/auditaria 0.30.11 → 0.30.13

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 (71) hide show
  1. package/README.md +14 -10
  2. package/bundle/docs/admin/enterprise-controls.md +115 -0
  3. package/bundle/docs/changelogs/index.md +20 -1
  4. package/bundle/docs/changelogs/latest.md +359 -293
  5. package/bundle/docs/changelogs/preview.md +296 -349
  6. package/bundle/docs/cli/checkpointing.md +2 -3
  7. package/bundle/docs/cli/cli-reference.md +4 -5
  8. package/bundle/docs/cli/commands.md +376 -650
  9. package/bundle/docs/cli/custom-commands.md +3 -0
  10. package/bundle/docs/cli/enterprise.md +1 -1
  11. package/bundle/docs/cli/gemini-md.md +20 -12
  12. package/bundle/docs/cli/headless.md +34 -372
  13. package/bundle/docs/cli/keyboard-shortcuts.md +36 -35
  14. package/bundle/docs/cli/plan-mode.md +5 -1
  15. package/bundle/docs/cli/rewind.md +11 -11
  16. package/bundle/docs/cli/session-management.md +61 -44
  17. package/bundle/docs/cli/settings.md +10 -5
  18. package/bundle/docs/cli/skills.md +15 -8
  19. package/bundle/docs/cli/themes.md +85 -51
  20. package/bundle/docs/cli/tutorials/automation.md +187 -0
  21. package/bundle/docs/cli/tutorials/file-management.md +142 -0
  22. package/bundle/docs/cli/tutorials/mcp-setup.md +105 -0
  23. package/bundle/docs/cli/tutorials/memory-management.md +126 -0
  24. package/bundle/docs/cli/tutorials/session-management.md +105 -0
  25. package/bundle/docs/cli/tutorials/shell-commands.md +107 -0
  26. package/bundle/docs/cli/tutorials/skills-getting-started.md +36 -31
  27. package/bundle/docs/cli/tutorials/task-planning.md +93 -0
  28. package/bundle/docs/cli/tutorials/web-tools.md +78 -0
  29. package/bundle/docs/core/policy-engine.md +4 -2
  30. package/bundle/docs/core/subagents.md +38 -38
  31. package/bundle/docs/extensions/best-practices.md +102 -53
  32. package/bundle/docs/extensions/index.md +37 -21
  33. package/bundle/docs/extensions/reference.md +148 -216
  34. package/bundle/docs/extensions/releasing.md +93 -122
  35. package/bundle/docs/extensions/writing-extensions.md +87 -76
  36. package/bundle/docs/get-started/configuration.md +103 -61
  37. package/bundle/docs/get-started/examples.md +39 -119
  38. package/bundle/docs/get-started/index.md +5 -4
  39. package/bundle/docs/get-started/installation.md +110 -77
  40. package/bundle/docs/index.md +156 -108
  41. package/bundle/docs/releases.md +2 -2
  42. package/bundle/docs/sidebar.json +101 -61
  43. package/bundle/docs/tools/activate-skill.md +43 -0
  44. package/bundle/docs/tools/ask-user.md +1 -1
  45. package/bundle/docs/tools/file-system.md +43 -133
  46. package/bundle/docs/tools/index.md +92 -91
  47. package/bundle/docs/tools/internal-docs.md +46 -0
  48. package/bundle/docs/tools/mcp-server.md +2 -2
  49. package/bundle/docs/tools/memory.md +21 -40
  50. package/bundle/docs/tools/shell.md +43 -88
  51. package/bundle/docs/tools/todos.md +22 -44
  52. package/bundle/docs/tools/web-fetch.md +22 -46
  53. package/bundle/docs/tools/web-search.md +19 -29
  54. package/bundle/gemini.js +138556 -136594
  55. package/bundle/mcp-bridge.js +154 -143
  56. package/bundle/node_modules/@browserbasehq/stagehand/dist/index.js +165438 -0
  57. package/bundle/node_modules/@browserbasehq/stagehand/package.json +102 -0
  58. package/bundle/node_modules/@thacio/auditaria-search/dist/tsconfig.tsbuildinfo +1 -1
  59. package/bundle/web-client/components/EditorPanel.js +57 -36
  60. package/bundle/web-client/components/FileTreePanel.js +240 -59
  61. package/bundle/web-client/index.html +5 -1
  62. package/bundle/web-client/managers/EditorManager.js +190 -24
  63. package/bundle/web-client/managers/FileTreeManager.js +301 -69
  64. package/bundle/web-client/styles/file-browser.css +42 -0
  65. package/bundle/web-client/styles/themes.css +376 -0
  66. package/bundle/web-client/utils/theme-manager.js +33 -1
  67. package/package.json +7 -6
  68. package/bundle/docs/architecture.md +0 -80
  69. package/bundle/docs/cli/index.md +0 -67
  70. package/bundle/docs/cli/tutorials.md +0 -87
  71. package/bundle/docs/get-started/configuration-v1.md +0 -882
@@ -1,19 +1,19 @@
1
- # Extensions on Gemini CLI: Best practices
1
+ # Gemini CLI extension best practices
2
2
 
3
3
  This guide covers best practices for developing, securing, and maintaining
4
4
  Gemini CLI extensions.
5
5
 
6
6
  ## Development
7
7
 
8
- Developing extensions for Gemini CLI is intended to be a lightweight, iterative
9
- process.
8
+ Developing extensions for Gemini CLI is a lightweight, iterative process. Use
9
+ these strategies to build robust and efficient extensions.
10
10
 
11
11
  ### Structure your extension
12
12
 
13
- While simple extensions can just be a few files, we recommend a robust structure
14
- for complex extensions:
13
+ While simple extensions may contain only a few files, we recommend a organized
14
+ structure for complex projects.
15
15
 
16
- ```
16
+ ```text
17
17
  my-extension/
18
18
  ├── package.json
19
19
  ├── tsconfig.json
@@ -24,47 +24,50 @@ my-extension/
24
24
  └── dist/
25
25
  ```
26
26
 
27
- - **Use TypeScript**: We strongly recommend using TypeScript for type safety and
28
- better tooling.
29
- - **Separate source and build**: Keep your source code in `src` and build to
30
- `dist`.
31
- - **Bundle dependencies**: If your extension has many dependencies, consider
32
- bundling them (e.g., with `esbuild` or `webpack`) to reduce install time and
33
- potential conflicts.
27
+ - **Use TypeScript:** We strongly recommend using TypeScript for type safety and
28
+ improved developer experience.
29
+ - **Separate source and build:** Keep your source code in `src/` and output
30
+ build artifacts to `dist/`.
31
+ - **Bundle dependencies:** If your extension has many dependencies, bundle them
32
+ using a tool like `esbuild` to reduce installation time and avoid conflicts.
34
33
 
35
34
  ### Iterate with `link`
36
35
 
37
- Use `gemini extensions link` to develop locally without constantly reinstalling:
36
+ Use the `gemini extensions link` command to develop locally without reinstalling
37
+ your extension after every change.
38
38
 
39
39
  ```bash
40
40
  cd my-extension
41
41
  gemini extensions link .
42
42
  ```
43
43
 
44
- Changes to your code (after rebuilding) will be immediately available in the CLI
45
- on restart.
44
+ Changes to your code are immediately available in the CLI after you rebuild the
45
+ project and restart the session.
46
46
 
47
47
  ### Use `GEMINI.md` effectively
48
48
 
49
- Your `GEMINI.md` file provides context to the model. Keep it focused:
49
+ Your `GEMINI.md` file provides essential context to the model.
50
50
 
51
- - **Do:** Explain high-level goals and how to use the provided tools.
52
- - **Don't:** Dump your entire documentation.
53
- - **Do:** Use clear, concise language.
51
+ - **Focus on goals:** Explain the high-level purpose of the extension and how to
52
+ interact with its tools.
53
+ - **Be concise:** Avoid dumping exhaustive documentation into the file. Use
54
+ clear, direct language.
55
+ - **Provide examples:** Include brief examples of how the model should use
56
+ specific tools or commands.
54
57
 
55
58
  ## Security
56
59
 
57
- When building a Gemini CLI extension, follow general security best practices
58
- (such as least privilege and input validation) to reduce risk.
60
+ Follow the principle of least privilege and rigorous input validation when
61
+ building extensions.
59
62
 
60
63
  ### Minimal permissions
61
64
 
62
- When defining tools in your MCP server, only request the permissions necessary.
63
- Avoid giving the model broad access (like full shell access) if a more
64
- restricted set of tools will suffice.
65
+ Only request the permissions your MCP server needs to function. Avoid giving the
66
+ model broad access (such as full shell access) if restricted tools are
67
+ sufficient.
65
68
 
66
- If you must use powerful tools like `run_shell_command`, consider restricting
67
- them to specific commands in your `gemini-extension.json`:
69
+ If your extension uses powerful tools like `run_shell_command`, restrict them in
70
+ your `gemini-extension.json` file:
68
71
 
69
72
  ```json
70
73
  {
@@ -73,27 +76,26 @@ them to specific commands in your `gemini-extension.json`:
73
76
  }
74
77
  ```
75
78
 
76
- This ensures that even if the model tries to execute a dangerous command, it
77
- will be blocked at the CLI level.
79
+ This ensures the CLI blocks dangerous commands even if the model attempts to
80
+ execute them.
78
81
 
79
82
  ### Validate inputs
80
83
 
81
- Your MCP server is running on the user's machine. Always validate inputs to your
82
- tools to prevent arbitrary code execution or filesystem access outside the
83
- intended scope.
84
+ Your MCP server runs on the user's machine. Always validate tool inputs to
85
+ prevent arbitrary code execution or unauthorized filesystem access.
84
86
 
85
87
  ```typescript
86
- // Good: Validating paths
88
+ // Example: Validating paths
87
89
  if (!path.resolve(inputPath).startsWith(path.resolve(allowedDir) + path.sep)) {
88
90
  throw new Error('Access denied');
89
91
  }
90
92
  ```
91
93
 
92
- ### Sensitive settings
94
+ ### Secure sensitive settings
93
95
 
94
- If your extension requires API keys, use the `sensitive: true` option in
95
- `gemini-extension.json`. This ensures keys are stored securely in the system
96
- keychain and obfuscated in the UI.
96
+ If your extension requires API keys or other secrets, use the `sensitive: true`
97
+ option in your manifest. This ensures keys are stored in the system keychain and
98
+ obfuscated in the CLI output.
97
99
 
98
100
  ```json
99
101
  "settings": [
@@ -105,35 +107,82 @@ keychain and obfuscated in the UI.
105
107
  ]
106
108
  ```
107
109
 
108
- ## Releasing
110
+ ## Release
109
111
 
110
- You can upload your extension directly to GitHub to list it in the gallery.
111
- Gemini CLI extensions also offers support for more complicated
112
- [releases](releasing.md).
112
+ Follow standard versioning and release practices to ensure a smooth experience
113
+ for your users.
113
114
 
114
115
  ### Semantic versioning
115
116
 
116
- Follow [Semantic Versioning](https://semver.org/).
117
+ Follow [Semantic Versioning (SemVer)](https://semver.org/) to communicate
118
+ changes clearly.
117
119
 
118
- - **Major**: Breaking changes (renaming tools, changing arguments).
119
- - **Minor**: New features (new tools, commands).
120
- - **Patch**: Bug fixes.
120
+ - **Major:** Breaking changes (e.g., renaming tools or changing arguments).
121
+ - **Minor:** New features (e.g., adding new tools or commands).
122
+ - **Patch:** Bug fixes and performance improvements.
121
123
 
122
- ### Release Channels
124
+ ### Release channels
123
125
 
124
- Use git branches to manage release channels (e.g., `main` for stable, `dev` for
125
- bleeding edge). This allows users to choose their stability level:
126
+ Use Git branches to manage release channels. This lets users choose between
127
+ stability and the latest features.
126
128
 
127
129
  ```bash
128
- # Stable
130
+ # Install the stable version (default branch)
129
131
  gemini extensions install github.com/user/repo
130
132
 
131
- # Dev
133
+ # Install the development version
132
134
  gemini extensions install github.com/user/repo --ref dev
133
135
  ```
134
136
 
135
137
  ### Clean artifacts
136
138
 
137
- If you are using GitHub Releases, ensure your release artifacts only contain the
138
- necessary files (`dist/`, `gemini-extension.json`, `package.json`). Exclude
139
- `node_modules` (users will install them) and `src/` to keep downloads small.
139
+ When using GitHub Releases, ensure your archives only contain necessary files
140
+ (such as `dist/`, `gemini-extension.json`, and `package.json`). Exclude
141
+ `node_modules/` and `src/` to minimize download size.
142
+
143
+ ## Test and verify
144
+
145
+ Test your extension thoroughly before releasing it to users.
146
+
147
+ - **Manual verification:** Use `gemini extensions link` to test your extension
148
+ in a live CLI session. Verify that tools appear in the debug console (F12) and
149
+ that custom commands resolve correctly.
150
+ - **Automated testing:** If your extension includes an MCP server, write unit
151
+ tests for your tool logic using a framework like Vitest or Jest. You can test
152
+ MCP tools in isolation by mocking the transport layer.
153
+
154
+ ## Troubleshooting
155
+
156
+ Use these tips to diagnose and fix common extension issues.
157
+
158
+ ### Extension not loading
159
+
160
+ If your extension doesn't appear in `/extensions list`:
161
+
162
+ - **Check the manifest:** Ensure `gemini-extension.json` is in the root
163
+ directory and contains valid JSON.
164
+ - **Verify the name:** The `name` field in the manifest must match the extension
165
+ directory name exactly.
166
+ - **Restart the CLI:** Extensions are loaded at the start of a session. Restart
167
+ Gemini CLI after making changes to the manifest or linking a new extension.
168
+
169
+ ### MCP server failures
170
+
171
+ If your tools aren't working as expected:
172
+
173
+ - **Check the logs:** View the CLI logs to see if the MCP server failed to
174
+ start.
175
+ - **Test the command:** Run the server's `command` and `args` directly in your
176
+ terminal to ensure it starts correctly outside of Gemini CLI.
177
+ - **Debug console:** In interactive mode, press **F12** to open the debug
178
+ console and inspect tool calls and responses.
179
+
180
+ ### Command conflicts
181
+
182
+ If a custom command isn't responding:
183
+
184
+ - **Check precedence:** Remember that user and project commands take precedence
185
+ over extension commands. Use the prefixed name (e.g., `/extension.command`) to
186
+ verify the extension's version.
187
+ - **Help command:** Run `/help` to see a list of all available commands and
188
+ their sources.
@@ -1,24 +1,49 @@
1
1
  # Gemini CLI extensions
2
2
 
3
- Gemini CLI extensions package prompts, MCP servers, custom commands, hooks,
4
- sub-agents, and agent skills into a familiar and user-friendly format. With
5
- extensions, you can expand the capabilities of Gemini CLI and share those
3
+ Gemini CLI extensions package prompts, MCP servers, custom commands, themes,
4
+ hooks, sub-agents, and agent skills into a familiar and user-friendly format.
5
+ With extensions, you can expand the capabilities of Gemini CLI and share those
6
6
  capabilities with others. They are designed to be easily installable and
7
7
  shareable.
8
8
 
9
- To see examples of extensions, you can browse a gallery of
10
- [Gemini CLI extensions](https://geminicli.com/extensions/browse/).
9
+ To see what's possible, browse the
10
+ [Gemini CLI extension gallery](https://geminicli.com/extensions/browse/).
11
11
 
12
- ## Managing extensions
12
+ ## Choose your path
13
13
 
14
- You can verify your installed extensions and their status using the interactive
15
- command:
14
+ Choose the guide that best fits your needs.
15
+
16
+ ### I want to use extensions
17
+
18
+ Learn how to discover, install, and manage extensions to enhance your Gemini CLI
19
+ experience.
20
+
21
+ - **[Manage extensions](#manage-extensions):** List and verify your installed
22
+ extensions.
23
+ - **[Install extensions](#installation):** Add new capabilities from GitHub or
24
+ local paths.
25
+
26
+ ### I want to build extensions
27
+
28
+ Learn how to create, test, and share your own extensions with the community.
29
+
30
+ - **[Build extensions](writing-extensions.md):** Create your first extension
31
+ from a template.
32
+ - **[Best practices](best-practices.md):** Learn how to build secure and
33
+ reliable extensions.
34
+ - **[Publish to the gallery](releasing.md):** Share your work with the world.
35
+
36
+ ## Manage extensions
37
+
38
+ Use the interactive `/extensions` command to verify your installed extensions
39
+ and their status:
16
40
 
17
41
  ```bash
18
42
  /extensions list
19
43
  ```
20
44
 
21
- or in noninteractive mode:
45
+ You can also manage extensions from your terminal using the `gemini extensions`
46
+ command group:
22
47
 
23
48
  ```bash
24
49
  gemini extensions list
@@ -26,20 +51,11 @@ gemini extensions list
26
51
 
27
52
  ## Installation
28
53
 
29
- To install a real extension, you can use the `extensions install` command with a
30
- GitHub repository URL in noninteractive mode. For example:
54
+ Install an extension by providing its GitHub repository URL. For example:
31
55
 
32
56
  ```bash
33
57
  gemini extensions install https://github.com/gemini-cli-extensions/workspace
34
58
  ```
35
59
 
36
- ## Next steps
37
-
38
- - [Writing extensions](writing-extensions.md): Learn how to create your first
39
- extension.
40
- - [Extensions reference](reference.md): Deeply understand the extension format,
41
- commands, and configuration.
42
- - [Best practices](best-practices.md): Learn strategies for building great
43
- extensions.
44
- - [Extensions releasing](releasing.md): Learn how to share your extensions with
45
- the world.
60
+ For more advanced installation options, see the
61
+ [Extension reference](reference.md#install-an-extension).