Skip to content

Instantly share code, notes, and snippets.

type SwarmStepResult<TOOLS extends Record<string, CoreTool>> = StepResult<TOOLS> & { agent: Agent };
type SwarmChunk = Extract<
TextStreamPart<any>,
{
type: "text-delta" | "reasoning" | "tool-call" | "tool-call-streaming-start" | "tool-call-delta" | "tool-result";
}
> & { agent: Agent };
export function streamSwarm<CONTEXT = any>({
@belgattitude
belgattitude / ci-yarn-install.md
Last active October 14, 2025 07:43
Composite github action to improve CI time with yarn 3+ / node-modules linker.
@sindresorhus
sindresorhus / esm-package.md
Last active December 10, 2025 13:22
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@ogrrd
ogrrd / dnsmasq OS X.md
Last active December 6, 2025 17:34
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install