ault-browser-check",
    "--disable-session-crashed-bubble",
    "--disable-search-engine-choice-screen",
)

STEALTH_ARGS = (
    # Explanation: https://peter.sh/experiments/chromium-command-line-switches/
    # Generally this will make the browser faster

"--accept-lang=en-US",
    "--use-mock-keychain",
    "--disable-translate",
    "--disable-voice-input",
    "--window-position=0,0",
    "--disable-wake-on-wifi",
    "--ignore-gpu-blocklist",
    "--enable-tcp-fast-open",
    "--enable-web-bluetooth",

and less detectable
    # "--incognito",
    "--test-type",
    "--lang=en-US",
    "--mute-audio",
    "--disable-sync",
    "--hide-scrollbars",
    "--disable-logging",
    "--start-maximized",  # For headless check bypass
    "--enable-async-dns",


NOT NULL CHECK (version_id > 0),
  metadata      JSONB NOT NULL,
  definition    JSON NOT NULL,
  trigger_uuids JSONB,
  create_ts     TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP NOT NULL, -- processing delay is the time diff between it and metadata create_time

,      -- is treated as version (not strictly increasing), add version if needed
  author                JSONB NOT NULL,    -- author for the properties_changes
  properties_changes    JSONB NOT NULL,     -- properties changes (delta) for the workflow leve

  PRIMARY KEY (workflow_id, version_id)
);

CREATE TABLE IF NOT EXISTS maestro_workflow_properties (    -- table of properties changes and previous snapshot, immutable
  workflow_id           TEXT NOT NULL COLLATE "C",
  create_time           INT8 NOT NULL


ponents/ui/input-group.tsx"
import { HugeiconsIcon } from "@hugeicons/react"
import { SearchIcon, Tick02Icon } from "@hugeicons/core-free-icons"

function Command({
  className,
  ...props
}: React.ComponentProps<typeof CommandPrimitive>) {
  return (

        "flex size-full flex-col overflow-hidden rounded-xl bg-popover p-1 text-popover-foreground",
        className
      )}
      {...props}
    />
  )
}

function CommandDialog({
  title = "Command Palette",
  description = "Search for a command to r

<CommandPrimitive
      data-slot="command"
      className={cn(


m: BinaryIO,
        stream_info: StreamInfo,
        **kwargs: Any,  # Options to pass to the converter
    ) -> bool:
        mimetype = (stream_info.mimetype or "").lower()
        extension = (stream_info.extension or "").lower()

        if extension

  for prefix in ACCEPTED_XLS_MIME_TYPE_PREFIXES:
            if mimetype.startswith(prefix):
                return True

        return False

    def convert(
        self,
        file_stream: BinaryIO,
        stream_info: StreamInfo,
        **kwargs:

in ACCEPTED_XLS_FILE_EXTENSIONS:
            return True


tabaseId":24,"name":"repair commit finding intake","status":"requested","conclusion":null,"createdAt":"2099-01-01T00:00:00Z","url":"https://github.test/runs/24"}]'
    ;;
  "api repos/test/sweeper/actions/runs?status=failure&per_page=12")
    printf '%s\n'

 '[{"databaseId":11,"name":"Sweep","status":"completed","conclusion":"failure","createdAt":"2099-01-01T00:00:00Z","url":"https://github.test/runs/11"}]'
    ;;
  "api repos/test/sweeper/actions/runs?status="*)
    printf '%s\n' '[]'
    ;;
  "api graphql")


* The URL provided by ngrok is ephemeral and will change each time ngrok is started. You will need to update the request URL in the bot's settings each time you restart ngrok. [See how to update the request URL](#updating-the-request-url-in-bots-settings).

 Workspace", click on "Install App to Workspace".
    *   Follow the prompts to authorize the app and add it to your workspace.
5. Set up environment variables:
    *   Obtain the `SLACK_SIGNING_SECRET`:
        *   Go to the Slack API: https://api.slack.c

4. Add the bot to your Slack workspace:
    *   Navigate to the "OAuth & Permissions" tab.
    *   Under "OAuth Tokens for Your


ity.
- Healthy roots without identity in JSON/non-interactive mode unless `--yes`
  is passed.

Mutations:

- With existing identity, update local registry only when needed.
- With confirmed conversion, create `.openspec-store/store.yaml` and update the

openspec/` planning files during register.

Interactive conversion prompt should be direct:

```text
Turn this OpenSpec root into context store "team-context"?
```

### `context-store doctor`

Doctor is the non-mutating health surface.

It checks:

- Regis


u64),
                            cache_creation_input_tokens: 0,
                            tool_use_prompt_tokens: 0,
                            reasoning_tokens: 0,
                        },
                        None if Ext::REQUIRES_USAGE => {

,
                            });
                        }
                        None => crate::completion::Usage::new(),
                    };

                    let embeddings = response
                        .data
                        .into_i

                          return Err(EmbeddingError::MissingUsage {
                                provider: Ext::PROVIDER_NAME


) -> str:
	"""Build a specific error message explaining why the filename was rejected and how to fix it."""
	base = os.path.basename(file_name)

	# Check for binary/image extension
	if '.' in base:
		_, ext = base.rsplit('.', 1)
		ext_lower = ext.lower()

f"Error: Cannot write binary/image file '{base}'. "
				f'The write_file tool only supports text-based files. '
				f'Supported extensions: {", ".join("." + e for e in supported_extensions)}. '
				f'For screenshots, the browser automatically captures them

	if ext_lower in UNSUPPORTED_BINARY_EXTENSIONS:
			return (


rm")

      [ -n "$candidate_base" ] && [ -n "$candidate_id" ] && break
    done

    if [ -z "$candidate_base" ] || [ -z "$candidate_id" ]; then
      local name="${display:-${image:-$product}}"
      [ -n "$name" ] && warn "Unknown image name: '$name'"

* ||
      "${product,,}" == *"evaluation"* ||
      "${edition_id,,}" == *"eval"* ||
      "${flags,,}" == *"eval"* ]]; then
      evaluation="-eval"
    fi

    if [ -n "$evaluation" ] &&
      [[ "${candidate_id,,}" != *"-eval" ]]; then
      candidate_

     continue
    fi

    local evaluation=""

    if [[ "${image,,}" == *"evaluation"* ||
      "${display,,}" == *"evaluation"


json!({
            "type": "object",
            "properties": {
                "labels": {
                    "type": "array",
                    "items": { "type": "string" }
                },
                "separator": { "type": "string" }

.log, Self::NAME, &args);
        Ok(format!("LABELS-OK {}", args.labels.join(&args.separator)))
    }
}

impl Tool for EscapeEcho {
    const NAME: &'static str = "escape_echo";
    type Error = SessionToolError;
    type Args = EchoArgs;
    type Output

      },
            "required": ["labels", "separator"]
        })
    }

    async fn call(
        &self,
        _context: &mut rig::tool::ToolContext,
        args: Self::Args,
    ) -> Result<Self::Output, Self::Error> {
        push_invocation(&self


go",
		Content:  "package main\nfunc main() {\n\tlog.Error(\"error\")\n\tfmt.Println(\"hello\")\n}",
	})
	backend.Write(ctx, &WriteRequest{
		FilePath: "/test.py",
		Content:  "def hello():\n    print('error')\n    print('world')",
	})
	backend.Write(ctx,

})
		if err != nil {
			t.Fatalf("GrepRaw failed: %v", err)
		}
		if len(matches) != 3 {
			t.Errorf("Expected 2 matches, got %d", len(matches))
		}
	})

	t.Run("empty pattern error", func(t *testing.T) {
		_, err := backend.GrepRaw(ctx, &GrepRequest{
			P

&WriteRequest{
		FilePath: "/dir/file.go",
		Content:  "package test\nfunc TestError() {\n\tlog.Error(\"test error\")\n}",
	})

	t.Run("basic pattern search", func(t *testing.T) {
		matches, err := backend.GrepRaw(ctx, &GrepRequest{
			Pattern: "error",


SON.stringify({
            id: 'closed-user', username: 'ClosedUser', disabled: true,
        }), { status: 200 })));
        await expect(cmd.func({ username: 'ClosedUser' })).rejects.toThrow(EmptyResultError);
    });

    it('picks the most-played perf

().mockResolvedValue(new Response(JSON.stringify({
            id: 'someplayer',
            username: 'SomePlayer',
            createdAt: 1543000000000,
            seenAt: 1700000000000,
            count: { all: 100, win: 50, loss: 30, draw: 20 },

 as topPerf', async () => {
        vi.stubGlobal('fetch', vi.fn


:
            return 3.14159 * r * r
        case Rectangle(width=w, height=h):
            return w * h
        case Triangle(base=b, height=h):
            return 0.5 * b * h
        # No compiler warning if you miss a case!
        # Adding a new shape?

Rectangle(f64, f64),        // Rectangle carries width, height
    Triangle { base: f64, height: f64 }, // Named fields also work
}

fn area(shape: &Shape) -> f64 {
    match shape {
        Shape::Circle(r) => std::f64::consts::PI * r * r,
        Shape::

 grep the codebase and hope you find all match blocks.
```

### Rust Enums — Data-Carrying Variants
```rust
// Rust — enum variants carry data, compiler enforces exhaustive matching
enum Shape {
    Circle(f64),                // Circle carries radius


t _get_modality(ContentUnderstandingFileType.WAV) == "audio"
        assert _get_modality(ContentUnderstandingFileType.MP3) == "audio"

# ---------------------------------------------------------------------------
# convert() mock tests
# ----------------

._client = MagicMock()

        mock_result = MagicMock()
        mock_result.contents = []
        mock_poller = MagicMock()
        mock_poller.result.return_value = mock_result
        conv._client.begin_analyze_binary.return_value = mock_poller

-----------------------------------------------------------

class TestConvertMock:
    """Test convert() with mocked CU SDK."""

    def _run_convert(self, extension, mimetype, expected_output="mock output"):
        conv = _make_converter()
        conv


e: "nvme1n1"},
				},
			},
		}
	}

	t.Run("registers direct child of extra-filesystems", func(t *testing.T) {
		agent := &Agent{fsStats: make(map[string]*system.FsStats)}
		d := makeDiscovery(agent)

		d.addPartitionExtraFs(disk.PartitionStat{
			Device:

, "caddy1-root", stats.Name)
	})

	t.Run("skips nested mount under extra-filesystem bind mount", func(t *testing.T) {
		agent := &Agent{fsStats: make(map[string]*system.FsStats)}
		d := makeDiscovery(agent)

		// These simulate the virtual mounts that appe

    "/dev/nvme0n1p1",
			Mountpoint: "/extra-filesystems/nvme0n1p1__caddy1-root",
		})

		stats, exists := agent.fsStats["nvme0n1p1"]
		assert.True(t, exists)
		assert.Equal(t, "/extra-filesystems/nvme0n1p1__caddy1-root", stats.Mountpoint)
		assert.Equal(t


it registerExistingStore({
          path: inputPath,
          id: options.id,
          allowCreateIdentity: options.yes,
        });
      } catch (error) {
        if (!isRegisterIdentityConfirmationError(error) || options.json || !isInteractive()) {

        await confirmRegisterConversion(error);
        result = await registerExistingStore({
          path: inputPath,
          id: options.id,
          allowCreateIdentity: true,
        });
      }

      const payload = toMutationOutput(result);


 spec, `instructions` output
  carries the index, and the printed fetch command runs verbatim
  against the built binary.
- **Docs**: a "Referencing stores from a project" subsection in
  `docs/cli.md`'s Stores section documenting the `references:` config

store:` pointer for rootless repos (3.2).
- Canonical remotes in store identity and clone-source hints (3.3).
- Later relationship health in doctor (3.6) — instructions-inline diagnostics
  are this slice's only health surface.
- Any change to root resolut

  key (no such config-key reference exists today — this subsection is
  created, not extended).

Out of scope:

- The fallback `


 or "utf-8"
                    notebook_content = file_stream.read().decode(encoding)
                    return (
                        "nbformat" in notebook_content
                        and "nbformat_minor" in notebook_content

cur_pos)

        return False

    def convert(
        self,
        file_stream: BinaryIO,
        stream_info: StreamInfo,
        **kwargs: Any,  # Options to pass to the converter
    ) -> DocumentConverterResult:
        # Parse and convert the note

)
                finally:
                    file_stream.seek(


  }
});

// ── 2c. AGENTS.md fence preserves user content above and below ───────────
test('opencode uninstall strips fenced AGENTS.md block, preserving user prefix and suffix', () => {
  const xdg = freshTmpDir();
  const shimDir = shimOpencode();
  try

    const installed = fs.readFileSync(agentsMd, 'utf8');
    // Sandwich the caveman block between user prefix and suffix.
    const userPrefix = '# my project\n\nuse 2-space indent.\n\n';
    const userSuffix = '\n## extra\n\nkeep PRs small.\n';
    fs.wr

{
    const env = { ...process.env, XDG_CONFIG_HOME: xdg, PATH: pathWith(shimDir), NO_COLOR: '1' };
    const r1 = runInstaller(['--only', 'opencode'], env);
    assert.notEqual(r1.status, 2);

    const agentsMd = path.join(xdg, 'opencode', 'AGENTS.md');


C framing over stdio: messages are separated by newlines (the
// MCP stdio transport uses LSP-like content but most servers emit one JSON
// object per line). We line-buffer in both directions and parse opportunistically.
function makeLineBuffer(onLine) {

      const line = buf.slice(0, nl);
      buf = buf.slice(nl + 1);
      if (line.trim()) onLine(line);
    }
  };
}

function transformResponse(msg) {
  // Compress description fields on list-style responses. Match by method
  // shape — we don't always

  let buf = '';
  return chunk => {
    buf += chunk.toString('utf8');
    let nl;
    while ((nl = buf.indexOf('\n')) !== -1) {


s across nested tasks.md files matched by the glob', async () => {
    await writeGlobSchema();
    await writeChange('globchange', {
      'backend/tasks.md': '- [x] 1.1 a\n- [x] 1.2 b\n',
      'frontend/tasks.md': '- [x] 2.1 a\n- [ ] 2.2 b\n- [ ] 2.3 c\

= await getTaskProgressForChange(changesDir, 'globchange', projectRoot);
    expect(progress).toEqual({ total: 5, completed: 3 });
  });

  it('resolves the same set of files status resolves (resolution-mechanism parity)', async () => {
    await writeGlob


ge_data["screenshot_path"]}')

async def generate_single_ad(page_data: dict, mode: str, ad_id: int):
	"""Generate a single ad using pre-analyzed page data"""
	generator = AdGenerator(mode=mode)

	try:
		if mode == 'instagram':
			prompt = generator.create

)
			ad_content = await generator.generate_ad_image(prompt, page_data.get('screenshot_path'))
			if ad_content is None:
				raise RuntimeError(f'Ad image generation failed for ad #{ad_id}')
		else:  # tiktok
			video_concept = await generator.create_video_


|-------------|---------------|-------------------|
| `fn read_sensor() -> f64` | Unitless — could be °C, °F, or RPM | `fn read_sensor() -> Celsius` |
| `fn encrypt(nonce: &[u8; 12])` | Nonce can be reused (borrow) | `fn encrypt(nonce: Nonce)` (move) |
|

)` |
| `Clone` on ephemeral keys | Defeats single-use guarantee | Don't derive Clone |
| `let vendor_id: u16 = 0xFFFF` | Sentinel carried internally | `let vendor_id: Option<u16> = None` |
| `fn route(level: &str)` with fallback | Typos silently default |

`fn admin_op(is_admin: bool)` | Caller can lie (`true`) | `fn admin_op(_: &AdminToken)` |
| `fn send(session: &Session)` | No state guarantee | `fn send(session: &Session<Active>)` |
| `fn process(data: &[u8])` | Not validated | `fn process(data: &ValidFru


;
        let detail_prefix = if show_group_ui {
            group_output_prefix.as_str()
        } else {
            hook_prefix
        };
        let group_separator = format!("{hook_prefix}{}", "  │".dimmed());

        if show_group_ui {

           "Files were modified by following hooks",
                hook_prefix,
                RunStatus::Failed,
            )?;
        }

        for (i, result) in group_results.iter().enumerate() {
            let prefix = if show_group_ui {


ion.

## Goals / Non-Goals

### Goals
- **Add** `createChange()` function to create change directories
- **Add** `validateChangeName()` function for kebab-case validation
- **Enable** automation (Claude commands, scripts) to create changes

### Non-Goals
-

(they work fine)
- Create abstraction layers or manager classes
- Change how `ListCommand` or `ChangeCommand` work

## Decisions

### Decision 1: Simple Utility Functions

**Choice**: Add functions to `src/utils/change-utils.ts` - no class.

```typescript


     b_only --> freed: del b (refcount 1→0)
        note right of shared: Both a and b point<br/>to the SAME object
    }
    state "Rust (Ownership Move)" as RS {
        [*] --> a_owns2: let a = vec![1,2,3]
        a_owns2 --> b_owns: let b = a (MOVE)

of b_owns: a is INVALID after move<br/>Compile error if used
    }
```

***

## Move Semantics vs Reference Counting

### Copy vs Move
```rust
// Simple types (integers, floats, bools, chars) are COPIED, not moved
let x = 42;
let y = x;    // x is COPIED t

      b_owns --> freed2: b goes out of scope
        note right


the
 * RENAMED+REMOVED cross-section conflict - where two spellings that differ
 * only in case or interior whitespace mean a mistake, never two requirements.
 */
export function foldRequirementName(name: string): string {
  return normalizeRequirementName

+/g, ' ');
}

/** The canonical requirement header the delta reader recognizes. */
const REQUIREMENT_HEADER_REGEX = /^###\s*Requirement:\s*(.+)\s*$/i;

/**
 * Extracts the Requirements section from a spec file and parses requirement blocks.
 */
export func


  newlyConfiguredTools: string[];
  workflowOverrides: Partial<Record<string, readonly (typeof ALL_WORKFLOWS)[number][]>>;
  deferredGlobalCleanup?: LegacyDetectionResult;
};

/**
 * Options for the update command.
 */
export interface UpdateCommandOptions

and managed commands) across all configured tools.
 * Returns the union of detected workflow IDs that match ALL_WORKFLOWS.
 *
 * Wrapper around the shared migration module's scanInstalledWorkflows that accepts tool IDs.
 */
export function scanInstalledWor

 {
  /** Force update even when tools are up to date */
  force?: boolean;
}

/**
 * Scans installed workflow artifacts (skills


CDP') -> None:
					self.Fetch = _FetchRegister(outer)

			self.send = _Send(self)
			self.register = _Register(self)

	root = StubCDP()

	# Attach stubs to session
	session._cdp_client_root = root  # type: ignore[attr-defined]
	# No need to attach a real

register Fetch handler and enable auth handling without raising
	await session._setup_proxy_auth()

	assert root.enabled is True
	assert callable(root.auth_callback)

	# Simulate proxy auth required event
	ev = {'requestId': 'r1', 'authChallenge': {'source

CDPSession; _setup_proxy_auth works with root client

	# Should


_stbFonts);
    Gles3_SetRenderTextFunction(&g_gles3, Stb_RenderText, &g_stbFonts);

    Gles3_Initialize(&g_gles3, 4096);

    int atlasW = 1024;
    int atlasH = 1024;
    if (!Stb_LoadFont(
            &g_gles3.fontTextures[0],
            &g_stbFonts[0

        abort();

    Clay_SetDebugModeEnabled(true);
}

void loop()
{

    glClearColor(0.1f, 0.2f, 0.1f, 1.0f);

    Clay_Vector2 scrollDelta = {};
    SDL_Event event;
    while (SDL_PollEvent(&event))
    {
        switch (event.type)
        {

],
            "resources/Roboto-Regular.ttf",
            24.0f, // bake pixel height
            atlasW,
            atlasH))


ive host ecosystems, and every release bumps all of them by hand.
//
// tests/gemini-extension.test.js already checks the four plugin manifests agree
// with each other, but that can't catch the failure mode that shipped in v4.8.0:
// every manifest stayed

 and
//   2. on a release-tag CI run, that shared version must equal the tag.

const fs = require('fs');
const path = require('path');

const root = path.join(__dirname, '..');
const PINNED_SEMVER = /^\d+\.\d+\.\d+$/;

// Every file that declares the proje

 stale at 4.7.0 *together* while the release moved on, so
// they "agreed" and the test passed (#260, #262). It also ignores the two
// package.json files. This check closes both gaps:
//   1. every version-bearing file must share one pinned X.Y.Z version,


w(self):
        ex = LinkExtractor(allow=r"/posts/")
        assert ex.matches("https://example.com/posts/1") is True
        assert ex.matches("https://example.com/about") is False

    def test_matches_honors_deny(self):
        ex = LinkExtractor(deny=

x") is False
        assert ex.matches("https://example.com/posts/1") is True

    def test_matches_honors_allow_domains(self):
        ex = LinkExtractor(allow_domains="example.com")
        assert ex.matches("https://api.example.com/x") is True
        a

r"/admin")
        assert ex.matches("https://example.com/admin/


ps(SelOp.ADD_ASSIGN, SelString.of("foo"));
  }

  @Test
  public void testCalls() {
    SelType res = one.call("forID", new SelType[] {SelString.of("UTC")});
    assertEquals("DATETIME_ZONE: UTC", res.type() + ": " + res);
    res =
        one.call(

_Angeles")))
            });
    assertEquals("LONG: 0", res.type() + ": " + res);
    res =
        another.call(
            "getOffset",
            new SelType[] {
              SelJodaDateTime.of(new DateTime(0, DateTimeZone.forID("America/Los_Angeles


 === 'default') {
          const dmode = parts[2];
          if (dmode === 'off' || dmode === 'lite' || dmode === 'full' || dmode === 'ultra') {
            writeDefaultMode(dmode);
            writeHookOutput('UserPromptSubmit', dmode, 'PONYTAIL DEFAULT

    return; // don't fall through to the session-mode switch
        }
        if (arg === 'lite') mode = 'lite';
        else if (arg === 'full') mode = 'full';
        else if (arg === 'ultra') mode = 'ultra';
        else if (arg === 'off') mode = 'off'

SET — new sessions start in ' + dmode + '.');
          }


NSI_PATTERN, "");
}

async function runCommand(...args: string[]): Promise<void> {
  const program = new Command();
  program.exitOverride();
  registerUpgradeCommand(program);
  await program.parseAsync(["node", "test", ...args]);
}

beforeEach(() => {

= [];
  shouldShowUpdateNotification.mockResolvedValue(true);
  shouldSkipUpdateNotifier.mockReturnValue(false);
  vi.spyOn(console, "log").mockImplementation((...args: unknown[]) => {
    logOutput.push(args.join(" "));
  });
  spawn.mockReturnValue({


==================================
IF OBJECT_ID('gold.dim_products', 'V') IS NOT NULL
    DROP VIEW gold.dim_products;
GO

CREATE VIEW gold.dim_products AS
SELECT
    ROW_NUMBER() OVER (ORDER BY pn.prd_start_dt, pn.prd_key) AS product_key, -- Surrogate key

id,
    pn.prd_key      AS product_number,
    pn.prd_nm       AS product_name,
    pn.cat_id       AS category_id,
    pc.cat          AS category,
    pc.subcat       AS subcategory,
    pc.maintenance  AS maintenance,
    pn.prd_cost     AS cost,
    pn


, heap-allocated, growable (like C's `malloc`'d buffer, or C++'s `std::string`)
    - `&str` — borrowed, lightweight reference (like C's `const char*` with length, or C++'s `std::string_view` — but `&str` is **lifetime-checked** so it can never dangle)

length and are guaranteed valid UTF-8

> **For C++ developers:** `String` ≈ `std::string`, `&str` ≈ `std::string_view`. Unlike `std::string_view`, a `&str` is guaranteed valid for its entire lifetime by the borrow checker.

## String vs &str: Owned vs Borr

- Unlike C's null-terminated strings, Rust strings track their


oBe(true);
  });

  test("fetches and displays user info when logged in", async () => {
    mockGetValidAccessToken.mockResolvedValue("valid-token");
    vi.stubGlobal(
      "fetch",
      vi.fn().mockResolvedValue({
        ok: true,
        json: () =>

        success: true,
            name: "Test User",
            email: "test@example.com",
            teamspace: null,
          }),
      })
    );

    await runCommand("whoami");
    expect(logOutput.some((l) => l.includes("Logged in"))).toBe(true);


())
}

#[cfg(windows)]
#[allow(clippy::unnecessary_wraps)]
pub fn fix_permissions<P: AsRef<Path>>(_path: P) -> io::Result<()> {
    // On Windows, permissions are handled differently and this function does nothing.
    Ok(())
}

#[cfg(test)]
mod tests {

;

    #[test]
    fn rm_rf_counts_and_removes_tree() -> anyhow::Result<()> {
        let temp = TempDir::new()?;
        let cache_root = temp.path().join("cache");
        fs_err::create_dir_all(cache_root.join("nested/deep"))?;
        fs_err::write(cac

  use super::remove_dir_all;
    use assert_fs::fixture::TempDir


n!("{greeting}");
}

fn make_greeting(name: String) -> String {
    format!("Hello, {name}!")
}
```

<details>
<summary>🔑 Solution</summary>

```rust
fn main() {
    let mut names = vec!["Alice".to_string(), "Bob".to_string()];
    let first = &names[0];

/ Use borrow BEFORE mutating
    names.push("Charlie".to_string()); // Now safe — no live immutable borrow

    let greeting = make_greeting(&names[0]); // Pass reference, not owned
    println!("{greeting}");
}

fn make_greeting(name: &str) -> String { //


tEmmcHealth(devs[0])
	if err != nil || !ok {
		t.Fatalf("collectEmmcHealth() = (ok=%v, err=%v), want (true,nil)", ok, err)
	}
	if len(sm.SmartDataMap) != 1 {
		t.Fatalf("SmartDataMap len=%d, want 1", len(sm.SmartDataMap))
	}
	var got *smart.SmartData
	for

nil {
		t.Fatalf("SmartDataMap value nil")
	}
	if got.DiskType != "emmc" || got.DiskName != "/dev/mmcblk0" {
		t.Fatalf("disk fields = (type=%q name=%q), want (emmc,/dev/mmcblk0)", got.DiskType, got.DiskName)
	}
	if got.SmartStatus != "WARNING" {
		t.Fatal

_, v := range sm.SmartDataMap {
		got = v
		break
	}
	if got ==


ep to verify your previous action achieved its goal. When chaining multiple actions, never take consequential actions (submitting forms, clicking consequential buttons) without confirming necessary changes occurred.
</action_rules>
<efficiency_guidelines>

in one step. Try to be efficient where it makes sense. Do not predict actions which do not make sense for the current page.
**Recommended Action Combinations:**
- `input` + `click` → Fill form field and submit/search in one step
- `input` + `input` → Fill


f monitored systems and their connections.
// It handles system lifecycle, status updates, and maintains both SSH and WebSocket connections.
type SystemManager struct {
	hub           hubLike                               // Hub interface for database and

      // Thread-safe store of active systems
	sshConfig     *ssh.ClientConfig                     // SSH client configuration for system connections
	smartFetchMap *expirymap.ExpiryMap[smartFetchState] // Stores last SMART fetch time/result; TTL is only fo

alert operations
	systems       *store.Store[string, *System]


dataStateSchema.safeParse(raw);

  if (!result.success) {
    throw invalidStoreStateError(
      'store metadata state',
      formatZodIssues(result.error)
    );
  }

  validateStoreId(result.data.id);

  return {
    version: 1,
    id: result.data.id,

throw invalidStoreStateError(
      'store registry state',
      formatZodIssues(result.error)
    );
  }

  assertValidStoreIds(Object.keys(result.data.stores), 'store id');

  return stringifyYaml({
    version: 1,
    stores: result.data.stores,
  });

    ...(result.data.remote !== undefined ? { remote: result.data.remote } : {}),
  };
}

export function serializeStoreRegistryState(state: StoreRegistryState): string {
  const result = RegistryStateSchema.safeParse(state);

  if (!result.success) {


ld be a function');
    assert.equal(typeof handlers['chat.message'], 'function', 'chat.message should be a function');
    assert.equal(typeof handlers['experimental.chat.system.transform'], 'function',
      'system.transform should be a function');

   await handlers['chat.message']({}, { parts: [{ type: 'text', text: '/caveman ultra' }] });
    assert.equal(fs.readFileSync(flagPath, 'utf8'), 'ultra');

    // opencode expands "/caveman <level>" into the command template before
    // chat.message fir

// Slash command in a chat.message text part activates ultra.


c-proposal`) to avoid collisions.
4. Centralize templates: define command bodies once and reuse across tools; apply minimal per-tool wrappers (frontmatter, categories, filenames).
5. During `openspec update`, refresh only existing slash command files (per-

 manage multiple files per tool.
  - Expose targets rather than a single `configFileName` (e.g., `getTargets(): Array<{ path: string; kind: 'slash'; id: string }>`).
  - Provide `generateAll(projectPath, openspecDir)` for init and `updateExisting(projectPa

file basis) within markers; do not create missing files or new tools.

## Design Ideas
- Introduce `SlashCommandConfigurator` to


er_use.agent.service import Agent
from browser_use.browser import BrowserSession
from browser_use.browser.profile import BrowserProfile
from browser_use.tools.service import Tools
from tests.ci.conftest import create_mock_llm

# ---------------------------

-------------------------------------------------------------------------

@pytest.fixture(scope='session')
def http_server():
	"""Test HTTP server with pages for guard tests."""
	server = HTTPServer()
	server.start()

	server.expect_request('/form').resp


story containing redacted_thinking should be accepted");

            let text: String = second_response
                .choice
                .iter()
                .filter_map(|content| match content {
                    AssistantContent::Text(text)

            })
                .collect();
            assert!(
                !text.trim().is_empty(),
                "follow-up turn should produce text after replaying redacted thinking"
            );
        },
    )
    .await;
}

#[tokio::test]
as

=> Some(text.text.as_str()),
                    _ => None,


       { ok: true },
                { ok: true, missing: [] },
                { ok: true },
            ],
        }), validArgs)).rejects.toBeInstanceOf(CommandExecutionError);
    });

    it('browser category script is async and returns typed failure

const result = await runBrowserScript('<main><button>其他</button></main>', __test__.buildSelectCategoryEvaluate('笔记本'));

        expect(result).toEqual({ ok: false, reason: 'category-trigger-not-found' });
    });

    it('browser fill script reports missi


rors';
import { USER_SNAPSHOT_JS } from '../xiaohongshu/user.js';
import { extractXhsUserNotes, normalizeXhsUserId } from '../xiaohongshu/user-helpers.js';

const WEB_HOST = 'www.rednote.com';

function parseLimit(raw) {
    const parsed = Number(raw ?? 15

integer, got ${JSON.stringify(raw)}`);
    }
    if (parsed < 1) {
        throw new ArgumentError(`--limit must be a positive integer, got ${parsed}`);
    }
    return parsed;
}

export const command = cli({
    site: 'rednote',
    name: 'user',
    acc

);
    if (!Number.isFinite(parsed) || !Number.isInteger(parsed)) {
        throw new ArgumentError(`--limit must be a positive


" || return 1
  fi

  if [ -n "${ADAPTER:-}" ] && [[ "${ADAPTER:-}" != "virtio-net-pci" ]]; then
    writeState "net" "$ADAPTER" || return 1
  fi

  if [ -n "${SOUND:-}" ] && [[ "${SOUND:-}" != "intel-hda" ]]; then
    writeState "sound" "$SOUND" || return

 && exit 60
  enabled "${UNPACK:-}" && exit 60

  efi=$(find "$dir" -maxdepth 1 -type d -iname efi -print -quit)

  if [ -z "$efi" ]; then
    [[ "${PLATFORM,,}" == "x64" ]] && BOOT_MODE="windows_legacy"
  fi

  if [ -n "$CUSTOM" ]; then
    BOOT="$iso"

 1
  fi

  if [ -n "${CPU_MODEL:-}" ] && [[ "${CPU_MODEL,,}" != "host" ]]; then
    writeState "cpu" "$CPU_MODEL" || return 1
  fi

  rm -rf "$TMP"
  return 0
}

abortInstall() {

  local dir="$1"
  local iso="$2"
  local efi

  [[ "${iso,,}" == *".esd" ]]


a else b""

        data: Dict[str, str | Tuple] = {
            "sid": self.sid,
            "body": body.hex(),
            "method": self._session_kwargs.get("method", "GET"),
            "url": canonicalize_url(self.url, keep_fragments=keep_fragments),

              for key, value in self._session_kwargs.items()
                if key.lower() not in ("data", "json")
            }
            data["kwargs"] = tuple(sorted(filtered_kwargs.items()))

        if include_headers:
            headers = self._s

        }

        if include_kwargs:
            filtered_kwargs = {
                key.lower(): _stable_value_repr(value)


', 'A Quiet Place', 271, 4.3),
  (25, '[25]', 'fantasy', 'The Chronicles of Narnia: The Lion, the Witch and the Wardrobe', 310, 3.9);

--select * from vec_movies;
--select * from vec_movies_metadata_chunks00;

create virtual table vec_chunks using vec0(

  +contents text,
  contents_embedding float[1],
);

INSERT INTO vec_chunks (rowid, user_id, contents, contents_embedding) VALUES
(1, 123, 'Our PTO policy allows employees to take both vacation and sick leave as needed.', '[1]'),
(2, 123, 'Employees must p


      }
      sqlite3_free(qvec);
    }
  }

  // Test assign-vectors with multi-cell state
  // First clear centroids
  sqlite3_exec(db,
    "INSERT INTO v(v) VALUES ('clear-centroids')",
    NULL, NULL, NULL);

  // Set centroids manually, then assign

 0; d < dim; d++) cvec[d] = (float)c + d * 0.1f;

    char cmd[128];
    snprintf(cmd, sizeof(cmd),
      "INSERT INTO v(v, emb) VALUES ('set-centroid:%d', ?)", c);
    sqlite3_stmt *sc = NULL;
    sqlite3_prepare_v2(db, cmd, -1, &sc, NULL);
    if (sc) {

 for (int c = 0; c < nlist; c++) {
    float *cvec = sqlite3_malloc(dim * sizeof(float));
    if (!cvec) break;
    for (int d =


alt text is included
    validate_strings(result, PPTX_TEST_STRINGS)

if __name__ == "__main__":
    """Runs this file's tests from the command line."""
    for test in [
        test_stream_info_operations,
        test_data_uris,
        test_file_uris,

    test_markitdown_remote,
        test_speech_transcription,
        test_exceptions,
        test_doc_rlink,
        test_markitdown_exiftool,
        test_markitdown_llm_parameters,
        test_markitdown_llm,
    ]:
        print(f"Running {test.__na

        test_docx_comments,
        test_input_as_strings,


es | $300,000 |\n"
        "| Net Profit | $200,000 |\n"
        "| NaN | NaN |\n"
        "| NaN | NaN |\n"
        "| NaN | NaN |\n"
        "| NaN | NaN |\n"
        "| NaN | NaN |\n"
        "| Signature: | NaN |\n\n"
        "### Images in this sheet:

50,000 |\n"
        "| NaN | NaN |\n"
        "| NaN | NaN |\n"
        "| NaN | NaN |\n"
        "| NaN | NaN |\n"
        "| NaN | NaN |\n"
        "| Approved: | NaN |\n\n"
        "### Images in this sheet:\n\n"
        "*[Image OCR]\nMOCK_OCR_TEXT_123

\n\n"
        "*[Image OCR]\nMOCK_OCR_TEXT_12345\n[End OCR]*\n\n"
        "## Budget\n\n"
        "| Budget Allocation | Unnamed: 1 |\n"
        "| --- | --- |\n"
        "| Marketing | $100,000 |\n"
        "| R&D | $150,000 |\n"
        "| Operations | $


True`): Force one final model call after max_failures
- `use_thinking` (default: `True`): Enable explicit reasoning steps
- `flash_mode` (default: `False`): Fast mode — skips evaluation, next goal, thinking; uses memory only. Overrides `use_thinking`

###

default system prompt
- `extend_system_message`: Add instructions to default system prompt

### File & Data Management
- `save_conversation_path`: Path to save conversation history
- `save_conversation_path_encoding` (default: `'utf-8'`)
- `available_file_

System Messages
- `override_system_message`: Completely replace


         assert string in result.markdown
        for string in test_vector.must_not_include:
            assert string not in result.markdown

@pytest.mark.parametrize("test_vector", GENERAL_TEST_VECTORS)
def test_convert_stream_without_hints(test_vector

 a stream with no stream info."""
    markitdown = MarkItDown()

    with open(os.path.join(TEST_FILES_DIR, test_vector.filename), "rb") as stream:
        result = markitdown.convert(stream, url=test_vector.url)
        for string in test_vector.must_incl


     return Ok(BunRequest::Any);
        }

        // Handle "bun" or "bun@version" format
        if let Some(version_part) = s.strip_prefix("bun@") {
            if version_part.eq_ignore_ascii_case("latest") {
                return Ok(BunRequest::Any)

return Ok(BunRequest::Any);
        }

        Self::parse_version_numbers(s, s).or_else(|_| {
            semver::VersionReq::parse(s)
                .map(BunRequest::Range)
                .map_err(|_| Error::InvalidVersion(s.to_string()))
        })

;
            }
            return Self::parse_version_numbers(version_part, s);
        }

        if s == "bun" {


 = (opcode - DW_ExprOp_Reg0);}goto reg_read;
      case DW_ExprOp_RegX:
      {reg_code_dw = operands[0].u512.u64[0];}goto reg_read;
      reg_read:;
      {
        ARCH_RegCode reg_code = arch_reg_code_from_dw(arch, reg_code_dw);
        Rng1U16 reg_rng

 = dim_1u16(reg_rng);
        read_size = Min(read_size, sizeof(push_vals[0].u512));
        reg_rng.max = reg_rng.min + read_size;
        arch_reg_block_read_range(arch_info, regs, reg_rng, &push_vals[0].u512);
      }break;

      //- rjf: registe

= arch_info->reg_code_rng_table[reg_code];
        U64 read_size


roper event bus and watchdog system
		browser_state = await browser_session.get_browser_state_summary(
			include_screenshot=False,
			include_recent_events=False,
		)
		assert browser_state.dom_state is not None
		state = browser_state.dom_state

		print(

	targets_found.add(target_id)

			# Check if element is from iframe (identified by id attributes we set)
			# Iframe elements will have a different target_id when cross_origin_iframes=True
			if element.attributes:
				element_id = element.attributes.get('

f'\n📊 Found {len(state.selector_map)} total elements')

		# Find elements from different targets
		targets_found = set()
		main_page_elements = []
		iframe_elements = []

		for idx, element in state.selector_map.items():
			target_id = element.target_id


nse_calls: Arc<AtomicUsize>,
    seen_prompt: Arc<Mutex<Option<String>>>,
    seen_response: Arc<Mutex<Option<String>>>,
}

impl AgentHook for SessionIdHook<'_> {
    async fn on_completion_call(
        &self,
        _ctx: &rig::agent::HookContext,

           return CompletionCallAction::stop("expected a user message");
        };
        let prompt_text = content
            .iter()
            .filter_map(|content| match content {
                UserContent::Text(text) => Some(text.text.clone()),

   event: CompletionCallEvent<'_>,
    ) -> CompletionCallAction {
        let Message::User { content } = event.prompt else {


            [
              `CLI command timed out after ${timeoutMs}ms: node ${invocation}`,
              stderr ? `stderr tail:\n${formatOutputTail(stderr)}` : '',
              stdout ? `stdout tail:\n${formatOutputTail(stdout)}` : '',
            ]

exitCode: code,
        signal,
        stdout,
        stderr,
        timedOut,
        command: `node ${invocation}`,
      });
    });

    if (options.input && child.stdin) {
      child.stdin.end(options.input);
    } else if (child.stdin) {
      ch

            .filter(Boolean)
              .join('\n\n')
          )
        );
        return;
      }
      resolve({


raw: super::CompletionResponse = serde_json::from_value(serde_json::json!({
            "id": "resp_123",
            "model": "grok-4.3",
            "output": [
                {
                    "type": "reasoning",
                    "id": "rs_123"

  "role": "assistant",
                    "status": "completed",
                    "content": [
                        { "type": "output_text", "text": "done", "annotations": [] }
                    ]
                }
            ],
            "usag

,
                    "summary": [{ "type": "summary_text", "text": "thinking" }],
                    "status": "completed"
                },
                {
                    "type": "message",
                    "id": "msg_123",


lert({
  className,
  variant,
  ...props
}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
  return (
    <div
      data-slot="alert"
      role="alert"
      className={cn(alertVariants({ variant }), className)}
      {...props}

&_a]:hover:text-foreground",
        className
      )}
      {...props}
    />
  )
}

function AlertDescription({
  className,
  ...props
}: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="alert-description"
      className={cn(

 />
  )
}

function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="alert-title"
      className={cn(
        "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [


 — pulls "已购内容" tab cards from
// `study.xiaoe-tech.com`.
//
// Replaces the legacy `pipeline:[]` form. The in-page extraction logic
// (Vue `__vue__.$parent` walk to match a card title back to the original
// purchase entry) is kept byte-for-byte — Xiaoe'

 Vue's private runtime tree is
// the only stable hook. JSDOM cannot reproduce the Vue runtime, so
// rewriting the IIFE without live verify would be silent-failure risk.
//
// What changes:
//   - `func` form + `Strategy.COOKIE` + `browser:true`.
//   - T

s purchase list is not
// exposed as a public JSON endpoint, and


		ServerConfigCallback: func(ctx ssh.Context) *gossh.ServerConfig {
			return config
		},
		// check public key(s)
		PublicKeyHandler: func(ctx ssh.Context, key ssh.PublicKey) bool {
			remoteAddr := ctx.RemoteAddr()
			for _, pubKey := range opts.Keys {

", "addr", remoteAddr)
					return true
				}
			}
			slog.Warn("Invalid SSH key", "addr", remoteAddr)
			return false
		},
		// disable pty
		PtyCallback: func(ctx ssh.Context, pty ssh.Pty) bool {
			return false
		},
		// close idle connections after 70

			if ssh.KeysEqual(key, pubKey) {
					slog.Info("SSH connected


t]
#[ignore = "requires a local llama.cpp OpenAI-compatible server"]
async fn output_schema_structured_output() {
    let client = support::completions_client();
    let model = support::model_name();
    let agent_with_schema = client
        .agent(model

temperature_f, current.humidity_pct, and current.description.",
        )
        .await
        .expect("output schema prompt should succeed");
    let parsed: WeatherForecast =
        serde_json::from_str(&response).expect("schema response should deseri

)
        .preamble(WEATHER_PREAMBLE)
        .temperature(0.0)
        .output_schema::<WeatherForecast>()
        .build();
    let response = agent_with_schema
        .prompt(
            "Return JSON weather data for Chicago with fields city, current.


ite!(hint, " with specified config `{}`", config.display().cyan())?;
    } else if let Some(project) = project {
        let git_root = GIT_ROOT.as_ref()?;
        let project_path = project.path();
        let relative_path = project_path.strip_prefix(git

        if !relative_path.as_os_str().is_empty() {
            args.push(format!(r#"--cd="{}""#, relative_path.display()));
        }

        // Show workspace path if it's not the root project.
        if project_path != git_root {
            writeln!(h


		c.handleStateChange(WebSocketConnected)
	case SSHConnect:
		c.handleStateChange(SSHConnected)
	case WebSocketDisconnect:
		if c.State == WebSocketConnected {
			c.handleStateChange(Disconnected)
		}
	case SSHDisconnect:
		if c.State == SSHConnected {

 based on the new state, including stopping services and initiating reconnections.
func (c *ConnectionManager) handleStateChange(newState ConnectionState) {
	if c.State == newState {
		return
	}
	c.State = newState
	switch newState {
	case WebSocketConnect

	c.handleStateChange(Disconnected)
		}
	}
}

// handleStateChange updates the connection state and performs necessary actions
//


n):
    page = await browser_session.must_get_current_page()
    elements = await page.get_elements_by_css_selector('button[type="submit"]')
    if not elements:
        return ActionResult(extracted_content='No submit button found')
    await elements[0].

extracted_content='Clicked!')
```

## Injectable Parameters

The agent fills function parameters by name. These special names are auto-injected:

| Parameter Name | Type | Description |
|---------------|------|-------------|
| `browser_session` | `BrowserS


ber" }
            ]
        });

        sanitize_schema(&mut schema);

        assert!(schema.get("oneOf").is_none());
        assert!(schema["anyOf"].as_array().is_some());
    }

    #[test]
    fn test_sanitize_recurses_into_nested_objects() {

    "properties": {
                "inner": {
                    "type": "object",
                    "properties": {
                        "value": { "type": "string" }
                    }
                }
            }
        });

        saniti

 let mut schema = json!({
            "type": "object",


n(judge_context)
		judge_prompt = f"""
You are a evaluator of a browser agent task inside a ci/cd pipeline. Here was the agent's task:
{task}

Here is the agent's output:
{agent_output if agent_output else '[No output provided]'}

Debug info: {debug_info}

no output, explain what might have gone wrong.
"""
		response = await judge_llm.ainvoke([UserMessage(content=judge_prompt)], output_format=JudgeResponse)
		judge_response = response.completion

		result = {
			'file': os.path.basename(task_file),
			'succe

Criteria for success:
- {criteria}

Reply in JSON with keys: success (true/false), explanation (string).
If the agent provided


e.SessionFactory;
import org.hibernate.Transaction;

/**
 * This is a utility class to populate the test database with some sample data. All the quickstart
 * examples in the documentation are based on this sample data. This class is not part of the main

 which might be referred to by storage
 * location of any table/volume should be created before creating the table/volume entry in the
 * database or can be a part of the same PR.
 */
public class PopulateTestDatabase {

  public static void main(String[]

* application code and is only used for testing purposes. To recreate the sample data, first delete
 * the existing database (at /etc/db) and then run main method of this class by running the command
 * `build/sbt server/populateTestDB`. Any data artifacts


mbol;
  lnk_symbol_list_push_node(list, node);
  return node;
}

internal LNK_SymbolHashTrie *
lnk_symbol_hash_trie_chunk_list_push(Arena *arena, LNK_SymbolHashTrieChunkList *list, U64 cap)
{
  if (list->last == 0 || list->last->count >= list->last->cap) {

   chunk->v                       = push_array_no_zero(arena, LNK_SymbolHashTrie, cap);
    SLLQueuePush(list->first, list->last, chunk);
    ++list->count;
  }

  LNK_SymbolHashTrie *result = &list->last->v[list->last->count++];
  return result;
}

intern

    LNK_SymbolHashTrieChunk *chunk = push_array(arena, LNK_SymbolHashTrieChunk, 1);
    chunk->cap                     = cap;


  >
        {children}
      </div>
    </CarouselContext.Provider>
  )
}

function CarouselContent({ className, ...props }: React.ComponentProps<"div">) {
  const { carouselRef, orientation } = useCarousel()

  return (
    <div
      ref={carouselRef}

 </div>
  )
}

function CarouselItem({ className, ...props }: React.ComponentProps<"div">) {
  const { orientation } = useCarousel()

  return (
    <div
      role="group"
      aria-roledescription="slide"
      data-slot="carousel-item"
      className=

    className="overflow-hidden"
      data-slot="carousel-content"
    >
      <div
        className={cn(
          "flex",
          orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
          className
        )}
        {...props}
      />


}/html",
        }

    async def test_basic_get(self, fetcher, urls):
        """Test doing basic get request with multiple statuses"""
        assert (await fetcher.get(urls["status_200"])).status == 200
        assert (await fetcher.get(urls["status_404

 fetcher, urls):
        """Test if different arguments with the GET request break the code or not"""
        assert (
            await fetcher.get(urls["status_200"], stealthy_headers=True)
        ).status == 200
        assert (
            await fetch

"])).status == 404
        assert (await fetcher.get(urls["status_501"])).status == 501

    async def test_get_properties(self,


 "http" | undefined
): string {
  const flag = clientFlagForCli(clientIde);
  const transportFlag = transport === "stdio" ? " --stdio" : "";
  return flag
    ? `npx ctx7 setup ${flag} --mcp${transportFlag} -y`
    : `npx ctx7 setup --mcp${transportFlag}`;

limits, run this in your terminal:",
    "",
    `    ${command}`,
    "",
    "It opens your browser, signs you in, and writes credentials into your MCP client config.",
    "After it finishes, disable then re-enable the Context7 MCP server in your editor

}

function buildElicitMessage(
  clientIde: string | undefined,
  transport: "stdio" | "http" | undefined
): string {
  const command = buildAuthCommand(clientIde, transport);
  return [
    "You're using Context7 anonymously. To unlock free higher rate


equire('child_process');
const fs = require('fs');
const os = require('os');
const path = require('path');

// ponytail: probe once at load; mirrors correctness.js
let pythonCmd;
function python() {
  if (pythonCmd) return pythonCmd;
  for (const cmd of ['

 catch (_) {}
  }
  return pythonCmd = 'python3';
}

const N = Number(process.env.AUDIT_N) || 20;
const MODEL = process.env.AUDIT_MODEL || 'gpt-5.4-mini';
const ROOT = path.join(__dirname, '..');
let kv = {};
try {
  kv = Object.fromEntries(fs.readFileSync

python3', 'python']) {
    try { execSync(`${cmd} -c "import sys"`, { stdio: 'pipe' }); pythonCmd = cmd; return pythonCmd; }


session - should extract new version
	version = agent.getHubVersion("different-session", mockCtx)
	assert.Equal(t, "0.11.0", version.String())

	// Test with invalid version string (non-beszel client)
	mockCtx.clientVersion = "SSH-2.0-OpenSSH_8.0"
	version

session", mockCtx)
	assert.Equal(t, "0.0.0", version.String()) // Should be empty version for non-beszel clients

	// Test with no client version
	mockCtx.clientVersion = ""
	version = agent.getHubVersion("no-version-session", mockCtx)
	assert.True(t, vers


tionGenerator,
  CommandDefinition,
  FlagDefinition,
  PositionalDefinition,
} from '../types.js';
import { POWERSHELL_DYNAMIC_HELPERS } from '../templates/powershell-templates.js';

/**
 * Generates PowerShell completion scripts for the OpenSpec CLI.
 *

readonly shell = 'powershell' as const;

  private stripTrailingCommaFromLastLine(lines: string[]): void {
    if (lines.length === 0) return;
    lines[lines.length - 1] = lines[lines.length - 1].replace(/,\s*$/, '');
  }

  /**
   * Generate a PowerShell

Uses Register-ArgumentCompleter for command completion.
 */
export class PowerShellGenerator implements CompletionGenerator {


new module under `src/core/`, e.g.
  `references.ts`): resolve each id through the shared non-throwing
  resolution variant (decision 5), enumerate the referenced root's
  `openspec/specs/`, extract first-line summaries tolerantly
  (decision 2), and emit

root, specs: [{id, summary}], fetch, status: [...]}`
  (`root` absolute; `fetch` the per-store recipe string).
- **Artifact instructions**: `generateInstructions`
  (`src/core/artifact-graph/instruction-loader.ts:271-339`) gains a
  `references` field; hum


se64.b64encode(buffer.getvalue()).decode()

	return f'data:image/jpeg;base64,{img_data}'

async def test_gemini_image_vision():
	"""Test Gemini's ability to see and describe images."""

	# Create the LLM
	llm = ChatGoogle(model='gemini-2.0-flash-exp')

	#

_text_image('Hello Gemini! Can you see this text?')

	# Create messages with image
	messages: list[BaseMessage] = [
		SystemMessage(content='You are a helpful assistant that can see and describe images.'),
		UserMessage(
			content=[
				ContentPartTextPar

 Create a random image with text
	image_data_url = create_random


r / 'uv'
	uv.write_text(
		'#!/usr/bin/env python3\n'
		'import os, pathlib, sys\n'
		'pathlib.Path(os.environ["UV_TOOL_INSTALL_ARGS_FILE"]).write_text(" ".join(sys.argv[1:]), encoding="utf-8")\n',
		encoding='utf-8',
	)
	uv.chmod(0o755)

	browser_harness

r}\n'
		'if sys.argv[1:] == ["skill"]:\n'
		'    print(text, end="")\n'
		'else:\n'
		'    print("usage: browser-harness skill", file=sys.stderr)\n'
		'    sys.exit(2)\n',
		encoding='utf-8',
	)
	browser_harness.chmod(0o755)
	return bin_dir

def test_docs

= bin_dir / 'browser-harness'
	browser_harness.write_text(
		'#!/usr/bin/env python3\n'
		'import sys\n'
		f'text = {skill_text!


cio.subprocess.PIPE,
				env=env,
			)
			stdout, stderr = await proc.communicate()

			if proc.returncode == 0:
				try:
					# Parse JSON result from subprocess
					stdout_text = stdout.decode().strip()
					stderr_text = stderr.decode().strip()

					#

 the last line that starts with {)
					lines = stdout_text.split('\n')
					json_line = None
					for line in reversed(lines):
						line = line.strip()
						if line.startswith('{') and line.endswith('}'):
							json_line = line
							break

					if js

 Display subprocess debug logs
					if stderr_text:
						print(f'[SUBPROCESS {os.path.basename(task_file)}] Debug output:')
						for line in stderr_text.split('\n'):
							if line.strip():
								print(f'  {line}')

					# Find the JSON line (should be


  };
}

function memberLine(member: WorkingSetMember): string {
  return `  ${member.id}  ${member.path}`;
}

function printHumanWorkingSet(workingSet: WorkingSet, declaredReferenceCount: number): void {
  const rootLabel = workingSet.root.store_id ?? path

for ${rootLabel} (${workingSet.root.path})`);
  console.log('');
  console.log('OpenSpec root');
  console.log(`  ${rootLabel}  ${workingSet.root.path}`);

  const availableStores = workingSet.members.filter(
    (member) => member.role === 'referenced_sto

.basename(workingSet.root.path);
  console.log(`Working context


ngType},
				cel.StringType,
				cel.UnaryBinding(func(str ref.Val) ref.Val {
					s, ok := str.(types.String)
					if !ok {
						return types.ValOrErr(str, "addr is not a string")
					}

					escapes := []string{"\\", ".", ":", "*", "?", "-", "[", "]",

r, escape, "\\"+escape)
					}
					return types.String(r)
				}),
			),
		),

		cel.Function("segments",
			cel.Overload("segments_string_list_string",
				[]*cel.Type{cel.StringType},
				cel.ListType(cel.StringType),
				cel.UnaryBinding(func(path ref.V

"(", ")", "+", "{", "}", "|", "^", "$"}
					r := string(s)

					for _, escape := range escapes {
						r = strings.ReplaceAll(


', 'add-billing'))
      ).toBe(true);
      expectNoLocalOpenSpec();
    });

    it('includes the shared root block and absolute paths in new change JSON', async () => {
      const result = await runCLI(
        ['new', 'change', 'add-billing', '--store

      { cwd: appRepo, env }
      );
      expect(result.exitCode).toBe(0);

      const json = parseJson(result);
      expect(json.root).toEqual({
        path: storeRoot,
        source: 'store',
        store_id: 'team-context',
      });
      expect(


ultra, stop caveman, and session init via real hooks', async () => {
  const xdg = freshTmpDir();
  const shimDir = shimOpencode();
  const origDefault = process.env.CAVEMAN_DEFAULT_MODE;
  try {
    const env = { ...process.env, XDG_CONFIG_HOME: xdg, PATH

1' };
    const r = runInstaller(['--only', 'opencode'], env);
    assert.notEqual(r.status, 2);

    const pluginPath = path.join(xdg, 'opencode', 'plugins', 'caveman', 'plugin.js');
    const flagPath = path.join(xdg, 'opencode', '.caveman-active');


matches = rows.filter((row) => row.section === section && row.metric.startsWith(prefix) && row.value);
    if (matches.length === 0)
        return { label: '', value: '' };
    const sorted = [...matches].sort((a, b) => parseFloat(b.value) - parseFloat(a.

;
}
export function summarizeCreatorNote(note, rows, rank) {
    const topSource = findTopBySectionPrefix(rows, '观看来源', '');
    const topInterest = findTopBySectionPrefix(rows, '观众画像', '兴趣/');
    return {
        rank,
        id: note.id,
        title:

value));
    const top = sorted[0];
    return {
        label: top.metric.slice(prefix.length),
        value: top.value,
    }


t) -> None:
		"""
		Switches video recording to the new tab.
		"""
		if self._recorder:
			self.logger.debug(f'Agent focus changed to {event.target_id}, switching screencast...')
			await self._start_screencast()

	async def _start_screencast(self) -> None

)

			# If we are already recording this session, do nothing
			if self._current_session_id == cdp_session.session_id:
				return

			# Stop recording on the previous session
			if self._current_session_id:
				try:
					# Use the root client to stop scree

:
		"""Starts screencast on the currently focused tab."""
		if not self._recorder or not self._screencast_params:
			return

		try:
			# Get the current session (for the focused target)
			cdp_session = await self.browser_session.get_or_create_cdp_session(


                         }

                                if let Some(usage) = interaction.usage.clone() {
                                    span.record_token_usage(&usage);
                                    final_usage = Some(usage);

                    InteractionSseEvent::Error { .. } => {
                                // Preserve the full provider error payload (code +
                                // message) by reusing the raw SSE event JSON, matching

                 }
                                final_interaction = Some(interaction);
                            }


param attrs: Attributes on those tags to read URLs from. Default ("href",).
    :param canonicalize: Canonicalize URLs (sort query params, normalize path). Default True.
    :param strip: Strip whitespace from extracted URLs. Default True.
    :param keep_

 to drop any value.
    """

    def __init__(
        self,
        allow: Union[str, Pattern[str], PatternInput] = (),
        deny: Union[str, Pattern[str], PatternInput] = (),
        allow_domains: StrOrIterable = (),
        deny_domains: StrOrIterab

fragment: Preserve the URL fragment when canonicalizing. Default False.
    :param deny_extensions: File extensions to drop. Default `IGNORED_EXTENSIONS`.
    :param process: A function to do a process on the values extracted before using them. Return None


SyncResourceSpecification specification = new McpServerFeatures.SyncResourceSpecification(
				resource, (exchange, req) -> ReadResourceResult.builder(List.of()).build());

		mcpSyncServer.addResource(specification);
		List<McpSchema.Resource> resources =

_URI);

		assertThatCode(mcpSyncServer::closeGracefully).doesNotThrowAnyException();
	}

	@Test
	void testRemoveResource() {
		var mcpSyncServer = prepareSyncServerBuilder().serverInfo("test-server", "1.0.0")
			.capabilities(ServerCapabilities.builder().r

mcpSyncServer.listResources();

		assertThat(resources).hasSize(1);
		assertThat(resources.get(0).uri()).isEqualTo(TEST_RESOURCE


       "Author",
                "DateTimeOriginal",
                "CreateDate",
                "GPSPosition",
            ]:
                if f in metadata:
                    md_content += f"{f}: {metadata[f]}\n"

        # Try describing the image

 None and llm_model is not None:
            llm_description = self._get_llm_description(
                file_stream,
                stream_info,
                client=llm_client,
                model=llm_model,
                prompt=kwargs.get("llm_p

 with GPT
        llm_client = kwargs.get("llm_client")
        llm_model = kwargs.get("llm_model")
        if llm_client is not


del = req.model.clone().unwrap_or_else(|| model.to_string());
        let mut input: Vec<Message> = req
            .preamble
            .as_ref()
            .map_or_else(Vec::new, |p| vec![Message::system(p)]);

        let mut additional_params_payload

or(Value::Null);

        for msg in chat_history {
            let msg: Vec<Message> = msg.try_into()?;
            input.extend(msg);
        }

        let tool_choice = req.tool_choice.map(ToolChoice::try_from).transpose()?;
        let mut additional_


 => normalizeReimbursementInput(validArgs({ currency: 'US' }))).toThrow(ArgumentError);
        expect(() => normalizeReimbursementInput(validArgs({ date: '2026-02-30' }))).toThrow(ArgumentError);
        expect(() => normalizeReimbursementInput(validArgs(

.toThrow(ArgumentError);
        expect(() => normalizeReimbursementInput(validArgs({ receipt: path.join(tmpDir, 'missing.png') }))).toThrow(ArgumentError);
    });
});

describe('mercury reimbursement-plan', () => {
    it('validates locally and returns a


hat requires it
// (e.g., tokio::spawn). Calling bad_mutex(...).await directly compiles fine.
// However, tokio::spawn(bad_mutex(data)) will fail with a Send bound error.
```

**Why this is usually a problem** — but not always:

Holding a `std::sync::Mutex

thread. For short critical sections this is wasteful; for long I/O it's a
performance trap.

**However**, there are legitimate cases where you *must* hold a lock across an
`.await` — the same way a database transaction holds a lock between read and
commit

` across `.await` blocks the **OS thread** for the
duration of the I/O, preventing the executor from polling other tasks on that


.Logger] = ContextVar("scrapling_logger", default=setup_logger())

class LoggerProxy:
    def __getattr__(self, name: str):
        return getattr(_current_logger.get(), name)

log = LoggerProxy()

def set_logger(logger: logging.Logger) -> Token:
    ""

 return _current_logger.set(logger)

def reset_logger(token: Token) -> None:
    """Reset logger to previous state using token."""
    _current_logger.reset(token)

def flatten(lst: Iterable[Any]) -> List[Any]:
    return list(chain.from_iterable(lst))

"Set the current context logger. Returns token for reset."""


ateCatalog createCatalog = new CreateCatalog().name(CATALOG_NAME).comment(COMMENT);
    catalogOperations.createCatalog(createCatalog);
    schemaOperations.createSchema(new CreateSchema().name(SCHEMA_NAME).catalogName(CATALOG_NAME));
  }

  protected void

SCHEMA_NAME);
    assertThat(functionInfo.getFunctionId()).isNotNull();
  }

  @Test
  public void testFunctionCRUD() throws ApiException {
    assertThatThrownBy(() -> functionOperations.getFunction(FUNCTION_FULL_NAME))
        .isInstanceOf(Exception.cla

 assertFunction(FunctionInfo functionInfo, String functionName) {
    assertThat(functionInfo.getName()).isEqualTo(functionName);
    assertThat(functionInfo.getCatalogName()).isEqualTo(CATALOG_NAME);
    assertThat(functionInfo.getSchemaName()).isEqualTo(


/<task-id>/status \
  -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY"
```

### Get session live URL

```bash
curl https://api.browser-use.com/api/v2/sessions/<session-id> \
  -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY"
```

Response includes `liveUrl

 "timeout": 30}'
```

Response includes `cdpUrl` (WebSocket) and `liveUrl`.

### Stop a session

```bash
curl -X PATCH https://api.browser-use.com/api/v2/sessions/<session-id> \
  -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY" \
  -H "Content-Type: appli

` — open it to watch the agent work.

### Create a CDP browser

```bash
curl -X POST https://api.browser-use.com/api/v2/browsers \
  -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"proxyCountryCode": "us",


k()
            mock_fetch.return_value = mock_response

            result = runner.invoke(
                stealthy_fetch,
                [html_url, str(output_file), "--headless", "--css-selector", "body", "--timeout", "60000"],
            )

        """Test that --executable-path is passed through to DynamicFetcher and wins over the environment variable"""
        output_file = tmp_path / "output.html"
        monkeypatch.setenv("SCRAPLING_EXECUTABLE_PATH", "/opt/env-chromium")

        with

   assert result.exit_code == 0

    def test_extract_fetch_with_executable_path(self, runner, tmp_path, html_url, monkeypatch):


ate history into latest-per-session totals, optionally filtered to a
// time window. Returns { sessions, outputTokens, estSavedTokens, estSavedUsd }.
function aggregateHistory(historyPath, sinceMs) {
  const lines = readHistory(historyPath);
  const cutoff

 try { entry = JSON.parse(line); } catch { continue; }
    if (!entry || typeof entry !== 'object') continue;
    if (cutoff !== null && (entry.ts || 0) < cutoff) continue;
    const id = entry.session_id || '_';
    const prev = latestPerSession.get(id);

 = sinceMs ? Date.now() - sinceMs : null;
  const latestPerSession = new Map();
  for (const line of lines) {
    let entry;


eck is unfinished"
//
// Heuristic graders, same spirit as loc.js / correctness.js. The graders
// themselves are proven by tests/behavior.test.js (RED/GREEN, no API key).
//
// Metric: `behavior` (1 = behavior present, 0 = absent).

function proseOf(text)

device as non-ideal: leaves a tunable knob or flags per-unit drift.
  // A passing mention of "calibration" is not enough; it must be actionable.
  hardware(output) {
    const t = String(output || '');
    const drift = /\bdrift|per[- ]unit|per[- ]part|pa

 {
  return String(text || '').replace(/```[\s\S]*?```/g, ' ').replace(/\s+/g, ' ').trim();
}

const CHECKS = {
  // Treats the


it applicability predicates
- **AND** generation entry points SHALL NOT implement ad-hoc rewrite logic

### Requirement: Shared Artifact Sync Engine

The system SHALL provide a shared artifact sync engine used by all generation entry points.

#### Scenario

 `openspec update` writes skills/commands
- **THEN** both flows SHALL use the same orchestration engine for planning, rendering, validating, and writing artifacts
- **AND** behavior differences SHALL be configuration-driven rather than separate duplicated

: Init and update use same engine

- **WHEN** `openspec init` or


ue) // header is missing
					}
					return types.Bool(false) // header is present
				}),
			),
		),

		cel.Function("reverseDNS",
			cel.Overload("reverseDNS_string_list_string",
				[]*cel.Type{cel.StringType},
				cel.ListType(cel.StringType),
				cel.

				return types.NewStringList(types.DefaultTypeAdapter, []string{})
					}
					return types.NewStringList(types.DefaultTypeAdapter, names)
				}),
			),
		),

		cel.Function("lookupHost",
			cel.Overload("lookupHost_string_list_string",
				[]*cel.Type{c

UnaryBinding(func(addr ref.Val) ref.Val {
					addrStr, ok := addr.(types.String)
					if !ok {
						return types.ValOrErr(addr, "addr is not a string, but is %T", addr)
					}

					names, err := dnsObj.ReverseDNS(string(addrStr))
					if err != nil {


G_StrExpr
{
  MG_StrExpr *parent;
  MG_StrExpr *left;
  MG_StrExpr *right;
  MG_StrExprOp op;
  MD_Node *node;
};

typedef struct MG_StrExprParseResult MG_StrExprParseResult;
struct MG_StrExprParseResult
{
  MG_StrExpr *root;
  MD_MsgList msgs;
  MD_Node *

///////////////
//~ rjf: Table Generation Types

typedef struct MG_NodeArray MG_NodeArray;
struct MG_NodeArray
{
  MD_Node **v;
  U64 count;
};

typedef struct MG_NodeGrid MG_NodeGrid;
struct MG_NodeGrid
{
  U64 x_stride;
  U64 y_stride;
  MG_NodeArray cel


)

	click_step = AgentHistory(
		model_output=AgentOutput(
			evaluation_previous_goal=None,
			memory='Click Submit',
			next_goal=None,
			action=[{'click': {'index': 1}}],  # type: ignore[arg-type]
		),
		result=[ActionResult(long_term_memory='Clicked')

,
			tabs=[],
			interacted_element=[historical_element],
		),
		metadata=StepMetadata(step_start_time=1, step_end_time=2, step_number=2, step_interval=0.1),
	)

	history = AgentHistoryList(history=[navigate_step, click_step])

	try:
		# Should fail becaus

],
		state=BrowserStateHistory(
			url=test_url,
			title='Test'


e == 0

        # Test with various options
        with patch("scrapling.fetchers.Fetcher.get") as mock_get:
            mock_get.return_value = mock_response

            result = runner.invoke(
                get,
                [

    "-H",
                    "User-Agent: Test",
                    "--cookies",
                    "session=abc123",
                    "--timeout",
                    "60",
                    "--proxy",
                    "http://proxy:8080",

html_url,
                    str(output_file),


',
	'openai_gpt_4_1_mini',
	'openai_o1',
	'openai_o1_mini',
	'openai_o1_pro',
	'openai_o3',
	'openai_o3_mini',
	'openai_o3_pro',
	'openai_o4_mini',
	'openai_gpt_5',
	'openai_gpt_5_mini',
	'openai_gpt_5_nano',
	# Azure instances - created on demand
	'azure_

'azure_gpt_4_1_mini',
	'azure_o1',
	'azure_o1_mini',
	'azure_o1_pro',
	'azure_o3',
	'azure_o3_mini',
	'azure_o3_pro',
	'azure_gpt_5',
	'azure_gpt_5_mini',
	# Google instances - created on demand
	'google_gemini_2_0_flash',
	'google_gemini_2_0_pro',
	'googl


f ! mkdir -p "$dir"; then
      error "Failed to create shared folder ($dir)." && return 1
    fi
  fi

  if ! ls -A "$dir" >/dev/null 2>&1; then
    local msg="No permission to access shared folder ($dir)."
    msg+=" If SELinux is active, you need to add

($dir) is not writeable!"
    warn "$msg"
  fi

  if [ -z "$(ls -A "$dir")" ]; then

    if ! chmod 2777 "$dir"; then
      error "Failed to set permissions for directory $dir" && return 1
    fi

    if ! owner=$(stat -c %u "$dir"); then
      error "Fail

 the \":Z\" flag to the bind mount."
    error "$msg" && return 1
  fi

  if [ ! -w "$dir" ]; then
    local msg="shared folder


e)

        threads = [threading.Thread(target=save_element, args=(i,)) for i in range(20)]
        for t in threads:
            t.start()
        for t in threads:
            t.join()

        assert len(errors) == 0, f"Thread safety errors: {errors}"

20):
            result = storage.retrieve(f"element-{i}")
            assert result is not None, f"element-{i} not found after concurrent save"

        storage.close()
        if os.path.exists(db_path):
            os.unlink(db_path)

class TestStorage

        # Verify all elements were saved
        for i in range(


unknown_entity_without_external_dtd() -> Result<()> {
        let dir = tempdir()?;
        let file_path =
            create_test_file(&dir, "unknown_entity.xml", b"<root>&unknown;</root>").await?;
        let (code, output) = check_file(Path::new(""), &

  async fn test_xml_with_internal_entity() -> Result<()> {
        let dir = tempdir()?;
        let content = br#"<!DOCTYPE root [<!ENTITY value "ok">]>
<root>&value;</root>"#;
        let file_path = create_test_file(&dir, "internal_entity.xml", content)

file_path).await?;
        assert_eq!(code, 1);
        assert!(!output.is_empty());
        Ok(())
    }

    #[tokio::test]


ading silver.crm_cust_info
        SET @start_time = GETDATE();
		PRINT '>> Truncating Table: silver.crm_cust_info';
		TRUNCATE TABLE silver.crm_cust_info;
		PRINT '>> Inserting Data Into: silver.crm_cust_info';
		INSERT INTO silver.crm_cust_info (
			cst_

cst_marital_status)) = 'S' THEN 'Single'
				WHEN UPPER(TRIM(cst_marital_status)) = 'M' THEN 'Married'
				ELSE 'n/a'
			END AS cst_marital_status, -- Normalize marital status values to readable format
			CASE
				WHEN UPPER(TRIM(cst_gndr)) = 'F' THEN 'Fe

id,
			cst_key,
			cst_firstname,
			cst_lastname,
			cst_marital_status,
			cst_gndr,
			cst_create_date
		)
		SELECT
			cst_id,
			cst_key,
			TRIM(cst_firstname) AS cst_firstname,
			TRIM(cst_lastname) AS cst_lastname,
			CASE
				WHEN UPPER(TRIM(


 name', async () => {
      const result = await runCLI(['status', '--change', '../foo'], { cwd: tempDir });
      expect(result.exitCode).toBe(1);
      const output = getOutput(result);
      expect(output).toContain('Invalid change name');
    });

, { cwd: tempDir });
      expect(result.exitCode).toBe(1);
      const output = getOutput(result);
      expect(output).toContain('Invalid change name');
    });

    it('rejects slashes in change name', async () => {
      const result = await runCLI(['s

it('rejects absolute path in change name', async () => {
      const result = await runCLI(['status', '--change', '/etc/passwd']


TTERNS) {
    working = working.replace(re, m => {
      const i = segments.length;
      segments.push(m);
      return `${i}`;
    });
  }
  let out = transform(working);
  // Restore iteratively: a single pass leaves inner sentinels unresolved when

) {
    sentinel.lastIndex = 0;
    if (!sentinel.test(out)) break;
    out = out.replace(/(\d+)/g, (_, i) => segments[+i]);
  }
  return out;
}

function compressProse(text) {
  let s = text;
  s = s.replace(LEADERS, '');
  s = s.replace(PLEASANTRIES, '

// patterns nested at protect time (#444).
  const sentinel = /(\d+)/g;
  for (let pass = 0; pass < MAX_RESTORE_PASSES; pass++


    async def test_basic_get(self, fetcher, urls):
        """Test doing basic get request with multiple statuses"""
        assert (await fetcher.get(urls["status_200"])).status == 200
        assert (await fetcher.get(urls["status_404"])).status == 404

= 501

    async def test_get_properties(self, fetcher, urls):
        """Test if different arguments with the GET request break the code or not"""
        assert (
            await fetcher.get(urls["status_200"], stealthy_headers=True)
        ).status =

assert (await fetcher.get(urls["status_501"])).status =


te(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
#else
    // Apple MacOs will use it own legacy desktop GL instead
    // I know, I lied, I said this was an GLES3
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE

_GL_CONTEXT_MAJOR_VERSION, 3);
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
#endif

    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
    SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
    SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
    SDL_GL_SetAttr

_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
    SDL_GL_SetAttribute(SDL


         serde_json::json!({"type": "function", "name": "beta"})
        );
    }

    #[test]
    fn xai_response_preserves_message_id_and_reasoning_token_usage() {
        let raw: super::CompletionResponse = serde_json::from_value(serde_json::json!({

": "reasoning",
                    "id": "rs_123",
                    "summary": [{ "type": "summary_text", "text": "thinking" }],
                    "status": "completed"
                },
                {
                    "type": "message",


alTrigger();
    var entry4 = new SignalTrigger.SignalTriggerEntry();
    entry4.setJoinKeys(new String[] {"foo"});
    trigger4.setDefinitions(Map.of("signal_a", entry4));
    Assert.assertTrue(validator.validate(new DummyWorkflow(trigger4)).isEmpty());

 = new SignalTrigger.SignalTriggerEntry();
    entry5.setMatchParams(
        Map.of(
            "bar",
            SignalMatchParam.builder()
                .value(SignalParamValue.of(123))
                .operator(SignalOperator.EQUALS_TO)

    SignalTrigger trigger5 = new SignalTrigger();
    var entry5


           "tgz" => Ok(Self::TarGz),
            "tbz" => Ok(Self::TarBz2),
            "txz" => Ok(Self::TarXz),
            "tlz" => Ok(Self::TarLzma),
            "gz" if is_tar(path.as_ref()) => Ok(Self::TarGz),
            "bz2" if is_tar(path.as_ref(

) => Ok(Self::TarXz),
            "lz" | "lzma" if is_tar(path.as_ref()) => Ok(Self::TarLzma),
            "zst" if is_tar(path.as_ref()) => Ok(Self::TarZst),
            _ => Err(Error::UnsupportedArchive(path.as_ref().to_path_buf())),
        }
    }
}

)) => Ok(Self::TarBz2),
            "xz" if is_tar(path.as_ref()


ePath, 'utf8').trim() || null;
  } catch (e) {
    return null;
  }
}

function writeHookOutput(event, mode, context = '') {
  if (isCopilot) {
    // Copilot reads additionalContext on SessionStart; ignores output elsewhere.
    process.stdout.write(JSON.

      hookEventName: event,
        additionalContext: context,
      };
    }
    process.stdout.write(JSON.stringify(output));
    return;
  }
  if (isQoder) {
    // Qoder: hookSpecificOutput JSON, same shape as Codex minus systemMessage.
    // UserPro

stringify(
      event === 'SessionStart' && context ? { additionalContext: context } : {}));
    return;
  }
  if (isCodex) {
    const output = { systemMessage: `PONYTAIL:${mode.toUpperCase()}` };
    if (context) {
      output.hookSpecificOutput = {


on you need.
        :param page_setup: A function that takes the `page` object, runs before navigation. Use it to register event listeners or routes that must be set up before the page loads.
        :param wait_selector: Wait for a specific CSS selector

   :param init_script: An absolute path to a JavaScript file to be executed on page creation with this request.
        :param locale: Set the locale for the browser if wanted. Defaults to the system default locale.
        :param wait_selector_state: The


			CAST(prd_start_dt AS DATE) AS prd_start_dt,
			CAST(
				LEAD(prd_start_dt) OVER (PARTITION BY prd_key ORDER BY prd_start_dt) - 1
				AS DATE
			) AS prd_end_dt -- Calculate end date as one day before the next start date
		FROM bronze.crm_prd_info;

 ' + CAST(DATEDIFF(SECOND, @start_time, @end_time) AS NVARCHAR) + ' seconds';
        PRINT '>> -------------';

        -- Loading crm_sales_details
        SET @start_time = GETDATE();
		PRINT '>> Truncating Table: silver.crm_sales_details';
		TRUNCATE T

     SET @end_time = GETDATE();
        PRINT '>> Load Duration:


e\n";
        let file_path = create_test_file(&dir, "partial_conflict.txt", content).await?;
        let (code, output) = check_file(Path::new(""), &file_path).await?;
        assert_eq!(code, 0);
        assert!(output.is_empty());
        Ok(())
    }

test_rst_heading_is_not_treated_as_conflict() -> Result<()> {
        let dir = tempdir()?;
        let content = b"Depends\n=======\n";
        let file_path = create_test_file(&dir, "doc.rst", content).await?;
        let (code, output) = check_file(Path


ent_params': self.client_params,
		}

	def get_client(self) -> OllamaAsyncClient:
		"""
		Returns an OllamaAsyncClient client.
		"""
		return OllamaAsyncClient(host=self.host, timeout=self.timeout, **self.client_params or {})

	@property
	def name(self) ->

, messages: list[BaseMessage], output_format: None = None, **kwargs: Any
	) -> ChatInvokeCompletion[str]: ...

	@overload
	async def ainvoke(self, messages: list[BaseMessage], output_format: type[T], **kwargs: Any) -> ChatInvokeCompletion[T]: ...

	async d

 str:
		return self.model

	@overload
	async def ainvoke(
		self


/github.test/pull/7","mergedAt":"2099-01-01T00:00:00Z","mergedBy":{"login":"maintainer"},"labels":[]}]'
    ;;
  "api repos/test/target/issues/comments"*)
    if [[ "$*" == *"per_page=20"* ]]; then
      echo "github_response_too_large" >&2
      exit 1

,"issue_url":"https://api.github.test/issues/8"}]'
    ;;
  "api repos/test/sweeper/contents/config/automation-limits.json"*)
    printf '%s\n' '{"workers":{"max":128},"lanes":{"exact_review":{"max_concurrent":28,"target_max_concurrent":24}}}'
    ;;
  "ap

  fi
    printf '%s\n' '[{"user":{"login":"clawsweeper"},"body":"Codex review: clean","html_url":"https://github.test/comment/8"


me
      )}
      {...props}
    />
  )
}

function CarouselPrevious({
  className,
  variant = "outline",
  size = "icon-sm",
  ...props
}: React.ComponentProps<typeof Button>) {
  const { orientation, scrollPrev, canScrollPrev } = useCarousel()

  return

carousel-previous"
      variant={variant}
      size={size}
      className={cn(
        "absolute touch-manipulation rounded-full",
        orientation === "horizontal"
          ? "top-1/2 -left-12 -translate-y-1/2"
          : "-top-12 left-1/2 -transl


(r.pass, false);
  assert.equal(r.score, 0);
});

// --- explanation: requested write-up is not debt ---

test('explanation: full requested write-up passes', () => {
  const r = check('explanation',
    '```python\ndef positives_doubled(rows):\n    return

. Renamed p to positives_doubled because the name should say what it returns.\n' +
    '2. Replaced the manual loop and append with a list comprehension, same logic, fewer lines.\n' +
    '3. Used x.get("a", 0) so a missing key is treated as zero instead o


5c5c3_Buffer, 6, "<p>")
			if templ_7745c5c3_Err != nil {
				return templ_7745c5c3_Err
			}
			var templ_7745c5c3_Var6 string
			templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("simplified_explanation"))
			if templ_7745c5c3_Err

{Err: templ_7745c5c3_Err, FileName: `proofofwork.templ`, Line: 20, Col: 44}
			}
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
			if templ_7745c5c3_Err != nil {
				return templ_7745c5c3_Err
			}
			t


", "--get", action="store_true")  # Use GET and put data in URL

        _parser.add_argument(
            "-b",
            "--cookie",
            default=None,
            help="Send cookies from string/file (string format used by DevTools)",
        )

default=None)  # Basic proxy auth

        # Connection/Security
        _parser.add_argument("-k", "--insecure", action="store_true")
        _parser.add_argument("--compressed", action="store_true")  # Very common from browsers

        # Other flags oft

        # Proxy
        _parser.add_argument("-x", "--proxy", default=None)
        _parser.add_argument("-U", "--proxy-user",


er-l-0",
        vertical:
          "flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0",
      },
    },
    defaultVariants: {

"div"> & VariantProps<typeof buttonGroupVariants>) {
  return (
    <div
      role="group"
      data-slot="button-group"
      data-orientation={orientation}
      className={cn(buttonGroupVariants({ orientation }), className)}
      {...props}
    />

 orientation: "horizontal",
    },
  }
)

function ButtonGroup({
  className,
  orientation,
  ...props
}: React.ComponentProps<


        fs.writeFileSync(path.join(specDir, 'spec.md'), VALID_DELTA_SPEC);
      }
      const badTargetDir = path.join(storeRoot, 'openspec', 'specs', 'zzz-bad');
      fs.mkdirSync(badTargetDir, { recursive: true });
      const badTargetContent =

, 'two-spec-change', '--store', 'team-context', '--json', '--yes'],
        { cwd: appRepo, env }
      );
      expect(result.exitCode).toBe(1);
      const json = parseJson(result);
      expect(json.archive).toBeNull();
      expect(json.status[0].code)

   '# zzz-bad\n\n## Purpose\nLegacy.\n\n## Requirements\n\n### Requirement: Old rule SHALL hold\nThe system SHALL hold.\n';
      fs.writeFileSync(path.join(badTargetDir, 'spec.md'), badTargetContent);

      const result = await runCLI(
        ['archive'


         let messages = {
                let guard = self.lock()?;
                guard.get(conversation_id).cloned().unwrap_or_default()
            };
            match &self.filter {
                Some(filter) => Ok(filter(messages)),

       messages: Vec<Message>,
    ) -> WasmBoxedFuture<'a, Result<(), MemoryError>> {
        Box::pin(async move {
            let mut guard = self.lock()?;
            guard
                .entry(conversation_id.to_string())
                .or_default

  None => Ok(messages),
            }
        })
    }

    fn append<'a>(
        &'a self,
        conversation_id: &'a str,


ing)

        # Remove javascript and style blocks
        for script in soup(["script", "style"]):
            script.extract()

        # Print only the main content
        body_elm = soup.find("body")
        webpage_text = ""
        try:

       raise
            # Large or deeply-nested HTML can exceed Python's recursion limit
            # during markdownify's recursive DOM traversal.  Fall back to
            # BeautifulSoup's iterative get_text() so the caller still gets
            # u

if body_elm:
                webpage_text = _CustomMarkdownify(**kwargs).convert_soup(body_elm)
            else:
                webpage_text = _CustomMarkdownify(**kwargs).convert_soup(soup)
        except RecursionError:
            if strict:


private: () }` | Unauthorised access | Zero | ch04 |
| 4 | Type-State | `Session<Active>` | Protocol violations | Zero | ch05 |
| 5 | Dimensional Types | `struct Celsius(f64)` | Unit confusion | Zero | ch06 |
| 6 | Validated Boundaries | `struct ValidFru`

 Capability Mixins | `trait FanDiagMixin: HasSpi + HasI2c` | Missing bus access | Zero | ch08 |
| 8 | Phantom Types | `Register<Width16>` | Width/direction mismatch | Zero | ch09 |
| 9 | Sentinel → Option | `Option<u8>` (not `0xFF`) | Sentinel-as-value bug

(via TryFrom) | Unvalidated data use | Parse once | ch07 |
| 7 |


\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14"
            original = _make_response(body=b"<html>test content</html>")

            await cache.put(fp, original, "GET")
            restored = await cache.get(fp)

            assert restored is not

.url == original.url
            assert restored.body == original.body
            assert restored.status == original.status
            assert restored.reason == original.reason
            assert restored.encoding == original.encoding
            assert


           file types to it. Incompatible modalities auto-route to
                default prebuilts. If None, auto-selects by extension/MIME.
            file_types: Which file types to handle. If None, uses the
                default set (all supported

 not None:
            raise MissingDependencyException(
                "ContentUnderstandingConverter requires the optional dependency "
                "[az-content-understanding] (or [all]) to be installed. "
                "E.g., `pip install 'markit

formats).
        """
        super().__init__()

        # Raise if dependencies are missing
        if _dependency_exc_info is


ent, 'utf-8');
    }
    return changeDir;
  }

  it('aggregates checkboxes across nested tasks.md files matched by the glob', async () => {
    await writeGlobSchema();
    await writeChange('globchange', {
      'backend/tasks.md': '- [x] 1.1 a\n- [x] 1.

[ ] 2.3 c\n',
    });

    const progress = await getTaskProgressForChange(changesDir, 'globchange', projectRoot);
    expect(progress).toEqual({ total: 5, completed: 3 });
  });

  it('resolves the same set of files status resolves (resolution-mechanism p


_id integer primary key,
  year integer partition key,
  headline_embedding float[1],
  +headline text,
  +url text,
  word_count integer,
  print_section text,
  print_page integer,
  pub_date text,
);

insert into vec_articles values (1111, 2020, '[1]',

 from vec_articles;

.exit

create table movies(movie_id integer primary key, synopsis text);
INSERT INTO movies(movie_id, synopsis)
VALUES
  (1, 'A family is haunted by demonic spirits after moving into a new house, requiring the help of paranormal inves


url)
            assert response.status == 200

    def test_session_multiple_requests_with_impersonate_list(self):
        """Test that multiple requests in a session work with impersonate list."""
        browsers = ["chrome110", "chrome120", "chrome131"

   def test_session_request_level_impersonate_override(self):
        """Test that request-level impersonate overrides session-level."""
        session_browsers = ["chrome", "firefox"]
        request_browser = "safari"

        with FetcherSession(impers

]
        with FetcherSession(impersonate=browsers) as session:
            response1 = session.get(self.basic_url)
            response2 = session.get(self.basic_url)
            assert response1.status == 200
            assert response2.status == 200


 = new SignalTrigger.SignalTriggerEntry();
    entry2.setJoinKeys(new String[] {"foo", "bar"});
    trigger.setDefinitions(Map.of("signal_a", entry1, "signal_b", entry2));
    Set<ConstraintViolation<DummyWorkflow>> violations =
        validator.validate(

);
  }

  @Test
  public void testInValidWhenJoinKeysUsedForMatch() {
    SignalTrigger trigger = new SignalTrigger();
    var entry = new SignalTrigger.SignalTriggerEntry();
    entry.setJoinKeys(new String[] {"bar"});
    entry.setMatchParams(
        Ma

new DummyWorkflow(trigger));
    Assert.assertEquals(1, violations.size());
    Assert.assertEquals(
        "[signal-trigger] the join_keys lengths between signals in the signal triggers must be the same",
        violations.iterator().next().getMessage()


ser actually
 * supplied so the URL stays canonical and round-trippable.
 */
export function buildSearchUrl({ query, location, category, sort, page, perPage }) {
    const params = new URLSearchParams();
    params.set('q', query);
    if (location) params

set('sort', sort);
    if (perPage && perPage !== 10) params.set('per_page', String(perPage));
    if (page && page > 1) params.set('page', String(page));
    return `${UPWORK_ORIGIN}/nx/search/jobs/?${params.toString()}`;
}

export function buildFeedUrl(t

.set('location', location);
    if (category) params.set('category2_uid', category);
    if (sort && sort !== 'recency') params.


, Serialize)]
struct Sentiment {
    sentiment: f64,
    confidence: f64,
}

#[tokio::test]
async fn batch_multi_extract_chain() -> Result<()> {
    with_openai_cassette_result(
        CassetteSpec::new("multi_extract/batch_multi_extract_chain").unordered

      let topics_extractor = client
                .extractor::<Topics>(openai::GPT_4O_MINI)
                .preamble("Extract topics from the given text.")
                .retries(2)
                .build();
            let sentiment_extractor = clien

(),
        |client| async move {
            let names_extractor = client
                .extractor::<Names>(openai::GPT_4O_MINI)
                .preamble("Extract names from the given text.")
                .retries(2)
                .build();


= "waiting" or .status == "requested")] | length' "$runs_json")"
concurrency_waiters="$(jq '[.workflow_runs[] | select(.status == "pending")] | length' "$runs_json")"
bad_count="$(jq --arg since "$since" '[.workflow_runs[] | select(.created_at >= $since) |

 or .conclusion == "timed_out" or .conclusion == "action_required")] | length' "$runs_json")"

codex_job_regex='^Review shard|^Review, comment, and apply event item$|^Review commit|^Plan and review cluster$|^Run worker|^Execute credited fix|^Execute and ap


json.Unmarshal([]byte(tt.inp), &eol); !errors.Is(err, tt.err) {
				t.Errorf("wanted unmarshal error: %v but got: %v", tt.err, err)
			}

			if tt.result != nil && !eol.Equal(tt.result) {
				t.Logf("wanted: %#v", tt.result)
				t.Logf("got:    %#v", &eol)

			if err := eol.Valid(); !errors.Is(err, tt.validErr) {
				t.Errorf("wanted validation error: %v but got: %v", tt.err, err)
			}
		})
	}
}

func TestExpressionOrListString(t *testing.T) {
	for _, tt := range []struct {
		name string
		out  string
		in

				t.Fatal("parsed expression is not what was expected")
			}


turn await checkboxWithHover(
      {
        message: "Which Context7 setup modes do you want to remove?",
        choices,
        loop: false,
        theme: CHECKBOX_THEME,
      },
      { getName: (mode: UninstallMode) => MODE_LABELS[mode] }
    );

options: UninstallOptions, scope: Scope): Promise<SetupAgent[]> {
  const explicit = getSelectedAgents(options);
  if (explicit.length > 0) return explicit;

  const detected = await detectConfiguredAgents(scope);
  if (detected.length > 0 && options.yes)

 } catch {
    return null;
  }
}

async function resolveAgents(


eceipt: receiptPath,
            amount: '140.00',
            currency: 'CNY',
            date: '2026-06-26',
            merchant: 'Example Merchant',
            category: 'Marketing & Advertising',
            notes: 'Example business purpose.',

       });
    });

    it('rejects malformed local-only arguments before browser work', () => {
        expect(() => normalizeReimbursementInput(validArgs({ amount: '0' }))).toThrow(ArgumentError);
        expect(() => normalizeReimbursementInput(validArg

       ocrWaitSeconds: 8,
            closeAfterReview: false,


t = getSelectedAgents(options);
  if (explicit.length > 0) return explicit;

  const detected = await detectConfiguredAgents(scope);
  if (detected.length > 0 && options.yes) return detected;

  if (detected.length === 0) {
    log.warn(
      "No Context7

  return selected;
}

function resolveFlagModes(options: UninstallOptions): UninstallMode[] {
  if (options.all) return ["mcp", "cli"];

  const selected: UninstallMode[] = [];

  if (options.mcp) selected.push("mcp");
  if (options.cli) selected.push("cli

 setup detected. Pass --claude, --cursor, --opencode, --codex, --antigravity, or --gemini."
    );
    return [];
  }

  log.blank();
  const selected = await promptAgents(detected);
  if (!selected) {
    log.warn("Remove cancelled");
    return [];
  }


onse) => Ok(warp::reply::json(&response)),
                Err(e) => Err(warp::reject::custom(ProcessingError(e.to_string()))),
            }
        });

    warp::serve(process_route)
        .run(([127, 0, 0, 1], 3030))
        .await;
}

#[derive(Debug

 ProcessingError {}
```

### Phase 3: New Microservices (Weeks 9-12)
```rust
// Build new services from scratch in Rust
// Example: Authentication service
use axum::{
    extract::{Query, State},
    http::StatusCode,
    response::Json,
    routing::{get,

)]
struct ProcessingError(String);
impl warp::reject::Reject for


strtbl->bucket_count){
    U32 off = *(U32*)(strtbl->data.str + strtbl->buckets_min + idx*4);
    result = pdb_strtbl_string_from_off(strtbl, off);
  }
  return(result);
}

internal U32
pdb_strtbl_off_from_string(PDB_Strtbl *strtbl, String8 string)
{
  U32

            = pdb_hash_v1(string);
  U32 best_bucket_idx = hash % strtbl->bucket_count;
  U32 bucket_idx      = best_bucket_idx;

  do
  {
    String8 test_string = pdb_strtbl_string_from_index(strtbl, bucket_idx);

    if(test_string.size == 0)


://app.mercury.com/expenses/review', title: 'Mercury', hasReview: true },
        ]);
        await expect(command.func(page, validArgs())).rejects.toBeInstanceOf(CommandExecutionError);
    });

    it('returns review-ready summary without clicking final

           clickResult(true),
            fillResult(),
            clickResult(true),
            reviewState(),
        ]);
        const rows = await command.func(page, validArgs());
        expect(rows).toEqual([expect.objectContaining({
            st

Submit expense', async () => {
        const page = createPageMock([
            loggedInState(),
            createSurface(),


y = kwargs.pop("proxy", None)

        params = _validate(kwargs, self, PlaywrightConfig)

        if not self._is_alive:  # pragma: no cover
            raise RuntimeError("Context manager has been closed")

        request_headers_keys = {h.lower() for h

 if params.extra_headers else set()
        referer = (
            "https://www.google.com/" if (params.google_search and "referer" not in request_headers_keys) else None
        )

        for attempt in range(self._config.retries):
            proxy: Op


\n')) !== -1) {
      const line = buf.slice(0, nl);
      buf = buf.slice(nl + 1);
      if (line.trim()) onLine(line);
    }
  };
}

function transformResponse(msg) {
  // Compress description fields on list-style responses. Match by method
  // shape —

 for (const arrayName of ['tools', 'prompts', 'resources', 'resourceTemplates']) {
    if (Array.isArray(r[arrayName])) {
      for (const item of r[arrayName]) {
        for (const field of fields) {
          if (typeof item[field] === 'string') {

we don't always know the original request's method, so we
  // detect by the presence of a tools/prompts/resources array.
  if (!msg || !msg.result || typeof msg.result !== 'object') return msg;
  const r = msg.result;
  let compressedSomething = false;


lute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
          defaultClassNames.nav
        ),
        button_previous: cn(
          buttonVariants({ variant: buttonVariant }),
          "size-(--cell-size) p-0 select-none aria-disabled:

 ),
        button_next: cn(
          buttonVariants({ variant: buttonVariant }),
          "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
          defaultClassNames.button_next
        ),
        month_caption: cn(
          "flex h-(--c

opacity-50",
          defaultClassNames.button_previous


 flex-1 text-left", className)}
      {...props}
    />
  )
}

function SelectTrigger({
  className,
  size = "default",
  children,
  ...props
}: SelectPrimitive.Trigger.Props & {
  size?: "sm" | "default"
}) {
  return (
    <SelectPrimitive.Trigger

   data-size={size}
      className={cn(
        "flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visibl


            // Per MCP Streamable HTTP spec: 404 signals to the client that the session
            // has been terminated/expired, so it should re-initialize with a fresh InitializeRequest.
            return res.status(404).json({
              jsonrpc:

    } else {
          return res.status(400).json({
            jsonrpc: "2.0",
            error: { code: -32000, message: "Bad Request: No valid session ID provided" },
            id: null,
          });
        }

        context.sessionId = effective

 "2.0",
              error: {
                code: -32000,
                message: "Session not found or expired. Please re-initialize.",
              },
              id: null,
            });
          }
          effectiveSessionId = sessionId;


ser-check',
		'--disable-extensions',
		'about:blank',  # Start with blank page
	]

	# Start Chrome process
	process = await asyncio.create_subprocess_exec(*cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)

	# Wait for Chrome to start and CDP to

 _ in range(20):  # 20 second timeout
		try:
			async with aiohttp.ClientSession() as session:
				async with session.get(
					f'http://localhost:{port}/json/version', timeout=aiohttp.ClientTimeout(total=1)
				) as response:
					if response.status == 20


e: Optional[str] = None,
        attempts: Optional[List[FailedConversionAttempt]] = None,
    ):
        self.attempts = attempts

        if message is None:
            if attempts is None:
                message = "File conversion failed."

 f"File conversion failed after {len(attempts)} attempts:\n"
                for attempt in attempts:
                    if attempt.exc_info is None:
                        message += f" -  {type(attempt.converter).__name__} provided no execution info."


y", "Remove from Antigravity")
    .option("--gemini", "Remove from Gemini CLI")
    .option("--all", "Remove both MCP setup and CLI + Skills setup")
    .option("--mcp", "Remove MCP setup")
    .option("--cli", "Remove CLI + Skills setup")
    .option("-p

    .action(async (options: UninstallOptions) => {
      await removeCommand(options);
    });
}

function getSelectedAgents(options: UninstallOptions): SetupAgent[] {
  const agents: SetupAgent[] = [];
  if (options.claude) agents.push("claude");
  if (op

, --project", "Remove from the current project instead of global config")
    .option("-y, --yes", "Skip confirmation prompts")