kolega-code 0.1.0__tar.gz
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.
- kolega_code-0.1.0/.env.example +14 -0
- kolega_code-0.1.0/.github/workflows/docs.yml +59 -0
- kolega_code-0.1.0/.github/workflows/release.yml +87 -0
- kolega_code-0.1.0/.gitignore +12 -0
- kolega_code-0.1.0/CONTRIBUTING.md +73 -0
- kolega_code-0.1.0/LICENSE +21 -0
- kolega_code-0.1.0/PKG-INFO +157 -0
- kolega_code-0.1.0/README.md +89 -0
- kolega_code-0.1.0/RELEASING.md +76 -0
- kolega_code-0.1.0/SECURITY.md +29 -0
- kolega_code-0.1.0/conftest.py +34 -0
- kolega_code-0.1.0/docs/.gitignore +21 -0
- kolega_code-0.1.0/docs/README.md +50 -0
- kolega_code-0.1.0/docs/astro.config.mjs +103 -0
- kolega_code-0.1.0/docs/package-lock.json +6897 -0
- kolega_code-0.1.0/docs/package.json +20 -0
- kolega_code-0.1.0/docs/public/favicon.svg +6 -0
- kolega_code-0.1.0/docs/src/assets/kolega-dark.svg +5 -0
- kolega_code-0.1.0/docs/src/assets/kolega-light.svg +5 -0
- kolega_code-0.1.0/docs/src/content/docs/cli/ask.md +97 -0
- kolega_code-0.1.0/docs/src/content/docs/cli/doctor.md +60 -0
- kolega_code-0.1.0/docs/src/content/docs/cli/overview.md +80 -0
- kolega_code-0.1.0/docs/src/content/docs/cli/sessions.md +66 -0
- kolega_code-0.1.0/docs/src/content/docs/concepts/agents.md +44 -0
- kolega_code-0.1.0/docs/src/content/docs/concepts/how-it-works.md +57 -0
- kolega_code-0.1.0/docs/src/content/docs/concepts/tools.md +64 -0
- kolega_code-0.1.0/docs/src/content/docs/configuration/environment-variables.md +100 -0
- kolega_code-0.1.0/docs/src/content/docs/configuration/providers-and-models.mdx +92 -0
- kolega_code-0.1.0/docs/src/content/docs/configuration/settings-and-api-keys.mdx +78 -0
- kolega_code-0.1.0/docs/src/content/docs/getting-started/installation.mdx +80 -0
- kolega_code-0.1.0/docs/src/content/docs/getting-started/introduction.md +57 -0
- kolega_code-0.1.0/docs/src/content/docs/getting-started/quick-start.mdx +90 -0
- kolega_code-0.1.0/docs/src/content/docs/index.mdx +70 -0
- kolega_code-0.1.0/docs/src/content/docs/skills.mdx +91 -0
- kolega_code-0.1.0/docs/src/content/docs/tui/composer.md +77 -0
- kolega_code-0.1.0/docs/src/content/docs/tui/interface.md +58 -0
- kolega_code-0.1.0/docs/src/content/docs/tui/modes.md +54 -0
- kolega_code-0.1.0/docs/src/content/docs/tui/sessions-and-resume.md +55 -0
- kolega_code-0.1.0/docs/src/content/docs/tui/slash-commands.md +54 -0
- kolega_code-0.1.0/docs/src/content.config.ts +7 -0
- kolega_code-0.1.0/docs/src/styles/brand.css +143 -0
- kolega_code-0.1.0/docs/tsconfig.json +5 -0
- kolega_code-0.1.0/kolega_code/__init__.py +151 -0
- kolega_code-0.1.0/kolega_code/agent/__init__.py +42 -0
- kolega_code-0.1.0/kolega_code/agent/baseagent.py +998 -0
- kolega_code-0.1.0/kolega_code/agent/browseragent.py +123 -0
- kolega_code-0.1.0/kolega_code/agent/coder.py +157 -0
- kolega_code-0.1.0/kolega_code/agent/common.py +41 -0
- kolega_code-0.1.0/kolega_code/agent/compression.py +81 -0
- kolega_code-0.1.0/kolega_code/agent/context.py +112 -0
- kolega_code-0.1.0/kolega_code/agent/conversation.py +408 -0
- kolega_code-0.1.0/kolega_code/agent/generalagent.py +146 -0
- kolega_code-0.1.0/kolega_code/agent/investigationagent.py +123 -0
- kolega_code-0.1.0/kolega_code/agent/planningagent.py +187 -0
- kolega_code-0.1.0/kolega_code/agent/prompt_provider.py +196 -0
- kolega_code-0.1.0/kolega_code/agent/prompt_templates/agents/browser.j2 +102 -0
- kolega_code-0.1.0/kolega_code/agent/prompt_templates/agents/coder_cli_mode.j2 +127 -0
- kolega_code-0.1.0/kolega_code/agent/prompt_templates/agents/general.j2 +68 -0
- kolega_code-0.1.0/kolega_code/agent/prompt_templates/agents/investigation.j2 +72 -0
- kolega_code-0.1.0/kolega_code/agent/prompt_templates/common/frontend_guidance.md +36 -0
- kolega_code-0.1.0/kolega_code/agent/prompt_templates/common/kolega_md_instructions.md +14 -0
- kolega_code-0.1.0/kolega_code/agent/prompt_templates/environment_variables/workspace_env_vars.md +11 -0
- kolega_code-0.1.0/kolega_code/agent/prompt_templates/template_guidance/expo-template.md +379 -0
- kolega_code-0.1.0/kolega_code/agent/prompt_templates/template_guidance/html-website-template.md +3 -0
- kolega_code-0.1.0/kolega_code/agent/prompt_templates/template_guidance/mern-stack-template.md +3 -0
- kolega_code-0.1.0/kolega_code/agent/prompt_templates/template_guidance/react-vite-shadcdn-template.md +182 -0
- kolega_code-0.1.0/kolega_code/agent/prompts.py +192 -0
- kolega_code-0.1.0/kolega_code/agent/tests/__init__.py +0 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/__init__.py +0 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_anthropic_token_counting.py +633 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_billing_openai_cache.py +74 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_client.py +773 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_dashscope_mapping.py +32 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_error_boundary.py +322 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_exceptions.py +249 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_instrumented_client.py +536 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_instrumented_client_integration.py +547 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_langfuse_normalization.py +39 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_model_specs.py +17 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_openai_cached_tokens.py +58 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_openai_cached_tokens_stream.py +74 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_openai_message_conversion.py +30 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_openai_token_counting.py +687 -0
- kolega_code-0.1.0/kolega_code/agent/tests/llm/test_tool_execution_ids.py +193 -0
- kolega_code-0.1.0/kolega_code/agent/tests/services/__init__.py +1 -0
- kolega_code-0.1.0/kolega_code/agent/tests/services/test_browser.py +447 -0
- kolega_code-0.1.0/kolega_code/agent/tests/services/test_browser_parity.py +353 -0
- kolega_code-0.1.0/kolega_code/agent/tests/services/test_file_system.py +699 -0
- kolega_code-0.1.0/kolega_code/agent/tests/services/test_sandbox_terminal_input.py +98 -0
- kolega_code-0.1.0/kolega_code/agent/tests/services/test_terminal.py +154 -0
- kolega_code-0.1.0/kolega_code/agent/tests/services/test_terminal_command_tracking.py +385 -0
- kolega_code-0.1.0/kolega_code/agent/tests/services/test_terminal_state_serializer.py +262 -0
- kolega_code-0.1.0/kolega_code/agent/tests/test_agent_tools_inventory.py +267 -0
- kolega_code-0.1.0/kolega_code/agent/tests/test_base_agent.py +1942 -0
- kolega_code-0.1.0/kolega_code/agent/tests/test_coder_attachments.py +330 -0
- kolega_code-0.1.0/kolega_code/agent/tests/test_coder_prompt_extensions.py +61 -0
- kolega_code-0.1.0/kolega_code/agent/tests/test_commands.py +179 -0
- kolega_code-0.1.0/kolega_code/agent/tests/test_duplicate_tool_results.py +556 -0
- kolega_code-0.1.0/kolega_code/agent/tests/test_empty_message_handling.py +48 -0
- kolega_code-0.1.0/kolega_code/agent/tests/test_general_agent.py +242 -0
- kolega_code-0.1.0/kolega_code/agent/tests/test_html.py +320 -0
- kolega_code-0.1.0/kolega_code/agent/tests/test_parallel_tool_calls.py +291 -0
- kolega_code-0.1.0/kolega_code/agent/tests/test_planning_agent.py +227 -0
- kolega_code-0.1.0/kolega_code/agent/tests/test_prompt_provider.py +271 -0
- kolega_code-0.1.0/kolega_code/agent/tests/test_tool_registry.py +102 -0
- kolega_code-0.1.0/kolega_code/agent/tests/test_tools.py +549 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/__init__.py +0 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_agent_tool.py +356 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_base_tool.py +147 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_browser_tool.py +335 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_build_tool.py +93 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_create_file_tool.py +115 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_glob_tool.py +196 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_glob_tool_sandbox_parity.py +230 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_list_directory_tool.py +292 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_read_file_tool.py +173 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_replace_entire_file_tool.py +115 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_replace_lines_tool.py +141 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_search_and_replace_tool.py +174 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_search_codebase_tool.py +228 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_terminal_tool.py +482 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_think_hard_integration.py +189 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_think_hard_streaming.py +445 -0
- kolega_code-0.1.0/kolega_code/agent/tests/tool_backend/test_web_fetch_tool.py +194 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/agent_tool.py +414 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/apply_edit_tool.py +98 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/apply_patch_tool.py +514 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/base_tool.py +217 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/browser_tool.py +271 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/build_tool.py +93 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/create_file_tool.py +52 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/glob_tool.py +323 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/list_directory_tool.py +300 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/memory_tool.py +79 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/read_file_tool.py +119 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/replace_entire_file_tool.py +40 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/replace_lines_tool.py +97 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/search_and_replace_tool.py +146 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/search_codebase_tool.py +377 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/streaming_tool.py +47 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/terminal_tool.py +643 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/think_hard_tool.py +211 -0
- kolega_code-0.1.0/kolega_code/agent/tool_backend/web_fetch_tool.py +205 -0
- kolega_code-0.1.0/kolega_code/agent/tools.py +1704 -0
- kolega_code-0.1.0/kolega_code/agent/utils/commands.py +94 -0
- kolega_code-0.1.0/kolega_code/cli/__init__.py +1 -0
- kolega_code-0.1.0/kolega_code/cli/app.py +2756 -0
- kolega_code-0.1.0/kolega_code/cli/config.py +280 -0
- kolega_code-0.1.0/kolega_code/cli/connection.py +49 -0
- kolega_code-0.1.0/kolega_code/cli/file_index.py +147 -0
- kolega_code-0.1.0/kolega_code/cli/main.py +564 -0
- kolega_code-0.1.0/kolega_code/cli/mentions.py +155 -0
- kolega_code-0.1.0/kolega_code/cli/messages.py +89 -0
- kolega_code-0.1.0/kolega_code/cli/provider_registry.py +96 -0
- kolega_code-0.1.0/kolega_code/cli/session_store.py +207 -0
- kolega_code-0.1.0/kolega_code/cli/settings.py +87 -0
- kolega_code-0.1.0/kolega_code/cli/skills.py +409 -0
- kolega_code-0.1.0/kolega_code/cli/slash_commands.py +108 -0
- kolega_code-0.1.0/kolega_code/cli/tests/__init__.py +1 -0
- kolega_code-0.1.0/kolega_code/cli/tests/test_app.py +4251 -0
- kolega_code-0.1.0/kolega_code/cli/tests/test_cli_config.py +171 -0
- kolega_code-0.1.0/kolega_code/cli/tests/test_connection.py +26 -0
- kolega_code-0.1.0/kolega_code/cli/tests/test_file_index.py +103 -0
- kolega_code-0.1.0/kolega_code/cli/tests/test_main.py +455 -0
- kolega_code-0.1.0/kolega_code/cli/tests/test_mentions.py +108 -0
- kolega_code-0.1.0/kolega_code/cli/tests/test_session_store.py +67 -0
- kolega_code-0.1.0/kolega_code/cli/tests/test_settings.py +62 -0
- kolega_code-0.1.0/kolega_code/cli/tests/test_skills.py +157 -0
- kolega_code-0.1.0/kolega_code/cli/tests/test_slash_commands.py +88 -0
- kolega_code-0.1.0/kolega_code/cli/theme.py +180 -0
- kolega_code-0.1.0/kolega_code/config.py +154 -0
- kolega_code-0.1.0/kolega_code/events.py +202 -0
- kolega_code-0.1.0/kolega_code/llm/client.py +300 -0
- kolega_code-0.1.0/kolega_code/llm/exceptions.py +285 -0
- kolega_code-0.1.0/kolega_code/llm/instrumented_client.py +520 -0
- kolega_code-0.1.0/kolega_code/llm/models.py +1368 -0
- kolega_code-0.1.0/kolega_code/llm/providers/__init__.py +0 -0
- kolega_code-0.1.0/kolega_code/llm/providers/anthropic.py +387 -0
- kolega_code-0.1.0/kolega_code/llm/providers/base.py +71 -0
- kolega_code-0.1.0/kolega_code/llm/providers/google.py +157 -0
- kolega_code-0.1.0/kolega_code/llm/providers/models.py +37 -0
- kolega_code-0.1.0/kolega_code/llm/providers/openai.py +363 -0
- kolega_code-0.1.0/kolega_code/llm/ratelimit.py +40 -0
- kolega_code-0.1.0/kolega_code/llm/specs.py +67 -0
- kolega_code-0.1.0/kolega_code/llm/tool_execution_ids.py +18 -0
- kolega_code-0.1.0/kolega_code/models/__init__.py +9 -0
- kolega_code-0.1.0/kolega_code/models/sandbox_terminal_state.py +47 -0
- kolega_code-0.1.0/kolega_code/runtime.py +50 -0
- kolega_code-0.1.0/kolega_code/sandbox/README.md +200 -0
- kolega_code-0.1.0/kolega_code/sandbox/__init__.py +21 -0
- kolega_code-0.1.0/kolega_code/sandbox/async_filesystem.py +475 -0
- kolega_code-0.1.0/kolega_code/sandbox/base.py +297 -0
- kolega_code-0.1.0/kolega_code/sandbox/browser.py +25 -0
- kolega_code-0.1.0/kolega_code/sandbox/event_loop.py +43 -0
- kolega_code-0.1.0/kolega_code/sandbox/filesystem.py +341 -0
- kolega_code-0.1.0/kolega_code/sandbox/local.py +118 -0
- kolega_code-0.1.0/kolega_code/sandbox/serializer.py +175 -0
- kolega_code-0.1.0/kolega_code/sandbox/terminal.py +868 -0
- kolega_code-0.1.0/kolega_code/sandbox/utils.py +216 -0
- kolega_code-0.1.0/kolega_code/services/base.py +255 -0
- kolega_code-0.1.0/kolega_code/services/browser.py +444 -0
- kolega_code-0.1.0/kolega_code/services/file_system.py +749 -0
- kolega_code-0.1.0/kolega_code/services/html.py +221 -0
- kolega_code-0.1.0/kolega_code/services/terminal.py +903 -0
- kolega_code-0.1.0/kolega_code/tools/__init__.py +22 -0
- kolega_code-0.1.0/kolega_code/tools/core.py +33 -0
- kolega_code-0.1.0/kolega_code/tools/definitions.py +81 -0
- kolega_code-0.1.0/kolega_code/tools/registry.py +73 -0
- kolega_code-0.1.0/pyproject.toml +84 -0
- kolega_code-0.1.0/run_tests.sh +34 -0
- kolega_code-0.1.0/scripts/install-kolega-code +81 -0
- kolega_code-0.1.0/uv.lock +2546 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Local test credentials. Copy this file to `.env` and fill only the keys you need.
|
|
2
|
+
# `.env` is ignored by git; do not commit real secrets.
|
|
3
|
+
|
|
4
|
+
ANTHROPIC_API_KEY=
|
|
5
|
+
OPENAI_API_KEY=
|
|
6
|
+
GOOGLE_API_KEY=
|
|
7
|
+
MOONSHOT_API_KEY=
|
|
8
|
+
DEEPSEEK_API_KEY=
|
|
9
|
+
|
|
10
|
+
BROWSERLESS_API_KEY=
|
|
11
|
+
|
|
12
|
+
LANGFUSE_HOST=https://us.cloud.langfuse.com
|
|
13
|
+
LANGFUSE_PUBLIC_KEY=
|
|
14
|
+
LANGFUSE_SECRET_KEY=
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: Deploy Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- "docs/**"
|
|
8
|
+
- ".github/workflows/docs.yml"
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
# Allow this workflow to publish to GitHub Pages.
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
pages: write
|
|
15
|
+
id-token: write
|
|
16
|
+
|
|
17
|
+
# Allow one concurrent deployment; don't cancel an in-progress production deploy.
|
|
18
|
+
concurrency:
|
|
19
|
+
group: pages
|
|
20
|
+
cancel-in-progress: false
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
build:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
defaults:
|
|
26
|
+
run:
|
|
27
|
+
working-directory: docs
|
|
28
|
+
steps:
|
|
29
|
+
- name: Checkout
|
|
30
|
+
uses: actions/checkout@v4
|
|
31
|
+
|
|
32
|
+
- name: Setup Node
|
|
33
|
+
uses: actions/setup-node@v4
|
|
34
|
+
with:
|
|
35
|
+
node-version: 20
|
|
36
|
+
cache: npm
|
|
37
|
+
cache-dependency-path: docs/package-lock.json
|
|
38
|
+
|
|
39
|
+
- name: Install dependencies
|
|
40
|
+
run: npm ci
|
|
41
|
+
|
|
42
|
+
- name: Build site
|
|
43
|
+
run: npm run build
|
|
44
|
+
|
|
45
|
+
- name: Upload Pages artifact
|
|
46
|
+
uses: actions/upload-pages-artifact@v3
|
|
47
|
+
with:
|
|
48
|
+
path: docs/dist
|
|
49
|
+
|
|
50
|
+
deploy:
|
|
51
|
+
needs: build
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
environment:
|
|
54
|
+
name: github-pages
|
|
55
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
56
|
+
steps:
|
|
57
|
+
- name: Deploy to GitHub Pages
|
|
58
|
+
id: deployment
|
|
59
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
name: Build and test package
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Setup Python
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.11"
|
|
23
|
+
cache: pip
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
python -m pip install -e ".[dev]" build twine
|
|
29
|
+
|
|
30
|
+
- name: Verify tag matches package version
|
|
31
|
+
run: |
|
|
32
|
+
python - <<'PY'
|
|
33
|
+
import os
|
|
34
|
+
import sys
|
|
35
|
+
import tomllib
|
|
36
|
+
|
|
37
|
+
tag = os.environ["GITHUB_REF_NAME"]
|
|
38
|
+
with open("pyproject.toml", "rb") as fh:
|
|
39
|
+
version = tomllib.load(fh)["project"]["version"]
|
|
40
|
+
expected = f"v{version}"
|
|
41
|
+
if tag != expected:
|
|
42
|
+
print(f"Release tag {tag!r} does not match pyproject.toml version {version!r}; expected {expected!r}.")
|
|
43
|
+
sys.exit(1)
|
|
44
|
+
PY
|
|
45
|
+
|
|
46
|
+
- name: Run tests
|
|
47
|
+
run: python -m pytest -ra --durations=50 --import-mode=importlib -m "not slow"
|
|
48
|
+
|
|
49
|
+
- name: Build distributions
|
|
50
|
+
run: python -m build
|
|
51
|
+
|
|
52
|
+
- name: Check distributions
|
|
53
|
+
run: python -m twine check dist/*
|
|
54
|
+
|
|
55
|
+
- name: Smoke-test wheel
|
|
56
|
+
run: |
|
|
57
|
+
python -m venv /tmp/kolega-code-smoke
|
|
58
|
+
/tmp/kolega-code-smoke/bin/python -m pip install --upgrade pip
|
|
59
|
+
/tmp/kolega-code-smoke/bin/python -m pip install dist/*.whl
|
|
60
|
+
/tmp/kolega-code-smoke/bin/kolega-code --version
|
|
61
|
+
|
|
62
|
+
- name: Upload distributions
|
|
63
|
+
uses: actions/upload-artifact@v4
|
|
64
|
+
with:
|
|
65
|
+
name: python-distributions
|
|
66
|
+
path: dist/
|
|
67
|
+
if-no-files-found: error
|
|
68
|
+
|
|
69
|
+
publish:
|
|
70
|
+
name: Publish to PyPI
|
|
71
|
+
needs: build
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
environment:
|
|
74
|
+
name: pypi
|
|
75
|
+
url: https://pypi.org/p/kolega-code
|
|
76
|
+
permissions:
|
|
77
|
+
contents: read
|
|
78
|
+
id-token: write
|
|
79
|
+
steps:
|
|
80
|
+
- name: Download distributions
|
|
81
|
+
uses: actions/download-artifact@v4
|
|
82
|
+
with:
|
|
83
|
+
name: python-distributions
|
|
84
|
+
path: dist/
|
|
85
|
+
|
|
86
|
+
- name: Publish distributions to PyPI
|
|
87
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
## Local Setup
|
|
4
|
+
|
|
5
|
+
Kolega Code requires Python 3.11 or newer.
|
|
6
|
+
|
|
7
|
+
Install the CLI and development dependencies with `uv`:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
uv sync --extra cli --extra dev
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
If you prefer `pip`, install the package in editable mode:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install -e ".[cli,dev]"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Run the CLI locally:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
kolega-code .
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Some slow and integration tests require provider credentials. Copy the example
|
|
26
|
+
environment file only when you need those tests, and never commit real secrets:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
cp .env.example .env
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Tests
|
|
33
|
+
|
|
34
|
+
Run the fast test suite before opening a pull request:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
./run_tests.sh
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Run slow and integration tests only when you have the required credentials:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
./run_tests.sh --all
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
You can pass additional pytest arguments through the wrapper:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
./run_tests.sh kolega_code/agent/tests/llm/test_client.py -ra
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Documentation
|
|
53
|
+
|
|
54
|
+
The documentation site lives in `docs/`.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
cd docs
|
|
58
|
+
npm ci
|
|
59
|
+
npm run build
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Use `npm run dev` from `docs/` for local documentation development.
|
|
63
|
+
|
|
64
|
+
## Pull Requests
|
|
65
|
+
|
|
66
|
+
- Keep changes focused and avoid unrelated refactors.
|
|
67
|
+
- Add or update tests for behavior changes.
|
|
68
|
+
- Update documentation when user-facing behavior changes.
|
|
69
|
+
- Do not commit `.env`, local settings, credentials, API keys, tokens, or private
|
|
70
|
+
endpoints.
|
|
71
|
+
- Use obviously fake credential placeholders in tests and docs, not strings that
|
|
72
|
+
match real token formats.
|
|
73
|
+
- Report security issues privately according to `SECURITY.md`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kolega Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kolega-code
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local-first AI coding agent for the terminal
|
|
5
|
+
Project-URL: Homepage, https://kolega-ai.github.io/kolega-code/
|
|
6
|
+
Project-URL: Documentation, https://kolega-ai.github.io/kolega-code/
|
|
7
|
+
Project-URL: Repository, https://github.com/kolega-ai/kolega-code
|
|
8
|
+
Project-URL: Issues, https://github.com/kolega-ai/kolega-code/issues
|
|
9
|
+
Author: Kolega Team
|
|
10
|
+
License: MIT License
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2026 Kolega Team
|
|
13
|
+
|
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
in the Software without restriction, including without limitation the rights
|
|
17
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
furnished to do so, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
copies or substantial portions of the Software.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
SOFTWARE.
|
|
31
|
+
License-File: LICENSE
|
|
32
|
+
Keywords: agent,ai,cli,coding-agent,developer-tools
|
|
33
|
+
Classifier: Development Status :: 3 - Alpha
|
|
34
|
+
Classifier: Environment :: Console
|
|
35
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
36
|
+
Classifier: Operating System :: MacOS
|
|
37
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
38
|
+
Classifier: Programming Language :: Python :: 3
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
41
|
+
Classifier: Topic :: Software Development
|
|
42
|
+
Classifier: Topic :: Utilities
|
|
43
|
+
Requires-Python: >=3.11
|
|
44
|
+
Requires-Dist: anthropic==0.101.0
|
|
45
|
+
Requires-Dist: beautifulsoup4==4.14.3
|
|
46
|
+
Requires-Dist: browser-use==0.1.40
|
|
47
|
+
Requires-Dist: google-genai==2.0.1
|
|
48
|
+
Requires-Dist: jinja2==3.1.6
|
|
49
|
+
Requires-Dist: langfuse==3.14.5
|
|
50
|
+
Requires-Dist: nest-asyncio==1.6.0
|
|
51
|
+
Requires-Dist: openai==1.109.1
|
|
52
|
+
Requires-Dist: pathspec==1.1.1
|
|
53
|
+
Requires-Dist: playwright==1.59.0
|
|
54
|
+
Requires-Dist: psutil==7.2.2
|
|
55
|
+
Requires-Dist: pydantic==2.13.4
|
|
56
|
+
Requires-Dist: python-dotenv==1.2.2
|
|
57
|
+
Requires-Dist: pyyaml==6.0.3
|
|
58
|
+
Requires-Dist: tenacity==9.1.4
|
|
59
|
+
Requires-Dist: textual==8.2.5
|
|
60
|
+
Requires-Dist: tiktoken==0.12.0
|
|
61
|
+
Requires-Dist: trafilatura==2.0.0
|
|
62
|
+
Provides-Extra: cli
|
|
63
|
+
Provides-Extra: dev
|
|
64
|
+
Requires-Dist: pytest-asyncio==1.3.0; extra == 'dev'
|
|
65
|
+
Requires-Dist: pytest==9.0.3; extra == 'dev'
|
|
66
|
+
Requires-Dist: ruff==0.15.12; extra == 'dev'
|
|
67
|
+
Description-Content-Type: text/markdown
|
|
68
|
+
|
|
69
|
+
# kolega-code
|
|
70
|
+
|
|
71
|
+
Kolega Code is a local-first AI coding agent for the terminal.
|
|
72
|
+
|
|
73
|
+
The package owns the `kolega_code` import namespace and provides the
|
|
74
|
+
`kolega-code` command.
|
|
75
|
+
|
|
76
|
+
## Install
|
|
77
|
+
|
|
78
|
+
Install with the public installer:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
curl -fsSL https://kolega.dev/install-kolega-code | sh
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Or install directly from PyPI with uv:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
uv tool install kolega-code
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Verify the command is available:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
kolega-code --version
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Upgrade or uninstall:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
uv tool upgrade kolega-code
|
|
100
|
+
uv tool uninstall kolega-code
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Run the Textual UI and open the Settings tab to select Moonshot Kimi K2.6 or DeepSeek V4 Pro and save your API key:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
kolega-code .
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
In the Textual UI, press `Shift+Tab` to switch between build mode and planning mode. Planning mode uses a standalone read-only planning agent; when it submits a complete plan, choose whether to implement it or keep discussing the plan.
|
|
110
|
+
|
|
111
|
+
All CLI sessions use the CLI-specific coding-agent prompt, including resumed sessions. Launching the UI starts a fresh thread by default. Resume an existing thread explicitly:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
kolega-code . --resume
|
|
115
|
+
kolega-code . --resume <thread-or-session-id>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
You can also set `MOONSHOT_API_KEY`, `DEEPSEEK_API_KEY`, or keep using env/flag based configuration for non-UI commands:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
kolega-code ask "summarize this repository" --project .
|
|
122
|
+
kolega-code ask "summarize this repository" --project . --provider deepseek --model deepseek-v4-pro
|
|
123
|
+
kolega-code sessions list --project .
|
|
124
|
+
kolega-code doctor --project .
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The Settings UI supports Moonshot `kimi-k2.6` and DeepSeek `deepseek-v4-pro`. A saved UI selection is used for all agent model roles and API keys are stored in the local CLI settings file with restrictive permissions. Existing environment and model/provider flag overrides continue to work. Local session state is stored under the platform state directory unless `KOLEGA_CODE_STATE_DIR` is set.
|
|
128
|
+
|
|
129
|
+
## From source
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
git clone https://github.com/kolega-ai/kolega-code.git
|
|
133
|
+
cd kolega-code
|
|
134
|
+
uv sync --extra dev
|
|
135
|
+
uv run kolega-code --version
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Tests
|
|
139
|
+
|
|
140
|
+
Fast tests run by default:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
./run_tests.sh
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Some slow and integration tests require real provider credentials. To run them locally, create an ignored `.env` file from the example and fill only the keys you need:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
cp .env.example .env
|
|
150
|
+
./run_tests.sh --all
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
The test runner loads `.env` through pytest and keeps existing shell environment variables higher priority than values in the file. You can pass additional pytest arguments through the wrapper:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
./run_tests.sh kolega_code/agent/tests/llm/test_client.py -ra
|
|
157
|
+
```
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# kolega-code
|
|
2
|
+
|
|
3
|
+
Kolega Code is a local-first AI coding agent for the terminal.
|
|
4
|
+
|
|
5
|
+
The package owns the `kolega_code` import namespace and provides the
|
|
6
|
+
`kolega-code` command.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
Install with the public installer:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
curl -fsSL https://kolega.dev/install-kolega-code | sh
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Or install directly from PyPI with uv:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
uv tool install kolega-code
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Verify the command is available:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
kolega-code --version
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Upgrade or uninstall:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
uv tool upgrade kolega-code
|
|
32
|
+
uv tool uninstall kolega-code
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Run the Textual UI and open the Settings tab to select Moonshot Kimi K2.6 or DeepSeek V4 Pro and save your API key:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
kolega-code .
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
In the Textual UI, press `Shift+Tab` to switch between build mode and planning mode. Planning mode uses a standalone read-only planning agent; when it submits a complete plan, choose whether to implement it or keep discussing the plan.
|
|
42
|
+
|
|
43
|
+
All CLI sessions use the CLI-specific coding-agent prompt, including resumed sessions. Launching the UI starts a fresh thread by default. Resume an existing thread explicitly:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
kolega-code . --resume
|
|
47
|
+
kolega-code . --resume <thread-or-session-id>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
You can also set `MOONSHOT_API_KEY`, `DEEPSEEK_API_KEY`, or keep using env/flag based configuration for non-UI commands:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
kolega-code ask "summarize this repository" --project .
|
|
54
|
+
kolega-code ask "summarize this repository" --project . --provider deepseek --model deepseek-v4-pro
|
|
55
|
+
kolega-code sessions list --project .
|
|
56
|
+
kolega-code doctor --project .
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The Settings UI supports Moonshot `kimi-k2.6` and DeepSeek `deepseek-v4-pro`. A saved UI selection is used for all agent model roles and API keys are stored in the local CLI settings file with restrictive permissions. Existing environment and model/provider flag overrides continue to work. Local session state is stored under the platform state directory unless `KOLEGA_CODE_STATE_DIR` is set.
|
|
60
|
+
|
|
61
|
+
## From source
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
git clone https://github.com/kolega-ai/kolega-code.git
|
|
65
|
+
cd kolega-code
|
|
66
|
+
uv sync --extra dev
|
|
67
|
+
uv run kolega-code --version
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Tests
|
|
71
|
+
|
|
72
|
+
Fast tests run by default:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
./run_tests.sh
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Some slow and integration tests require real provider credentials. To run them locally, create an ignored `.env` file from the example and fill only the keys you need:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
cp .env.example .env
|
|
82
|
+
./run_tests.sh --all
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The test runner loads `.env` through pytest and keeps existing shell environment variables higher priority than values in the file. You can pass additional pytest arguments through the wrapper:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
./run_tests.sh kolega_code/agent/tests/llm/test_client.py -ra
|
|
89
|
+
```
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Releasing Kolega Code
|
|
2
|
+
|
|
3
|
+
This project publishes the `kolega-code` package to PyPI and serves the public
|
|
4
|
+
installer from `https://kolega.dev/install-kolega-code`.
|
|
5
|
+
|
|
6
|
+
## First PyPI release
|
|
7
|
+
|
|
8
|
+
The first release can be published from the existing maintainer PyPI user
|
|
9
|
+
account, then transferred to the Kolega PyPI organization after PyPI approves
|
|
10
|
+
the organization request.
|
|
11
|
+
|
|
12
|
+
1. In PyPI, create a pending Trusted Publisher under the maintainer user account.
|
|
13
|
+
|
|
14
|
+
Use these values:
|
|
15
|
+
|
|
16
|
+
- PyPI project name: `kolega-code`
|
|
17
|
+
- GitHub owner: `kolega-ai`
|
|
18
|
+
- GitHub repository: `kolega-code`
|
|
19
|
+
- Workflow filename: `release.yml`
|
|
20
|
+
- Environment name: `pypi`
|
|
21
|
+
|
|
22
|
+
2. In GitHub, create an environment named `pypi`.
|
|
23
|
+
|
|
24
|
+
Require approval from trusted maintainers before deployment. The release
|
|
25
|
+
workflow will pause before publishing to PyPI.
|
|
26
|
+
|
|
27
|
+
3. Confirm `pyproject.toml` has the release version.
|
|
28
|
+
|
|
29
|
+
4. Create and push a matching tag:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
git tag v0.1.0
|
|
33
|
+
git push origin v0.1.0
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
5. Approve the `pypi` environment deployment in GitHub Actions.
|
|
37
|
+
|
|
38
|
+
6. Verify the release:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
uv tool install --force kolega-code
|
|
42
|
+
kolega-code --version
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Installer handoff
|
|
46
|
+
|
|
47
|
+
The canonical installer source is tracked at:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
scripts/install-kolega-code
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The `kolega.dev` site repo should publish that file verbatim at:
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
https://kolega.dev/install-kolega-code
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
After updating the site, verify:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
curl -fsSL https://kolega.dev/install-kolega-code | sh
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Transfer to the PyPI organization
|
|
66
|
+
|
|
67
|
+
After the Kolega PyPI organization is approved:
|
|
68
|
+
|
|
69
|
+
1. Open the PyPI organization page.
|
|
70
|
+
2. Go to **Projects**.
|
|
71
|
+
3. Transfer the existing `kolega-code` project from the maintainer user account.
|
|
72
|
+
4. Confirm maintainers and teams have the expected permissions.
|
|
73
|
+
5. Re-check the `kolega-code` project **Publishing** page and confirm the
|
|
74
|
+
Trusted Publisher still points at `kolega-ai/kolega-code` and `release.yml`.
|
|
75
|
+
|
|
76
|
+
The package name and install commands stay the same after transfer.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Kolega Code is currently pre-1.0. Security reports are accepted for the latest
|
|
6
|
+
`main` branch and the latest published release. Older prerelease versions are
|
|
7
|
+
supported only when the issue is still reproducible on `main`.
|
|
8
|
+
|
|
9
|
+
## Reporting a Vulnerability
|
|
10
|
+
|
|
11
|
+
Do not open public GitHub issues for suspected vulnerabilities.
|
|
12
|
+
|
|
13
|
+
Use GitHub private vulnerability reporting from the repository's Security tab.
|
|
14
|
+
If that is unavailable, contact a maintainer privately and ask for a secure
|
|
15
|
+
reporting channel before sharing exploit details.
|
|
16
|
+
|
|
17
|
+
Please include:
|
|
18
|
+
|
|
19
|
+
- The affected version, commit, or branch.
|
|
20
|
+
- The expected and observed behavior.
|
|
21
|
+
- Steps to reproduce the issue.
|
|
22
|
+
- Any proof of concept, logs, or stack traces.
|
|
23
|
+
- The impact you believe the issue has.
|
|
24
|
+
|
|
25
|
+
## Disclosure
|
|
26
|
+
|
|
27
|
+
Maintainers will triage reports privately and coordinate disclosure after a fix
|
|
28
|
+
or mitigation is available. Please do not publish details until the maintainers
|
|
29
|
+
have had a reasonable opportunity to investigate and respond.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Shared pytest configuration for the repository."""
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
from dotenv import load_dotenv
|
|
7
|
+
|
|
8
|
+
from kolega_code.cli.config import API_KEY_ENV
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
CLI_CONFIG_ENV_KEYS = {
|
|
12
|
+
"KOLEGA_CODE_PROVIDER",
|
|
13
|
+
"KOLEGA_CODE_MODEL",
|
|
14
|
+
"KOLEGA_CODE_FAST_PROVIDER",
|
|
15
|
+
"KOLEGA_CODE_FAST_MODEL",
|
|
16
|
+
"KOLEGA_CODE_EDIT_PROVIDER",
|
|
17
|
+
"KOLEGA_CODE_EDIT_MODEL",
|
|
18
|
+
"KOLEGA_CODE_THINKING_PROVIDER",
|
|
19
|
+
"KOLEGA_CODE_THINKING_MODEL",
|
|
20
|
+
"KOLEGA_CODE_THINKING_TOKENS",
|
|
21
|
+
"KOLEGA_CODE_ENVIRONMENT",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def pytest_configure() -> None:
|
|
26
|
+
"""Load local test environment variables before test modules import."""
|
|
27
|
+
load_dotenv(Path(__file__).with_name(".env"), override=False)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@pytest.fixture
|
|
31
|
+
def isolated_cli_env(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
32
|
+
"""Remove process CLI config so unit tests don't depend on a developer .env."""
|
|
33
|
+
for key in {*API_KEY_ENV.values(), *CLI_CONFIG_ENV_KEYS}:
|
|
34
|
+
monkeypatch.delenv(key, raising=False)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# build output
|
|
2
|
+
dist/
|
|
3
|
+
|
|
4
|
+
# generated types
|
|
5
|
+
.astro/
|
|
6
|
+
|
|
7
|
+
# dependencies
|
|
8
|
+
node_modules/
|
|
9
|
+
|
|
10
|
+
# logs
|
|
11
|
+
npm-debug.log*
|
|
12
|
+
yarn-debug.log*
|
|
13
|
+
yarn-error.log*
|
|
14
|
+
pnpm-debug.log*
|
|
15
|
+
|
|
16
|
+
# environment variables
|
|
17
|
+
.env
|
|
18
|
+
.env.production
|
|
19
|
+
|
|
20
|
+
# macOS-specific files
|
|
21
|
+
.DS_Store
|