@codemieai/code 0.0.3 → 0.0.5
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/README.md +375 -325
- package/bin/codemie-claude.js +23 -0
- package/bin/codemie-code.js +49 -11
- package/bin/codemie-codex.js +12 -13
- package/dist/agents/adapters/claude-code.d.ts +5 -0
- package/dist/agents/adapters/claude-code.d.ts.map +1 -1
- package/dist/agents/adapters/claude-code.js +76 -18
- package/dist/agents/adapters/claude-code.js.map +1 -1
- package/dist/agents/adapters/codex.d.ts +5 -0
- package/dist/agents/adapters/codex.d.ts.map +1 -1
- package/dist/agents/adapters/codex.js +75 -17
- package/dist/agents/adapters/codex.js.map +1 -1
- package/dist/agents/codemie-code/agent.d.ts.map +1 -1
- package/dist/agents/codemie-code/agent.js +187 -21
- package/dist/agents/codemie-code/agent.js.map +1 -1
- package/dist/agents/codemie-code/config.d.ts.map +1 -1
- package/dist/agents/codemie-code/config.js +29 -27
- package/dist/agents/codemie-code/config.js.map +1 -1
- package/dist/agents/codemie-code/index.d.ts +16 -2
- package/dist/agents/codemie-code/index.d.ts.map +1 -1
- package/dist/agents/codemie-code/index.js +74 -6
- package/dist/agents/codemie-code/index.js.map +1 -1
- package/dist/agents/codemie-code/modes/contextAwarePlanning.d.ts +87 -0
- package/dist/agents/codemie-code/modes/contextAwarePlanning.d.ts.map +1 -0
- package/dist/agents/codemie-code/modes/contextAwarePlanning.js +957 -0
- package/dist/agents/codemie-code/modes/contextAwarePlanning.js.map +1 -0
- package/dist/agents/codemie-code/modes/planMode.d.ts +116 -0
- package/dist/agents/codemie-code/modes/planMode.d.ts.map +1 -0
- package/dist/agents/codemie-code/modes/planMode.js +537 -0
- package/dist/agents/codemie-code/modes/planMode.js.map +1 -0
- package/dist/agents/codemie-code/prompts.d.ts +29 -0
- package/dist/agents/codemie-code/prompts.d.ts.map +1 -1
- package/dist/agents/codemie-code/prompts.js +129 -0
- package/dist/agents/codemie-code/prompts.js.map +1 -1
- package/dist/agents/codemie-code/storage/todoStorage.d.ts +78 -0
- package/dist/agents/codemie-code/storage/todoStorage.d.ts.map +1 -0
- package/dist/agents/codemie-code/storage/todoStorage.js +225 -0
- package/dist/agents/codemie-code/storage/todoStorage.js.map +1 -0
- package/dist/agents/codemie-code/tokenUtils.js +1 -1
- package/dist/agents/codemie-code/tokenUtils.js.map +1 -1
- package/dist/agents/codemie-code/tools/index.d.ts +26 -0
- package/dist/agents/codemie-code/tools/index.d.ts.map +1 -1
- package/dist/agents/codemie-code/tools/index.js +182 -14
- package/dist/agents/codemie-code/tools/index.js.map +1 -1
- package/dist/agents/codemie-code/tools/planning.d.ts +53 -0
- package/dist/agents/codemie-code/tools/planning.d.ts.map +1 -0
- package/dist/agents/codemie-code/tools/planning.js +224 -0
- package/dist/agents/codemie-code/tools/planning.js.map +1 -0
- package/dist/agents/codemie-code/types.d.ts +170 -6
- package/dist/agents/codemie-code/types.d.ts.map +1 -1
- package/dist/agents/codemie-code/types.js.map +1 -1
- package/dist/agents/codemie-code/ui/progressTracker.d.ts +125 -0
- package/dist/agents/codemie-code/ui/progressTracker.d.ts.map +1 -0
- package/dist/agents/codemie-code/ui/progressTracker.js +343 -0
- package/dist/agents/codemie-code/ui/progressTracker.js.map +1 -0
- package/dist/agents/codemie-code/ui/todoPanel.d.ts +112 -0
- package/dist/agents/codemie-code/ui/todoPanel.d.ts.map +1 -0
- package/dist/agents/codemie-code/ui/todoPanel.js +318 -0
- package/dist/agents/codemie-code/ui/todoPanel.js.map +1 -0
- package/dist/agents/codemie-code/ui.d.ts +106 -10
- package/dist/agents/codemie-code/ui.d.ts.map +1 -1
- package/dist/agents/codemie-code/ui.js +913 -129
- package/dist/agents/codemie-code/ui.js.map +1 -1
- package/dist/agents/codemie-code/utils/progressionEnforcer.d.ts +87 -0
- package/dist/agents/codemie-code/utils/progressionEnforcer.d.ts.map +1 -0
- package/dist/agents/codemie-code/utils/progressionEnforcer.js +293 -0
- package/dist/agents/codemie-code/utils/progressionEnforcer.js.map +1 -0
- package/dist/agents/codemie-code/utils/todoParser.d.ts +41 -0
- package/dist/agents/codemie-code/utils/todoParser.d.ts.map +1 -0
- package/dist/agents/codemie-code/utils/todoParser.js +305 -0
- package/dist/agents/codemie-code/utils/todoParser.js.map +1 -0
- package/dist/agents/codemie-code/utils/todoValidator.d.ts +65 -0
- package/dist/agents/codemie-code/utils/todoValidator.d.ts.map +1 -0
- package/dist/agents/codemie-code/utils/todoValidator.js +249 -0
- package/dist/agents/codemie-code/utils/todoValidator.js.map +1 -0
- package/dist/agents/codemie-code/validators/planValidator.d.ts +94 -0
- package/dist/agents/codemie-code/validators/planValidator.d.ts.map +1 -0
- package/dist/agents/codemie-code/validators/planValidator.js +281 -0
- package/dist/agents/codemie-code/validators/planValidator.js.map +1 -0
- package/dist/agents/registry.d.ts.map +1 -1
- package/dist/agents/registry.js +7 -5
- package/dist/agents/registry.js.map +1 -1
- package/dist/cli/commands/auth.d.ts +3 -0
- package/dist/cli/commands/auth.d.ts.map +1 -0
- package/dist/cli/commands/auth.js +170 -0
- package/dist/cli/commands/auth.js.map +1 -0
- package/dist/cli/commands/config.d.ts.map +1 -1
- package/dist/cli/commands/config.js +40 -13
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +209 -16
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/env.js +3 -3
- package/dist/cli/commands/env.js.map +1 -1
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +2 -1
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +15 -9
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +177 -11
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/commands/tools.d.ts +6 -0
- package/dist/cli/commands/tools.d.ts.map +1 -0
- package/dist/cli/commands/tools.js +244 -0
- package/dist/cli/commands/tools.js.map +1 -0
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/commands/version.js.map +1 -1
- package/dist/cli/commands/workflow.d.ts +6 -0
- package/dist/cli/commands/workflow.d.ts.map +1 -0
- package/dist/cli/commands/workflow.js +424 -0
- package/dist/cli/commands/workflow.js.map +1 -0
- package/dist/cli/index.js +39 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/clients/adapters/github.d.ts +17 -0
- package/dist/clients/adapters/github.d.ts.map +1 -0
- package/dist/clients/adapters/github.js +150 -0
- package/dist/clients/adapters/github.js.map +1 -0
- package/dist/clients/adapters/gitlab.d.ts +17 -0
- package/dist/clients/adapters/gitlab.d.ts.map +1 -0
- package/dist/clients/adapters/gitlab.js +147 -0
- package/dist/clients/adapters/gitlab.js.map +1 -0
- package/dist/clients/registry.d.ts +20 -0
- package/dist/clients/registry.d.ts.map +1 -0
- package/dist/clients/registry.js +27 -0
- package/dist/clients/registry.js.map +1 -0
- package/dist/tools/detector.d.ts +33 -0
- package/dist/tools/detector.d.ts.map +1 -0
- package/dist/tools/detector.js +145 -0
- package/dist/tools/detector.js.map +1 -0
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +8 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/manager.d.ts +21 -0
- package/dist/tools/manager.d.ts.map +1 -0
- package/dist/tools/manager.js +104 -0
- package/dist/tools/manager.js.map +1 -0
- package/dist/tools/registry.d.ts +8 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +36 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/types.d.ts +41 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +5 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/types/sso.d.ts +42 -0
- package/dist/types/sso.d.ts.map +1 -0
- package/dist/types/sso.js +2 -0
- package/dist/types/sso.js.map +1 -0
- package/dist/utils/agent-compatibility.d.ts +32 -0
- package/dist/utils/agent-compatibility.d.ts.map +1 -0
- package/dist/utils/agent-compatibility.js +140 -0
- package/dist/utils/agent-compatibility.js.map +1 -0
- package/dist/utils/codemie-integration-validator.d.ts +17 -0
- package/dist/utils/codemie-integration-validator.d.ts.map +1 -0
- package/dist/utils/codemie-integration-validator.js +105 -0
- package/dist/utils/codemie-integration-validator.js.map +1 -0
- package/dist/utils/codemie-model-fetcher.d.ts +11 -0
- package/dist/utils/codemie-model-fetcher.d.ts.map +1 -0
- package/dist/utils/codemie-model-fetcher.js +242 -0
- package/dist/utils/codemie-model-fetcher.js.map +1 -0
- package/dist/utils/config-loader.d.ts +23 -1
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js +73 -27
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/credential-store.d.ts +16 -0
- package/dist/utils/credential-store.d.ts.map +1 -0
- package/dist/utils/credential-store.js +109 -0
- package/dist/utils/credential-store.js.map +1 -0
- package/dist/utils/first-time.d.ts +1 -1
- package/dist/utils/first-time.d.ts.map +1 -1
- package/dist/utils/first-time.js +52 -71
- package/dist/utils/first-time.js.map +1 -1
- package/dist/utils/health-checker.d.ts.map +1 -1
- package/dist/utils/health-checker.js +5 -1
- package/dist/utils/health-checker.js.map +1 -1
- package/dist/utils/model-fetcher.d.ts.map +1 -1
- package/dist/utils/model-fetcher.js +15 -2
- package/dist/utils/model-fetcher.js.map +1 -1
- package/dist/utils/sso-auth.d.ts +15 -0
- package/dist/utils/sso-auth.d.ts.map +1 -0
- package/dist/utils/sso-auth.js +207 -0
- package/dist/utils/sso-auth.js.map +1 -0
- package/dist/utils/sso-gateway.d.ts +47 -0
- package/dist/utils/sso-gateway.d.ts.map +1 -0
- package/dist/utils/sso-gateway.js +298 -0
- package/dist/utils/sso-gateway.js.map +1 -0
- package/dist/workflows/detector.d.ts +37 -0
- package/dist/workflows/detector.d.ts.map +1 -0
- package/dist/workflows/detector.js +160 -0
- package/dist/workflows/detector.js.map +1 -0
- package/dist/workflows/index.d.ts +8 -0
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/index.js +8 -0
- package/dist/workflows/index.js.map +1 -0
- package/dist/workflows/installer.d.ts +24 -0
- package/dist/workflows/installer.d.ts.map +1 -0
- package/dist/workflows/installer.js +105 -0
- package/dist/workflows/installer.js.map +1 -0
- package/dist/workflows/registry.d.ts +29 -0
- package/dist/workflows/registry.d.ts.map +1 -0
- package/dist/workflows/registry.js +54 -0
- package/dist/workflows/registry.js.map +1 -0
- package/dist/workflows/templates/github/metadata.d.ts +6 -0
- package/dist/workflows/templates/github/metadata.d.ts.map +1 -0
- package/dist/workflows/templates/github/metadata.js +111 -0
- package/dist/workflows/templates/github/metadata.js.map +1 -0
- package/dist/workflows/templates/gitlab/metadata.d.ts +6 -0
- package/dist/workflows/templates/gitlab/metadata.d.ts.map +1 -0
- package/dist/workflows/templates/gitlab/metadata.js +14 -0
- package/dist/workflows/templates/gitlab/metadata.js.map +1 -0
- package/dist/workflows/types.d.ts +71 -0
- package/dist/workflows/types.d.ts.map +1 -0
- package/dist/workflows/types.js +5 -0
- package/dist/workflows/types.js.map +1 -0
- package/package.json +19 -6
- package/src/workflows/templates/github/code-ci.yml +529 -0
- package/src/workflows/templates/github/inline-fix.yml +665 -0
- package/src/workflows/templates/github/pr-review.yml +677 -0
- package/.claude/agents/README.md +0 -298
- package/.claude/agents/release-manager.md +0 -857
- package/.codemie/guides/git-workflow.md +0 -493
- package/CLAUDE.md +0 -225
- package/config.example.json +0 -10
- package/dist/agents/codemie-code/streaming/events.d.ts +0 -7
- package/dist/agents/codemie-code/streaming/events.d.ts.map +0 -1
- package/dist/agents/codemie-code/streaming/events.js +0 -7
- package/dist/agents/codemie-code/streaming/events.js.map +0 -1
- package/dist/agents/codemie-code/streaming/formatter.d.ts +0 -2
- package/dist/agents/codemie-code/streaming/formatter.d.ts.map +0 -1
- package/dist/agents/codemie-code/streaming/formatter.js +0 -2
- package/dist/agents/codemie-code/streaming/formatter.js.map +0 -1
- package/dist/agents/codemie-code/streaming/ui.d.ts +0 -2
- package/dist/agents/codemie-code/streaming/ui.d.ts.map +0 -1
- package/dist/agents/codemie-code/streaming/ui.js +0 -2
- package/dist/agents/codemie-code/streaming/ui.js.map +0 -1
- package/dist/agents/codemie-code/tools/command.d.ts +0 -2
- package/dist/agents/codemie-code/tools/command.d.ts.map +0 -1
- package/dist/agents/codemie-code/tools/command.js +0 -2
- package/dist/agents/codemie-code/tools/command.js.map +0 -1
- package/dist/agents/codemie-code/tools/filesystem.d.ts +0 -2
- package/dist/agents/codemie-code/tools/filesystem.d.ts.map +0 -1
- package/dist/agents/codemie-code/tools/filesystem.js +0 -2
- package/dist/agents/codemie-code/tools/filesystem.js.map +0 -1
- package/dist/agents/codemie-code/tools/git.d.ts +0 -2
- package/dist/agents/codemie-code/tools/git.d.ts.map +0 -1
- package/dist/agents/codemie-code/tools/git.js +0 -2
- package/dist/agents/codemie-code/tools/git.js.map +0 -1
- package/dist/agents/codemie-code/tools/security.d.ts +0 -2
- package/dist/agents/codemie-code/tools/security.d.ts.map +0 -1
- package/dist/agents/codemie-code/tools/security.js +0 -2
- package/dist/agents/codemie-code/tools/security.js.map +0 -1
- package/eslint.config.mjs +0 -43
- package/scripts/README.md +0 -80
- package/scripts/release.sh +0 -156
package/config.example.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"provider": "ai-run",
|
|
3
|
-
"baseUrl": "https://litellm.codemie.example.com",
|
|
4
|
-
"apiKey": "your-litellm-api-key-here",
|
|
5
|
-
"model": "claude-4-5-sonnet",
|
|
6
|
-
"timeout": 300,
|
|
7
|
-
"debug": false,
|
|
8
|
-
"allowedDirs": ["/home/user/projects"],
|
|
9
|
-
"ignorePatterns": ["node_modules", ".git", "dist", "build"]
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/agents/codemie-code/streaming/events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../../src/agents/codemie-code/streaming/events.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../../../../src/agents/codemie-code/streaming/formatter.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../../../src/agents/codemie-code/streaming/formatter.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../../src/agents/codemie-code/streaming/ui.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../../../src/agents/codemie-code/streaming/ui.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/agents/codemie-code/tools/command.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../src/agents/codemie-code/tools/command.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem.d.ts","sourceRoot":"","sources":["../../../../src/agents/codemie-code/tools/filesystem.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem.js","sourceRoot":"","sources":["../../../../src/agents/codemie-code/tools/filesystem.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../../src/agents/codemie-code/tools/git.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../../../src/agents/codemie-code/tools/git.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../../../src/agents/codemie-code/tools/security.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"security.js","sourceRoot":"","sources":["../../../../src/agents/codemie-code/tools/security.ts"],"names":[],"mappings":""}
|
package/eslint.config.mjs
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import eslint from '@eslint/js';
|
|
2
|
-
import tseslint from '@typescript-eslint/eslint-plugin';
|
|
3
|
-
import tsparser from '@typescript-eslint/parser';
|
|
4
|
-
|
|
5
|
-
export default [
|
|
6
|
-
eslint.configs.recommended,
|
|
7
|
-
{
|
|
8
|
-
files: ['src/**/*.ts'],
|
|
9
|
-
languageOptions: {
|
|
10
|
-
parser: tsparser,
|
|
11
|
-
parserOptions: {
|
|
12
|
-
ecmaVersion: 2022,
|
|
13
|
-
sourceType: 'module',
|
|
14
|
-
project: './tsconfig.json',
|
|
15
|
-
},
|
|
16
|
-
globals: {
|
|
17
|
-
console: 'readonly',
|
|
18
|
-
process: 'readonly',
|
|
19
|
-
Buffer: 'readonly',
|
|
20
|
-
__dirname: 'readonly',
|
|
21
|
-
__filename: 'readonly',
|
|
22
|
-
require: 'readonly',
|
|
23
|
-
module: 'readonly',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
plugins: {
|
|
27
|
-
'@typescript-eslint': tseslint,
|
|
28
|
-
},
|
|
29
|
-
rules: {
|
|
30
|
-
...tseslint.configs.recommended.rules,
|
|
31
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
32
|
-
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
|
|
33
|
-
'@typescript-eslint/no-require-imports': 'warn',
|
|
34
|
-
'no-undef': 'off', // TypeScript handles this
|
|
35
|
-
'no-useless-catch': 'warn',
|
|
36
|
-
'no-case-declarations': 'warn',
|
|
37
|
-
'no-useless-escape': 'warn',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
ignores: ['dist/**', 'node_modules/**', '**/*.js'],
|
|
42
|
-
},
|
|
43
|
-
];
|
package/scripts/README.md
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# Release Scripts
|
|
2
|
-
|
|
3
|
-
Simple automation scripts for CodeMie Code releases following KISS principles.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
### Main Release Script
|
|
8
|
-
|
|
9
|
-
The `release.sh` script automates the complete release process:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
# Release specific version
|
|
13
|
-
./scripts/release.sh 0.0.3
|
|
14
|
-
|
|
15
|
-
# Auto-increment patch version (0.0.2 → 0.0.3)
|
|
16
|
-
./scripts/release.sh
|
|
17
|
-
|
|
18
|
-
# Preview what would be done (dry run)
|
|
19
|
-
./scripts/release.sh --dry-run
|
|
20
|
-
|
|
21
|
-
# Preview specific version
|
|
22
|
-
./scripts/release.sh 0.0.3 --dry-run
|
|
23
|
-
|
|
24
|
-
# Show help
|
|
25
|
-
./scripts/release.sh --help
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## What it does
|
|
29
|
-
|
|
30
|
-
The script follows the release process defined in the release-manager documentation:
|
|
31
|
-
|
|
32
|
-
1. **Pre-flight checks**: Validates git status and existing tags
|
|
33
|
-
2. **Version determination**: Auto-increments patch version or uses provided version
|
|
34
|
-
3. **Version update**: Updates `package.json` and `package-lock.json`
|
|
35
|
-
4. **Git operations**: Commits changes, creates annotated tag, pushes to origin
|
|
36
|
-
5. **GitHub release**: Creates GitHub release with auto-generated notes (if `gh` CLI available)
|
|
37
|
-
|
|
38
|
-
## Requirements
|
|
39
|
-
|
|
40
|
-
- `git` - Version control operations
|
|
41
|
-
- `npm` - Package version management
|
|
42
|
-
- `gh` (optional) - GitHub release creation
|
|
43
|
-
|
|
44
|
-
If `gh` CLI is not available, the script will provide a manual link to create the GitHub release.
|
|
45
|
-
|
|
46
|
-
## Release Process
|
|
47
|
-
|
|
48
|
-
Based on CLAUDE.md, the complete release flow is:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
# From CLAUDE.md:
|
|
52
|
-
git tag -a v0.0.1 -m "Release version 0.0.1" # Create release tag
|
|
53
|
-
git push origin v0.0.1 # Push tag to trigger publish
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
The script automates this by:
|
|
57
|
-
1. Using `npm version` to update package files
|
|
58
|
-
2. Creating proper commit message with Claude Code attribution
|
|
59
|
-
3. Creating annotated git tag
|
|
60
|
-
4. Pushing both commit and tag
|
|
61
|
-
5. Creating GitHub release (triggers npm publish workflow)
|
|
62
|
-
|
|
63
|
-
## Error Handling
|
|
64
|
-
|
|
65
|
-
The script includes basic error handling:
|
|
66
|
-
- Warns about uncommitted changes (allows override)
|
|
67
|
-
- Checks for existing tags (allows override)
|
|
68
|
-
- Validates git repository state
|
|
69
|
-
- Uses `set -e` to exit on errors
|
|
70
|
-
|
|
71
|
-
## Simple by Design
|
|
72
|
-
|
|
73
|
-
Following KISS principles, this script:
|
|
74
|
-
- Is a single file with no dependencies
|
|
75
|
-
- Uses basic bash constructs
|
|
76
|
-
- Provides clear output and prompts
|
|
77
|
-
- Handles the most common release scenarios
|
|
78
|
-
- Can be extended easily if needed
|
|
79
|
-
|
|
80
|
-
The release-manager agent can run this script instead of individual git commands, making releases more reliable and consistent.
|
package/scripts/release.sh
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
set -e
|
|
3
|
-
|
|
4
|
-
# CodeMie Code Release Script
|
|
5
|
-
# Simple script to automate releases following KISS principles
|
|
6
|
-
|
|
7
|
-
DRY_RUN=false
|
|
8
|
-
VERSION=""
|
|
9
|
-
|
|
10
|
-
# Parse arguments
|
|
11
|
-
while [[ $# -gt 0 ]]; do
|
|
12
|
-
case $1 in
|
|
13
|
-
--dry-run) DRY_RUN=true; shift ;;
|
|
14
|
-
--help|-h)
|
|
15
|
-
echo "Usage: $0 [VERSION] [--dry-run]"
|
|
16
|
-
echo "Examples:"
|
|
17
|
-
echo " $0 0.0.3 # Release version 0.0.3"
|
|
18
|
-
echo " $0 --dry-run # Preview next patch release"
|
|
19
|
-
exit 0 ;;
|
|
20
|
-
*) VERSION="$1"; shift ;;
|
|
21
|
-
esac
|
|
22
|
-
done
|
|
23
|
-
|
|
24
|
-
# Get current version
|
|
25
|
-
CURRENT=$(grep '"version"' package.json | sed 's/.*"version": "\(.*\)".*/\1/')
|
|
26
|
-
echo "Current version: $CURRENT"
|
|
27
|
-
|
|
28
|
-
# Determine target version
|
|
29
|
-
if [[ -z "$VERSION" ]]; then
|
|
30
|
-
# Auto-increment patch version
|
|
31
|
-
IFS='.' read -r major minor patch <<< "$CURRENT"
|
|
32
|
-
VERSION="$major.$minor.$((patch + 1))"
|
|
33
|
-
echo "Auto-incrementing to: $VERSION"
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
echo "Target version: $VERSION"
|
|
37
|
-
|
|
38
|
-
# Pre-flight checks
|
|
39
|
-
echo ""
|
|
40
|
-
echo "🔍 Pre-flight checks:"
|
|
41
|
-
|
|
42
|
-
# Check git status
|
|
43
|
-
if ! git diff --quiet || ! git diff --cached --quiet; then
|
|
44
|
-
echo "❌ Working directory has uncommitted changes"
|
|
45
|
-
if [[ "$DRY_RUN" == "false" ]]; then
|
|
46
|
-
read -p "Continue anyway? (y/N): " -n 1 -r
|
|
47
|
-
echo
|
|
48
|
-
[[ ! $REPLY =~ ^[Yy]$ ]] && exit 1
|
|
49
|
-
fi
|
|
50
|
-
else
|
|
51
|
-
echo "✅ Working directory is clean"
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
# Check if version tag exists
|
|
55
|
-
if git tag -l "v$VERSION" | grep -q "v$VERSION"; then
|
|
56
|
-
echo "⚠️ Tag v$VERSION already exists"
|
|
57
|
-
if [[ "$DRY_RUN" == "false" ]]; then
|
|
58
|
-
read -p "Continue anyway? (y/N): " -n 1 -r
|
|
59
|
-
echo
|
|
60
|
-
[[ ! $REPLY =~ ^[Yy]$ ]] && exit 1
|
|
61
|
-
fi
|
|
62
|
-
else
|
|
63
|
-
echo "✅ Tag v$VERSION does not exist"
|
|
64
|
-
fi
|
|
65
|
-
|
|
66
|
-
# Show what will be done
|
|
67
|
-
echo ""
|
|
68
|
-
echo "📋 Actions that will be performed:"
|
|
69
|
-
echo "1. Update package.json version to $VERSION"
|
|
70
|
-
echo "2. Commit version bump"
|
|
71
|
-
echo "3. Create git tag v$VERSION"
|
|
72
|
-
echo "4. Push commit and tag to origin"
|
|
73
|
-
if command -v gh >/dev/null 2>&1; then
|
|
74
|
-
echo "5. Create GitHub Release (if gh CLI available)"
|
|
75
|
-
fi
|
|
76
|
-
|
|
77
|
-
if [[ "$DRY_RUN" == "true" ]]; then
|
|
78
|
-
echo ""
|
|
79
|
-
echo "🔍 DRY RUN - No changes will be made"
|
|
80
|
-
exit 0
|
|
81
|
-
fi
|
|
82
|
-
|
|
83
|
-
echo ""
|
|
84
|
-
read -p "❓ Proceed with release? (y/N): " -n 1 -r
|
|
85
|
-
echo
|
|
86
|
-
[[ ! $REPLY =~ ^[Yy]$ ]] && exit 1
|
|
87
|
-
|
|
88
|
-
# Execute release
|
|
89
|
-
echo ""
|
|
90
|
-
echo "🚀 Executing release..."
|
|
91
|
-
|
|
92
|
-
# Update version in package.json and package-lock.json
|
|
93
|
-
echo "📝 Updating package versions..."
|
|
94
|
-
npm version "$VERSION" --no-git-tag-version
|
|
95
|
-
|
|
96
|
-
# Commit changes
|
|
97
|
-
echo "💾 Committing version bump..."
|
|
98
|
-
git add package.json package-lock.json
|
|
99
|
-
git commit -m "chore: bump version to $VERSION
|
|
100
|
-
|
|
101
|
-
🤖 Generated with release script"
|
|
102
|
-
|
|
103
|
-
# Create tag
|
|
104
|
-
echo "🏷️ Creating tag v$VERSION..."
|
|
105
|
-
git tag -a "v$VERSION" -m "Release version $VERSION"
|
|
106
|
-
|
|
107
|
-
# Push to origin
|
|
108
|
-
echo "📤 Pushing to origin..."
|
|
109
|
-
git push origin main
|
|
110
|
-
git push origin "v$VERSION"
|
|
111
|
-
|
|
112
|
-
# Create GitHub release if gh CLI is available
|
|
113
|
-
if command -v gh >/dev/null 2>&1; then
|
|
114
|
-
echo "🐱 Creating GitHub Release..."
|
|
115
|
-
|
|
116
|
-
# Generate simple release notes
|
|
117
|
-
LAST_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
|
|
118
|
-
if [[ -n "$LAST_TAG" ]]; then
|
|
119
|
-
COMMITS=$(git log "$LAST_TAG..HEAD" --oneline --no-merges | wc -l)
|
|
120
|
-
RANGE="$LAST_TAG..v$VERSION"
|
|
121
|
-
else
|
|
122
|
-
COMMITS=$(git rev-list --count HEAD)
|
|
123
|
-
RANGE="v$VERSION"
|
|
124
|
-
fi
|
|
125
|
-
|
|
126
|
-
# Create release notes
|
|
127
|
-
cat > /tmp/release-notes.md << EOF
|
|
128
|
-
## What's Changed
|
|
129
|
-
|
|
130
|
-
This release includes $COMMITS commits with improvements and updates.
|
|
131
|
-
|
|
132
|
-
### Recent Changes:
|
|
133
|
-
$(git log --oneline --no-merges -10 ${LAST_TAG:+$LAST_TAG..HEAD} | sed 's/^/- /')
|
|
134
|
-
|
|
135
|
-
**Full Changelog**: https://github.com/EPMCDME/codemie-ai/compare/${LAST_TAG:-initial}...v$VERSION
|
|
136
|
-
EOF
|
|
137
|
-
|
|
138
|
-
gh release create "v$VERSION" \
|
|
139
|
-
--title "Release v$VERSION" \
|
|
140
|
-
--notes-file /tmp/release-notes.md \
|
|
141
|
-
--latest
|
|
142
|
-
|
|
143
|
-
rm -f /tmp/release-notes.md
|
|
144
|
-
echo "✅ GitHub Release created"
|
|
145
|
-
else
|
|
146
|
-
echo "⚠️ GitHub CLI not available - create release manually at:"
|
|
147
|
-
echo " https://github.com/EPMCDME/codemie-ai/releases/new?tag=v$VERSION"
|
|
148
|
-
fi
|
|
149
|
-
|
|
150
|
-
echo ""
|
|
151
|
-
echo "🎉 Release v$VERSION completed successfully!"
|
|
152
|
-
echo ""
|
|
153
|
-
echo "📦 Next steps:"
|
|
154
|
-
echo "• Monitor GitHub Actions for npm publish: https://github.com/EPMCDME/codemie-ai/actions"
|
|
155
|
-
echo "• Package will be available: npm install @codemieai/code@$VERSION"
|
|
156
|
-
echo "• View release: https://github.com/EPMCDME/codemie-ai/releases/tag/v$VERSION"
|