scalix 0.0.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +122 -0
  2. package/LICENSE +100 -0
  3. package/README.md +300 -2
  4. package/app.py +55 -0
  5. package/bin/scalix.js +19 -0
  6. package/dist/agent-replay.js +166 -0
  7. package/dist/agent.js +852 -0
  8. package/dist/auto-verify.js +136 -0
  9. package/dist/change-tracker.js +53 -0
  10. package/dist/cli.js +2329 -0
  11. package/dist/commands.js +71 -0
  12. package/dist/config.js +16 -0
  13. package/dist/constants.js +324 -0
  14. package/dist/context-builder.js +151 -0
  15. package/dist/context-manager.js +148 -0
  16. package/dist/cost-tracker.js +85 -0
  17. package/dist/diff.js +140 -0
  18. package/dist/git-context.js +180 -0
  19. package/dist/git-undo.js +67 -0
  20. package/dist/headless.js +654 -0
  21. package/dist/hooks.js +94 -0
  22. package/dist/ipc-server.js +228 -0
  23. package/dist/logger.js +45 -0
  24. package/dist/markdown.js +41 -0
  25. package/dist/mcp.js +49 -0
  26. package/dist/model-router.js +68 -0
  27. package/dist/plugins.js +132 -0
  28. package/dist/project-index.js +374 -0
  29. package/dist/project-memory.js +165 -0
  30. package/dist/safe-math.js +194 -0
  31. package/dist/sandbox.js +279 -0
  32. package/dist/scoped-rules.js +82 -0
  33. package/dist/sessions.js +71 -0
  34. package/dist/settings.js +155 -0
  35. package/dist/sub-agent.js +79 -0
  36. package/dist/token-counter.js +47 -0
  37. package/dist/tool-helper.js +97 -0
  38. package/dist/tool-selector.js +77 -0
  39. package/dist/tools-advanced.js +232 -0
  40. package/dist/tools-browser.js +273 -0
  41. package/dist/tools-extra.js +383 -0
  42. package/dist/tools-vision.js +115 -0
  43. package/dist/tools-voice.js +147 -0
  44. package/dist/tools-web.js +346 -0
  45. package/dist/tools.js +370 -0
  46. package/dist/types.js +1 -0
  47. package/docs/DISTRIBUTION.md +301 -0
  48. package/package.json +67 -6
package/CHANGELOG.md ADDED
@@ -0,0 +1,122 @@
1
+ # Changelog
2
+
3
+ All notable changes to Scalix Coder will be documented in this file.
4
+
5
+ ## [3.1.0] - 2026-04-20
6
+
7
+ ### Added
8
+ - Browser automation tools (navigate, screenshot, click, type, eval, get_text, close) via headless browser
9
+ - Vision tools (read_image, screenshot) for image analysis with vision models
10
+ - Voice input tool for speech-to-text
11
+ - IPC server mode for VS Code extension integration (replaces HTTP-only bridge)
12
+ - Auto-verification system — automatic build/lint checks after file modifications
13
+ - File change tracker for monitoring agent modifications
14
+ - Tab completion (inline suggestions) in VS Code extension
15
+ - Inline chat (Cmd+I) in VS Code extension
16
+ - Codebase symbol indexer in VS Code extension with multi-language support
17
+ - Git checkpoint and restore in VS Code extension
18
+ - Session persistence in VS Code extension
19
+ - Slash commands and @-mention system in VS Code extension webview
20
+ - Settings panel in VS Code extension with tabbed UI (General, Models, Tools)
21
+ - Context detail panel showing token usage breakdown
22
+
23
+ ### Changed
24
+ - Redesigned terminal UI with unique Scalix identity (magenta theme, custom indicators)
25
+ - Tool count expanded from 21 to 31 built-in tools
26
+ - Background process auto-cleanup reduced from 1 hour to 5 minutes
27
+ - All unbounded defaults replaced with finite limits for memory stability
28
+ - Background buffer max reduced from 100MB to 10MB
29
+ - Max exec buffer and file read size capped at 10MB
30
+ - Max steps/messages default set to 200 (previously unbounded)
31
+ - Tool result hard cap at 200K characters to prevent context overflow
32
+ - `verifyFailCounts` map capped at 100 entries with LRU eviction
33
+ - Stream connections properly closed on abort via try/finally
34
+ - Event listeners extracted to named references with proper cleanup
35
+ - Model registry changed from hardcoded to dynamic API-fetched
36
+
37
+ ### Fixed
38
+ - JavaScript heap out-of-memory crash (5GB after ~21 minutes idle)
39
+ - Event listener memory leak (verify:pass, verify:fail, file:modified without cleanup)
40
+ - Stream connection leak on abort (for-await loop without stream.controller.abort())
41
+ - Background process buffer overflow with precise slicing
42
+ - Confirmation timeout hanging indefinitely (now 5-minute timeout)
43
+ - VS Code webview null reference crashes (getElementById without guards)
44
+ - React useEffect dependency causing unnecessary re-renders
45
+
46
+ ## [3.0.0] - 2026-04-18
47
+
48
+ ### Added
49
+ - Scalix ecosystem integration with API key formats (`scalix_*`, `sk_live_*`, `scalix_free_*`)
50
+ - Dynamic model fetching from Scalix API (`/api/inference/models`)
51
+ - Model registry with exact context windows
52
+ - Token and context management system with auto-compression
53
+ - Virtual scrolling in terminal UI with keyboard navigation (Shift+Up/Down, PageUp/PageDown)
54
+ - Symlink traversal prevention in path resolution
55
+ - Bracketed paste mode handling for reliable text input
56
+ - API key masking in setup wizard with character count indicator
57
+ - Context bar in VS Code extension showing token usage
58
+ - Security hardening: `execFile` for search, stream error handlers, input sanitization
59
+
60
+ ### Changed
61
+ - Default API endpoint to `https://api.scalix.world/v1`
62
+ - Default model to `scalix-world-ai` (free tier)
63
+ - Package name from `my-agent` to `scalix-coder`
64
+ - CLI command unified to `scalix`
65
+ - User-Agent strings to `ScalixCoder/3.0`
66
+ - License from ISC to EULA under Scalix World Private Limited
67
+
68
+ ### Fixed
69
+ - Terminal UI shrinking instead of scrolling on long conversations
70
+ - Diff capture race condition in VS Code extension
71
+ - Notebook cell move operation with out-of-bounds positions
72
+ - Dynamic imports replaced with static imports for reliability
73
+
74
+ ## [2.1.0] - 2026-03-15
75
+
76
+ ### Added
77
+ - Sub-agent system with delegated task execution
78
+ - Git checkpoint and undo system
79
+ - Scoped rules engine (`.scalix/rules/*.md`)
80
+ - Custom commands (`.scalix/commands/*.md`)
81
+ - Lifecycle hooks (`.scalix/hooks.json`)
82
+ - Plugin system with auto-discovery
83
+ - Model routing with complexity-based selection
84
+ - Cost budget tracking with daily/monthly limits
85
+ - Project memory with auto-detected conventions
86
+ - Session replay timeline
87
+
88
+ ### Changed
89
+ - Upgraded to 21 built-in tools
90
+ - Enhanced project indexing with symbol extraction
91
+
92
+ ## [2.0.0] - 2026-02-01
93
+
94
+ ### Added
95
+ - React/Ink terminal UI with gradient banner
96
+ - Streaming responses with reasoning display
97
+ - 4 permission modes (plan, default, auto, yolo)
98
+ - Session persistence with save/load
99
+ - Context manager with auto-compression
100
+ - MCP (Model Context Protocol) support
101
+ - Web fetch and search tools with SSRF protection
102
+ - File edit tool with LCS diff engine
103
+ - Directory tree visualization
104
+ - Multiline input with `\` continuation
105
+
106
+ ### Changed
107
+ - Migrated from plain REPL to Ink-based UI
108
+ - Complete architecture rewrite
109
+
110
+ ## [1.0.0] - 2026-01-15
111
+
112
+ ### Added
113
+ - Initial release
114
+ - Core agent loop with OpenAI-compatible API
115
+ - Basic tools: shell, read, write, list files
116
+ - Calculator and time tools
117
+ - Simple REPL interface
118
+ - Configuration system
119
+
120
+ ---
121
+
122
+ (c) 2024-2026 Scalix World Private Limited. All rights reserved.
package/LICENSE ADDED
@@ -0,0 +1,100 @@
1
+ SCALIX WORLD PRIVATE LIMITED
2
+ END USER LICENSE AGREEMENT (EULA)
3
+
4
+ Copyright (c) 2025-2026 Scalix World Pvt Ltd. All rights reserved.
5
+ A subsidiary of Energy FW Ltd (UK Company No. 14600160)
6
+
7
+ IMPORTANT — READ CAREFULLY BEFORE USING THIS SOFTWARE.
8
+
9
+ This End User License Agreement ("Agreement") is a legal agreement between you
10
+ ("User") and Scalix World Private Limited ("Company", "we", "us"), a company
11
+ incorporated under the laws of India (CIN: U72100KL2026PTC102006), for the use
12
+ of the software, source code, documentation, and associated materials
13
+ (collectively, the "Software") contained in this repository.
14
+
15
+ By accessing, downloading, copying, installing, or otherwise using the Software,
16
+ you agree to be bound by the terms of this Agreement. If you do not agree to
17
+ these terms, do not use the Software.
18
+
19
+
20
+ 1. LICENSE GRANT
21
+
22
+ Subject to the terms of this Agreement, the Company grants you a limited,
23
+ non-exclusive, non-transferable, revocable license to use the Software solely
24
+ for the purposes expressly authorized by the Company.
25
+
26
+ You may NOT:
27
+ a) Copy, modify, adapt, translate, or create derivative works of the Software;
28
+ b) Distribute, sublicense, lease, rent, loan, or otherwise transfer the
29
+ Software or any rights therein to any third party;
30
+ c) Reverse engineer, decompile, disassemble, or attempt to derive the source
31
+ code of the Software, except to the extent permitted by applicable law;
32
+ d) Remove, alter, or obscure any proprietary notices, labels, or marks on
33
+ the Software;
34
+ e) Use the Software to build a competing product or service;
35
+ f) Use the Software for any unlawful purpose.
36
+
37
+
38
+ 2. INTELLECTUAL PROPERTY
39
+
40
+ The Software and all copies thereof are proprietary to the Company and title
41
+ thereto remains in the Company. All rights in the Software not specifically
42
+ granted in this Agreement are reserved to the Company. The Software is
43
+ protected by copyright laws and international treaty provisions.
44
+
45
+
46
+ 3. CONFIDENTIALITY
47
+
48
+ The Software contains trade secrets and proprietary information of the
49
+ Company. You agree to maintain the confidentiality of the Software and not
50
+ to disclose it to any third party without the prior written consent of
51
+ the Company.
52
+
53
+
54
+ 4. NO WARRANTY
55
+
56
+ THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
57
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
58
+ FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. THE COMPANY DOES
59
+ NOT WARRANT THAT THE SOFTWARE WILL BE ERROR-FREE OR UNINTERRUPTED.
60
+
61
+
62
+ 5. LIMITATION OF LIABILITY
63
+
64
+ IN NO EVENT SHALL THE COMPANY, ITS DIRECTORS, OFFICERS, EMPLOYEES, OR
65
+ AGENTS BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR
66
+ PUNITIVE DAMAGES ARISING OUT OF OR RELATED TO YOUR USE OF OR INABILITY TO
67
+ USE THE SOFTWARE, EVEN IF THE COMPANY HAS BEEN ADVISED OF THE POSSIBILITY
68
+ OF SUCH DAMAGES.
69
+
70
+
71
+ 6. TERMINATION
72
+
73
+ This license is effective until terminated. The Company may terminate this
74
+ Agreement at any time if you fail to comply with any term herein. Upon
75
+ termination, you must destroy all copies of the Software in your possession
76
+ and cease all use.
77
+
78
+
79
+ 7. GOVERNING LAW
80
+
81
+ This Agreement shall be governed by and construed in accordance with the
82
+ laws of India. Any disputes arising under this Agreement shall be subject
83
+ to the exclusive jurisdiction of the courts in Kerala, India.
84
+
85
+
86
+ 8. THIRD-PARTY COMPONENTS
87
+
88
+ The Software may include third-party open-source components, each subject to
89
+ its own license terms. Such licenses are found in the respective component
90
+ directories and are not affected by this Agreement.
91
+
92
+
93
+ 9. ENTIRE AGREEMENT
94
+
95
+ This Agreement constitutes the entire agreement between you and the Company
96
+ regarding the Software and supersedes all prior agreements, whether written
97
+ or oral.
98
+
99
+
100
+ For licensing inquiries, contact: legal@scalix.world
package/README.md CHANGED
@@ -1,3 +1,301 @@
1
- # scalix
1
+ # Scalix Coder
2
2
 
3
- Coming soon. Visit [scalix.world](https://scalix.world)
3
+ AI-powered coding agent for the terminal and VS Code — built by [Scalix World](https://scalix.world).
4
+
5
+ ![Version](https://img.shields.io/badge/version-3.1.0-blue)
6
+ ![Node](https://img.shields.io/badge/node-%3E%3D18-green)
7
+ ![License](https://img.shields.io/badge/license-EULA-orange)
8
+
9
+ Scalix Coder is a full-featured AI coding assistant that runs in your terminal or as a VS Code extension. It connects to the Scalix API (or any OpenAI-compatible endpoint) and gives AI direct access to your codebase through 31 built-in tools — file editing, shell execution, search, git, web access, browser automation, vision, voice input, and more.
10
+
11
+ ## Features
12
+
13
+ - **Terminal UI** — Rich React/Ink interface with magenta-themed prompt, scrollable chat, streaming responses, and keyboard shortcuts
14
+ - **VS Code Extension** — Sidebar chat panel with inline diffs, tab completion, inline chat (Cmd+I), codebase search, model picker, checkpoints, and session history
15
+ - **31 Built-in Tools** — Shell, file read/write/edit, search (ripgrep), git, web fetch/search, directory tree, notebooks, browser automation, vision, voice input, sub-agents
16
+ - **Security Sandbox** — Path traversal prevention, symlink detection, command blocklist, injection detection, SSRF protection
17
+ - **4 Permission Modes** — `plan` (read-only) / `default` (ask) / `auto` (auto-approve) / `yolo` (full autonomy)
18
+ - **Context Management** — Auto-compression, sliding window, per-model context limits
19
+ - **Dynamic Model Registry** — Models fetched from your Scalix account with exact context windows
20
+ - **Session Persistence** — Save, load, and resume conversations
21
+ - **Project Intelligence** — Auto-detects tech stack, conventions, git context
22
+ - **Plugin System** — Custom tools via `.scalix/plugins/`
23
+ - **Custom Commands** — Reusable prompts in `.scalix/commands/*.md`
24
+ - **Model Routing** — Multi-model support with complexity-based routing and fallback
25
+ - **Cost Tracking** — Token usage and budget limits per session/day/month
26
+ - **Sub-agents** — Delegate tasks with isolated tool access
27
+ - **Git Checkpoints** — Create and undo agent-made changes
28
+ - **Auto-Verification** — Automatic build/lint checks after file modifications
29
+ - **Lifecycle Hooks** — Pre/post tool-use hooks via `.scalix/hooks.json`
30
+ - **IPC Server** — Bridge mode for VS Code extension integration
31
+ - **Browser Automation** — Navigate, click, type, screenshot, and evaluate JS in headless browsers
32
+
33
+ ## Quick Start
34
+
35
+ ### Install
36
+
37
+ ```bash
38
+ git clone https://github.com/scalixworld/scalix-coder.git && cd scalix-coder
39
+ npm install
40
+ sudo npm link
41
+ ```
42
+
43
+ ### Run
44
+
45
+ ```bash
46
+ scalix
47
+ ```
48
+
49
+ First launch opens a setup wizard to configure your Scalix API key, endpoint, and models.
50
+
51
+ ### Environment Variables
52
+
53
+ | Variable | Description |
54
+ | ----------------- | -------------------------------- |
55
+ | `SCALIX_API_KEY` | API key (overrides saved config) |
56
+ | `SCALIX_MODEL` | Comma-separated model IDs |
57
+ | `SCALIX_BASE_URL` | API base URL |
58
+ | `BRAVE_API_KEY` | Brave Search API key |
59
+ | `TAVILY_API_KEY` | Tavily Search API key |
60
+
61
+ ### Headless Mode
62
+
63
+ ```bash
64
+ scalix run "explain src/agent.ts"
65
+
66
+ echo "list all TODO comments" | scalix --pipe
67
+
68
+ scalix run "generate a migration" --output migration.sql --format patch
69
+ ```
70
+
71
+ ## Commands
72
+
73
+ | Command | Description |
74
+ | ------------------ | ---------------------------- |
75
+ | `/help` | Show all commands |
76
+ | `/shortcuts` | Keyboard shortcuts |
77
+ | `/clear` | Reset conversation |
78
+ | `/models` | List active models |
79
+ | `/model` | Switch model |
80
+ | `/mode` | Set permission mode |
81
+ | `/compact` | Compress context |
82
+ | `/cost` | Token usage & cost |
83
+ | `/budget` | Budget status |
84
+ | `/save [name]` | Save session |
85
+ | `/load` | Resume session |
86
+ | `/index` | Scan project files |
87
+ | `/git` | Git context |
88
+ | `/memory` | Project memory |
89
+ | `/remember <note>` | Save a project note |
90
+ | `/replay` | Session timeline |
91
+ | `/plugins` | Loaded plugins |
92
+ | `/settings` | Configure limits |
93
+ | `/setup` | Reconfigure API key & models |
94
+ | `/delegate <task>` | Run with sub-agent |
95
+ | `/checkpoint` | Create git checkpoint |
96
+ | `/undo` | Undo last checkpoint |
97
+ | `!<cmd>` | Run shell command |
98
+
99
+ ## Keyboard Shortcuts
100
+
101
+ | Key | Action |
102
+ | ----------------------- | ---------------------------------------- |
103
+ | `Ctrl+C` | Interrupt / clear / double-press to quit |
104
+ | `Ctrl+D` | Exit (empty input) |
105
+ | `Ctrl+L` | Clear screen |
106
+ | `Ctrl+U` | Clear input line |
107
+ | `Ctrl+W` | Delete last word |
108
+ | `Ctrl+S` | Stash/restore prompt |
109
+ | `Tab` | Autocomplete commands |
110
+ | `Up/Down` | Input history |
111
+ | `Shift+Up / PageUp` | Scroll chat up |
112
+ | `Shift+Down / PageDown` | Scroll chat down |
113
+ | `Esc` | Quit |
114
+
115
+ ## Tools
116
+
117
+ ### Core
118
+
119
+ | Tool | Description |
120
+ | ------------------ | ------------------------------------ |
121
+ | `get_current_time` | Current date/time with timezone |
122
+ | `calculate` | Safe math expression evaluator |
123
+ | `run_command` | Shell execution with security checks |
124
+ | `read_file` | File reading with line numbers |
125
+ | `read_file_lines` | Read specific line ranges |
126
+ | `write_file` | File creation/overwrite |
127
+ | `list_files` | Directory listing with glob support |
128
+
129
+ ### Code
130
+
131
+ | Tool | Description |
132
+ | -------------- | ------------------------------------ |
133
+ | `edit_file` | Precise string replacement with diff |
134
+ | `search_files` | Regex search via ripgrep |
135
+ | `find_files` | Glob-based file finding |
136
+ | `tree` | Directory tree visualization |
137
+
138
+ ### Git
139
+
140
+ | Tool | Description |
141
+ | ------------ | ------------------------------- |
142
+ | `git_status` | Branch, changes, recent commits |
143
+ | `git_diff` | Staged/unstaged diffs |
144
+ | `git_commit` | Stage and commit |
145
+
146
+ ### Web
147
+
148
+ | Tool | Description |
149
+ | ------------ | --------------------------------------- |
150
+ | `web_fetch` | Fetch URLs with SSRF protection |
151
+ | `web_search` | Search via Brave, Tavily, or DuckDuckGo |
152
+
153
+ ### Browser
154
+
155
+ | Tool | Description |
156
+ | -------------------- | ------------------------------------- |
157
+ | `browser_navigate` | Navigate to a URL in headless browser |
158
+ | `browser_screenshot` | Capture browser page screenshot |
159
+ | `browser_click` | Click elements on page |
160
+ | `browser_type` | Type text into page elements |
161
+ | `browser_eval` | Execute JavaScript in browser context |
162
+ | `browser_get_text` | Extract text content from page |
163
+ | `browser_close` | Close browser session |
164
+
165
+ ### Vision & Voice
166
+
167
+ | Tool | Description |
168
+ | ------------- | --------------------------------- |
169
+ | `read_image` | Analyze images with vision models |
170
+ | `screenshot` | Capture desktop screenshots |
171
+ | `voice_input` | Voice-to-text input |
172
+
173
+ ### Advanced
174
+
175
+ | Tool | Description |
176
+ | ---------------- | --------------------------- |
177
+ | `todo_write` | Task tracking |
178
+ | `notebook_edit` | Jupyter notebook operations |
179
+ | `monitor` | Background process output |
180
+ | `agent` | Spawn sub-agents |
181
+ | `add_mcp_server` | Register MCP servers |
182
+
183
+ ## Configuration
184
+
185
+ Config is stored in `~/.scalix-coder/config.json`.
186
+
187
+ ### Limits
188
+
189
+ | Setting | Default | Description |
190
+ | ---------------------- | --------- | --------------------------------------------- |
191
+ | `maxSteps` | 200 | Tool-call rounds per request |
192
+ | `maxMessages` | 200 | History size |
193
+ | `maxContextTokens` | 1,000,000 | Context window (tokens) |
194
+ | `compressionThreshold` | 0.75 | Auto-compress when context exceeds this ratio |
195
+ | `maxToolResultTokens` | 10,000 | Truncate tool results (tokens) |
196
+ | `commandTimeoutMs` | 60,000 | Shell command timeout (ms) |
197
+ | `bgCleanupMs` | 300,000 | Background process auto-cleanup (5 min) |
198
+ | `readFileMaxSize` | 10 MB | Max file size for read operations |
199
+
200
+ ### Project Files
201
+
202
+ | Path | Purpose |
203
+ | ----------------------- | ----------------------------- |
204
+ | `AGENT.md` | Project-specific instructions |
205
+ | `.scalix/memory.json` | Conventions & notes |
206
+ | `.scalix/plugins/` | Custom tool plugins |
207
+ | `.scalix/commands/*.md` | Custom slash commands |
208
+ | `.scalix/hooks.json` | Lifecycle hooks |
209
+ | `.scalix/rules/*.md` | Scoped rules |
210
+ | `mcp-services.json` | MCP server config |
211
+
212
+ ## VS Code Extension
213
+
214
+ Full-featured sidebar assistant with streaming chat, tab completion, inline chat, inline diffs, codebase search, and checkpoints.
215
+
216
+ See [vscode-extension/README.md](vscode-extension/README.md) for setup and usage.
217
+
218
+ ```bash
219
+ cd vscode-extension
220
+ npm install
221
+ npm run build
222
+ npm run package # Creates .vsix file
223
+ ```
224
+
225
+ ## Development
226
+
227
+ ```bash
228
+ npm run start # Run CLI
229
+ npm run dev # Watch mode
230
+ npm run test # Vitest
231
+ npm run typecheck # Type-check
232
+ npm run lint # ESLint
233
+ npm run check # All checks
234
+ ```
235
+
236
+ ## Architecture
237
+
238
+ ```
239
+ src/
240
+ cli.tsx Terminal UI (React/Ink)
241
+ headless.ts Headless/REPL mode
242
+ agent.ts Core agent loop
243
+ constants.ts All defaults and configuration constants
244
+ settings.ts Config management and validation
245
+ sandbox.ts Security sandbox (path, command, injection)
246
+ context-manager.ts Token counting & compression
247
+ context-builder.ts System prompt assembly
248
+ token-counter.ts Token estimation engine
249
+ tools.ts Core tools (shell, file, time, calc)
250
+ tools-extra.ts Code tools (edit, search, find, git)
251
+ tools-web.ts Web tools (fetch, search, tree, read_file_lines)
252
+ tools-advanced.ts Advanced tools (todo, notebook, sub-agent, monitor)
253
+ tools-browser.ts Browser automation (navigate, click, type, eval)
254
+ tools-vision.ts Vision tools (read_image, screenshot)
255
+ tools-voice.ts Voice input tool
256
+ tool-helper.ts Tool definition helper
257
+ tool-selector.ts Dynamic tool selection
258
+ model-router.ts Multi-model complexity routing
259
+ cost-tracker.ts Token/cost tracking with budgets
260
+ sessions.ts Session persistence
261
+ project-index.ts Project file scanning & symbol extraction
262
+ project-memory.ts Convention memory system
263
+ plugins.ts Plugin auto-discovery and loading
264
+ sub-agent.ts Sub-agent spawning
265
+ auto-verify.ts Post-edit build/lint verification
266
+ change-tracker.ts File modification tracking
267
+ hooks.ts Lifecycle hook execution
268
+ scoped-rules.ts Scoped rules engine
269
+ commands.ts Custom slash commands
270
+ git-context.ts Git info collection
271
+ git-undo.ts Checkpoint/undo system
272
+ agent-replay.ts Session timeline replay
273
+ diff.ts LCS diff computation
274
+ markdown.ts Markdown rendering
275
+ safe-math.ts Safe expression evaluator
276
+ logger.ts Structured logging
277
+ mcp.ts MCP server integration
278
+ ipc-server.ts IPC bridge for VS Code extension
279
+ config.ts Config helpers
280
+
281
+ vscode-extension/
282
+ src/extension.ts Extension activation & command registration
283
+ src/agent-bridge.ts Agent implementation (HTTP + IPC modes)
284
+ src/chat-panel.ts Webview chat UI (HTML/CSS/JS)
285
+ src/status-bar.ts Status bar integration
286
+ src/diff-viewer.ts Inline diff viewer
287
+ src/completion-provider.ts AI-powered tab completion
288
+ src/inline-chat.ts Inline chat (Cmd+I)
289
+ src/indexer.ts Codebase symbol indexer
290
+ src/checkpoints.ts Git checkpoint management
291
+ src/session-store.ts Session persistence
292
+
293
+ bin/
294
+ scalix.js CLI entry point
295
+ ```
296
+
297
+ ## License
298
+
299
+ Scalix Coder is proprietary software. See [LICENSE](LICENSE) for the full EULA.
300
+
301
+ (c) 2024-2026 Scalix World Private Limited. All rights reserved.
package/app.py ADDED
@@ -0,0 +1,55 @@
1
+ from flask import Flask, request, jsonify
2
+ from flask_cors import CORS
3
+
4
+ app = Flask(__name__)
5
+ CORS(app) # Enable CORS for all routes
6
+
7
+ # In-memory storage for todos
8
+ todos = []
9
+ next_id = 1
10
+
11
+ @app.route('/todos', methods=['GET'])
12
+ def get_todos():
13
+ return jsonify(todos)
14
+
15
+ @app.route('/todos', methods=['POST'])
16
+ def add_todo():
17
+ global next_id
18
+ data = request.get_json()
19
+ if not data or 'task' not in data:
20
+ return jsonify({'error': 'Task is required'}), 400
21
+
22
+ new_todo = {
23
+ 'id': next_id,
24
+ 'task': data['task'],
25
+ 'completed': data.get('completed', False)
26
+ }
27
+ todos.append(new_todo)
28
+ next_id += 1
29
+ return jsonify(new_todo), 201
30
+
31
+ @app.route('/todos/<int:todo_id>', methods=['PUT'])
32
+ def update_todo(todo_id):
33
+ data = request.get_json()
34
+ for todo in todos:
35
+ if todo['id'] == todo_id:
36
+ if 'task' in data:
37
+ todo['task'] = data['task']
38
+ if 'completed' in data:
39
+ todo['completed'] = data['completed']
40
+ return jsonify(todo)
41
+ return jsonify({'error': 'Todo not found'}), 404
42
+
43
+ @app.route('/todos/<int:todo_id>', methods=['DELETE'])
44
+ def delete_todo(todo_id):
45
+ global todos
46
+ initial_length = len(todos)
47
+ todos = [todo for todo in todos if todo['id'] != todo_id]
48
+ if len(todos) < initial_length:
49
+ return jsonify({'message': 'Todo deleted'})
50
+ return jsonify({'error': 'Todo not found'}), 404
51
+
52
+ if __name__ == '__main__':
53
+ # Note: For production, use a proper WSGI server like Gunicorn.
54
+ # For development, Flask's built-in server is fine.
55
+ app.run(debug=True, port=5000) # Specify port for clarity
package/bin/scalix.js ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+ import { fileURLToPath } from 'node:url';
3
+ import { pathToFileURL } from 'node:url';
4
+ import { dirname, resolve } from 'node:path';
5
+
6
+ const __dirname = dirname(fileURLToPath(import.meta.url));
7
+
8
+ process.env.NODE_ENV = 'production';
9
+
10
+ const args = process.argv.slice(2);
11
+ const needsHeadless =
12
+ args.includes('run') ||
13
+ args.includes('--pipe') || args.includes('-p') ||
14
+ args.includes('--ipc') ||
15
+ args.includes('--help') || args.includes('-h') ||
16
+ !process.stdin.isTTY;
17
+
18
+ const entry = resolve(__dirname, '..', 'dist', needsHeadless ? 'headless.js' : 'cli.js');
19
+ await import(pathToFileURL(entry).href);