kiwi-code 0.0.447__tar.gz → 0.0.449__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.
- kiwi_code-0.0.449/.github/workflows/publish.yml +128 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/.github/workflows/test.yml +9 -1
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/PKG-INFO +87 -14
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/README.md +82 -10
- kiwi_code-0.0.449/docs/runtime_audit.html +881 -0
- kiwi_code-0.0.449/docs/social_login_e2e.md +108 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/pyproject.toml +8 -5
- kiwi_code-0.0.449/scripts/set_edition.py +70 -0
- kiwi_code-0.0.449/scripts/ws_auth_check.py +76 -0
- kiwi_code-0.0.449/src/common/banner.py +57 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_cli/__init__.py +1 -2
- kiwi_code-0.0.449/src/kiwi_cli/_edition.py +3 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_cli/auth.py +5 -3
- kiwi_code-0.0.449/src/kiwi_cli/autocode.py +109 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_cli/checkpoints.py +0 -2
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_cli/cli.py +43 -25
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_cli/client.py +114 -23
- kiwi_code-0.0.449/src/kiwi_cli/commands.py +520 -0
- kiwi_code-0.0.449/src/kiwi_cli/edition.py +52 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_cli/models.py +3 -1
- kiwi_code-0.0.449/src/kiwi_cli/oauth.py +128 -0
- kiwi_code-0.0.449/src/kiwi_cli/server.py +212 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_cli/terminal_mode.py +212 -178
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_runtime/__init__.py +1 -2
- kiwi_code-0.0.449/src/kiwi_runtime/auth.py +483 -0
- kiwi_code-0.0.449/src/kiwi_runtime/checkpoints.py +161 -0
- kiwi_code-0.0.449/src/kiwi_runtime/cli.py +429 -0
- kiwi_code-0.0.449/src/kiwi_runtime/commands.py +427 -0
- kiwi_code-0.0.449/src/kiwi_runtime/constants.py +10 -0
- kiwi_code-0.0.449/src/kiwi_runtime/fs/__init__.py +1 -0
- kiwi_code-0.0.449/src/kiwi_runtime/fs/batch.py +164 -0
- kiwi_code-0.0.449/src/kiwi_runtime/fs/codelens.py +214 -0
- kiwi_code-0.0.449/src/kiwi_runtime/fs/context.py +28 -0
- kiwi_code-0.0.449/src/kiwi_runtime/fs/handler.py +147 -0
- kiwi_code-0.0.449/src/kiwi_runtime/fs/paths.py +366 -0
- kiwi_code-0.0.449/src/kiwi_runtime/fs/read.py +653 -0
- kiwi_code-0.0.449/src/kiwi_runtime/fs/search.py +450 -0
- kiwi_code-0.0.449/src/kiwi_runtime/fs/text.py +255 -0
- kiwi_code-0.0.449/src/kiwi_runtime/fs/upload.py +211 -0
- kiwi_code-0.0.449/src/kiwi_runtime/fs/write.py +208 -0
- kiwi_code-0.0.449/src/kiwi_runtime/handlers.py +378 -0
- kiwi_code-0.0.449/src/kiwi_runtime/link.py +414 -0
- kiwi_code-0.0.449/src/kiwi_runtime/main.py +43 -0
- kiwi_code-0.0.449/src/kiwi_runtime/restricted.py +243 -0
- kiwi_code-0.0.449/src/kiwi_runtime/sessions.py +753 -0
- kiwi_code-0.0.449/src/kiwi_runtime/state.py +238 -0
- kiwi_code-0.0.449/src/kiwi_runtime/tui_bridge.py +263 -0
- kiwi_code-0.0.449/src/kiwi_runtime/ui.py +236 -0
- kiwi_code-0.0.449/src/kiwi_runtime/uploads.py +136 -0
- kiwi_code-0.0.449/src/kiwi_tui/__init__.py +3 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/main.py +107 -244
- kiwi_code-0.0.449/src/kiwi_tui/role_mode.py +256 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/runtime_agent.py +19 -3
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/screens/__init__.py +1 -2
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/screens/command_result.py +0 -10
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/screens/detach_files.py +1 -1
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/screens/id_picker.py +0 -19
- kiwi_code-0.0.449/src/kiwi_tui/screens/login.py +669 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/screens/runtime_cleanup.py +2 -18
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/screens/runtime_logs.py +0 -9
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/screens/term_dashboard.py +1010 -1625
- kiwi_code-0.0.449/src/kiwi_tui/screens/term_dashboard_css.py +634 -0
- kiwi_code-0.0.449/src/kiwi_tui/screens/term_dashboard_helpers.py +324 -0
- kiwi_code-0.0.449/src/kiwi_tui/screens/term_dashboard_widgets.py +666 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/slash_commands.py +16 -33
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/widgets.py +26 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/worktrees.py +0 -2
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/test_hello.py +1 -1
- kiwi_code-0.0.449/tests/__init__.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/conftest.py +19 -0
- kiwi_code-0.0.449/tests/test_account_server.py +564 -0
- kiwi_code-0.0.449/tests/test_autocode_actions.py +156 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_cli_help.py +9 -13
- kiwi_code-0.0.449/tests/test_fs_edit_fidelity.py +175 -0
- kiwi_code-0.0.449/tests/test_login_social.py +107 -0
- kiwi_code-0.0.449/tests/test_oauth.py +303 -0
- kiwi_code-0.0.449/tests/test_role_mode_injection.py +131 -0
- kiwi_code-0.0.449/tests/test_runtime_cleanup_per_account.py +77 -0
- kiwi_code-0.0.449/tests/test_runtime_connection.py +804 -0
- kiwi_code-0.0.449/tests/test_runtime_fixes.py +547 -0
- kiwi_code-0.0.449/tests/test_runtime_social_login.py +262 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_search_in_files_fs_tool.py +16 -0
- kiwi_code-0.0.449/tests/test_slash_commands.py +378 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_term_dashboard_ui.py +217 -13
- kiwi_code-0.0.449/tests/test_terminal_mode.py +47 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_tui_interactive_runtime.py +3 -91
- kiwi_code-0.0.449/uv.lock +1592 -0
- kiwi_code-0.0.447/.github/workflows/publish.yml +0 -77
- kiwi_code-0.0.447/CLAUDE.md +0 -79
- kiwi_code-0.0.447/src/kiwi_cli/commands.py +0 -282
- kiwi_code-0.0.447/src/kiwi_cli/server.py +0 -45
- kiwi_code-0.0.447/src/kiwi_runtime/main.py +0 -5364
- kiwi_code-0.0.447/src/kiwi_tui/__init__.py +0 -3
- kiwi_code-0.0.447/src/kiwi_tui/screens/dashboard.py +0 -3870
- kiwi_code-0.0.447/src/kiwi_tui/screens/login.py +0 -370
- kiwi_code-0.0.447/tests/test_slash_commands.py +0 -16
- kiwi_code-0.0.447/tests/test_terminal_mode.py +0 -107
- kiwi_code-0.0.447/tests/test_tui_headless.py +0 -1099
- kiwi_code-0.0.447/uv.lock +0 -1460
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/.gitignore +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/.python-version +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/Makefile +0 -0
- {kiwi_code-0.0.447/tests → kiwi_code-0.0.449/src/common}/__init__.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_cli/logger.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_cli/runtime_manager.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_runtime/__main__.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/inline_file_picker.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/random_words.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/screens/attach_content.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/screens/file_browser.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/screens/help.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/screens/slash_picker.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/status_words.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/term_app.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/src/kiwi_tui/ui_settings.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_batch_fs_tool.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_checkpoints.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_copy_path_fs_tool.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_imports.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_read_file_streaming.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_reexec_kiwi.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_runtime_log_trimming.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_tokens.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_tui_palette.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_unified_diff.py +0 -0
- {kiwi_code-0.0.447 → kiwi_code-0.0.449}/tests/test_worktrees.py +0 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
run-name: "Publish ${{ github.event.inputs.package && format('{0} {1}', github.event.inputs.package, github.event.inputs.version) || github.ref_name }}"
|
|
4
|
+
|
|
5
|
+
# kiwi-ai and kiwi-code are both built from main. The tag (or the manual inputs)
|
|
6
|
+
# says which one to publish:
|
|
7
|
+
# git tag kiwi-ai-v0.0.25 && git push origin kiwi-ai-v0.0.25
|
|
8
|
+
# git tag kiwi-code-v0.0.449 && git push origin kiwi-code-v0.0.449
|
|
9
|
+
on:
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
inputs:
|
|
12
|
+
package:
|
|
13
|
+
description: 'Package to publish'
|
|
14
|
+
required: true
|
|
15
|
+
type: choice
|
|
16
|
+
options:
|
|
17
|
+
- kiwi-ai
|
|
18
|
+
- kiwi-code
|
|
19
|
+
version:
|
|
20
|
+
description: 'Version to publish (e.g., 0.1.1)'
|
|
21
|
+
required: true
|
|
22
|
+
type: string
|
|
23
|
+
push:
|
|
24
|
+
tags:
|
|
25
|
+
- 'kiwi-ai-v*.*.*'
|
|
26
|
+
- 'kiwi-code-v*.*.*'
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
publish:
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
- name: Install uv
|
|
36
|
+
uses: astral-sh/setup-uv@v4
|
|
37
|
+
|
|
38
|
+
- name: Set up Python
|
|
39
|
+
run: uv python install 3.13
|
|
40
|
+
|
|
41
|
+
- name: Determine package and version
|
|
42
|
+
id: release
|
|
43
|
+
env:
|
|
44
|
+
INPUT_PACKAGE: ${{ github.event.inputs.package }}
|
|
45
|
+
INPUT_VERSION: ${{ github.event.inputs.version }}
|
|
46
|
+
run: |
|
|
47
|
+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
|
48
|
+
PACKAGE="$INPUT_PACKAGE"
|
|
49
|
+
VERSION="$INPUT_VERSION"
|
|
50
|
+
else
|
|
51
|
+
# kiwi-code-v0.0.449 -> kiwi-code, 0.0.449
|
|
52
|
+
PACKAGE="${GITHUB_REF_NAME%-v*}"
|
|
53
|
+
VERSION="${GITHUB_REF_NAME##*-v}"
|
|
54
|
+
fi
|
|
55
|
+
echo "package=$PACKAGE" >> "$GITHUB_OUTPUT"
|
|
56
|
+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
57
|
+
|
|
58
|
+
- name: Prepare ${{ steps.release.outputs.package }} build
|
|
59
|
+
run: |
|
|
60
|
+
python3 scripts/set_edition.py "${{ steps.release.outputs.package }}" "${{ steps.release.outputs.version }}"
|
|
61
|
+
grep -E '^(name|version) = ' pyproject.toml
|
|
62
|
+
cat src/kiwi_cli/_edition.py
|
|
63
|
+
|
|
64
|
+
- name: Install dependencies
|
|
65
|
+
run: uv sync
|
|
66
|
+
|
|
67
|
+
- name: Smoke test
|
|
68
|
+
env:
|
|
69
|
+
# Prevent any re-exec / process-renaming logic from interfering with CI.
|
|
70
|
+
_KIWI_PROC_RENAMED: "1"
|
|
71
|
+
KIWI_DISABLE_REEXEC: "1"
|
|
72
|
+
run: |
|
|
73
|
+
uv run kiwicli --help
|
|
74
|
+
uv run kiwi --help
|
|
75
|
+
uv run kiwi-runtime --help
|
|
76
|
+
uv run python -c "import kiwi_cli, kiwi_tui, kiwi_runtime; print('imports ok')"
|
|
77
|
+
|
|
78
|
+
- name: Build package
|
|
79
|
+
run: uv build
|
|
80
|
+
|
|
81
|
+
- name: Verify build artifacts
|
|
82
|
+
env:
|
|
83
|
+
PACKAGE: ${{ steps.release.outputs.package }}
|
|
84
|
+
VERSION: ${{ steps.release.outputs.version }}
|
|
85
|
+
run: |
|
|
86
|
+
ls -lh dist/
|
|
87
|
+
# Artifact names normalize the dash: kiwi-code -> kiwi_code
|
|
88
|
+
PREFIX="${PACKAGE//-/_}-${VERSION}"
|
|
89
|
+
for f in "dist/${PREFIX}.tar.gz" "dist/${PREFIX}-py3-none-any.whl"; do
|
|
90
|
+
if [ ! -f "$f" ]; then
|
|
91
|
+
echo "ERROR: expected $f"
|
|
92
|
+
exit 1
|
|
93
|
+
fi
|
|
94
|
+
done
|
|
95
|
+
# Install the wheel on its own and check it identifies as the right product.
|
|
96
|
+
uv run --isolated --no-project --with "dist/${PREFIX}-py3-none-any.whl" python - <<'EOF'
|
|
97
|
+
import os
|
|
98
|
+
from kiwi_cli.edition import EDITION, BACKEND_URL, VERSION
|
|
99
|
+
print(f"built: {EDITION} {VERSION} -> {BACKEND_URL}")
|
|
100
|
+
assert EDITION == os.environ["PACKAGE"], EDITION
|
|
101
|
+
assert VERSION == os.environ["VERSION"], VERSION
|
|
102
|
+
EOF
|
|
103
|
+
|
|
104
|
+
# Each package has its own PyPI token; pick it from the package actually built.
|
|
105
|
+
- name: Select PyPI token
|
|
106
|
+
id: pypi
|
|
107
|
+
run: |
|
|
108
|
+
PACKAGE=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['name'])")
|
|
109
|
+
case "$PACKAGE" in
|
|
110
|
+
kiwi-ai) SECRET=PYPI_TOKEN_KIWI_AI ;;
|
|
111
|
+
kiwi-code) SECRET=PYPI_TOKEN_KIWI_CODE ;;
|
|
112
|
+
*)
|
|
113
|
+
echo "ERROR: no PyPI token configured for package '$PACKAGE'"
|
|
114
|
+
exit 1
|
|
115
|
+
;;
|
|
116
|
+
esac
|
|
117
|
+
echo "Publishing $PACKAGE with secret $SECRET"
|
|
118
|
+
echo "secret=$SECRET" >> "$GITHUB_OUTPUT"
|
|
119
|
+
|
|
120
|
+
- name: Publish to PyPI
|
|
121
|
+
env:
|
|
122
|
+
UV_PUBLISH_TOKEN: ${{ secrets[steps.pypi.outputs.secret] }}
|
|
123
|
+
run: |
|
|
124
|
+
if [ -z "$UV_PUBLISH_TOKEN" ]; then
|
|
125
|
+
echo "ERROR: repository secret ${{ steps.pypi.outputs.secret }} is not set"
|
|
126
|
+
exit 1
|
|
127
|
+
fi
|
|
128
|
+
uv publish
|
|
@@ -12,13 +12,21 @@ concurrency:
|
|
|
12
12
|
|
|
13
13
|
jobs:
|
|
14
14
|
test:
|
|
15
|
-
name: pytest · py${{ matrix.python-version }} · ${{ matrix.os }}
|
|
15
|
+
name: pytest · ${{ matrix.edition }} · py${{ matrix.python-version }} · ${{ matrix.os }}
|
|
16
16
|
runs-on: ${{ matrix.os }}
|
|
17
17
|
strategy:
|
|
18
18
|
fail-fast: false
|
|
19
19
|
matrix:
|
|
20
20
|
os: [ubuntu-latest, macos-latest]
|
|
21
21
|
python-version: ["3.11", "3.12", "3.13"]
|
|
22
|
+
edition: [kiwi-ai]
|
|
23
|
+
# kiwi-code is built from the same code; run the suite once as kiwi-code too.
|
|
24
|
+
include:
|
|
25
|
+
- os: ubuntu-latest
|
|
26
|
+
python-version: "3.13"
|
|
27
|
+
edition: kiwi-code
|
|
28
|
+
env:
|
|
29
|
+
KIWI_EDITION: ${{ matrix.edition }}
|
|
22
30
|
|
|
23
31
|
steps:
|
|
24
32
|
- uses: actions/checkout@v4
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: kiwi-code
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.449
|
|
4
4
|
Summary: A textual-based terminal user interface application
|
|
5
|
-
Project-URL: Homepage, https://
|
|
5
|
+
Project-URL: Homepage, https://kiwicode.ai
|
|
6
6
|
Author-email: Anurag <anurag@meetkiwi.co>
|
|
7
7
|
License: Proprietary
|
|
8
8
|
Keywords: cli,terminal,textual,tui
|
|
@@ -14,11 +14,12 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
16
16
|
Requires-Python: <4.0,>=3.11
|
|
17
|
-
Requires-Dist:
|
|
17
|
+
Requires-Dist: codeglass>=0.1.2
|
|
18
18
|
Requires-Dist: httpx>=0.25.0
|
|
19
19
|
Requires-Dist: loguru>=0.7.3
|
|
20
20
|
Requires-Dist: psutil>=5.9.0
|
|
21
21
|
Requires-Dist: pydantic>=2.12.5
|
|
22
|
+
Requires-Dist: pykiwiai==0.0.13
|
|
22
23
|
Requires-Dist: setproctitle>=1.3.0
|
|
23
24
|
Requires-Dist: textual-dev>=1.8.0
|
|
24
25
|
Requires-Dist: textual>=8.1.1
|
|
@@ -47,18 +48,53 @@ Primary entrypoints:
|
|
|
47
48
|
### 1) Install
|
|
48
49
|
|
|
49
50
|
```bash
|
|
50
|
-
pip install kiwi-code
|
|
51
|
+
pip install kiwi-code # defaults to a Work account (app.meetkiwi.ai)
|
|
52
|
+
pip install kiwi-ai # defaults to a Personal account (kiwicode.ai)
|
|
51
53
|
```
|
|
52
54
|
|
|
55
|
+
Both packages are built from this repository and provide the same commands. Install one or the other, not both.
|
|
56
|
+
|
|
53
57
|
### 2) Log in from the terminal
|
|
54
58
|
|
|
55
59
|
```bash
|
|
56
60
|
kiwi login
|
|
57
61
|
```
|
|
58
62
|
|
|
59
|
-
|
|
63
|
+
Kiwi has two kinds of account, on separate servers. Login asks which one you have:
|
|
64
|
+
|
|
65
|
+
| Choice | Account | Sign-in |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| 1 | Work (app.meetkiwi.ai) | email and password |
|
|
68
|
+
| 2 | Personal (kiwicode.ai) | email and password, Google, Outlook |
|
|
69
|
+
|
|
70
|
+
The default is Personal for kiwi-ai and Work for kiwi-code.
|
|
71
|
+
|
|
72
|
+
To skip the question, name the account:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
kiwi login --account work
|
|
76
|
+
kiwi login --account personal
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Login then prompts for your email and password. Each server keeps its own login file, so
|
|
80
|
+
you can be signed in to both accounts at once:
|
|
81
|
+
|
|
82
|
+
| Server | Login file |
|
|
83
|
+
|---|---|
|
|
84
|
+
| Personal (kiwicode.ai) | `~/.kiwi/tokens.json` |
|
|
85
|
+
| Work (app.meetkiwi.ai) | `~/.kiwi/tokens-work.json` |
|
|
86
|
+
| dev | `~/.kiwi/tokens-dev.json` |
|
|
87
|
+
| local or a URL | `~/.kiwi/tokens-<host>.json` |
|
|
88
|
+
|
|
89
|
+
To use both side by side, name the account in each terminal:
|
|
60
90
|
|
|
61
|
-
|
|
91
|
+
```bash
|
|
92
|
+
kiwi --account work # one tab
|
|
93
|
+
kiwi --account personal # another tab
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
With no `--account` or `--server`, a command uses the account you logged in to most
|
|
97
|
+
recently (remembered in `~/.kiwi/server`).
|
|
62
98
|
|
|
63
99
|
You can inspect auth state anytime with:
|
|
64
100
|
|
|
@@ -69,7 +105,9 @@ kiwi whoami
|
|
|
69
105
|
To clear saved credentials:
|
|
70
106
|
|
|
71
107
|
```bash
|
|
72
|
-
kiwi logout
|
|
108
|
+
kiwi logout # the account you logged in to most recently
|
|
109
|
+
kiwi logout --account work # one account
|
|
110
|
+
kiwi logout --all # every account
|
|
73
111
|
```
|
|
74
112
|
|
|
75
113
|
### 3) Launch the TUI (unchanged default)
|
|
@@ -86,9 +124,11 @@ kiwi --server dev
|
|
|
86
124
|
|
|
87
125
|
Available presets:
|
|
88
126
|
|
|
89
|
-
- `app` (prod)
|
|
90
|
-
- `dev` (dev)
|
|
91
|
-
- `local` (localhost)
|
|
127
|
+
- `app` (prod): Personal (kiwicode.ai) for kiwi-ai and Work (app.meetkiwi.ai) for kiwi-code; `--account work` / `--account personal` pick Work / Personal in either
|
|
128
|
+
- `dev` (dev): `dev.api.myautobots.com`, for every account
|
|
129
|
+
- `local` (localhost): `localhost:8000`, for every account
|
|
130
|
+
|
|
131
|
+
`--server` also takes a full URL, for example `--server http://localhost:9000`.
|
|
92
132
|
|
|
93
133
|
### 4) Use terminal mode instead of the full-screen TUI
|
|
94
134
|
|
|
@@ -325,7 +365,22 @@ kiwi --terminal --no-stream --run-id <RUN_ID> "Continue"
|
|
|
325
365
|
```
|
|
326
366
|
|
|
327
367
|
- `--server`: `app | dev | local | <full url>`
|
|
328
|
-
- `--
|
|
368
|
+
- `--account`: `work | personal`. Picks the server when `--server` is `app` or not given.
|
|
369
|
+
On `dev`, `local` or a URL the server stays the same, and the account only decides how
|
|
370
|
+
to sign in: a work account has email and password, no Google or Outlook.
|
|
371
|
+
|
|
372
|
+
| `--server` | `--account` | Connects to |
|
|
373
|
+
|---|---|---|
|
|
374
|
+
| not given | not given | the server you logged in to; at login, asks Work or Personal (default: Personal for kiwi-ai, Work for kiwi-code) |
|
|
375
|
+
| not given, or `app` | `work` | Work (app.meetkiwi.ai) |
|
|
376
|
+
| not given, or `app` | `personal` | Personal (kiwicode.ai) |
|
|
377
|
+
| `app` | not given | Personal (kiwicode.ai) for kiwi-ai, Work (app.meetkiwi.ai) for kiwi-code |
|
|
378
|
+
| `dev` | any | `dev.api.myautobots.com` |
|
|
379
|
+
| `local` | any | `localhost:8000` |
|
|
380
|
+
| a URL | any | that URL |
|
|
381
|
+
- `--scope`: `restricted | full`. In the TUI you can also click the mode to switch it: the
|
|
382
|
+
`Mode:` line on the login screen, or `mode:restricted` in the top bar once signed in.
|
|
383
|
+
Switching replaces the current run's runtime with one in the new mode.
|
|
329
384
|
- `--allow PATH`: repeatable; additional allowed directories in restricted mode
|
|
330
385
|
- `--terminal`: run Kiwi in plain terminal mode instead of the full-screen TUI
|
|
331
386
|
- `--action-id`: start a fresh conversation for the given action
|
|
@@ -361,13 +416,17 @@ uv run python -m kiwi_runtime.main connect --server dev --scope restricted --all
|
|
|
361
416
|
|
|
362
417
|
Notes:
|
|
363
418
|
- `--server` supports presets: `app`, `dev`, `local` (or a full URL).
|
|
419
|
+
- `--account work|personal` picks the account; see [Server / flags](#server--flags). With
|
|
420
|
+
neither `--server`, `--account` nor `--token`, the runtime asks which account before login.
|
|
421
|
+
- `--login google|outlook` is for Personal (kiwicode.ai) accounts only.
|
|
364
422
|
- `--scope restricted` is the default; use `--allow` to add directories.
|
|
365
423
|
- The runtime prints connection status and will remain running until you stop it.
|
|
366
424
|
|
|
367
425
|
### Authentication
|
|
368
426
|
|
|
369
|
-
The runtime typically needs an access token. When you run the TUI and log in, your token is saved to
|
|
370
|
-
|
|
427
|
+
The runtime typically needs an access token. When you run the TUI and log in, your token is saved to the login file of that
|
|
428
|
+
server (`~/.kiwi/tokens.json` for personal, `~/.kiwi/tokens-work.json` for work; see
|
|
429
|
+
[Log in](#2-log-in-from-the-terminal)).
|
|
371
430
|
|
|
372
431
|
You can pass the token explicitly (if required by your setup):
|
|
373
432
|
|
|
@@ -415,12 +474,26 @@ uv sync
|
|
|
415
474
|
uv run python -m kiwi_tui.main --server dev
|
|
416
475
|
```
|
|
417
476
|
|
|
477
|
+
A checkout runs as kiwi-ai (`src/kiwi_cli/_edition.py`). Set `KIWI_EDITION=kiwi-code` to run it as kiwi-code.
|
|
478
|
+
|
|
418
479
|
Run tests:
|
|
419
480
|
|
|
420
481
|
```bash
|
|
421
482
|
uv run python -m pytest -q
|
|
483
|
+
KIWI_EDITION=kiwi-code uv run python -m pytest -q
|
|
422
484
|
```
|
|
423
485
|
|
|
486
|
+
## Releasing
|
|
487
|
+
|
|
488
|
+
kiwi-ai and kiwi-code are both published from `main`. The differences between them (package name, default backend, author) live in `EDITIONS` in `src/kiwi_cli/edition.py`. Push a tag naming the package and version:
|
|
489
|
+
|
|
490
|
+
```bash
|
|
491
|
+
git tag kiwi-code-v0.0.449 && git push origin kiwi-code-v0.0.449
|
|
492
|
+
git tag kiwi-ai-v0.0.25 && git push origin kiwi-ai-v0.0.25
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
The publish workflow runs `scripts/set_edition.py` to stamp the package name, version and edition into the build, checks the built wheel, and publishes with that package's token (`PYPI_TOKEN_KIWI_CODE` or `PYPI_TOKEN_KIWI_AI`). You can also run it manually from the Actions tab by choosing the package and version.
|
|
496
|
+
|
|
424
497
|
---
|
|
425
498
|
|
|
426
499
|
## License
|
|
@@ -18,18 +18,53 @@ Primary entrypoints:
|
|
|
18
18
|
### 1) Install
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
pip install kiwi-code
|
|
21
|
+
pip install kiwi-code # defaults to a Work account (app.meetkiwi.ai)
|
|
22
|
+
pip install kiwi-ai # defaults to a Personal account (kiwicode.ai)
|
|
22
23
|
```
|
|
23
24
|
|
|
25
|
+
Both packages are built from this repository and provide the same commands. Install one or the other, not both.
|
|
26
|
+
|
|
24
27
|
### 2) Log in from the terminal
|
|
25
28
|
|
|
26
29
|
```bash
|
|
27
30
|
kiwi login
|
|
28
31
|
```
|
|
29
32
|
|
|
30
|
-
|
|
33
|
+
Kiwi has two kinds of account, on separate servers. Login asks which one you have:
|
|
34
|
+
|
|
35
|
+
| Choice | Account | Sign-in |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| 1 | Work (app.meetkiwi.ai) | email and password |
|
|
38
|
+
| 2 | Personal (kiwicode.ai) | email and password, Google, Outlook |
|
|
39
|
+
|
|
40
|
+
The default is Personal for kiwi-ai and Work for kiwi-code.
|
|
41
|
+
|
|
42
|
+
To skip the question, name the account:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
kiwi login --account work
|
|
46
|
+
kiwi login --account personal
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Login then prompts for your email and password. Each server keeps its own login file, so
|
|
50
|
+
you can be signed in to both accounts at once:
|
|
51
|
+
|
|
52
|
+
| Server | Login file |
|
|
53
|
+
|---|---|
|
|
54
|
+
| Personal (kiwicode.ai) | `~/.kiwi/tokens.json` |
|
|
55
|
+
| Work (app.meetkiwi.ai) | `~/.kiwi/tokens-work.json` |
|
|
56
|
+
| dev | `~/.kiwi/tokens-dev.json` |
|
|
57
|
+
| local or a URL | `~/.kiwi/tokens-<host>.json` |
|
|
58
|
+
|
|
59
|
+
To use both side by side, name the account in each terminal:
|
|
31
60
|
|
|
32
|
-
|
|
61
|
+
```bash
|
|
62
|
+
kiwi --account work # one tab
|
|
63
|
+
kiwi --account personal # another tab
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
With no `--account` or `--server`, a command uses the account you logged in to most
|
|
67
|
+
recently (remembered in `~/.kiwi/server`).
|
|
33
68
|
|
|
34
69
|
You can inspect auth state anytime with:
|
|
35
70
|
|
|
@@ -40,7 +75,9 @@ kiwi whoami
|
|
|
40
75
|
To clear saved credentials:
|
|
41
76
|
|
|
42
77
|
```bash
|
|
43
|
-
kiwi logout
|
|
78
|
+
kiwi logout # the account you logged in to most recently
|
|
79
|
+
kiwi logout --account work # one account
|
|
80
|
+
kiwi logout --all # every account
|
|
44
81
|
```
|
|
45
82
|
|
|
46
83
|
### 3) Launch the TUI (unchanged default)
|
|
@@ -57,9 +94,11 @@ kiwi --server dev
|
|
|
57
94
|
|
|
58
95
|
Available presets:
|
|
59
96
|
|
|
60
|
-
- `app` (prod)
|
|
61
|
-
- `dev` (dev)
|
|
62
|
-
- `local` (localhost)
|
|
97
|
+
- `app` (prod): Personal (kiwicode.ai) for kiwi-ai and Work (app.meetkiwi.ai) for kiwi-code; `--account work` / `--account personal` pick Work / Personal in either
|
|
98
|
+
- `dev` (dev): `dev.api.myautobots.com`, for every account
|
|
99
|
+
- `local` (localhost): `localhost:8000`, for every account
|
|
100
|
+
|
|
101
|
+
`--server` also takes a full URL, for example `--server http://localhost:9000`.
|
|
63
102
|
|
|
64
103
|
### 4) Use terminal mode instead of the full-screen TUI
|
|
65
104
|
|
|
@@ -296,7 +335,22 @@ kiwi --terminal --no-stream --run-id <RUN_ID> "Continue"
|
|
|
296
335
|
```
|
|
297
336
|
|
|
298
337
|
- `--server`: `app | dev | local | <full url>`
|
|
299
|
-
- `--
|
|
338
|
+
- `--account`: `work | personal`. Picks the server when `--server` is `app` or not given.
|
|
339
|
+
On `dev`, `local` or a URL the server stays the same, and the account only decides how
|
|
340
|
+
to sign in: a work account has email and password, no Google or Outlook.
|
|
341
|
+
|
|
342
|
+
| `--server` | `--account` | Connects to |
|
|
343
|
+
|---|---|---|
|
|
344
|
+
| not given | not given | the server you logged in to; at login, asks Work or Personal (default: Personal for kiwi-ai, Work for kiwi-code) |
|
|
345
|
+
| not given, or `app` | `work` | Work (app.meetkiwi.ai) |
|
|
346
|
+
| not given, or `app` | `personal` | Personal (kiwicode.ai) |
|
|
347
|
+
| `app` | not given | Personal (kiwicode.ai) for kiwi-ai, Work (app.meetkiwi.ai) for kiwi-code |
|
|
348
|
+
| `dev` | any | `dev.api.myautobots.com` |
|
|
349
|
+
| `local` | any | `localhost:8000` |
|
|
350
|
+
| a URL | any | that URL |
|
|
351
|
+
- `--scope`: `restricted | full`. In the TUI you can also click the mode to switch it: the
|
|
352
|
+
`Mode:` line on the login screen, or `mode:restricted` in the top bar once signed in.
|
|
353
|
+
Switching replaces the current run's runtime with one in the new mode.
|
|
300
354
|
- `--allow PATH`: repeatable; additional allowed directories in restricted mode
|
|
301
355
|
- `--terminal`: run Kiwi in plain terminal mode instead of the full-screen TUI
|
|
302
356
|
- `--action-id`: start a fresh conversation for the given action
|
|
@@ -332,13 +386,17 @@ uv run python -m kiwi_runtime.main connect --server dev --scope restricted --all
|
|
|
332
386
|
|
|
333
387
|
Notes:
|
|
334
388
|
- `--server` supports presets: `app`, `dev`, `local` (or a full URL).
|
|
389
|
+
- `--account work|personal` picks the account; see [Server / flags](#server--flags). With
|
|
390
|
+
neither `--server`, `--account` nor `--token`, the runtime asks which account before login.
|
|
391
|
+
- `--login google|outlook` is for Personal (kiwicode.ai) accounts only.
|
|
335
392
|
- `--scope restricted` is the default; use `--allow` to add directories.
|
|
336
393
|
- The runtime prints connection status and will remain running until you stop it.
|
|
337
394
|
|
|
338
395
|
### Authentication
|
|
339
396
|
|
|
340
|
-
The runtime typically needs an access token. When you run the TUI and log in, your token is saved to
|
|
341
|
-
|
|
397
|
+
The runtime typically needs an access token. When you run the TUI and log in, your token is saved to the login file of that
|
|
398
|
+
server (`~/.kiwi/tokens.json` for personal, `~/.kiwi/tokens-work.json` for work; see
|
|
399
|
+
[Log in](#2-log-in-from-the-terminal)).
|
|
342
400
|
|
|
343
401
|
You can pass the token explicitly (if required by your setup):
|
|
344
402
|
|
|
@@ -386,12 +444,26 @@ uv sync
|
|
|
386
444
|
uv run python -m kiwi_tui.main --server dev
|
|
387
445
|
```
|
|
388
446
|
|
|
447
|
+
A checkout runs as kiwi-ai (`src/kiwi_cli/_edition.py`). Set `KIWI_EDITION=kiwi-code` to run it as kiwi-code.
|
|
448
|
+
|
|
389
449
|
Run tests:
|
|
390
450
|
|
|
391
451
|
```bash
|
|
392
452
|
uv run python -m pytest -q
|
|
453
|
+
KIWI_EDITION=kiwi-code uv run python -m pytest -q
|
|
393
454
|
```
|
|
394
455
|
|
|
456
|
+
## Releasing
|
|
457
|
+
|
|
458
|
+
kiwi-ai and kiwi-code are both published from `main`. The differences between them (package name, default backend, author) live in `EDITIONS` in `src/kiwi_cli/edition.py`. Push a tag naming the package and version:
|
|
459
|
+
|
|
460
|
+
```bash
|
|
461
|
+
git tag kiwi-code-v0.0.449 && git push origin kiwi-code-v0.0.449
|
|
462
|
+
git tag kiwi-ai-v0.0.25 && git push origin kiwi-ai-v0.0.25
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
The publish workflow runs `scripts/set_edition.py` to stamp the package name, version and edition into the build, checks the built wheel, and publishes with that package's token (`PYPI_TOKEN_KIWI_CODE` or `PYPI_TOKEN_KIWI_AI`). You can also run it manually from the Actions tab by choosing the package and version.
|
|
466
|
+
|
|
395
467
|
---
|
|
396
468
|
|
|
397
469
|
## License
|