@codeflyai/codefly 0.24.1 → 0.24.2

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 (48) hide show
  1. package/bundle/builtin/skill-creator/SKILL.md +382 -0
  2. package/bundle/builtin/skill-creator/scripts/init_skill.cjs +235 -0
  3. package/bundle/builtin/skill-creator/scripts/package_skill.cjs +102 -0
  4. package/bundle/builtin/skill-creator/scripts/validate_skill.cjs +127 -0
  5. package/bundle/codefly.js +296592 -296367
  6. package/bundle/docs/architecture.md +3 -3
  7. package/bundle/docs/assets/monitoring-dashboard-logs.png +0 -0
  8. package/bundle/docs/assets/monitoring-dashboard-metrics.png +0 -0
  9. package/bundle/docs/assets/monitoring-dashboard-overview.png +0 -0
  10. package/bundle/docs/changelogs/index.md +134 -0
  11. package/bundle/docs/changelogs/latest.md +355 -210
  12. package/bundle/docs/changelogs/preview.md +318 -115
  13. package/bundle/docs/cli/commands.md +21 -0
  14. package/bundle/docs/cli/custom-commands.md +9 -9
  15. package/bundle/docs/cli/index.md +6 -2
  16. package/bundle/docs/cli/keyboard-shortcuts.md +61 -78
  17. package/bundle/docs/cli/model-routing.md +7 -2
  18. package/bundle/docs/cli/model.md +1 -1
  19. package/bundle/docs/cli/openspec.md +164 -0
  20. package/bundle/docs/cli/sandbox.md +1 -1
  21. package/bundle/docs/cli/settings.md +80 -60
  22. package/bundle/docs/cli/skills.md +188 -0
  23. package/bundle/docs/cli/system-prompt.md +32 -0
  24. package/bundle/docs/cli/telemetry.md +38 -3
  25. package/bundle/docs/cli/themes.md +0 -2
  26. package/bundle/docs/cli/tutorials/skills-getting-started.md +124 -0
  27. package/bundle/docs/cli/tutorials.md +4 -0
  28. package/bundle/docs/core/index.md +4 -0
  29. package/bundle/docs/core/memport.md +2 -0
  30. package/bundle/docs/core/policy-engine.md +3 -2
  31. package/bundle/docs/extensions/getting-started-extensions.md +39 -2
  32. package/bundle/docs/get-started/configuration.md +130 -74
  33. package/bundle/docs/get-started/gemini-3.md +2 -17
  34. package/bundle/docs/hooks/reference.md +245 -116
  35. package/bundle/docs/index.md +2 -0
  36. package/bundle/docs/local-development.md +1 -1
  37. package/bundle/docs/releases.md +1 -1
  38. package/bundle/docs/sidebar.json +5 -5
  39. package/bundle/docs/tools/index.md +3 -0
  40. package/bundle/docs/tools/mcp-server.md +26 -2
  41. package/bundle/docs/tools/shell.md +1 -1
  42. package/bundle/docs/troubleshooting.md +23 -5
  43. package/bundle/policies/agent.toml +1 -1
  44. package/bundle/policies/plan.toml +70 -0
  45. package/bundle/policies/read-only.toml +0 -5
  46. package/bundle/policies/yolo.toml +1 -0
  47. package/package.json +10 -5
  48. package/bundle/docs/get-started/deployment.md +0 -143
@@ -0,0 +1,70 @@
1
+ # Priority system for policy rules:
2
+ # - Higher priority numbers win over lower priority numbers
3
+ # - When multiple rules match, the highest priority rule is applied
4
+ # - Rules are evaluated in order of priority (highest first)
5
+ #
6
+ # Priority bands (tiers):
7
+ # - Default policies (TOML): 1 + priority/1000 (e.g., priority 100 → 1.100)
8
+ # - User policies (TOML): 2 + priority/1000 (e.g., priority 100 → 2.100)
9
+ # - Admin policies (TOML): 3 + priority/1000 (e.g., priority 100 → 3.100)
10
+ #
11
+ # This ensures Admin > User > Default hierarchy is always preserved,
12
+ # while allowing user-specified priorities to work within each tier.
13
+ #
14
+ # Settings-based and dynamic rules (all in user tier 2.x):
15
+ # 2.95: Tools that the user has selected as "Always Allow" in the interactive UI
16
+ # 2.9: MCP servers excluded list (security: persistent server blocks)
17
+ # 2.4: Command line flag --exclude-tools (explicit temporary blocks)
18
+ # 2.3: Command line flag --allowed-tools (explicit temporary allows)
19
+ # 2.2: MCP servers with trust=true (persistent trusted servers)
20
+ # 2.1: MCP servers allowed list (persistent general server allows)
21
+ #
22
+ # TOML policy priorities (before transformation):
23
+ # 10: Write tools default to ASK_USER (becomes 1.010 in default tier)
24
+ # 20: Plan mode catch-all DENY override (becomes 1.020 in default tier)
25
+ # 50: Read-only tools (becomes 1.050 in default tier)
26
+ # 999: YOLO mode allow-all (becomes 1.999 in default tier)
27
+
28
+ # Catch-All: Deny everything by default in Plan mode.
29
+
30
+ [[rule]]
31
+ decision = "deny"
32
+ priority = 20
33
+ modes = ["plan"]
34
+
35
+ # Explicitly Allow Read-Only Tools in Plan mode.
36
+
37
+ [[rule]]
38
+ toolName = "glob"
39
+ decision = "allow"
40
+ priority = 50
41
+ modes = ["plan"]
42
+
43
+ [[rule]]
44
+ toolName = "search_file_content"
45
+ decision = "allow"
46
+ priority = 50
47
+ modes = ["plan"]
48
+
49
+ [[rule]]
50
+ toolName = "list_directory"
51
+ decision = "allow"
52
+ priority = 50
53
+ modes = ["plan"]
54
+
55
+ [[rule]]
56
+ toolName = "read_file"
57
+ decision = "allow"
58
+ priority = 50
59
+ modes = ["plan"]
60
+
61
+ [[rule]]
62
+ toolName = "google_web_search"
63
+ decision = "allow"
64
+ priority = 50
65
+ modes = ["plan"]
66
+
67
+ [[rule]]
68
+ toolName = "SubagentInvocation"
69
+ decision = "allow"
70
+ priority = 50
@@ -45,11 +45,6 @@ toolName = "read_file"
45
45
  decision = "allow"
46
46
  priority = 50
47
47
 
48
- [[rule]]
49
- toolName = "read_many_files"
50
- decision = "allow"
51
- priority = 50
52
-
53
48
  [[rule]]
54
49
  toolName = "google_web_search"
55
50
  decision = "allow"
@@ -29,3 +29,4 @@
29
29
  decision = "allow"
30
30
  priority = 999
31
31
  modes = ["yolo"]
32
+ allow_redirection = true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeflyai/codefly",
3
- "version": "0.24.1",
3
+ "version": "0.24.2",
4
4
  "engines": {
5
5
  "node": ">=20.0.0"
6
6
  },
@@ -40,6 +40,8 @@
40
40
  "test": "npm run test --workspaces --if-present",
41
41
  "test:ci": "npm run test:ci --workspaces --if-present && npm run test:scripts",
42
42
  "test:scripts": "vitest run --config ./scripts/tests/vitest.config.ts",
43
+ "test:always_passing_evals": "vitest run --config evals/vitest.config.ts",
44
+ "test:all_evals": "cross-env RUN_EVALS=1 vitest run --config evals/vitest.config.ts",
43
45
  "test:e2e": "cross-env VERBOSE=true KEEP_OUTPUT=true npm run test:integration:sandbox:none",
44
46
  "test:integration:all": "npm run test:integration:sandbox:none && npm run test:integration:sandbox:docker && npm run test:integration:sandbox:podman",
45
47
  "test:integration:sandbox:none": "cross-env CODEFLY_SANDBOX=false vitest run --root ./integration-tests",
@@ -51,8 +53,8 @@
51
53
  "lint:all": "node scripts/lint.js",
52
54
  "format": "prettier --experimental-cli --write .",
53
55
  "typecheck": "npm run typecheck --workspaces --if-present",
54
- "preflight": "npm run clean && npm ci && npm run format && npm run lint:ci && npm run build && npm run typecheck && npm run test:ci",
55
- "prepare": "husky && npm run bundle",
56
+ "preflight": "npm run clean && npm ci && npm run format && npm run build && npm run lint:ci && npm run typecheck && npm run test:ci",
57
+ "prepare": "husky",
56
58
  "prepare:package": "node scripts/prepare-package.js",
57
59
  "release:version": "node scripts/version.js",
58
60
  "telemetry": "node scripts/telemetry.js",
@@ -61,7 +63,7 @@
61
63
  "pre-commit": "node scripts/pre-commit.js"
62
64
  },
63
65
  "overrides": {
64
- "ink": "npm:@jrichman/ink@6.4.6",
66
+ "ink": "npm:@jrichman/ink@6.4.7",
65
67
  "wrap-ansi": "9.0.2",
66
68
  "cliui": {
67
69
  "wrap-ansi": "7.0.0"
@@ -76,6 +78,7 @@
76
78
  "LICENSE"
77
79
  ],
78
80
  "devDependencies": {
81
+ "@agentclientprotocol/sdk": "^0.12.0",
79
82
  "@octokit/rest": "^22.0.0",
80
83
  "@types/marked": "^5.0.2",
81
84
  "@types/mime-types": "^3.0.1",
@@ -120,7 +123,8 @@
120
123
  "yargs": "^17.7.2"
121
124
  },
122
125
  "dependencies": {
123
- "ink": "npm:@jrichman/ink@6.4.6",
126
+ "clipboardy": "^5.0.2",
127
+ "ink": "npm:@jrichman/ink@6.4.7",
124
128
  "latest-version": "^9.0.0",
125
129
  "mysql2": "^3.16.0",
126
130
  "pg": "^8.16.3",
@@ -133,6 +137,7 @@
133
137
  "@lydell/node-pty-linux-x64": "1.1.0",
134
138
  "@lydell/node-pty-win32-arm64": "1.1.0",
135
139
  "@lydell/node-pty-win32-x64": "1.1.0",
140
+ "keytar": "^7.9.0",
136
141
  "node-pty": "^1.0.0"
137
142
  },
138
143
  "lint-staged": {
@@ -1,143 +0,0 @@
1
- Note: This page will be replaced by [installation.md](installation.md).
2
-
3
- # Gemini CLI installation, execution, and deployment
4
-
5
- Install and run Gemini CLI. This document provides an overview of Gemini CLI's
6
- installation methods and deployment architecture.
7
-
8
- ## How to install and/or run Gemini CLI
9
-
10
- There are several ways to run Gemini CLI. The recommended option depends on how
11
- you intend to use Gemini CLI.
12
-
13
- - As a standard installation. This is the most straightforward method of using
14
- Gemini CLI.
15
- - In a sandbox. This method offers increased security and isolation.
16
- - From the source. This is recommended for contributors to the project.
17
-
18
- ### 1. Standard installation (recommended for standard users)
19
-
20
- This is the recommended way for end-users to install Gemini CLI. It involves
21
- downloading the Gemini CLI package from the NPM registry.
22
-
23
- - **Global install:**
24
-
25
- ```bash
26
- npm install -g @google/gemini-cli
27
- ```
28
-
29
- Then, run the CLI from anywhere:
30
-
31
- ```bash
32
- gemini
33
- ```
34
-
35
- - **NPX execution:**
36
-
37
- ```bash
38
- # Execute the latest version from NPM without a global install
39
- npx @google/gemini-cli
40
- ```
41
-
42
- ### 2. Run in a sandbox (Docker/Podman)
43
-
44
- For security and isolation, Gemini CLI can be run inside a container. This is
45
- the default way that the CLI executes tools that might have side effects.
46
-
47
- - **Directly from the registry:** You can run the published sandbox image
48
- directly. This is useful for environments where you only have Docker and want
49
- to run the CLI.
50
- ```bash
51
- # Run the published sandbox image
52
- docker run --rm -it us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.1.1
53
- ```
54
- - **Using the `--sandbox` flag:** If you have Gemini CLI installed locally
55
- (using the standard installation described above), you can instruct it to run
56
- inside the sandbox container.
57
- ```bash
58
- gemini --sandbox -y -p "your prompt here"
59
- ```
60
-
61
- ### 3. Run from source (recommended for Gemini CLI contributors)
62
-
63
- Contributors to the project will want to run the CLI directly from the source
64
- code.
65
-
66
- - **Development mode:** This method provides hot-reloading and is useful for
67
- active development.
68
- ```bash
69
- # From the root of the repository
70
- npm run start
71
- ```
72
- - **Production-like mode (Linked package):** This method simulates a global
73
- installation by linking your local package. It's useful for testing a local
74
- build in a production workflow.
75
-
76
- ```bash
77
- # Link the local cli package to your global node_modules
78
- npm link packages/cli
79
-
80
- # Now you can run your local version using the `gemini` command
81
- gemini
82
- ```
83
-
84
- ---
85
-
86
- ### 4. Running the latest Gemini CLI commit from GitHub
87
-
88
- You can run the most recently committed version of Gemini CLI directly from the
89
- GitHub repository. This is useful for testing features still in development.
90
-
91
- ```bash
92
- # Execute the CLI directly from the main branch on GitHub
93
- npx https://github.com/google-gemini/gemini-cli
94
- ```
95
-
96
- ## Deployment architecture
97
-
98
- The execution methods described above are made possible by the following
99
- architectural components and processes:
100
-
101
- **NPM packages**
102
-
103
- Gemini CLI project is a monorepo that publishes two core packages to the NPM
104
- registry:
105
-
106
- - `@google/gemini-cli-core`: The backend, handling logic and tool execution.
107
- - `@google/gemini-cli`: The user-facing frontend.
108
-
109
- These packages are used when performing the standard installation and when
110
- running Gemini CLI from the source.
111
-
112
- **Build and packaging processes**
113
-
114
- There are two distinct build processes used, depending on the distribution
115
- channel:
116
-
117
- - **NPM publication:** For publishing to the NPM registry, the TypeScript source
118
- code in `@google/gemini-cli-core` and `@google/gemini-cli` is transpiled into
119
- standard JavaScript using the TypeScript Compiler (`tsc`). The resulting
120
- `dist/` directory is what gets published in the NPM package. This is a
121
- standard approach for TypeScript libraries.
122
-
123
- - **GitHub `npx` execution:** When running the latest version of Gemini CLI
124
- directly from GitHub, a different process is triggered by the `prepare` script
125
- in `package.json`. This script uses `esbuild` to bundle the entire application
126
- and its dependencies into a single, self-contained JavaScript file. This
127
- bundle is created on-the-fly on the user's machine and is not checked into the
128
- repository.
129
-
130
- **Docker sandbox image**
131
-
132
- The Docker-based execution method is supported by the `gemini-cli-sandbox`
133
- container image. This image is published to a container registry and contains a
134
- pre-installed, global version of Gemini CLI.
135
-
136
- ## Release process
137
-
138
- The release process is automated through GitHub Actions. The release workflow
139
- performs the following actions:
140
-
141
- 1. Build the NPM packages using `tsc`.
142
- 2. Publish the NPM packages to the artifact registry.
143
- 3. Create GitHub releases with bundled assets.