Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Added terminal support to the OpenCode desktop app. The OpenCode server now exposes APIs for creating PTY sessions. - server buffers messages on ws disconnect - client persists buffer on unmount - tabs are unmounted when not active - only one PTY ws connection active at a time

18,077 görüntüleme • 7 ay önce •via X (Twitter)

0 Yorum

Yorum bulunmuyor

Orijinal gönderinin yorumları burada görünecek

Benzer Videolar

React tip: "use client" misconceptions (2/5) 🚫 "You cannot nest Server Components inside Client Components because "use client" turns everything into Client Components." ✅ We can pass the rendered result of Server Components to Client Components as props. Simple example: (Server Component) (Client Component) (Server Component) is designed for the client. It needs to instantly open and close when clicked. is designed for the server. It uses packages that don't work in the browser and needs to fetch data close to where it's stored without exposing credentials. So, how can we nest a component that uses server APIs inside a component that uses client APIs... without using `import`? React props to the rescue! --- (0:00) 1-4: Reminder: Importing code forms a module dependency graph. Adding dependencies to a server or client bundle. (0:23) 5-6: Reminder: Using components eventually forms a rendered component tree. (0:37) 9: Oh no! We get an error when trying to `import` a client API (useState) into a server module. (0:44) 10: We know the trick by now: Add "use client" to mark `2.js` as a client entry point. This moves the module to the client bundle and allows us to use client APIs like `useState.` (0:51) 11: But we get a new error! "use client" moved all imported dependencies into the client bundle, including our ORM package, which doesn't work in the browser. (0:59) 13: Let's refactor without changing our rendered component hierarchy. First, we move the `Cart` import to the parent file that imports `Modal`. This moves `Cart` outside the "use client" boundary and consequently the client bundle. (1:11) 15: Then, we pass down the rendered result of `Cart` as a prop to `Modal`. This allows `Cart` to be entirely rendered on the server as a Server Component before being passed down. `Modal` has no knowledge of what the `cart` prop is. Its only responsibility is placing whatever it receives into the `{cart}` slot. (1:15) 16: Finally, it's common to use the special `children` prop for a component's primary content. The key insight is that we were able to use props to retain our desired component hierarchy even though we changed our module dependency graph.

Delba

43,989 görüntüleme • 2 yıl önce

This Chinese guy created agents in Claude Code for MCP servers and single-handedly serves 6 marketing agencies a month from one iPhone, earning $5,000 from each. Inside he runs a pipeline of 7 agents on Claude Sonnet 4.6 that every Monday pulls a scan of the tech stack from a selected agency, develops an MCP server for its ad accounts, and over the course of a week brings it to production code ready to connect to Claude Desktop. No DevOps, no senior developer, no project manager. Just a Mac Mini in a work corner, an iPhone in the pocket, and a single API key. And traditional dev shops keep 5 people on project rates for the same contract, while his entire P&L is tokens, dirt-cheap hosting on Cloudflare, and Calendly. 7 agents run under a shared orchestrator-router and burn about 5 million tokens a day, which in the API bill comes out to $540 a month. The Mac Mini itself sits at home and keeps the entire orchestrator running 24/7, and from the iPhone the owner connects to it through a secure remote terminal and sees the output of any session right on the smartphone screen, wherever he happens to be. His starting system prompt looks like this: "you run a solo shop for custom MCP servers for marketing agencies. you hand out read-only tasks to 6 sub-agents and own all commits and shipping yourself. sub-agents: // Hunter (finds marketing agencies of 15 to 60 people that have no MCP access to Google Ads, Meta Ads, TikTok Ads, and HubSpot) // Mapper (pulls their tech stack, identifies 3 to 5 integration pains, and simultaneously writes the technical spec for the server: which tools, resources, and prompts to export through MCP, which auth flow and rate limit) // Coder (generates an MCP server in Python through the MCP SDK, deploys 8 to 15 tools for ad accounts and CRM) // Validator (connects the server to Claude Desktop, runs real client API keys in a sandbox, and checks for compliance with the MCP spec) // Shipper (writes a README, integration guide, deployment manual, packages the server, and hosts it on Cloudflare Workers or pushes to the GitHub of the client) // Mobile (always online on the iPhone, books demo calls in Calendly, picks up hot fixes, and confirms contracts through a secure remote terminal to the Mac Mini). only 1 owner agent works on 1 contract, no overlaps. you pull the owner out of observation mode only when a deal goes above $7,500 or the test coverage of the server drops below 85%." This prompt gives the system an understanding of its role and the limits of intervention from the very first line. It knows it is supposed to find agencies on its own. It knows it is supposed to bring every MCP server to production on its own. It knows it connects the live owner only on large deals or when the tests do not converge. → The pipeline runs without breaks, day or night → Hunter goes through about 130 marketing agencies on LinkedIn and Clutch per day → Mapper rolls out 4 audit reports with the tech stack and a final spec for each → Coder writes 1 to 2 MCP servers per week in Python with 8 to 15 tools → Validator validates every server through Claude Desktop with real client API keys → Shipper rolls out the full documentation package and pushes the finished product to Cloudflare Workers or the GitHub of the client And only when a contract breaks $7,500 or test coverage drops below 85% does the orchestrator pull the owner from whatever he is doing. And when the owner at that moment is behind the wheel or at a meeting in a coworking space, the Mobile agent in his iPhone picks up 1 contract in progress: confirms a meeting with the agency CMO in Calendly, opens a live demo of the MCP server through a secure terminal to the Mac Mini, and writes the test result to the shared state. The owner just swipes "approve" and in 15 minutes joins the Zoom demo. The fresh system log from last Wednesday looks like this: "hunter report: 132 agencies checked on LinkedIn and Clutch, 19 without MCP integrations, 8 with active requests for AI tooling in job posts, 4 with an open Q4 budget. passing to mapper." "coder: MCP server for Northwave Performance Marketing built in Python, 11 tools for Google Ads, Meta Ads, and GA4, 320 lines of code. exported to /Users/dev/mcp-shop/clients/northwave/server.py. validator connecting to Claude Desktop." "validator: 11 tools passed validation through Claude Desktop, test coverage 92%, average latency 380 ms. passing to shipper." "eval flag: contract with Pacific Reach Agency at $8,200 exceeds the approved limit of $7,500. sending for manual review." In his work setup there is no cloud server, no external team, and not even a separate office. At home sits a Mac Mini with a sandbox at /Users/dev/mcp-shop, on top runs an MCP router with a single API key to Claude, and the same key is forwarded to a secure terminal on the iPhone. Out of everything I have seen this year, this is the cleanest solo shop for custom MCP servers for marketing agencies: $540 a month on the API, about $30,000 into the account, and between them 7 system prompts, 1 Mac Mini in a work corner, and 1 iPhone that never leaves the pocket.

Blaze

55,926 görüntüleme • 2 ay önce