Repository navigation
Conversation
Adds a new LLM node for GMI Cloud (api.gmi-serving.com), an OpenAI-compatible inference platform hosting 100+ models including DeepSeek, GPT, Claude, Gemini, Llama 4, and Qwen3 on owned H100/H200 GPU infrastructure. ## Profiles Two model tiers are supported: Shared (always-on) — API key only required: DeepSeek V3.2, V3, R1, R1 Distill 32B & 1.5B, Prover V2 GPT-5.2, 5.1, 5, 4o Claude Opus 4.5, Sonnet 4.5 Gemini 3 Pro, Gemini 3 Flash Deploy-on-demand — endpoint URL + API key required (deploy first at console.gmicloud.ai, then paste the provided endpoint URL): Llama 4 Scout, Llama 4 Maverick Qwen3 235B, 32B, 30B, Coder 480B A custom profile allows specifying any model name and endpoint URL manually.
📝 WalkthroughWalkthroughAdds a new GMI Cloud LLM node package with global lifecycle management, configuration validation, and OpenAI-compatible chat bindings. The package includes endpoint validation, model probing, error handling, a service definition with multiple model profiles, and runtime initialization for chat client management. Changes
Sequence DiagramsequenceDiagram
participant User
participant IGlobal as IGlobal<br/>(Lifecycle)
participant Config as Config
participant Chat as gmi_cloud.Chat<br/>(OpenAI Client)
participant GMI as GMI Cloud API
User->>IGlobal: validateConfig() [save-time]
IGlobal->>Config: load apikey, model, serverbase
IGlobal->>IGlobal: _validate_serverbase(url)
Note over IGlobal: Enforce HTTPS + *.gmi-serving.com
IGlobal->>Chat: probe model (1-token completion)
Chat->>GMI: ChatOpenAI request
GMI-->>Chat: response or error
Chat-->>IGlobal: success or formatted error
IGlobal-->>User: warning or valid
User->>IGlobal: beginGlobal() [runtime]
IGlobal->>Config: resolve serverbase
IGlobal->>IGlobal: validate endpoint
IGlobal->>Chat: Chat(logicalType, config, bag)
Chat->>GMI: initialize ChatOpenAI client
GMI-->>Chat: client ready
Chat-->>IGlobal: _chat instance stored
IGlobal-->>User: ready
User->>Chat: chat completion
Chat->>GMI: OpenAI-compatible request
GMI-->>Chat: response or error
Chat->>Chat: map_exception / is_retryable_error
Chat-->>User: result or ValueError
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@nodes/src/nodes/llm_gmi_cloud/gmi_cloud.py`:
- Around line 68-75: The is_retryable_error method is verbose; replace the
if/elif chain in is_retryable_error with a single isinstance check against a
tuple of exception types (RateLimitError, APIConnectionError) and return that
boolean directly, so the function simply returns isinstance(error,
(RateLimitError, APIConnectionError)).
In `@nodes/src/nodes/llm_gmi_cloud/IGlobal.py`:
- Around line 147-164: The code in beginGlobal constructs the requirements path
via string concatenation into the variable requirements; replace that with
os.path.join to build the path portably (use
os.path.dirname(os.path.realpath(__file__)) and join 'requirements.txt'),
ensuring you import/use os consistently as elsewhere (match the pattern used at
line ~70). Update the requirements assignment in beginGlobal (variable
requirements) to use os.path.join so path construction is consistent across the
module.
In `@nodes/src/nodes/llm_gmi_cloud/services.json`:
- Around line 188-200: The two DeepSeek profiles "deepseek-r1-distill-32b" and
"deepseek-r1-distill-1-5b" have empty serverbase values so they behave like
deploy-on-demand; update both entries (the objects keyed by
deepseek-r1-distill-32b and deepseek-r1-distill-1-5b in services.json) to set
"serverbase" to "https://api.gmi-serving.com/v1" so they use the shared GMI
Cloud inference endpoint.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 118f7d3f-81fb-4c65-b484-f0cda3b67ae9
📒 Files selected for processing (6)
nodes/src/nodes/llm_gmi_cloud/IGlobal.pynodes/src/nodes/llm_gmi_cloud/IInstance.pynodes/src/nodes/llm_gmi_cloud/__init__.pynodes/src/nodes/llm_gmi_cloud/gmi_cloud.pynodes/src/nodes/llm_gmi_cloud/requirements.txtnodes/src/nodes/llm_gmi_cloud/services.json
Adds a new LLM node for GMI Cloud (api.gmi-serving.com), an OpenAI-compatible inference platform hosting 100+ models including DeepSeek, GPT, Claude, Gemini, Llama 4, and Qwen3 on owned H100/H200 GPU infrastructure. ## Profiles Two model tiers are supported: Shared (always-on) — API key only required: DeepSeek V3.2, V3, R1, R1 Distill 32B & 1.5B, Prover V2 GPT-5.2, 5.1, 5, 4o Claude Opus 4.5, Sonnet 4.5 Gemini 3 Pro, Gemini 3 Flash Deploy-on-demand — endpoint URL + API key required (deploy first at console.gmicloud.ai, then paste the provided endpoint URL): Llama 4 Scout, Llama 4 Maverick Qwen3 235B, 32B, 30B, Coder 480B A custom profile allows specifying any model name and endpoint URL manually.
* fix(security): prevent arbitrary module injection via /use endpoint (RCE) (#342)
* docs: add project rules for claude code
* fix(security): add module whitelist to prevent arbitrary code injection via /use endpoint
The /use endpoint accepts a module name from the HTTP query string and
passes it directly to importlib.import_module() with only lowercase/strip
normalization. This allows an attacker to load arbitrary Python modules
by sending crafted requests, potentially achieving remote code execution.
Add an ALLOWED_MODULES frozenset whitelist that restricts dynamic imports
to the 10 known service modules (chat, clients, data, dropper, pipe,
profiler, remote, services, task, task_http). Requests for any other
module name now raise ValueError, returning a 400 response.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: add language identifier to markdown code fence
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(security): require authentication for profiler endpoints
All 5 profiler endpoints (/profile, /profile/start, /profile/stop,
/profile/status, /profile/report) were registered with public=True,
bypassing the AuthMiddleware entirely. This allows unauthenticated
users to start/stop profiling and read performance reports that expose
internal function names, call counts, and timing data.
Remove public=True from all profiler route registrations so they
require authentication like other protected endpoints.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: correct HTTP method in profiler docs (PUT → POST)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: remove claude.md from version control
This file is project-specific AI tooling configuration and should not
be tracked in git. Added to .gitignore instead.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* test(security): add tests for ALLOWED_MODULES allowlist validation
Verify that:
- ALLOWED_MODULES is an immutable frozenset with the expected 10 entries
- use() rejects non-allowlisted modules and path traversal attempts
- use() accepts valid modules and calls initModule correctly
- use() normalizes module names (lower + strip)
- use() skips already-loaded modules without re-importing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(security): address CodeRabbit review feedback on test_server.py
- Fix S104: change stub host from 0.0.0.0 to 127.0.0.1
- Add return type annotation to _make_server() -> WebServer
- Track injected sys.modules mocks and clean up in teardown_module()
- Assert cached module's initModule is not re-called in reload test
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: minor changes
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: stepmik <stepmikhaylov@yandex.ru>
* fix(security): prevent filter expression injection in Milvus vector store (#355)
* fix(security): prevent filter expression injection in Milvus vector store
Add _escape_milvus_str() helper to sanitize user-controlled values
before interpolation into Milvus filter expressions. Escapes single
quotes and backslashes to prevent filter injection attacks across all
query construction points in the Milvus store implementation.
* fix: address review feedback on Milvus filter injection PR
- Remove unnecessary tuple wrappers on append calls
- Fix isTable filter using wrong field (docFilter.nodeId -> docFilter.isTable)
- Use unquoted boolean for isTable filter (matches isDeleted pattern)
- Add type annotation and docstring to _escape_milvus_str
* fix: move test to nodes/test/ per project conventions
* fix(security): use secure temporary file creation in task engine (#356)
* fix(security): use secure temporary file creation in task engine
Replace insecure predictable temp file path with tempfile.mkstemp()
to prevent information disclosure and symlink attacks.
_write_task_file previously wrote pipeline config (which may contain
API keys and resolved env vars) to /tmp/<task-id>.json with default
0644 permissions. This was vulnerable to:
- World-readable files exposing sensitive pipeline configuration
- Symlink attacks due to predictable path based on task ID
- TOCTOU races from lack of O_EXCL exclusive creation
mkstemp() creates the file atomically with O_EXCL, uses a random
suffix making the path unpredictable, and defaults to 0600 permissions
(owner read/write only).
Uses await asyncio.to_thread(os.write, ...) for async compatibility.
Tests use asyncio.run() instead of deprecated get_event_loop().
* fix: address CodeRabbit findings on temp file PR
- Use os.fdopen + f.write instead of os.write to prevent partial writes
- Remove unused tempfile import in tests
- Add @skipIf(os.name == 'nt') on POSIX-specific tests
* chore: minor changes
---------
Co-authored-by: stepmik <stepmikhaylov@yandex.ru>
* fix(security): require authentication for profiler endpoints and escape HTML output (#362)
* fix(security): require authentication for profiler endpoints and escape HTML output
Remove public=True from all 5 profiler routes so they require authentication
via AuthMiddleware, and HTML-escape the profile report output to prevent XSS.
* fix: improve profiler XSS tests to verify actual endpoint output
* fix: revert conftest.py changes, scope mocks to test file
Remove depends and rocketride mocks from conftest.py (they break
other tests per asclearuc). Move stubs into the profiler test file
where they're needed, scoped locally.
* fix(ci): pin all actions to immutable commit hash (#483)
* chore(ci): remove PR title validation check (#502)
Co-authored-by: Dmitrii Karataev <dmitriikarataev@Dmitriis-MacBook-Pro.local>
* Fix: SDK connect error callback type (#576)
* fix(client-ts): correct ConnectErrorCallback type signature
The callback type expected (message: string) => Promise<void> but
the implementation passes Error objects and callers may return void
instead of Promise<void>. Updated to accept Error | string and
return void | Promise<void>.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(client-ts): use ConnectionException in ConnectErrorCallback type
Address maintainer feedback:
- Replace Error | string with ConnectionException from exceptions module
- Pass ConnectionException object directly to callback instead of extracting message string
- Keep void | Promise<void> return type as approved
- Fix invocation site in client.ts to construct ConnectionException when needed
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(apps): migrate onConnectError handlers to accept ConnectionException
Update three call sites to match the new ConnectErrorCallback type
signature that accepts ConnectionException instead of a plain string.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(client-ts): revert formatting changes
---------
Co-authored-by: NIHAL NIHALANI <nihal.nihalani@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: stepmik <stepmikhaylov@yandex.ru>
* fix(llm): clear correct _chat reference in endGlobal across all LLM nodes (#531)
All LLM node IGlobal classes assigned the Chat instance to `self._chat`
in `beginGlobal`, but `endGlobal` cleared `self.chat` (no underscore) —
a different attribute that was never set. This meant `endGlobal` was a
no-op: the Chat object was never explicitly released when a pipeline
stopped.
Fixed in 12 nodes: llm_anthropic, llm_bedrock, llm_deepseek, llm_gemini,
llm_ibm_watson, llm_mistral, llm_ollama, llm_openai, llm_perplexity,
llm_qwen, llm_vertex, llm_xai.
llm_vision_ollama and llm_vision_mistral were already correct.
* feat(llm): add GMI Cloud LLM connector (#540)
Adds a new LLM node for GMI Cloud (api.gmi-serving.com), an OpenAI-compatible
inference platform hosting 100+ models including DeepSeek, GPT, Claude, Gemini,
Llama 4, and Qwen3 on owned H100/H200 GPU infrastructure.
## Profiles
Two model tiers are supported:
Shared (always-on) — API key only required:
DeepSeek V3.2, V3, R1, R1 Distill 32B & 1.5B, Prover V2
GPT-5.2, 5.1, 5, 4o
Claude Opus 4.5, Sonnet 4.5
Gemini 3 Pro, Gemini 3 Flash
Deploy-on-demand — endpoint URL + API key required (deploy first at
console.gmicloud.ai, then paste the provided endpoint URL):
Llama 4 Scout, Llama 4 Maverick
Qwen3 235B, 32B, 30B, Coder 480B
A custom profile allows specifying any model name and endpoint URL manually.
* fix(security): use pathlib.is_relative_to for path traversal checks (#580)
Replace fragile str().startswith() path traversal checks with
Path.is_relative_to() in chat and dropper modules. The string prefix
comparison could be bypassed with crafted paths like /app/static/chat-evil/.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(security): switch SQL safety check from blacklist to whitelist approach (#577)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(security): expand sensitive field redaction patterns in VS Code logger (#578)
The redactSensitiveFields function only checked for auth-key, token-key,
and apikey patterns. This missed commonly used sensitive fields like
password, secret, authorization, bearer, credential, access_token,
refresh_token, and private_key, which could be logged unredacted.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: add Product Hunt badge to all READMEs (#590)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* chore(community): add initial Code of Conduct (#591)
Establish baseline community guidelines for inclusive collaboration.
Intentionally kept lightweight to be expanded over time.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* docs: fix broken image links in README — use absolute URLs (#506)
* fix(vscode): remove Product Hunt SVG badge from VS Code README — marketplace rejects SVGs
* fix(vscode): add Product Hunt badge as PNG — marketplace rejects SVGs
* fix(security): restrict environment variable expansion in pipeline configs (#359)
* fix(security): restrict environment variable expansion in pipeline configs
Add an allowlist of permitted env var prefixes (ROCKETRIDE_, PIPELINE_,
NODE_, ROCKET_) to _resolve_pipeline(). All other ${VAR} references are
replaced with <REDACTED> to prevent exfiltration of sensitive environment
variables (AWS keys, DB URLs, tokens) via pipeline configuration.
* chore(ai): allow ROCKETRIDE_ prefixed variables
* chore(ai): check json injection
---------
Co-authored-by: stepmik <stepmikhaylov@yandex.ru>
* fix(client-ts): preserve user-specified port in normalizeUri (#377)
The URL API silently strips ports that are default-for-scheme (e.g. :443
on https), so url.port is empty for both "no port given" and
"scheme-default port given". This caused normalizeUri to always overwrite
with the default 5565 port, breaking connections through ngrok/Cloudflare
tunnels and custom reverse proxies.
Check the raw input string for an explicit port pattern before deciding
whether to apply the default port.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(connection): handle missing hostname in URI parsing (#530)
* Update connection.py
* cr
* Update dap_base.py (#532)
* Update execution.py (#537)
* feat(nodes): config - add deprecation pathway for deprecated profiles (#504)
* deprecation pathway
* coderabbit suggestions
* add tests
* cr
* fix build
* fix build
* Update conftest.py
* Update conftest.py
* Update conftest.py
* Update conftest.py
* simplify
* simplify
* fix(mixins): error handling for missing pipeline configuration files (#544)
* fix(nodes): openai - add latest openai models (#503)
* add latest openai model profiles
* coderabbit fixes
* fix typo (we didn't introduce)
* don't change default
* Update services.json
* Update services.json
* fix(nodes): remove deprecated gemini models (#500)
* remove gemini 3 pro (deprecated), gemini 2
* code rabbit response
* coderabbit
* Update services.json
* Update services.json
* feat: #429 Add Exa search node and working sample pipeline [FRONTIER TOWER HACKATHON] (#386)
* Add Exa search node and stable pipeline
* Harden Exa search node runtime handling
* Fix Exa fallback question parsing
* Fix Exa mock credential test wiring
* Assert Exa mock request contract
* Tighten Exa API exception types
* Document Exa node lifecycle hooks
* Handle unsafe Exa result URLs per item
* Clean up Exa backend from endpoint bag
* Unpin Exa node requests dependency
* Add comments to Exa service definition
* Add Exa search docstrings
* Parse Exa boolean config defensively
* Guard Exa error payload parsing
* revert: remove Exa node test changes
* revert: restore base test framework behavior
* chore: drop test framework whitespace diff
---------
Co-authored-by: Kaushik Sivakumar <kaushik.siva88@gmail.com>
* fix(vscode): register canvas-played pipelines in sidebar menu (#571)
* feat(vscode): improve stop button feedback in Pipeline Observability screen
Handle TASK_STATE.STOPPING in the control button to show "Stopping..."
with a disabled state and distinct orange styling, preventing duplicate
clicks and giving immediate visual feedback during pipeline shutdown.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(vscode): register canvas-played pipelines in sidebar menu
The PIPELINES sidebar failed to track pipelines started from the canvas
because source-component detection relied solely on config.mode being
set to "Source". The canvas editor never writes that field — only the
C++ engine adds it at execution time — so freshly saved .pipe files
from the canvas had zero recognised source components.
Three changes fix the issue:
1. PipelineFileParser.getSourceComponents now accepts an optional
service catalog and also checks each component's provider classType
array for "source", matching the same logic the canvas uses to
decide which nodes get a Run button.
2. SidebarFilesProvider passes the cached service catalog to the parser
when loading/re-parsing files, and re-parses all files when the
catalog first arrives (servicesUpdated) so that files parsed before
connect are retroactively enriched.
3. handleEvent now handles the "restart" apaevt_task action, which the
server sends instead of "begin" when a pipeline is restarted. Without
this, restarted pipelines silently dropped out of the active set.
Closes #396
#Hack-with-bay-2
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(test): resolve flaky timeouts and hanging in concurrent pipeline tests (#561)
The stress test (4 pipelines x 32 cycles) used a 30s hard-coded timeout
that was too tight for CI runners, causing both Jest timeout errors and
"Connection closed" failures under load. Several other concurrent tests
had the same issue. Test teardown could also hang indefinitely if a
WebSocket connection failed to close cleanly.
Root causes addressed:
- Hard-coded 30s timeouts on concurrent tests replaced with
TEST_CONFIG.timeout (120s) matching the rest of the suite
- Added single-retry with backoff in the stress test to handle transient
"Connection closed" errors from server-side frame drops under load
- Added bounded timeouts to all afterEach teardown blocks so cleanup
never hangs the runner
- Added forceExit to jest.config.js so Jest exits even with leaked handles
- Added pytest-timeout (120s default) in pyproject.toml to prevent
individual Python tests from hanging indefinitely
- Removed deprecated event_loop fixture from conftest.py (replaced by
pytest-asyncio auto mode)
- Added asyncio_mode = "auto" to pyproject.toml for consistent async
test handling
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(vscode): change play button to show actionable text instead of current state (#575)
- Rename idle label from "Play" to "Run Pipeline" for clearer intent
- Add STOPPING state with "Stopping..." disabled button to prevent
double-clicks and provide immediate visual feedback during shutdown
- Widen hover expansion to accommodate longer label text
- Smooth CSS transitions with easing functions for polished UX
Closes #398
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(ci): add build passthrough for docs-only PRs (#607)
When a PR only changes docs/README files, the Build job is correctly
skipped. But branch protection requires "Build / Ubuntu 22.04",
"Build / macOS (ARM64)", and "Build / Windows Server 2022" checks
to pass. The skipped jobs never report status, so PRs hang forever.
Add a build-skip job that runs on docs-only PRs and reports success
under the same check names, satisfying branch protection without
running actual builds.
Co-authored-by: Dmitrii <dmitrii@Dmitriis-MacBook-Pro-2.local>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore(docs): reorder README header (#594)
* chore(docs): reorder README header — move language icons above description
Swaps the position of the language icon badges and the project
description so the icons appear more prominently. Also removes
fixed height attributes to let icons render at their native size.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): move closing div to include screenshots in header block
Extends the centered header div to wrap the screenshot images and
captions so they inherit the same alignment as the rest of the hero
section.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): remove Product Hunt badges from all READMEs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): reformat features section as table and update install screenshot
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): simplify features table — remove icons column
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): theme-aware language icons and replace emojis with unicode
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): revert language icons to original native-color PNGs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): reorder README header — move language icons above description
Swaps the position of the language icon badges and the project
description so the icons appear more prominently. Also removes
fixed height attributes to let icons render at their native size.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): move closing div to include screenshots in header block
Extends the centered header div to wrap the screenshot images and
captions so they inherit the same alignment as the rest of the hero
section.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): remove Product Hunt badges from all READMEs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): reformat features section as table and update install screenshot
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): simplify features table — remove icons column
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): theme-aware language icons and replace emojis with unicode
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): revert language icons to original native-color PNGs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): rename engine badge to Runtime and capitalize License
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(docs): capitalize all badge labels for consistency
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat(engine): support for experimental capability (#606)
* feat(engine): support for experimental capability
* feat(engine): support for experimental capability
* feat(engine): add DEPRECATED capability bit, move EXPERIMENTAL to BIT(16), and surface experimental badge in UI
- Insert DEPRECATED = BIT(15) into PROTOCOL_CAPS so services.json can
flag drivers as deprecated; shift EXPERIMENTAL from BIT(15) to BIT(16).
- Wire "deprecated" string in services.cpp parser and expose the new
constant via pybind11 bindings.
- Add PROTOCOL_CAPS enum to both client SDKs (TypeScript and Python)
with all 17 capability flags.
- Add Experimental flag (1 << 16) to the shared-ui IServiceCapabilities
enum.
- Render a yellow "EXPERIMENTAL" / "Experimental" badge on canvas nodes,
the Add Node slider, and the Quick Add popup when a service carries
the experimental capability.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Rod.Christensen <rod.christensen@aparavi.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(store): handle-based streaming I/O for file store (#600)
* feat(store): add handle-based streaming I/O to file store (open/read/write/close)
The store system previously had two problems: it buffered entire files
in memory for every read/write, and domain operations (save_project,
get_template, save_log, etc.) were implemented as monolithic methods
on the Store class with bespoke path construction and JSON
serialization baked in.
This change replaces that with a generic filesystem-style interface
(open, read, write, close, delete, stat, mkdir, list_dir) on
FileStore, with domain methods (save_project, get_template, save_log,
etc.) becoming thin convenience wrappers on the client SDKs that
call the generic file operations with well-known paths. The server
no longer needs to know about project/template/log semantics — it
just serves files.
The handle-based open/read/write/close pattern also enables streaming
large files without holding everything in memory, and lets each
backend use its native chunked upload API.
The open/write/close pattern is the lowest common denominator across
all three backends:
- S3: create_multipart_upload → upload_part (5 MB buffer) → complete
- Azure: stage_block (4 MB buffer) → commit_block_list
- Filesystem: open('wb') → write() → close()
Each handle is tagged with the owning connection_id so that when a
connection terminates, all its handles are force-closed (committing
whatever data has been written, not discarding it).
Changes by layer:
IStore (store.py):
- Added open_write, write_chunk, close_write, abort_write,
open_read, read_chunk, close_read with default in-memory
implementations so custom backends continue to work.
Backends (filesystem.py, s3.py, azure.py):
- FilesystemStore: holds aiofiles file descriptors across calls.
- S3Store: multipart upload with 5 MB buffer threshold; falls back
to single put_object for files under 5 MB.
- AzureBlobStore: staged blocks with 4 MB threshold; falls back to
upload_blob for small files.
- abort_write on all backends commits rather than discards.
FileStore (file_store.py — new file):
- FileHandle dataclass and FileHandleMode enum (inline, no separate
module — nothing outside FileStore imports them).
- Handle registry with per-path write locks (one writer at a time).
- close_all_handles(connection_id) for disconnect cleanup.
- read()/write() convenience methods now use handles internally.
- Fixed stat() to check directory before file (prevents filesystem
directories from being reported as files).
DAP command handler (cmd_task.py):
- fs_open, fs_read (handle-based), fs_write (handle-based), fs_close
replace the old path-based fs_read/fs_write subcommands.
- Removed domain-specific subcommands (save_project, get_template,
etc.) — these are now client-side convenience wrappers.
Disconnect cleanup (task_server.py):
- _dapbase_on_disconnected now calls close_all_handles for the
disconnecting connection.
Client SDKs (store.py, client.ts):
- fs_open/fs_read/fs_write/fs_close (Python) and
fsOpen/fsRead/fsWrite/fsClose (TypeScript) — identical shapes.
- Convenience wrappers (fs_read_string, fs_write_json, etc.) now
perform open/read|write/close internally.
- Domain methods (save_project, get_project, save_template, etc.)
are thin wrappers that serialize to JSON and write to well-known
paths using the generic file operations.
- Both SDKs use plain string handle IDs, no wrapper classes.
Tests:
- Fixed stale tests in test_store.py and test_file_store.py that
called methods removed from Store and FileStore.
- Added TestHandleIO to test_file_store.py (server-side).
- Added TestFileStoreOperations to Python client integration tests.
- Added File Store Operations to TypeScript client integration tests.
* fix(store): harden store API — validation, offset-on-read, file info, CLI fixes
The handle-based I/O added in f079c994 shipped with several gaps that
this commit addresses across the full stack (server, Python SDK, TS SDK,
both CLIs, and tests).
Security — path and ID validation
---
Paths and domain IDs (projectId, templateId, source) were interpolated
into storage keys without checking individual segments. A malicious
client_id like "../../other" or a projectId containing "*" could escape
account isolation or cause backend errors. Validation now happens at
three layers:
- Server (FileStore._validate_path): rejects *, ?, <, >, |, ", null,
and control characters per segment. __init__ rejects client_ids with
path separators or ".." values.
- Python SDK (StoreMixin._validate_store_path / _validate_id): same
rules applied before every DAP request that takes a path or domain ID.
- TS SDK (RocketRideClient.validateStorePath / validateId): same rules.
API change — move offset from open to read
---
Passing the byte offset at open time forced the server to track cursor
state internally, and gave the client no way to seek after opening.
Offset is now a parameter of read_chunk / fs_read / fsRead, letting the
client control position on every call. Convenience wrappers
(fs_read_string, fsReadString) track offset client-side in a loop.
File metadata — get_file_info, size in list_dir/stat
---
list_dir and stat previously returned only modification time for files,
and list_dir fetched it via a separate get_modified_time call. Added
IStore.get_file_info() returning {size, modified} in a single backend
call:
- Filesystem: one stat() call
- S3: one head_object call
- Azure: one get_blob_properties call
list_dir and stat now return both size (bytes) and modified (epoch
timestamp) for file entries. CLI dir output reformatted to match Windows
DIR style (date, time, <DIR> or size, name, summary counts).
Concurrency fixes in FileStore
---
- open_write: write lock was acquired after awaiting the backend, leaving
a race window at the suspension point. Lock now acquired before await,
released on failure.
- delete: rejects deletion while the path has an active write handle.
- read_chunk: negative offset rejected, length capped at MAX_CHUNK_SIZE.
- cmd_task handler: clamps client-supplied offset and length.
Broken CLI write commands
---
Both Python and TS CLIs called fs_write(path, data) — but after the
handle-based refactor, fs_write takes (handle, data). Fixed to use
fs_open/fs_write/fs_close with chunked streaming (64 KB in Python,
createReadStream in TS).
Cloud provider fixes
---
- Azure write_chunk: buffer bytes were deleted before _stage_block
completed, losing data on transient failures. Deletion now happens
after staging succeeds. close_write clears buffer after commit.
- S3 open_write: unconditionally called create_multipart_upload even for
small files, then aborted it in close_write. Multipart creation is now
deferred until the buffer first reaches 5 MB; small files use simple
put_object.
Minor fixes
---
- store.py: fallback temp path used 'dtc' instead of 'store', diverging
from the primary branch.
- task_server.py: disconnect path created a FileStore instance even when
the connection never used the store. Now checks the cache first.
- main.py: error message listed old command names (save_project, etc.)
instead of current ones (dir, type, write, rm, mkdir, stat).
- Integration tests: Python and TS test path schemes aligned to
.test-store/{lang}-{name}-{random} to prevent collision when run
concurrently.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(store): offload sync cloud SDK calls to thread pool via asyncio.to_thread
Both the Azure and S3 storage providers use synchronous SDKs (azure-storage-blob
and boto3) but are called from async methods on the event loop. With multiple
clients connected over WebSocket via the rrext_store DAP path, a blocking
upload_blob() or put_object() call freezes the entire event loop for all
connected clients.
Wrapped every synchronous SDK call in asyncio.to_thread() so network I/O runs
in the default thread pool executor:
Azure (azure.py):
- upload_blob, download_blob/readall, get_blob_properties, exists, delete_blob,
list_blobs, stage_block, commit_block_list — all offloaded
- _stage_block made async to await the to_thread call
S3 (s3.py):
- put_object, get_object/Body.read, head_object, delete_object, paginate
(list_objects_v2), create_multipart_upload, upload_part,
complete_multipart_upload, abort_multipart_upload — all offloaded
- _upload_part made async to await the to_thread call
- Multi-step operations (read + parse, paginate + collect) wrapped in
inner functions to keep the entire blocking sequence in one thread call
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(store): enforce handle ownership, fix empty-dir display, remove abort_write
Applied fixes from code review. Each finding was verified against the
current code; findings that were already addressed, architecturally
unsound, or purely stylistic were rejected with reasoning below.
Handle ownership enforcement
---
_get_handle now accepts an optional connection_id and rejects operations
from connections that don't own the handle. The cmd_task DAP handlers
pass self._connection_id on every read_chunk, write_chunk, close_write,
and close_read call. The parameter defaults to 0 (no check) so internal
callers (convenience methods, tests, close_all_handles) are unaffected.
This matters because handle IDs are UUIDs sent over the wire — without
ownership checks, a client that guesses or intercepts a handle ID from
another connection could read or write another user's open file.
Empty directory vs missing path
---
Both CLIs printed "File Not Found" when fs_list_dir returned zero
entries, which is wrong for an existing empty directory. They now call
fs_stat/fsStat to distinguish: empty dirs show a zero-count summary,
missing paths show "File Not Found".
Remove abort_write from API
---
abort_write existed on IStore and all three providers but had zero
callers — it was dead code. Rather than build out discard semantics for
an unused API surface, the method was removed entirely. If abort
semantics are needed in the future, they can be added with a clear
use case driving the design.
Silent exception swallowing in listing
---
_get_all_items (Python) and getAllProjects/getAllTemplates (TS) caught
all exceptions and silently continued when reading project/template JSON
files. This hid file corruption, permission errors, and malformed JSON
with no diagnostic output. Both now log the error at debug level before
continuing, so issues are visible in logs without breaking the listing.
Findings rejected (with reasoning)
---
- task_server.py client_id empty default: The empty string is a
dataclass initialization pattern, not a security gap. client_id is set
from _account_info.clientid after authentication succeeds, and
unauthenticated connections cannot reach the store. Adding validation
at the dataclass level would require finding and updating every
construction site for a field that is always set by the auth flow.
- cmd_task.py chunk length clamping: Already implemented in the prior
commit (ec225ed3). The review was looking at stale code.
- filesystem.py lock/temp-file staging for open_write: The review
proposed acquiring the existing file lock for the entire lifetime of a
write handle and writing to a temp file with atomic rename on close.
This would be a significant architectural change that conflicts with
the current design: FileStore._write_locks already provides
single-writer exclusion at the application layer, and the handle-based
API is designed for streaming large files where holding a filesystem
lock for minutes would block all other operations (reads, stat,
list_dir) on that file. The current approach — application-level write
locks + direct file I/O — is appropriate for the access patterns.
- fs_write_string simplification: The review suggested replacing the
nested try/except with finally + contextlib.suppress. The current
pattern correctly calls fs_close exactly once on the success path and
exactly once (best-effort) on the error path before re-raising. A
finally block would call close twice on the success path (once
explicitly, once in finally). Equivalent behavior would require a
flag variable, making it no simpler than the current code.
- Integration tests for mkdir/list_dir: Test additions are valuable but
are a separate concern from the code fixes in this commit.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Rod.Christensen <rod.christensen@aparavi.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(tools): Replace tool declarations @tool_function decorators on IInstanceBase (#599)
* refactor(engine): replace ToolsBase driver classes with @tool_function decorators on IInstanceBase
Every tool-providing node previously required two parallel classes: an
IInstance (pipeline integration) and a ToolsBase driver (tool definitions).
The driver implemented three abstract methods (_tool_query, _tool_validate,
_tool_invoke) and the IInstance wired them together with boilerplate
delegation in invoke(). This created a parallel system that was hard to
understand and tedious to write — the driver often just called back into
the instance for the actual work, and every node repeated the same
delegation pattern.
The root cause was that tool declaration was separate from the class that
actually owned the state and connections needed to execute the tool. A
MySQL node's IInstance had the database connection, the LLM access, and
the lane handlers — but its tool definitions lived in a MySQLDriver class
that had to reach back into the instance for everything.
This commit collapses both layers into one by adding @invoke_function and
@tool_function decorators directly to IInstanceBase in rocketlib/filters.py.
Any IInstanceBase subclass can now declare tool entry points with a
decorator — the method name becomes the tool ID, the decorator carries the
schema and description, and the base class invoke() dispatches
automatically. No separate driver class, no factory method, no delegation.
Usage example — static tool:
from rocketlib import IInstanceBase, tool_function
class IInstance(IInstanceBase):
IGlobal: IGlobal
@tool_function(
input_schema={
'type': 'object',
'required': ['url', 'method'],
'properties': {
'url': {'type': 'string'},
'method': {'type': 'string', 'enum': ['GET', 'POST']},
},
},
description='Make an HTTP request.',
)
def http_request(self, args):
if args['method'] not in self.IGlobal.enabled_methods:
raise ValueError('Method not allowed')
return execute_request(url=args['url'], method=args['method'])
Usage example — dynamic description from config:
class DatabaseInstanceBase(IInstanceBase):
@tool_function(
input_schema={...},
description=lambda self: (
f'Query the {self._db_display_name()} database. '
f'Just describe what data you need.'
),
)
def get_data(self, args):
...
Usage example — dynamic tools (MCP, tools discovered at runtime):
class IInstance(IInstanceBase):
def _tool_query_dynamic(self):
return self.IGlobal.list_namespaced_tools()
def _tool_invoke_dynamic(self, *, tool_name, input_obj):
server, bare = tool_name.split('.', 1)
return self.IGlobal.call_tool(server, bare, input_obj)
The decorator system follows the existing control/invoke layering:
control() <- engine entry point, rarely overridden
└─ invoke() <- dispatches on param.op
├─ tool.* -> @tool_function methods (tool.query builds
| descriptors, tool.invoke calls the method)
└─ other ops -> @invoke_function methods (op name = method name)
Key design decisions:
- Decorators live in rocketlib/filters.py with zero upstream dependencies.
The declaration plumbing (ToolDescriptor, @tool_function, @invoke_function,
dispatch logic) is entirely self-contained in the engine base layer.
- No tool name prefix. Tool IDs are bare method names (e.g. 'get_data',
not 'mysql.get_data'). The agent host already namespaces by nodeId to
prevent collisions between multiple nodes of the same type.
- No separate validation step. tool.validate is removed from the dispatch.
Validation is guard clauses at the top of the function body — simpler,
more obvious, impossible to forget.
- Decorator parameters accept static values or callables. Roughly half of
all tools need runtime config in their descriptions (e.g. the user-entered
database description, allowed import lists, display names). These use
lambda self: ... which is resolved at tool.query time when self.IGlobal
is available. This is a first-class pattern, not an escape hatch.
- User-entered tool descriptions are auto-prepended. The "tool" field from
the node config (e.g. "This is a database of world cities") is read via
_tool_config_description() and prepended to every @tool_function's
description automatically. Individual decorators only provide the fixed
part.
- Dynamic tools (MCP) use _tool_query_dynamic / _tool_invoke_dynamic
overrides on IInstanceBase for tools discovered at runtime from external
servers. Only MCP needs this.
- Backward compatible with the agent-as-tool pattern. The four agent nodes
still use _AgentAsToolProvider via ToolsBase — they are not tool nodes in
the decorator sense, they use a different mechanism for exposing
themselves as tools to other agents.
Migrated nodes:
- chart_chartjs: generate_chart (also eliminated the set_llm_invoker
callback — IInstance calls self.instance.invoke('llm', ...) directly)
- tool_python: execute
- tool_http_request: http_request
- tool_firecrawl: scrape_url, map_url
- memory_internal: put, get, list, clear
- db_mysql, db_postgres: get_data, get_schema, get_sql (via
DatabaseInstanceBase with callable descriptors for display names)
- db_neo4j: get_data, get_schema, get_cypher
- mcp_client: dynamic tools via _tool_query_dynamic/_tool_invoke_dynamic
Deleted (11 files, ~1600 lines):
- All *_driver.py files (http, python, firecrawl, chartjs, memory, mcp,
mysql, postgres, neo4j)
- packages/ai/src/ai/common/database/db_driver_base.py
- DatabaseDriverBase removed from database __init__.py exports
Updated imports:
- Agent framework drivers (langchain, crewai, deepagent) and AgentBase
now use ToolDescriptor from rocketlib instead of ToolsBase.ToolDescriptor
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(nodes): fix tool schema key mismatch, harden node implementations
The @tool_function decorator builds ToolDescriptors with camelCase keys
(inputSchema, outputSchema) but three of the four agent drivers were
reading snake_case (input_schema), silently getting None for every
tool's parameter schema. The LLM never saw real parameter definitions —
it always fell back to a generic "accept anything" schema.
Tool schema fix (3 agent drivers)
---
- agent_langchain: td.get('input_schema') → td.get('inputSchema')
- agent_deepagent: td.get('input_schema') → td.get('inputSchema')
- agent_crewai: already handled both with fallback; simplified to
td.get('inputSchema') for consistency
llm_base: replace manual dispatch with @invoke_function
---
The manual match/case block in llm_base/IInstance.py duplicated what the
base class invoke() auto-dispatcher already provides. Replaced with four
@invoke_function decorated methods (ask, getContextLength,
getOutputLength, getTokenCounter). Removed the now-unused IInvokeLLM
import.
Node hardening (from code review)
---
- chart_chartjs: inverted ternary → idiomatic `description or "default"`
- memory_internal: _store type MemoryStore → MemoryStore | None; put/get/
clear raise ValueError on non-dict args instead of silently coercing
- tool_firecrawl: metadata.model_dump() exception now logged via warning;
JSON parse catch narrowed to JSONDecodeError/TypeError with log
- tool_http_request/IGlobal: mutable class-level set()/[] defaults →
None; typing.Set/List → built-in set/list
- tool_http_request/IInstance: str(body_json) fallback → json.dumps() so
non-dict/list/str values produce valid JSON
- tool_python/IGlobal: typing.Set → built-in set; removed unused imports
- db_instance_base: int(raw_limit) wrapped in try/except, falls back to
250 on parse error instead of raising
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(nodes): address PR review findings — input validation, lint, and hardening
- langchain: fix ANN401/ARG002/UP037 on bind_tools signature
- chart_chartjs: reject non-list/dict data, cap serialized payload at 20KB,
validate and normalize LLM JSON output before wrapping in chartjs fence
- llm_base: rename unused param → _param on invoke handlers (ARG002)
- tool_firecrawl: simplify formats array → single format string, redact raw
payload from warning log
- tool_http_request: fail-fast validation on auth/body types and nested
fields; fail-closed on malformed urlWhitelist in guardrails
- tool_python: validate json.loads result is a list before iterating
- memory_internal: enforce key type/presence in put/get/clear, add dict
check to list handler
- db_instance_base: add missing valid boolean to success/failure return
dicts; fix stale _create_driver docstring → _db_display_name()
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Rod.Christensen <rod.christensen@aparavi.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: add Discord notifications for PRs, issues, and discussions (#612)
- Posts to separate Discord channels via webhooks on PR open, issue
open, and discussion create events
- Uses jq for safe JSON construction (avoids shell escaping issues)
- Truncates body to 1500 chars with unclosed code block detection
- Webhook URLs stored as GitHub Secrets
- Uses GitHub Actions (not native /github endpoint which is unreliable
for discussions per Reddit r/discordapp consensus)
Closes #610
Co-authored-by: Dmitrii <dmitrii@Dmitriis-MacBook-Pro-2.local>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(vscode,engine): Add server monitor (#595)
* refactor(engine): remove ServicePython log level in favor of DebugOut
ServicePython was a dedicated trace level only used by the Python
service layer, but it duplicated what DebugOut already provides.
Consolidating into DebugOut simplifies the Lvl enum surface, removes
a Python-specific flag that callers had to know about separately,
and makes trace configuration more intuitive — `--trace=debugOut`
now covers Python service output alongside other debug tracing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(sdk): add dashboard API and client identification to auth handshake
The server's new rrext_dashboard command provides real-time visibility into
connections, tasks, and aggregate metrics — but neither SDK could call it.
This adds getDashboard() (TS) and get_dashboard() (Python) with full type
definitions so consumers like the VS Code extension can surface server
health without raw DAP calls.
Both SDKs now also accept clientName/clientVersion config options and
forward them during the auth handshake. This lets the server distinguish
which client is connected (e.g. "VS Code 0.9.4" vs "CLI 1.2.0"), which
the dashboard surfaces in each connection's clientInfo field.
The Python DAPClient also now skips the auth message when the transport
lacks get_auth() (e.g. stdio to a subprocess), fixing a crash for
non-WebSocket transports that don't implement DAP authentication.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(vscode): add server monitoring dashboard and fix subscription stomping
Multiple VS Code providers (editor, status, sidebar) share a single
WebSocket connection but independently called rrext_monitor with REPLACE
semantics — each provider's subscription silently overwrote the previous
one, causing missed events depending on activation order.
Introduce MonitorManager, a reference-counted subscription layer that
merges per-key bitmasks across providers and replays them on reconnect.
All providers now subscribe/unsubscribe through MonitorManager instead
of issuing raw rrext_monitor requests.
Add a Server Monitor dashboard (PageDashboardProvider + ServerMonitor
shared-ui component) that surfaces connected clients, running tasks,
and server activity without leaving the IDE. To support this, the
auth handshake now sends clientName/clientVersion so the server can
identify who is connected.
Also threads pipeline names through the execute command and defaults
component display names from the service catalog, so tasks appear with
human-readable labels in the dashboard and status views.
* feat(engine): add dashboard endpoint, connection tracking, and transport fixes
Implement rrext_dashboard command handler with server overview, active
connections, and task metrics. Track per-connection message counts, activity
timestamps, and client identity from auth handshake. Fix status_object event
name typo and exit message parsing in stdio transport. Add task name priority
from execute args over config.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(monitor): improve dashboard readability, component naming, and UX polish
The server monitoring dashboard was functional but hard to read — monitor
subscription keys showed raw UUIDs (p.3fda047b-fcc8-...), attached tasks
showed internal IDs (aa37e50b.chat_1), the outgoing message counter was
never incremented, and several UI details felt rough.
Dashboard data improvements (cmd_misc.py, task_conn.py):
- Resolve monitor keys to human-friendly labels: '*' becomes 'All tasks',
'p.{uuid}.*' becomes 'analyze.*', 'p.{uuid}.chat_1' becomes 'analyze.Chat'
- Show event type flags (summary, flow, task, etc.) alongside each monitor
subscription so operators can see what each connection is listening for
- Return task display names in attachedTasks instead of internal token IDs
- Increment _messages_out counter via send() override in TaskConn — the
counter was initialized but never updated, so the dashboard always showed 0
Task naming (task_engine.py):
- Change status name format to '{task_name|task_id}.{component_name|source}'
so tasks are identifiable by both their execution context and component,
which feeds into the dashboard's friendly label resolution
Component name enrichment (PageEditorProvider.ts):
- Enrich pipeline components with default names from the service catalog
before sending to the canvas webview, so components that lack an explicit
name get the service title (e.g. 'Chat', 'OpenAI') at the provider level
rather than displaying blank or falling back to the raw component ID
Connection page UX (PageConnection.tsx):
- Show Monitor button always, disabled when not connected — previously it
disappeared entirely, giving no indication the feature exists
Sidebar UX (SidebarFilesProvider.ts):
- Switch pipeline restart prompt from modal to toast notification to
eliminate the redundant Cancel button that VS Code forces on modal dialogs
Dashboard UI (ConnectionsTab.tsx, server-monitor.css, dashboard.ts):
- Render each monitor subscription on its own row with flag badges instead
of cramming all keys into a single tag list
- Remove left border accent from selected table row in favor of full
background highlight for cleaner selection feedback
- Update DashboardConnection.monitors type from string[] to {key, flags}[]
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(engine): add task token auth, harden multi-tenant isolation, and clean up teardown
The task server lacked tenant isolation — any authenticated API key could
interact with any task, the dashboard exposed all connections and tasks
across accounts, monitor subscriptions weren't ownership-checked, and
there was no way for external tools to authenticate scoped to a single
task. The debug disconnect also didn't actually detach, and subprocess
teardown had race conditions.
Task token authentication (task_server.py):
- Introduce 'tk_' prefixed task tokens that grant scoped control over a
single task, alongside the existing 'pk_' public tokens for data-only
access. This gives external integrations (MCP, webhooks) a way to
authenticate directly to a task without a full API key.
- Generate task tokens with the 'tk_' prefix during task setup so they
are distinguishable from public and API key credentials.
- Rework control.id to strip the auth prefix before hashing, so display
IDs remain clean regardless of token type.
- Remove get_server_status() and the _tasks_peak/_tasks_total counters —
these were server-global metrics that leaked cross-tenant data and are
now replaced by the per-account dashboard endpoint.
Multi-tenant dashboard isolation (cmd_misc.py):
- Add permission check (task.monitor) to the dashboard endpoint.
- Filter task_controls and connections to only the caller's API key so
each account sees only its own tasks and connections.
- Remove peakTasks and totalTasksLifetime from overview — these were
server-global counters that exposed cross-tenant activity.
Dashboard type updates (dashboard.ts, dashboard.py, OverviewTab.tsx):
- Remove peakTasks and totalTasksLifetime from DashboardOverview in both
TypeScript and Python SDK types.
- Update OverviewTab to remove the Total Tasks card and peak subtitle.
- Update comments to clarify metrics are scoped to the caller's account.
Task ownership enforcement (task_conn.py, cmd_task.py, cmd_monitor.py):
- Add apikey ownership checks in get_task() so API key callers can only
access tasks they launched — previously any valid key could reach any
task. pk_ and tk_ auth are already inherently scoped by get_task_token.
- Add permission check and ownership verification to rrext_get_token so
the token for a running task can't be retrieved by a different account.
- Add ownership checks to monitor set_monitor() for both token-based and
project-based subscriptions, with PermissionError re-raised past the
generic exception handler.
- Fix verify_permission return type annotation (was bool, actually None).
- Resolve token from request.arguments.token as a fallback, not just the
top-level request.token, so callers that pass token in args work correctly.
- Recognize tk_ tokens in get_task_token as locked to their task, same as pk_.
Debugger fixes (cmd_debug.py):
- Rewrite attach to use get_task()/get_task_token() for ownership validation
instead of manually extracting the token and calling verify_permission,
aligning it with how all other commands validate access.
- The disconnect handler was calling self.get_task() (which just validates)
but never called self._server.detach_task(), so disconnecting a debug
session left the debugger attached on the task side. Now properly detaches.
- Rewrite terminate to also use get_task()/get_task_token() consistently.
- Save task control ID on attach so debug events reference the right task.
Subprocess teardown hardening (task_engine.py):
- Set _is_terminating flag at the start of on_teardown and on_terminate to
block new data operations from racing against shutdown.
- Guard engine.terminate() against None engine reference — the subprocess
may not have started if the task fails during init.
- Use local 'engine' variable consistently instead of self._engine_process
to avoid TOCTOU issues during termination.
- Use Task.TaskData wrapper for data client connections.
- Reset exitCode to None instead of 0 in reset_status so completed-with-
success (exit 0) is distinguishable from never-ran.
Source resolution extraction (pipeline.py):
- Extract the duplicated "find the single source component" logic from
task_server.py and cmd_misc.py into a shared resolve_implied_source()
utility. Both call sites had identical logic for scanning components,
detecting ambiguity, and returning the source ID.
Minor cleanup:
- Replace magic number 3 with TASK_STATE.RUNNING.value in MCP tool listing.
- Remove unused HTTPException import and dead config variable in task_server.
- Remove stray blank line in data_conn.py.
- Fix error log in detach to reference token instead of unresolved control.id.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(monitor): add strongly-typed event definitions, dashboard activity stream, and SDK self-identification
The server monitor Activity tab was always empty because no events were
emitted or forwarded. Monitor subscriptions leaked when tasks were removed
or editors closed. The SDKs didn't identify themselves, making connections
opaque. And the event type definitions between Python and TypeScript were
inconsistent, incomplete, and weakly typed — the old EVENT_TASK used a
loose TypedDict with total=False in Python and a DAP wrapper with fields
that never existed on the wire in TypeScript.
Strongly-typed event definitions (events.ts, events.py, dashboard.ts, dashboard.py):
- Replace weak, inconsistent event types with strongly-typed discriminated
unions in both SDKs, using 'action' as the discriminant field. TypeScript
enforces exact field sets per variant at compile time; Python uses Literal
types on action fields for the same guarantee at type-check time.
- TaskEvent (TS) / TASK_EVENT (Python): four variants — TaskEventRunning,
TaskEventBegin, TaskEventEnd, TaskEventRestart. Each lifecycle variant
includes the new 'name' field. These are body-only types describing the
apaevt_task payload — not DAP message wrappers. The old EVENT_TASK had
an 'id' field at the root that never existed on the wire (the server
puts id into body.__id via build_event). The new types correctly describe
what clients actually receive.
- DashboardEvent (TS) / DASHBOARD_EVENT (Python): eight variants —
ConnectionAdded, ConnectionRemoved, TaskStarted, TaskStopped,
TaskRemoved, TaskError, AuthFailed, MonitorChanged. Each variant has
only the fields that apply — connection events carry connectionId and
optional client identity, task events carry taskId, error events carry
exitCode, etc. No optional fields leaking across variants.
- Both SDKs are in full parity: identical variant names (PascalCase TS,
SCREAMING_CASE Python), identical fields per variant, identical action
string literals.
- Add DASHBOARD (1 << 7) and SSE (1 << 6) to EVENT_TYPE enum in both
SDKs — SSE was already on the server but missing from the client types.
- Update DASHBOARD_MONITOR, DASHBOARD_TASK (add name, Optional nullables,
rate/count fields) and DASHBOARD_CONNECTION (monitors as {key, flags}[])
in both SDKs.
Server event emission (task_server.py, task_conn.py, cmd_monitor.py, task_engine.py):
- Add broadcast_server_event(type, event) on TaskServer and
send_server_event(type, event) on MonitorCommands for server-level
events that aren't task-scoped. Mirrors the existing
broadcast_task_event/send_task_event pattern — both paths go through
the connection's monitor layer, server events just check the '*'
wildcard only.
- Rename forward_event to send_task_event for clarity alongside the new
send_server_event.
- Emit apaevt_dashboard events: connection_added (from on_auth, after
client info is captured), connection_removed (from on_disconnect),
task_removed (from remove_task cleanup), task_error (non-zero exit
in task teardown), auth_failed (from on_auth rejection),
monitor_changed (from set_monitor subscribe/unsubscribe).
- Include 'name' in all apaevt_task lifecycle event bodies (begin, end,
restart) so consumers can display human-readable task names.
- Clean up monitor subscriptions when tasks are removed from the registry.
Dashboard provider and webview (PageDashboardProvider.ts, PageDashboard.tsx):
- Subscribe to ['task', 'summary', 'dashboard'] so the provider receives
both apaevt_task and apaevt_dashboard events.
- Forward them as separate typed message types to the webview: 'taskEvent'
with TaskEvent body, 'dashboardEvent' with DashboardEvent body. No
conversion between them — each channel keeps its native shape.
- Webview wraps both in ActivityEvent tagged union ({ source: 'task' |
'dashboard', body }) and accumulates up to 100 events newest-first.
Activity tab display (ActivityTab.tsx, OverviewTab.tsx):
- Separate display functions per event source: getTaskEventDisplay handles
running/begin/end/restart, getDashboardEventDisplay handles all eight
dashboard event types. Both leverage discriminant narrowing for type-safe
field access.
- Show client identity in connection events: "Cursor 1.0.6:#3 connected".
- Fix completed tasks showing internal ID instead of display name.
Monitor lifecycle cleanup (task_server.py, PageEditorProvider.ts):
- Remove monitor subscriptions for a task across all connections when the
task is removed from the registry.
- Fix PageEditorProvider.stopMonitoring to always call removeMonitor on
editor dispose regardless of isMonitoring flag — a disconnect/reconnect
cycle could desync the flag from the MonitorManager refcount, leaking
subscriptions.
SDK self-identification (DAPClient.ts, client.py, constants.ts, tasks.js):
- Default clientName to 'TypeScript SDK' / 'Python SDK' when not provided
by the caller, so connections are identifiable in the dashboard.
- Default clientVersion to the SDK's own version: TypeScript reads
SDK_VERSION from constants.ts (auto-synced from package.json by the new
sync-version build task), Python reads from importlib.metadata so it
always matches pyproject.toml. Source files default to '' — the real
value is set at build time (TS) or import time (Python).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(vscode): fix broken CSS comment headers and move padding/background to views
Every view-specific CSS file (PageConnection, PageDeploy, PageEditor,
PageSettings, PageStatus) plus the shared app.css and vscode.css were
missing the opening '/*' on their license comment blocks. The CSS parser
treated the unclosed comment as content, silently dropping all rules that
followed — body resets, container padding, layout classes, everything.
This is why view-specific styles appeared to have no effect.
CSS comment fixes:
- Add missing '/*' opener to PageConnection, PageEditor, PageStatus,
PageSettings, app.css, and vscode.css
- Remove stray closing comment fragment from PageDeploy
View-owned padding and background:
- Remove view-specific body padding rules (body.settings, body.sidebar-status,
body:not(...)) from vscode.css — these were unreliable because VS Code's
own webview styles can override body padding
- Set body to padding: 0; margin: 0 as a clean baseline
- Each view's root container now owns its own padding and background:
PageSettings gets padding: 24px, PageStatus/PageDeploy get background-color
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(monitor): harden monitor branch — security, correctness, and cleanup
Addresses code review findings across the monitor feature branch. Each
fix was verified against the current code before applying.
Security
---
- ConnectionsTab: raw API key no longer displayed in the detail panel;
masked to first/last 4 chars with bullets in between.
- cmd_misc: _resolve_monitor_label no longer echoes raw task tokens for
non-'p.' monitor keys; returns 'Task monitor' instead.
Correctness
---
- extension.ts: _pageDashboard.dispose() added to deactivate() — was
leaking event listeners registered in setupEventListeners().
- PageDashboardProvider: generateNonce() now uses crypto.randomBytes()
instead of Math.random(); require('fs') replaced with ES import.
- SidebarFilesProvider: pipeName strips both .pipe and .pipe.json
suffixes so legacy filenames produce the correct name.
- cmd_debug: disconnect flow tolerant of tasks removed by on_terminate
(best-effort detach); debug state cleared in finally block.
- cmd_monitor: 'type' parameter renamed to 'event_type' to avoid
shadowing the Python builtin; bitmask parsing now accepts integer
values and legacy listenType in addition to string arrays.
- pipeline.py: separate seen_source boolean from source_id to correctly
detect multiple Source components even when the first has no id.
- task_conn: mutable default dict on on_receive replaced with None
guard to prevent shared-state leakage across calls.
- dap_client: auth request wrapped in try/except — transport is now
disconnected if the auth request itself throws (timeout, network
error) instead of leaving a half-open connection.
- transport_stdio: None guard at top of _process_message prevents
AttributeError when message is None (end-of-stream).
- FlowGraphContext: shallow clone data.config before mutating .name so
the caller's object is not modified.
Cleanup
---
- client.ts: getDashboard docstring corrected from 'server.monitor' to
'task.monitor'.
- engine.py: debug() docstring no longer references removed
ServicePython trace level.
- hooks/index.ts: added export {} so the file is a valid ES module.
- server-monitor.css: currentColor → currentcolor for stylelint
value-keyword-case rule.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(monitor): address PR review findings — error propagation, naming, types
- monitor-manager: syncKey now rethrows on failure; addMonitor rolls back
refCounts so local state stays in sync with server on error
- PageDashboardProvider: add hasWildcardMonitor guard to prevent duplicate
wildcard subscriptions on reconnect
- cmd_debug: move get_task_token() before get_task() in attach/terminate
so token is always defined in error handlers
- cmd_monitor: rename shadowed `type` parameter to `event_type` in
send_task_event (A002); update callers in task_server and task_engine
- task_conn: fix mutable default argument on on_receive (Dict={} → Optional=None)
- task_server: include token-scoped keys in stop_task monitor cleanup;
only strip known auth prefixes (tk_, pk_) when building display id
- tasks.js: use robust regex for SDK_VERSION matching; throw on no match
instead of silently succeeding
- dashboard.ts: allow string | null on nullable wire fields (clientName,
clientVersion, clientId, exitMessage)
- events.ts: fix docstring example to match TaskEvent type fields
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Update packages/shared-ui/src/modules/flow/context/FlowGraphContext.tsx
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* fix(monitor): address remaining PR review findings — security, dedup, a11y, types
- Restrict tk_ token dashboard scope to own task/connection (cmd_misc.py)
- Deduplicate overlapping monitor event sends by merging preferences (cmd_monitor.py)
- Import shared ActivityEvent type instead of local duplicate (PageDashboard.tsx)
- Stamp receivedAt on activity events at receive time, not render (ActivityTab/types)
- Add ARIA tab semantics: role=tablist/tab/tabpanel, aria-selected (ServerMonitor)
- Add keyboard accessibility: tabIndex/onKeyDown on tr, semantic close button (ConnectionsTab)
- Extract TRANSITIONAL_STATES constant to eliminate 4× duplicated OR-chains (PageConnection)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(monitor): tenant-scope broadcasts, coalesce fetches, balance monitors, harden dashboard
- Add apikey parameter to broadcast_server_event + send_server_event for tenant scoping
- Pass apikey from all 6 scoped call sites (connection add/remove, task error/remove, monitor change)
- Coalesce overlapping fetchAndPost() calls via in-flight/pending flags (PageDashboardProvider)
- Balance wi…
Adds a new LLM node for GMI Cloud (api.gmi-serving.com), an OpenAI-compatible inference platform hosting 100+ models including DeepSeek, GPT, Claude, Gemini, Llama 4, and Qwen3 on owned H100/H200 GPU infrastructure. ## Profiles Two model tiers are supported: Shared (always-on) — API key only required: DeepSeek V3.2, V3, R1, R1 Distill 32B & 1.5B, Prover V2 GPT-5.2, 5.1, 5, 4o Claude Opus 4.5, Sonnet 4.5 Gemini 3 Pro, Gemini 3 Flash Deploy-on-demand — endpoint URL + API key required (deploy first at console.gmicloud.ai, then paste the provided endpoint URL): Llama 4 Scout, Llama 4 Maverick Qwen3 235B, 32B, 30B, Coder 480B A custom profile allows specifying any model name and endpoint URL manually.
Summary
Adds a new LLM node for GMI Cloud (api.gmi-serving.com), an OpenAI-compatible inference platform hosting 100+ models including DeepSeek, GPT, Claude, Gemini, Llama 4, and Qwen3 on owned H100/H200 GPU infrastructure.
Profiles
Two model tiers are supported:
Shared (always-on) — API key only required:
DeepSeek V3.2, V3, R1, R1 Distill 32B & 1.5B, Prover V2 GPT-5.2, 5.1, 5, 4o
Claude Opus 4.5, Sonnet 4.5
Gemini 3 Pro, Gemini 3 Flash
Deploy-on-demand — endpoint URL + API key required (deploy first at console.gmicloud.ai, then paste the provided endpoint URL): Llama 4 Scout, Llama 4 Maverick
Qwen3 235B, 32B, 30B, Coder 480B
A custom profile allows specifying any model name and endpoint URL manually.
Type
feat
Testing
./builder testpassesChecklist
Linked Issue
Fixes #538
Summary by CodeRabbit
New Features