Skip to content

v0.9.71: trial plan-change guard, 1password patch bounds, mcp json-rpc responses - #10521

Open
waleedlatif1 wants to merge 14 commits into
mainfrom
staging
Open

waleedlatif1 wants to merge 14 commits into
mainfrom
staging

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

waleedlatif1 and others added 14 commits November 28, 2026 17:42
…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.
…for Production Agents? (#10509)

* feat(library): Google ADK vs LangGraph vs Pydantic AI: Which Is Best for Production Agents?

* Pi Babysit: address PR #10509 feedback

* Pi Babysit: address PR #10509 feedback

---------

Co-authored-by: Sim Pi Agent <pi@sim.ai>
…low Automation (#10510)

* feat(library): Dust vs n8n vs Gumloop for Company Knowledge and Workflow Automation

* Pi Babysit: address PR #10510 feedback

---------

Co-authored-by: Sim Pi Agent <pi@sim.ai>
…Workflows? (#10511)

* feat(library): n8n vs LangChain: Which Should Teams Use for AI Agent Workflows?

* Pi Babysit: address PR #10511 feedback

---------

Co-authored-by: Sim Pi Agent <pi@sim.ai>
…s Choose? (#10513)

* feat(library): Dify vs n8n: Which Should Self Hosted AI Workflow Teams Choose?

* Pi Babysit: address PR #10513 feedback

---------

Co-authored-by: Sim Pi Agent <pi@sim.ai>
…AI Agents (#10512)

* feat(library): Best Platforms for Building Internal Tools Powered by AI Agents

* Pi Babysit: address PR #10512 feedback

---------

Co-authored-by: Sim Pi Agent <pi@sim.ai>
Co-authored-by: Sim Pi Agent <pi@sim.ai>
…ternatives (#10518)

* docs(library): update best-microsoft-copilot-studio-power-automate-alternatives

* Pi Babysit: address PR #10518 feedback

---------

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
@vercel

vercel Bot commented Nov 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 30, 2026 9:49pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5 · The PR appears safe to merge, with a non-blocking gap in rejecting 1Password patches that change nothing.RetriggerView in GreptileConfidence Score: 4/5

[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

  1. P2 Unchanged patches still report success ▶

Summary

This PR adds trial plan-change guards, bounds 1Password patches, accepts client-posted MCP replies, and preserves fast terminal command output.

  • Pro trial accounts wait until the trial ends to change plans.
  • Workflow MCP servers acknowledge client-posted JSON-RPC responses.
  • 1Password item requests now have clear size and patch limits.
  • Fast terminal commands keep output between their shell markers.
  • Catalog and schema lookups now accept only safe, owned keys.
  • The library adds five guides comparing AI agent and workflow platforms.
  • Existing library guides now include refreshed comparisons and details.

Reviews (1) · Last reviewed commit: "fix(billing): refuse plan changes during..." · Reviewed by Greptile

Comment on lines +39 to +43
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))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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. Make applyOnePasswordPatch reject paths that resolve to nothing.
  • In session.ts, a command that enters the alternate screen but omits ?1049l can leave the terminal on the alternate buffer. Handle that state before finishCommand() resets altScreen.
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 &&

@cubic-dev-ai cubic-dev-ai Bot Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with cubic

enteredFullScreen =
this.captureCommandOutput(text.slice(from, offsets[index])) || enteredFullScreen
from = offsets[index]
this.applyMarker(marker)

@cubic-dev-ai cubic-dev-ai Bot Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with cubic

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

This branch was successfully deployed

1 active deployment
Preview — 09c0b119 Deployed Nov 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant