Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Type these at the prompt during a session.
|---------|-------------|
| `/settings` | Open the settings workspace |
| `/agents` | Show the live subagent swarm dashboard |
| `/update` | Check for updates and self-update |
| `kosmokrator update` | Check for updates and update based on install method |
| `/feedback <text>` | Submit feedback or a bug report as a GitHub issue (requires `gh` CLI) |
| `/tasks clear` | Remove all tasks |
| `/clear` | Clear the terminal screen |
Expand Down
8 changes: 7 additions & 1 deletion bin/kosmokrator
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ use Kosmokrator\Command\CodexLogoutCommand;
use Kosmokrator\Command\CodexStatusCommand;
use Kosmokrator\Command\ConfigCommand;
use Kosmokrator\Command\SetupCommand;
use Kosmokrator\Command\TelegramGatewayCommand;
use Kosmokrator\Command\TelegramGatewayWorkerCommand;
use Kosmokrator\Command\UpdateCommand;
use Kosmokrator\Kernel;
use NunoMaduro\Collision\Provider;

Expand Down Expand Up @@ -38,12 +41,15 @@ $console->addCommand(new CodexLogoutCommand($kernel->getContainer()));
$console->addCommand(new SetupCommand($kernel->getContainer()));
$console->addCommand(new ConfigCommand($kernel->getContainer()));
$console->addCommand(new AuthCommand($kernel->getContainer()));
$console->addCommand(new UpdateCommand($kernel->getContainer(), $console->getVersion() ?? 'dev'));
$console->addCommand(new TelegramGatewayCommand($kernel->getContainer()));
$console->addCommand(new TelegramGatewayWorkerCommand($kernel->getContainer()));

// Default to agent in single-command mode unless another explicit command is requested.
// 'agent' is removed from the explicit list so that `kosmokrator agent "prompt"`
// enters single-command mode correctly (positional prompt binds to the command).
$args = $_SERVER['argv'] ?? [];
$explicitCommands = ['setup', 'config', 'auth', 'codex:login', 'codex:status', 'codex:logout', 'list', 'help', '_complete', 'completion'];
$explicitCommands = ['setup', 'config', 'auth', 'update', 'gateway:telegram', 'gateway:telegram:worker', 'codex:login', 'codex:status', 'codex:logout', 'list', 'help', '_complete', 'completion'];
$requestedCommand = $args[1] ?? null;
$isExplicitCommand = is_string($requestedCommand) && ! str_starts_with($requestedCommand, '-') && in_array($requestedCommand, $explicitCommands, true);

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"amphp/amp": "^3.1",
"amphp/http-client": "^5.3",
"league/commonmark": "^2.9",
"league/html-to-markdown": "^5.1",
"opencompany/prism-codex": "dev-main",
"opencompanyapp/integration-clickup": "@dev",
"opencompanyapp/integration-coingecko": "@dev",
Expand Down
91 changes: 90 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions config/kosmokrator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,53 @@ ui:
integrations:
permissions_default: ask # Default for operations not explicitly set

gateway:
telegram:
enabled: false
token: null
session_mode: thread
allowed_users: []
allowed_chats: []
require_mention: true
free_response_chats: []
poll_timeout_seconds: 20

web:
cache:
keep_turns: 2
max_entries: 128
search:
default_provider: tavily
fallback_providers: []
max_results: 5
timeout: 20
providers:
tavily:
api_key: ${TAVILY_API_KEY}
zai:
api_key: ${ZAI_API_KEY}
remote_url: https://api.z.ai/api/mcp/web_search_prime/mcp
exa:
api_key: ${EXA_API_KEY}
google_custom_search:
api_key: ${GOOGLE_API_KEY}
search_engine_id: ${GOOGLE_SEARCH_ENGINE_ID}
fetch:
default_provider: direct
fallback_providers: []
timeout: 20
max_bytes: 10485760
max_chars: 12000
providers:
direct:
user_agent_mode: browser_like
zai:
api_key: ${ZAI_API_KEY}
base_url: https://api.z.ai/api/coding/paas/v4
firecrawl:
api_key: ${FIRECRAWL_API_KEY}
api_url: ${FIRECRAWL_API_URL}

tools:
# Tools that are always denied, overriding all modes (including Prometheus).
# Useful for hard-disabling tools in specific projects or CI environments.
Expand All @@ -146,6 +193,10 @@ tools:
- ask_user
- ask_choice
- subagent
- session_search
- session_read
- web_search
- web_fetch
- lua_list_docs
- lua_search_docs
- lua_read_doc
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Forward-looking design docs. Not shipped — may reference classes or features t
| [ecosystem-architecture.md](proposals/ecosystem-architecture.md) | Lua code mode, MCP integration, OpenCompany tool ecosystem |
| [integration-refactor-plan.md](proposals/integration-refactor-plan.md) | Refactoring tool packages to framework-agnostic contracts |
| [desktop-app.md](proposals/desktop-app.md) | NativePHP + Electron desktop surface proposal |
| [hermes-style-gateway.md](proposals/hermes-style-gateway.md) | Hermes-style Telegram-first gateway surface for KosmoKrator |
| [tui-ux-improvements.md](proposals/tui-ux-improvements.md) | 10 ranked UX improvements with mockups |
| [command-inspiration.md](proposals/command-inspiration.md) | Slash/power command ideas from competitive analysis |
| [laravel-ai-patterns.md](proposals/laravel-ai-patterns.md) | Patterns from Laravel AI SDK worth borrowing |
Expand Down
4 changes: 2 additions & 2 deletions docs/proposals/desktop-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,6 @@ This means:
| Terminal (ANSI) | `AnsiRenderer` | readline | ANSI escape codes | `php bin/kosmokrator` |
| Terminal (TUI) | `TuiRenderer` | Symfony TUI InputWidget | TUI widgets + Revolt | `php bin/kosmokrator` |
| Desktop | `WebRenderer` | Vue frontend via WebSocket | Electron BrowserWindow | NativePHP (bundled PHP) |
| *(future)* Mobile | `MobileRenderer` | Native UI via EDGE | Swift/Kotlin shell | NativePHP Mobile |
| Kosmo (mobile + desktop) | Flutter thin client | touch + voice | Stream cards | Kosmo Cloud / OpenCompany backend |

All implement `RendererInterface`. The engine doesn't know which surface it's running on.
Terminal and Desktop surfaces implement `RendererInterface` — the engine doesn't know which surface it's on. Kosmo is a separate thin client that talks to the same backend (Kosmo Cloud / OpenCompany) over WebSocket, not a RendererInterface implementation.
Loading
Loading