Repository navigation
v0.9.71: trial plan-change guard, 1password patch bounds, mcp json-rpc responses - #10521
waleedlatif1 wants to merge 14 commits into
Conversation
waleedlatif1
commented
Nov 30, 2026
- fix(billing): refuse plan changes during a pro trial (fix(billing): refuse plan changes during a pro trial #10520)
- docs(library): update best-dust-alternatives-2026 (docs(library): update best-dust-alternatives-2026 #10519)
- fix(desktop-terminal): keep a fast command's output when its start and end markers share a read (fix(desktop-terminal): keep a fast command's output when its start and end markers share a read #10504)
- docs(library): update best-microsoft-copilot-studio-power-automate-alternatives (docs(library): update best-microsoft-copilot-studio-power-automate-alternatives #10518)
- docs(library): update best-pipedream-alternatives-2026 (docs(library): update best-pipedream-alternatives-2026 #10517)
- docs(library): update best-workato-alternatives-ai-agents-2026 (docs(library): update best-workato-alternatives-ai-agents-2026 #10516)
- docs(library): update llms-vs-ai-agents (docs(library): update llms-vs-ai-agents #10515)
- feat(library): Best Platforms for Building Internal Tools Powered by AI Agents (feat(library): Best Platforms for Building Internal Tools Powered by AI Agents #10512)
- feat(library): Dify vs n8n: Which Should Self Hosted AI Workflow Teams Choose? (feat(library): Dify vs n8n: Which Should Self Hosted AI Workflow Teams Choose? #10513)
- feat(library): n8n vs LangChain: Which Should Teams Use for AI Agent Workflows? (feat(library): n8n vs LangChain: Which Should Teams Use for AI Agent Workflows? #10511)
- feat(library): Dust vs n8n vs Gumloop for Company Knowledge and Workflow Automation (feat(library): Dust vs n8n vs Gumloop for Company Knowledge and Workflow Automation #10510)
- feat(library): Google ADK vs LangGraph vs Pydantic AI: Which Is Best for Production Agents? (feat(library): Google ADK vs LangGraph vs Pydantic AI: Which Is Best for Production Agents? #10509)
- fix(mcp): accept client-posted JSON-RPC responses on workflow MCP servers (fix(mcp): accept client-posted JSON-RPC responses on workflow MCP servers #10508)
- fix(onepassword): bound item patches and refuse ones that change nothing (fix(onepassword): bound item patches and refuse ones that change nothing #10506)
…ing (#10506) - an item patch carries 1 to 500 operations, each with a path of 1 to 16 segments; a patch with no operations or a path naming no field is refused instead of reporting success - item, field and patch JSON bodies are capped at 256 KB - path segments are checked with the shared isSafeKey - the catalog's operation-input map and the Anthropic schema path walk skip inherited keys
…vers (#10508) The Streamable HTTP transport requires a server to answer a POSTed JSON-RPC response with 202 and no body, as it already does for notifications. The workflow MCP serve route refused them with 400 -32600. It now accepts and ignores result and error responses, matching the SDK's streamable HTTP server; the route never sends server-to-client requests, so there is nothing to correlate them to. Remaining malformed-message 400s now log the body's shape (batch, not_an_object, invalid_version, invalid_response, missing_method, invalid_id) instead of a single not_a_request, without logging the body.
Co-authored-by: Sim Pi Agent <pi@sim.ai>
Co-authored-by: Sim Pi Agent <pi@sim.ai>
Co-authored-by: Sim Pi Agent <pi@sim.ai>
…d end markers share a read (#10504) * fix(desktop-terminal): keep a fast command's output when its start and end markers share a read The session applied every shell marker in a PTY chunk before looking at the chunk's text. When a quick command's start marker, output and end marker arrived in one read, the command finished before its text was examined, so terminal_run returned completed with empty output. Marker offsets now place each piece of text before or after the markers around it. * fix(desktop-terminal): judge a full-screen command only after the whole read is applied A program that opened and closed the alternate screen and finished within one read was resolved as interactive before its finish marker ran. Interactive resolution now waits until every marker in the read is applied and requires the alternate screen to still be held.
* docs(library): update best-dust-alternatives-2026 * improvement(library): add a runnable Dust buying guide pilot --------- Co-authored-by: Sim Pi Agent <pi@sim.ai>
* fix(billing): refuse plan changes during a pro trial A trial's fixed allowance is counted per billing period, and a price change restarts Stripe's period, so switching monthly/yearly during a trial started the cap over each time. Refuse switch-plan (checked against the row and Stripe) and any personal /subscription/upgrade while a Pro trial runs. * fix(billing): scope the trial guard to personal pro, cover the stripe check * chore(tests): shrink the test-types baseline for the switch-plan route test
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
[Medium impact] The runtime changes affect billing, workflow MCP requests, 1Password item operations, and desktop terminal output. The PR appears safe to merge, with a non-blocking gap in rejecting 1Password patches that change nothing. Findings
SummaryThis PR adds trial plan-change guards, bounds 1Password patches, accepts client-posted MCP replies, and preserves fast terminal command output.
Reviews (1) · Last reviewed commit: "fix(billing): refuse plan changes during..." · Reviewed by Greptile |
| const segments = path.split('/').filter(Boolean) | ||
| return ( | ||
| PATCH_OPS.has(record?.op) && | ||
| typeof path === 'string' && | ||
| path.split('/').every((segment) => !PROTOTYPE_SEGMENTS.has(segment)) | ||
| segments.length > 0 && | ||
| segments.length <= MAX_PATCH_PATH_DEPTH && | ||
| path.split('/').every((segment) => isSafeKey(segment)) |
There was a problem hiding this comment.
Unchanged patches still report success
The new no-op check still accepts paths that do not reach an item field. For example, replace /fields/missing-id/value passes, but applyOnePasswordPatch silently returns when that ID is absent. In service-account mode, executeOnePasswordUpdateItem then saves the unchanged item and reports success.
Have the patch helper report missing targets and reject them before saving. Add a regression test for a missing field ID.
There was a problem hiding this comment.
2 issues found across 32 files
Confidence score: 3/5
- In
json-patch.ts, a patch path that matches nothing can be silently ignored, then reported as successful in service-account mode. MakeapplyOnePasswordPatchreject paths that resolve to nothing. - In
session.ts, a command that enters the alternate screen but omits?1049lcan leave the terminal on the alternate buffer. Handle that state beforefinishCommand()resetsaltScreen.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/lib/internal/onepassword/json-patch.ts">
<violation number="1" location="apps/sim/lib/internal/onepassword/json-patch.ts:41">
P2: A path that resolves to nothing in the item still passes validation, and `applyOnePasswordPatch` silently no-ops it. In service-account mode the unchanged item is then PUT and reported as success. Have `applyOnePasswordPatch` return whether it applied, and make `executeOnePasswordUpdateItem` reject the patch with a 400 when an operation applies to nothing.</violation>
</file>
<file name="apps/desktop/src/main/terminal/session.ts">
<violation number="1" location="apps/desktop/src/main/terminal/session.ts:846">
P3: `trackAltScreen(text)` runs before this new `output-end` handler, whose `finishCommand()` resets `altScreen` to false. If a command enters `?1049h` but exits without `?1049l`, the terminal remains on the alternate buffer while `tabState().interactive` reports false; track the text after applying markers.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
| PATCH_OPS.has(record?.op) && | ||
| typeof path === 'string' && | ||
| path.split('/').every((segment) => !PROTOTYPE_SEGMENTS.has(segment)) | ||
| segments.length > 0 && |
There was a problem hiding this comment.
P2: A path that resolves to nothing in the item still passes validation, and applyOnePasswordPatch silently no-ops it. In service-account mode the unchanged item is then PUT and reported as success. Have applyOnePasswordPatch return whether it applied, and make executeOnePasswordUpdateItem reject the patch with a 400 when an operation applies to nothing.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At apps/sim/lib/internal/onepassword/json-patch.ts, line 41:
<comment>A path that resolves to nothing in the item still passes validation, and `applyOnePasswordPatch` silently no-ops it. In service-account mode the unchanged item is then PUT and reported as success. Have `applyOnePasswordPatch` return whether it applied, and make `executeOnePasswordUpdateItem` reject the patch with a 400 when an operation applies to nothing.</comment>
<file context>
@@ -10,27 +12,35 @@ function recordValue(value: unknown): Record<string, unknown> | undefined {
- PATCH_OPS.has(record?.op) &&
- typeof path === 'string' &&
- path.split('/').every((segment) => !PROTOTYPE_SEGMENTS.has(segment))
+ segments.length > 0 &&
+ segments.length <= MAX_PATCH_PATH_DEPTH &&
+ path.split('/').every((segment) => isSafeKey(segment))
</file context>
| enteredFullScreen = | ||
| this.captureCommandOutput(text.slice(from, offsets[index])) || enteredFullScreen | ||
| from = offsets[index] | ||
| this.applyMarker(marker) |
There was a problem hiding this comment.
P3: trackAltScreen(text) runs before this new output-end handler, whose finishCommand() resets altScreen to false. If a command enters ?1049h but exits without ?1049l, the terminal remains on the alternate buffer while tabState().interactive reports false; track the text after applying markers.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At apps/desktop/src/main/terminal/session.ts, line 846:
<comment>`trackAltScreen(text)` runs before this new `output-end` handler, whose `finishCommand()` resets `altScreen` to false. If a command enters `?1049h` but exits without `?1049l`, the terminal remains on the alternate buffer while `tabState().interactive` reports false; track the text after applying markers.</comment>
<file context>
@@ -837,18 +833,39 @@ export class TerminalSession {
+ enteredFullScreen =
+ this.captureCommandOutput(text.slice(from, offsets[index])) || enteredFullScreen
+ from = offsets[index]
+ this.applyMarker(marker)
+ })
+ enteredFullScreen = this.captureCommandOutput(text.slice(from)) || enteredFullScreen
</file context>
There was a problem hiding this comment.
Partly valid, fixed in #10523. The real gap was a read where one command's end marker came before the next command's ?1049h: tracking the whole read first let the end-marker reset win, so a just-opened full-screen program showed as not interactive. #10523 tracks alt-screen per segment in stream order, alongside output capture. The scenario described here (enter ?1049h, exit without ?1049l, then the end marker) intentionally stays not interactive: interactive means a full-screen program holds the shell, and the end marker says nothing does. That matches the case where the two arrive in separate reads. Tracking after the markers would flip that case to true after the command ended, so it isn't the fix.