@codeflyai/codefly 0.24.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.
- package/LICENSE +202 -0
- package/README.md +375 -0
- package/bundle/codefly.js +486433 -0
- package/bundle/docs/architecture.md +80 -0
- package/bundle/docs/assets/connected_devtools.png +0 -0
- package/bundle/docs/assets/gemini-screenshot.png +0 -0
- package/bundle/docs/assets/release_patch.png +0 -0
- package/bundle/docs/assets/theme-ansi-light.png +0 -0
- package/bundle/docs/assets/theme-ansi.png +0 -0
- package/bundle/docs/assets/theme-atom-one.png +0 -0
- package/bundle/docs/assets/theme-ayu-light.png +0 -0
- package/bundle/docs/assets/theme-ayu.png +0 -0
- package/bundle/docs/assets/theme-custom.png +0 -0
- package/bundle/docs/assets/theme-default-light.png +0 -0
- package/bundle/docs/assets/theme-default.png +0 -0
- package/bundle/docs/assets/theme-dracula.png +0 -0
- package/bundle/docs/assets/theme-github-light.png +0 -0
- package/bundle/docs/assets/theme-github.png +0 -0
- package/bundle/docs/assets/theme-google-light.png +0 -0
- package/bundle/docs/assets/theme-xcode-light.png +0 -0
- package/bundle/docs/changelogs/index.md +592 -0
- package/bundle/docs/changelogs/latest.md +225 -0
- package/bundle/docs/changelogs/preview.md +129 -0
- package/bundle/docs/changelogs/releases.md +896 -0
- package/bundle/docs/cli/authentication.md +3 -0
- package/bundle/docs/cli/checkpointing.md +94 -0
- package/bundle/docs/cli/codefly-ignore.md +71 -0
- package/bundle/docs/cli/codefly-md.md +109 -0
- package/bundle/docs/cli/commands.md +354 -0
- package/bundle/docs/cli/configuration.md +780 -0
- package/bundle/docs/cli/custom-commands.md +315 -0
- package/bundle/docs/cli/enterprise.md +565 -0
- package/bundle/docs/cli/generation-settings.md +210 -0
- package/bundle/docs/cli/headless.md +388 -0
- package/bundle/docs/cli/index.md +63 -0
- package/bundle/docs/cli/keyboard-shortcuts.md +143 -0
- package/bundle/docs/cli/model-routing.md +37 -0
- package/bundle/docs/cli/model.md +62 -0
- package/bundle/docs/cli/sandbox.md +171 -0
- package/bundle/docs/cli/session-management.md +158 -0
- package/bundle/docs/cli/settings.md +113 -0
- package/bundle/docs/cli/system-prompt.md +95 -0
- package/bundle/docs/cli/telemetry.md +792 -0
- package/bundle/docs/cli/themes.md +237 -0
- package/bundle/docs/cli/token-caching.md +20 -0
- package/bundle/docs/cli/trusted-folders.md +95 -0
- package/bundle/docs/cli/tutorials.md +83 -0
- package/bundle/docs/cli/uninstall.md +47 -0
- package/bundle/docs/core/index.md +101 -0
- package/bundle/docs/core/memport.md +244 -0
- package/bundle/docs/core/policy-engine.md +267 -0
- package/bundle/docs/core/tools-api.md +131 -0
- package/bundle/docs/examples/proxy-script.md +83 -0
- package/bundle/docs/extensions/extension-releasing.md +183 -0
- package/bundle/docs/extensions/getting-started-extensions.md +245 -0
- package/bundle/docs/extensions/index.md +293 -0
- package/bundle/docs/faq.md +154 -0
- package/bundle/docs/get-started/authentication.md +321 -0
- package/bundle/docs/get-started/configuration-v1.md +888 -0
- package/bundle/docs/get-started/configuration.md +1524 -0
- package/bundle/docs/get-started/deployment.md +143 -0
- package/bundle/docs/get-started/examples.md +219 -0
- package/bundle/docs/get-started/gemini-3.md +116 -0
- package/bundle/docs/get-started/index.md +71 -0
- package/bundle/docs/get-started/installation.md +141 -0
- package/bundle/docs/hooks/best-practices.md +856 -0
- package/bundle/docs/hooks/index.md +687 -0
- package/bundle/docs/hooks/reference.md +168 -0
- package/bundle/docs/hooks/writing-hooks.md +1026 -0
- package/bundle/docs/ide-integration/ide-companion-spec.md +267 -0
- package/bundle/docs/ide-integration/index.md +202 -0
- package/bundle/docs/index.md +147 -0
- package/bundle/docs/integration-tests.md +211 -0
- package/bundle/docs/issue-and-pr-automation.md +134 -0
- package/bundle/docs/local-development.md +128 -0
- package/bundle/docs/mermaid/context.mmd +103 -0
- package/bundle/docs/mermaid/render-path.mmd +64 -0
- package/bundle/docs/npm.md +62 -0
- package/bundle/docs/quota-and-pricing.md +158 -0
- package/bundle/docs/release-confidence.md +164 -0
- package/bundle/docs/releases.md +540 -0
- package/bundle/docs/sidebar.json +297 -0
- package/bundle/docs/tools/file-system.md +217 -0
- package/bundle/docs/tools/index.md +95 -0
- package/bundle/docs/tools/mcp-server.md +1044 -0
- package/bundle/docs/tools/memory.md +54 -0
- package/bundle/docs/tools/shell.md +260 -0
- package/bundle/docs/tools/todos.md +57 -0
- package/bundle/docs/tools/web-fetch.md +59 -0
- package/bundle/docs/tools/web-search.md +42 -0
- package/bundle/docs/tos-privacy.md +96 -0
- package/bundle/docs/troubleshooting.md +158 -0
- package/bundle/policies/agent.toml +31 -0
- package/bundle/policies/discovered.toml +8 -0
- package/bundle/policies/read-only.toml +61 -0
- package/bundle/policies/write.toml +78 -0
- package/bundle/policies/yolo.toml +31 -0
- package/bundle/sandbox-macos-permissive-closed.sb +32 -0
- package/bundle/sandbox-macos-permissive-open.sb +27 -0
- package/bundle/sandbox-macos-permissive-proxied.sb +37 -0
- package/bundle/sandbox-macos-restrictive-closed.sb +93 -0
- package/bundle/sandbox-macos-restrictive-open.sb +96 -0
- package/bundle/sandbox-macos-restrictive-proxied.sb +98 -0
- package/package.json +148 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
(version 1)
|
|
2
|
+
|
|
3
|
+
;; deny everything by default
|
|
4
|
+
(deny default)
|
|
5
|
+
|
|
6
|
+
;; allow reading files from anywhere on host
|
|
7
|
+
(allow file-read*)
|
|
8
|
+
|
|
9
|
+
;; allow exec/fork (children inherit policy)
|
|
10
|
+
(allow process-exec)
|
|
11
|
+
(allow process-fork)
|
|
12
|
+
|
|
13
|
+
;; allow signals to self, e.g. SIGPIPE on write to closed pipe
|
|
14
|
+
(allow signal (target self))
|
|
15
|
+
|
|
16
|
+
;; allow read access to specific information about system
|
|
17
|
+
;; from https://source.chromium.org/chromium/chromium/src/+/main:sandbox/policy/mac/common.sb;l=273-319;drc=7b3962fe2e5fc9e2ee58000dc8fbf3429d84d3bd
|
|
18
|
+
(allow sysctl-read
|
|
19
|
+
(sysctl-name "hw.activecpu")
|
|
20
|
+
(sysctl-name "hw.busfrequency_compat")
|
|
21
|
+
(sysctl-name "hw.byteorder")
|
|
22
|
+
(sysctl-name "hw.cacheconfig")
|
|
23
|
+
(sysctl-name "hw.cachelinesize_compat")
|
|
24
|
+
(sysctl-name "hw.cpufamily")
|
|
25
|
+
(sysctl-name "hw.cpufrequency_compat")
|
|
26
|
+
(sysctl-name "hw.cputype")
|
|
27
|
+
(sysctl-name "hw.l1dcachesize_compat")
|
|
28
|
+
(sysctl-name "hw.l1icachesize_compat")
|
|
29
|
+
(sysctl-name "hw.l2cachesize_compat")
|
|
30
|
+
(sysctl-name "hw.l3cachesize_compat")
|
|
31
|
+
(sysctl-name "hw.logicalcpu_max")
|
|
32
|
+
(sysctl-name "hw.machine")
|
|
33
|
+
(sysctl-name "hw.ncpu")
|
|
34
|
+
(sysctl-name "hw.nperflevels")
|
|
35
|
+
(sysctl-name "hw.optional.arm.FEAT_BF16")
|
|
36
|
+
(sysctl-name "hw.optional.arm.FEAT_DotProd")
|
|
37
|
+
(sysctl-name "hw.optional.arm.FEAT_FCMA")
|
|
38
|
+
(sysctl-name "hw.optional.arm.FEAT_FHM")
|
|
39
|
+
(sysctl-name "hw.optional.arm.FEAT_FP16")
|
|
40
|
+
(sysctl-name "hw.optional.arm.FEAT_I8MM")
|
|
41
|
+
(sysctl-name "hw.optional.arm.FEAT_JSCVT")
|
|
42
|
+
(sysctl-name "hw.optional.arm.FEAT_LSE")
|
|
43
|
+
(sysctl-name "hw.optional.arm.FEAT_RDM")
|
|
44
|
+
(sysctl-name "hw.optional.arm.FEAT_SHA512")
|
|
45
|
+
(sysctl-name "hw.optional.armv8_2_sha512")
|
|
46
|
+
(sysctl-name "hw.packages")
|
|
47
|
+
(sysctl-name "hw.pagesize_compat")
|
|
48
|
+
(sysctl-name "hw.physicalcpu_max")
|
|
49
|
+
(sysctl-name "hw.tbfrequency_compat")
|
|
50
|
+
(sysctl-name "hw.vectorunit")
|
|
51
|
+
(sysctl-name "kern.hostname")
|
|
52
|
+
(sysctl-name "kern.maxfilesperproc")
|
|
53
|
+
(sysctl-name "kern.osproductversion")
|
|
54
|
+
(sysctl-name "kern.osrelease")
|
|
55
|
+
(sysctl-name "kern.ostype")
|
|
56
|
+
(sysctl-name "kern.osvariant_status")
|
|
57
|
+
(sysctl-name "kern.osversion")
|
|
58
|
+
(sysctl-name "kern.secure_kernel")
|
|
59
|
+
(sysctl-name "kern.usrstack64")
|
|
60
|
+
(sysctl-name "kern.version")
|
|
61
|
+
(sysctl-name "sysctl.proc_cputype")
|
|
62
|
+
(sysctl-name-prefix "hw.perflevel")
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
;; allow writes to specific paths
|
|
66
|
+
(allow file-write*
|
|
67
|
+
(subpath (param "TARGET_DIR"))
|
|
68
|
+
(subpath (param "TMP_DIR"))
|
|
69
|
+
(subpath (param "CACHE_DIR"))
|
|
70
|
+
(subpath (string-append (param "HOME_DIR") "/.codefly"))
|
|
71
|
+
(subpath (string-append (param "HOME_DIR") "/.npm"))
|
|
72
|
+
(subpath (string-append (param "HOME_DIR") "/.cache"))
|
|
73
|
+
(subpath (string-append (param "HOME_DIR") "/.gitconfig"))
|
|
74
|
+
;; Allow writes to included directories from --include-directories
|
|
75
|
+
(subpath (param "INCLUDE_DIR_0"))
|
|
76
|
+
(subpath (param "INCLUDE_DIR_1"))
|
|
77
|
+
(subpath (param "INCLUDE_DIR_2"))
|
|
78
|
+
(subpath (param "INCLUDE_DIR_3"))
|
|
79
|
+
(subpath (param "INCLUDE_DIR_4"))
|
|
80
|
+
(literal "/dev/stdout")
|
|
81
|
+
(literal "/dev/stderr")
|
|
82
|
+
(literal "/dev/null")
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
;; allow communication with sysmond for process listing (e.g. for pgrep)
|
|
86
|
+
(allow mach-lookup (global-name "com.apple.sysmond"))
|
|
87
|
+
|
|
88
|
+
;; enable terminal access required by ink
|
|
89
|
+
;; fixes setRawMode EPERM failure (at node:tty:81:24)
|
|
90
|
+
(allow file-ioctl (regex #"^/dev/tty.*"))
|
|
91
|
+
|
|
92
|
+
;; allow inbound network traffic on debugger port
|
|
93
|
+
(allow network-inbound (local ip "localhost:9229"))
|
|
94
|
+
|
|
95
|
+
;; allow outbound network traffic through proxy on localhost:8877
|
|
96
|
+
;; set `GEMINI_SANDBOX_PROXY_COMMAND=<command>` to run proxy alongside sandbox
|
|
97
|
+
;; proxy must listen on :::8877 (see docs/examples/proxy-script.md)
|
|
98
|
+
(allow network-outbound (remote tcp "localhost:8877"))
|
package/package.json
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@codeflyai/codefly",
|
|
3
|
+
"version": "0.24.0",
|
|
4
|
+
"engines": {
|
|
5
|
+
"node": ">=20.0.0"
|
|
6
|
+
},
|
|
7
|
+
"type": "module",
|
|
8
|
+
"workspaces": [
|
|
9
|
+
"packages/*"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/luobintianya/codefly-cli.git"
|
|
14
|
+
},
|
|
15
|
+
"config": {
|
|
16
|
+
"sandboxImageUri": "us-docker.pkg.dev/codefly-dev/codefly/sandbox:0.24.0-nightly.20251227.37be16243"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"start": "cross-env NODE_ENV=development node scripts/start.js",
|
|
20
|
+
"start:a2a-server": "CODER_AGENT_PORT=41242 npm run start --workspace @codeflyai/codefly-a2a-server",
|
|
21
|
+
"debug": "cross-env DEBUG=1 node --inspect-brk scripts/start.js",
|
|
22
|
+
"deflake": "node scripts/deflake.js",
|
|
23
|
+
"deflake:test:integration:sandbox:none": "npm run deflake -- --command=\"npm run test:integration:sandbox:none -- --retry=0\"",
|
|
24
|
+
"deflake:test:integration:sandbox:docker": "npm run deflake -- --command=\"npm run test:integration:sandbox:docker -- --retry=0\"",
|
|
25
|
+
"auth:npm": "npx google-artifactregistry-auth",
|
|
26
|
+
"auth:docker": "gcloud auth configure-docker us-west1-docker.pkg.dev",
|
|
27
|
+
"auth": "npm run auth:npm && npm run auth:docker",
|
|
28
|
+
"generate": "node scripts/generate-git-commit-info.js",
|
|
29
|
+
"predocs:settings": "npm run build --workspace @codeflyai/codefly-core",
|
|
30
|
+
"schema:settings": "tsx ./scripts/generate-settings-schema.ts",
|
|
31
|
+
"docs:settings": "tsx ./scripts/generate-settings-doc.ts",
|
|
32
|
+
"docs:keybindings": "tsx ./scripts/generate-keybindings-doc.ts",
|
|
33
|
+
"build": "node scripts/build.js",
|
|
34
|
+
"build-and-start": "npm run build && npm run start",
|
|
35
|
+
"build:vscode": "node scripts/build_vscode_companion.js",
|
|
36
|
+
"build:all": "npm run build && npm run build:sandbox && npm run build:vscode",
|
|
37
|
+
"build:packages": "npm run build --workspaces",
|
|
38
|
+
"build:sandbox": "node scripts/build_sandbox.js",
|
|
39
|
+
"bundle": "npm run generate && node esbuild.config.js && node scripts/copy_bundle_assets.js",
|
|
40
|
+
"test": "npm run test --workspaces --if-present",
|
|
41
|
+
"test:ci": "npm run test:ci --workspaces --if-present && npm run test:scripts",
|
|
42
|
+
"test:scripts": "vitest run --config ./scripts/tests/vitest.config.ts",
|
|
43
|
+
"test:e2e": "cross-env VERBOSE=true KEEP_OUTPUT=true npm run test:integration:sandbox:none",
|
|
44
|
+
"test:integration:all": "npm run test:integration:sandbox:none && npm run test:integration:sandbox:docker && npm run test:integration:sandbox:podman",
|
|
45
|
+
"test:integration:sandbox:none": "cross-env CODEFLY_SANDBOX=false vitest run --root ./integration-tests",
|
|
46
|
+
"test:integration:sandbox:docker": "cross-env CODEFLY_SANDBOX=docker npm run build:sandbox && cross-env CODEFLY_SANDBOX=docker vitest run --root ./integration-tests",
|
|
47
|
+
"test:integration:sandbox:podman": "cross-env CODEFLY_SANDBOX=podman vitest run --root ./integration-tests",
|
|
48
|
+
"lint": "eslint . --ext .ts,.tsx && eslint integration-tests && eslint scripts",
|
|
49
|
+
"lint:fix": "eslint . --fix --ext .ts,.tsx && eslint integration-tests --fix && eslint scripts --fix && npm run format",
|
|
50
|
+
"lint:ci": "npm run lint:all",
|
|
51
|
+
"lint:all": "node scripts/lint.js",
|
|
52
|
+
"format": "prettier --experimental-cli --write .",
|
|
53
|
+
"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
|
+
"prepare:package": "node scripts/prepare-package.js",
|
|
57
|
+
"release:version": "node scripts/version.js",
|
|
58
|
+
"telemetry": "node scripts/telemetry.js",
|
|
59
|
+
"check:lockfile": "node scripts/check-lockfile.js",
|
|
60
|
+
"clean": "node scripts/clean.js",
|
|
61
|
+
"pre-commit": "node scripts/pre-commit.js"
|
|
62
|
+
},
|
|
63
|
+
"overrides": {
|
|
64
|
+
"ink": "npm:@jrichman/ink@6.4.6",
|
|
65
|
+
"wrap-ansi": "9.0.2",
|
|
66
|
+
"cliui": {
|
|
67
|
+
"wrap-ansi": "7.0.0"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"bin": {
|
|
71
|
+
"codefly": "bundle/codefly.js"
|
|
72
|
+
},
|
|
73
|
+
"files": [
|
|
74
|
+
"bundle/",
|
|
75
|
+
"README.md",
|
|
76
|
+
"LICENSE"
|
|
77
|
+
],
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@octokit/rest": "^22.0.0",
|
|
80
|
+
"@types/marked": "^5.0.2",
|
|
81
|
+
"@types/mime-types": "^3.0.1",
|
|
82
|
+
"@types/minimatch": "^5.1.2",
|
|
83
|
+
"@types/mock-fs": "^4.13.4",
|
|
84
|
+
"@types/prompts": "^2.4.9",
|
|
85
|
+
"@types/react": "^19.2.0",
|
|
86
|
+
"@types/react-dom": "^19.2.0",
|
|
87
|
+
"@types/shell-quote": "^1.7.5",
|
|
88
|
+
"@vitest/coverage-v8": "^3.1.1",
|
|
89
|
+
"@vitest/eslint-plugin": "^1.3.4",
|
|
90
|
+
"cross-env": "^7.0.3",
|
|
91
|
+
"depcheck": "^1.4.7",
|
|
92
|
+
"esbuild": "^0.25.0",
|
|
93
|
+
"esbuild-plugin-wasm": "^1.1.0",
|
|
94
|
+
"eslint": "^9.24.0",
|
|
95
|
+
"eslint-config-prettier": "^10.1.2",
|
|
96
|
+
"eslint-plugin-headers": "^1.3.3",
|
|
97
|
+
"eslint-plugin-import": "^2.31.0",
|
|
98
|
+
"eslint-plugin-react": "^7.37.5",
|
|
99
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
100
|
+
"glob": "^12.0.0",
|
|
101
|
+
"globals": "^16.0.0",
|
|
102
|
+
"google-artifactregistry-auth": "^3.4.0",
|
|
103
|
+
"husky": "^9.1.7",
|
|
104
|
+
"ink-testing-library": "^4.0.0",
|
|
105
|
+
"json": "^11.0.0",
|
|
106
|
+
"lint-staged": "^16.1.6",
|
|
107
|
+
"memfs": "^4.42.0",
|
|
108
|
+
"mnemonist": "^0.40.3",
|
|
109
|
+
"mock-fs": "^5.5.0",
|
|
110
|
+
"msw": "^2.10.4",
|
|
111
|
+
"npm-run-all": "^4.1.5",
|
|
112
|
+
"prettier": "^3.5.3",
|
|
113
|
+
"react-devtools-core": "^6.1.2",
|
|
114
|
+
"semver": "^7.7.2",
|
|
115
|
+
"strip-ansi": "^7.1.2",
|
|
116
|
+
"ts-prune": "^0.10.3",
|
|
117
|
+
"tsx": "^4.20.3",
|
|
118
|
+
"typescript-eslint": "^8.30.1",
|
|
119
|
+
"vitest": "^3.2.4",
|
|
120
|
+
"yargs": "^17.7.2"
|
|
121
|
+
},
|
|
122
|
+
"dependencies": {
|
|
123
|
+
"ink": "npm:@jrichman/ink@6.4.6",
|
|
124
|
+
"latest-version": "^9.0.0",
|
|
125
|
+
"simple-git": "^3.28.0"
|
|
126
|
+
},
|
|
127
|
+
"optionalDependencies": {
|
|
128
|
+
"@lydell/node-pty": "1.1.0",
|
|
129
|
+
"@lydell/node-pty-darwin-arm64": "1.1.0",
|
|
130
|
+
"@lydell/node-pty-darwin-x64": "1.1.0",
|
|
131
|
+
"@lydell/node-pty-linux-x64": "1.1.0",
|
|
132
|
+
"@lydell/node-pty-win32-arm64": "1.1.0",
|
|
133
|
+
"@lydell/node-pty-win32-x64": "1.1.0",
|
|
134
|
+
"node-pty": "^1.0.0"
|
|
135
|
+
},
|
|
136
|
+
"lint-staged": {
|
|
137
|
+
"*.{js,jsx,ts,tsx}": [
|
|
138
|
+
"prettier --write",
|
|
139
|
+
"eslint --fix --max-warnings 0 --no-warn-ignored"
|
|
140
|
+
],
|
|
141
|
+
"eslint.config.js": [
|
|
142
|
+
"prettier --write"
|
|
143
|
+
],
|
|
144
|
+
"*.{json,md}": [
|
|
145
|
+
"prettier --write"
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
}
|