ching', async () => {
        const fetchMock = vi.fn();
        vi.stubGlobal('fetch', fetchMock);
        await expect(cmd.func({ perf: '' })).rejects.toThrow(ArgumentError);
        await expect(cmd.func({ perf: 'turbo' })).rejects.toThrow(ArgumentError

toHaveBeenCalled();
    });

    it('throws EmptyResultError on empty leaderboard', async () => {
        vi.stubGlobal('fetch', vi.fn().mockResolvedValue(new Response(JSON.stringify({ users: [] }), { status: 200 })));
        await expect(cmd.func({ perf:

);
        await expect(cmd.func({ perf: 'blitz', limit: 9999 })).rejects.toThrow(ArgumentError);
        expect(fetchMock).not.


eckpointErr error
	for {
		event, ok := iter.Next()
		if !ok {
			break
		}
		events = append(events, event)
		if event.Err != nil {
			checkpointErr = event.Err
			t.Logf("event error: %v", event.Err)
		}
	}

	// The bug: checkpoint save fails because the

failed stream's error in session")

	var hasInterrupt bool
	for _, event := range events {
		if event.Action != nil && event.Action.Interrupted != nil {
			hasInterrupt = true
		}
	}
	assert.True(t, hasInterrupt, "should receive an interrupt event from the

 failed stream's error chunk
	// is encountered during gob encoding of the session events.
	// If the bug is fixed, checkpointErr should be nil and we should see an interrupt event.
	assert.NoError(t, checkpointErr, "checkpoint save should not fail due to


#### Scenario: Invalid credentials
Given a user with invalid credentials
When they submit the login form
Then they see an error message`;

      const specPath = path.join(testDir, 'spec.md');
      await fs.writeFile(specPath, specContent);

);
      const report = await validator.validateSpec(specPath);

      expect(report.valid).toBe(true);
      expect(report.summary.errors).toBe(0);
    });

    it('should detect missing overview section', async () => {
      const specContent = `#


ce_root_unhealthy',
          fix: expect.stringContaining('openspec store doctor'),
        })
      );
    }
  });

  it('degrades every reference when the registry is unreadable', async () => {
    const registryDir = path.join(globalDataDir, 'stores');

entry of entries) {
      expect(entry.status[0].code).toBe('reference_registry_unreadable');
    }
  });

  it('skips spec content, fetch recipes, and the budget in health mode (3.6)', async () => {
    const storeRoot = await registerStore('team-context'

    fs.mkdirSync(registryDir, { recursive: true });
    fs.writeFileSync(path.join(registryDir, 'registry.yaml'), ':[ not yaml');

    const entries = await assemble(['team-context', 'other-context']);

    expect(entries).toHaveLength(2);
    for (const


_name="$5"
  local -n versions_ref="$versions_name"
  local -n bases_ref="$bases_name"
  local -n groups_ref="$groups_name"
  local -n indexes_ref="$indexes_name"

  local count image image_index
  local display product platform
  local edition_id install_

  versions_ref=()
  bases_ref=()
  groups_ref=()
  indexes_ref=()

  platform=$(getPlatform "$xml")
  count=$(xmllint --nonet --xpath 'count(/WIM/IMAGE)' - 2>/dev/null <<< "$xml") || return 0

  for ((i=1; i<=count; i++)); do

    image_index=$(xmllint --n


] = true
			} else {
				t.Errorf("Unexpected path: %s", info.Path)
			}
		}

		for path, found := range expected {
			if !found {
				t.Errorf("Expected absolute path not found: %s", path)
			}
		}
	})
}

func TestInMemoryBackend_Concurrent(t *testing.T)

()
	ctx := context.Background()

	// Test concurrent writes and reads
	done := make(chan bool)
	for i := 0; i < 10; i++ {
		go func(n int) {
			backend.Write(ctx, &WriteRequest{
				FilePath: "/concurrent.txt",
				Content:  "content",
			})
			backend.Rea


one:
		"""Extract token usage from a litellm response."""
		usage = getattr(response, 'usage', None)
		if usage is None:
			return None

		prompt_tokens = getattr(usage, 'prompt_tokens', 0) or 0
		completion_tokens = getattr(usage, 'completion_tokens', 0)

_cached = getattr(details, 'cached_tokens', None)

		return ChatInvokeUsage(
			prompt_tokens=prompt_tokens,
			prompt_cached_tokens=int(prompt_cached) if prompt_cached is not None else None,
			prompt_cache_creation_tokens=int(cache_creation) if cache_cre

or 0

		prompt_cached = getattr(usage, 'cache_read_input_tokens', None)
		cache_creation = getattr(usage, 'cache_creation_input_tokens', None)

		if prompt_cached is None:
			details = getattr(usage, 'prompt_tokens_details', None)
			if details:
				prompt


+ 1);
                    CV_NumericParsed size = cv_numeric_from_data_range(numeric_ptr, first + cap);

                    // name
                    U8 *name_ptr = numeric_ptr + size.encoded_size;
                    String8 name =

     U8 *unique_name_ptr = name_ptr + name.size + 1;
                        String8 unique_name = str8_cstring_capped((char*)unique_name_ptr, (char *)(first + cap));
                        extracted_name = unique_name;
                      }

str8_cstring_capped((char*)name_ptr, (char *)(first + cap));

                    // unique name
                    if (compare_unique_name){
                      if (lf_struct->props & CV_TypeProp_HasUniqueName) {


            throw new CliError('ARGUMENT', 'An email address is required.', 'Pass --email <address>');
        }
        if (dryRun) {
            return summarizeSubmission({
                pdfFile,
                email,
                venue,

  method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify({
                filename: pdfFile.fileName,
                venue,
            }),
        });
        ensureSuccess(uploadUrlResponse, upload

       message: 'Input validation passed. No remote request was sent.',
                dryRun: true,
            });
        }
        const { response: uploadUrlResponse, payload: uploadUrlPayload } = await requestJson('/api/get-upload-url', {


n(tmpdir(), `ctx7-uninstall-${Date.now()}`);
  await mkdir(tempDir, { recursive: true });
  process.chdir(tempDir);
});

afterEach(async () => {
  process.chdir(originalCwd);
  await rm(tempDir, { recursive: true, force: true });
  vi.restoreAllMocks();
})

", "SKILL.md");
    const mcpSkillPath = join(tempDir, ".cursor", "skills", "context7-mcp", "SKILL.md");

    await mkdir(join(tempDir, ".cursor", "rules"), { recursive: true });
    await mkdir(join(tempDir, ".cursor", "skills", "find-docs"), { recursive:

;

describe("remove command", () => {
  test("removes only CLI artifacts for cursor project setup", async () => {
    const rulePath = join(tempDir, ".cursor", "rules", "context7.mdc");
    const cliSkillPath = join(tempDir, ".cursor", "skills", "find-docs


    goto: vi.fn().mockResolvedValue(undefined),
    wait: vi.fn().mockResolvedValue(undefined),
    evaluate: vi.fn().mockResolvedValue(evaluateResult),
  };
}

describe('yahoo search', () => {
  it('should register as a valid command', () => {
    expect(

).toBe('search.yahoo.com');
  });

  it('should define keyword positional arg', () => {
    const kwArg = command.args.find(a => a.name === 'keyword');
    expect(kwArg).toBeDefined();
    expect(kwArg.positional).toBe(true);
    expect(kwArg.required).toB

command).toBeDefined();
    expect(command.site).toBe('yahoo');
    expect(command.name).toBe('search');
    expect(command.access).toBe('read');
    expect(command.browser).toBe(true);
    expect(command.strategy).toBe('public');
    expect(command.domain


o: StreamInfo,
        **kwargs: Any,  # Options to pass to the converter
    ) -> DocumentConverterResult:
        # Parse the stream
        encoding = "utf-8" if stream_info.charset is None else stream_info.charset
        soup = bs4.BeautifulSoup(file_

", "style"]):
            script.extract()

        # Print only the main content
        body_elm = soup.find("div", {"id": "mw-content-text"})
        title_elm = soup.find("span", {"class": "mw-page-title-main"})

        webpage_text = ""
        main_

stream, "html.parser", from_encoding=encoding)

        # Remove javascript and style blocks
        for script in soup(["script


FileSync(
      path.join(changeDir, 'proposal.md'),
      '## Why\nBilling needs work.\n\n## What Changes\n- **billing:** Add billing\n'
    );
    fs.writeFileSync(
      path.join(changeDir, 'tasks.md'),
      options.tasksDone === false ? '- [ ] Task 1

) {
      const specDir = path.join(changeDir, 'specs', 'billing');
      fs.mkdirSync(specDir, { recursive: true });
      fs.writeFileSync(path.join(specDir, 'spec.md'), options.deltaSpec ?? VALID_DELTA_SPEC);
    }
    return changeDir;
  }

  function

\n' : '- [x] Task 1\n'
    );
    if (options.deltaSpec !== null


, "clean.txt", content).await?;
        let (code, output) = check_file(Path::new(""), &file_path).await?;
        assert_eq!(code, 0);
        assert!(output.is_empty());
        Ok(())
    }

    #[tokio::test]
    async fn test_conflict_marker_start() -

 = b"Some content\n<<<<<<< HEAD\nConflicting line\n";
        let file_path = create_test_file(&dir, "conflict.txt", content).await?;
        let (code, output) = check_file(Path::new(""), &file_path).await?;
        assert_eq!(code, 1);
        assert!(!o

> Result<()> {
        let dir = tempdir()?;
        let content


t failedTools: Array<{ name: string; error: string }> = [];
    const skillsInvocableCommandSkips: string[] = [];
    let removedCommandCount = 0;
    let removedSkillCount = 0;
    let removedDeselectedCommandCount = 0;
    let removedDeselectedSkillCount

join(resolvedProjectPath, tool.skillsDir, 'skills');
        const shouldGenerateSkills = shouldGenerateSkillsForTool(tool.value, delivery);
        const shouldGenerateCommands = shouldGenerateCommandsForTool(tool.value, delivery);
        const toolWorkf

 = 0;

    for (const toolId of toolsToUpdate) {
      const tool = AI_TOOLS.find((t) => t.value === toolId);
      if (!tool?.skillsDir) continue;

      const spinner = ora(`Updating ${tool.name}...`).start();

      try {
        const skillsDir = path.


      instructions: "Custom instructions for testing",
      });

      expect(agent).toBeDefined();
    });

    test("should accept Context7 config options", () => {
      const agent = new Context7Agent({
        model: bedrock("anthropic.claude-3-haiku

",
        inputSchema: z.object({
          input: z.string().describe("Test input"),
        }),
        execute: async ({ input }) => ({ result: `processed: ${input}` }),
      });

      const agent = new Context7Agent({
        model: bedrock("anthrop

-20240307-v1:0"),
        apiKey: "ctx7sk-test-key",
      });

      expect(agent).toBeDefined();
    });

    test("should accept additional tools alongside Context7 tools", () => {
      const customTool = tool({
        description: "A custom test tool


task.py)** - Your first cloud task (start here!)
- **[02_fast_mode_gemini.py](./02_fast_mode_gemini.py)** - ⚡ Ultra-fast mode with Gemini Flash & Fireship humor
- **[03_structured_output.py](./03_structured_output.py)** - Get structured JSON responses
- **

 execution ($0.01/step)
2. **Disable proxy** when not needed for captcha solving
3. **Disable element highlighting** for better performance
4. **Set max_agent_steps** to prevent runaway costs
5. **Use structured output** to reduce parsing overhead
6. **Add

[04_proxy_usage.py](./04_proxy_usage.py)** - 🌍 Proxy for geo-restrictions & captcha solving
- **[05_search_api.py](./05_search_api.py)** - 🔍 Search API for content extraction (BETA)

## 💰 Cost Optimization Tips

1. **Use Gemini Flash** for fastest/cheapest


ultAzureCredential:  # type: ignore[no-redef]
        pass

    def to_llm_input(*args, **kwargs):  # type: ignore[no-redef]
        pass

# ---------------------------------------------------------------------------
# File type enum and routing tables
#

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

class ContentUnderstandingFileType(str, Enum):
    """Supported file types for Content Understanding conversion."""

    # Documents
    PDF = "pdf"
    DOCX = "docx"
    PPTX = "pptx"
    XLSX = "xlsx"
    HTM


ssets) {
    const items = [];
    const pushImages = (urls, prefix) => {
        urls.forEach((url, index) => {
            items.push({
                type: 'image',
                url,
                filename: `${offerId}_${prefix}_${String(index + 1

   pushImages(assets.sku_images, 'sku');
    pushImages(assets.detail_images, 'detail');
    pushImages(assets.other_images, 'other');
    assets.videos.forEach((url, index) => {
        items.push({
            type: 'video',
            url,

).padStart(2, '0')}${extFromUrl(url, '.jpg')}`,
            });
        });
    };
    pushImages(assets.main_images, 'main');


idden": false,
				"id": "date2675529103",
				"max": "",
				"min": "",
				"name": "start",
				"presentable": false,
				"required": true,
				"system": false,
				"type": "date"
			},
			{
				"hidden": false,
				"id": "date16528305",
				"max": "",

			"min": "",
				"name": "end",
				"presentable": false,
				"required": true,
				"system": false,
				"type": "date"
			}
		],
		"id": "pbc_451525641",
		"indexes": [
			"CREATE INDEX ` + "`" + `idx_q0iKnRP9v8` + "`" + ` ON ` + "`" + `quiet_hours` + "`


           .schemaId(UUID.fromString(schemaId))
            .comment("Partitioned table")
            .columns(List.of(firstName, age, country))
            .dataSourceFormat(DataSourceFormat.DELTA.getValue())
            .type(TableType.EXTERNAL.getValue(

 Date())
            .url(partitionedTablePath)
            .build();

    partitionedTableInfoDAO
        .getColumns()
        .forEach(columnInfoDAO -> columnInfoDAO.setTable(partitionedTableInfoDAO));

    try (Session session = factory.openSession())

))
            .createdAt(new Date())
            .updatedAt(new


ge,
)

class LangChainMessageSerializer:
	"""Serializer for converting between browser-use message types and LangChain message types."""

	@staticmethod
	def _serialize_user_content(
		content: str | list[ContentPartTextParam | ContentPartImageParam],
	)

			'type': 'text',
						'text': part.text,
					}
				)
			elif part.type == 'image_url':
				# LangChain format for images
				serialized_parts.append(
					{'type': 'image_url', 'image_url': {'url': part.image_url.url, 'detail': part.image_url.detail}}

-> str | list[str | dict]:
		"""Convert user message content for LangChain compatibility."""
		if isinstance(content, str):
			return content

		serialized_parts = []
		for part in content:
			if part.type == 'text':
				serialized_parts.append(
					{


 pipeline that a dry-run can't
// see — missing hook files, malformed settings entries, broken statusline
// wiring, idempotency bugs, JSONC-tolerance regressions (#249-class).
//
// Limitations:
//   - The Claude Code provider only triggers when `claude`

 that don't need `claude` (idempotence,
//     JSONC tolerance) always run.
//   - The installer's uninstall path also calls `claude plugin uninstall` and
//     `gemini extensions uninstall` against whatever binary is on PATH. We
//     strip those out of

is on PATH. Tests
//     that depend on it skip cleanly when missing (most CI runners and dev
//     boxes won't have it). Tests


nerRadius.topRight,
					  3 * M_PI / 2, 2 * M_PI); // 270° to 360°
			cairo_arc(cr, bb.x + bb.width - config->cornerRadius.bottomRight,
					  bb.y + bb.height - config->cornerRadius.bottomRight,
					  config->cornerRadius.bottomRight,
					  0, M_PI / 2

 bb.x + config->cornerRadius.bottomLeft,
					  bb.y + bb.height - config->cornerRadius.bottomLeft,
					  config->cornerRadius.bottomLeft,
					  M_PI / 2, M_PI); // 90° to 180°
			cairo_close_path(cr);

			cairo_fill(cr);
			break;
		}
		case CLAY_RENDER


                response_calls: Arc::new(AtomicUsize::new(0)),
                seen_prompt: Arc::new(Mutex::new(None)),
                seen_response: Arc::new(Mutex::new(None)),
            };

            let response = agent.prompt("Entertain me!").add_

(&response);
            anyhow::ensure!(
                hook.prompt_calls.load(Ordering::SeqCst) == 1,
                "expected one prompt hook call"
            );
            anyhow::ensure!(
                hook.response_calls.load(Ordering::SeqCst)

hook(hook.clone()).await?;

            assert_nonempty_response


env.putAll(env);
			}
			return this;
		}

		public Builder addEnvVar(String key, String value) {
			Assert.notNull(key, "The key can not be null");
			Assert.notNull(value, "The value can not be null");
			this.env.put(key, value);
			return this;
		}

{
			return new ServerParameters(command, args, env);
		}

	}

	/**
	 * Returns a default environment object including only environment variables deemed
	 * safe to inherit.
	 */
	private static Map<String, String> getDefaultEnvironment() {
		return System


?param=value"
    netloc, path = file_uri_to_path(file_uri)
    assert netloc is None
    assert path == "/path/to/file.txt"

    # Test file URI with fragment
    file_uri = "file:///path/to/file.txt#fragment"
    netloc, path = file_uri_to_path(file_uri)

result = markitdown_with_style_map.convert(
        os.path.join(TEST_FILES_DIR, "test_with_comment.docx")
    )
    validate_strings(result, DOCX_COMMENT_TEST_STRINGS)

def test_docx_equations() -> None:
    markitdown = MarkItDown()
    docx_file = os.p

    assert netloc is None
    assert path == "/path/to/file.txt"

def test_docx_comments() -> None:
    # Test DOCX processing, with comments and setting style_map on init
    markitdown_with_style_map = MarkItDown(style_map="comment-reference => ")


1);
        }
        n->v = push_vals[push_idx];
        SLLStackPush(state->top_val, n);
      }
    }

    //- rjf: do not need a break? advance state.
    //
    // (if we *do* need a break, this means we need to ask the caller for
    // more info

      state->op_idx += 1;
      state->off = off;
    }

    //- rjf: at the end of the expression? -> set success, fill result
    if(off == expr.size)
    {
      result.status = DW_EvalStatus_Good;
      if(state->top_val != 0)
      {
        resu

, like memory reads, and so we want to resume from the
    // offset just before this opcode)
    //
    if(!need_a_break)
    {


defined) delete process.env.CAVEMAN_DEFAULT_MODE;
    else process.env.CAVEMAN_DEFAULT_MODE = origEnv;
    fs.rmSync(tmpBase, { recursive: true, force: true });
  }
}

console.log('repo-local config resolution tests\n');

test('returns "full" when no env,

;
  assert.strictEqual(getDefaultMode(), 'full');
});

test('reads .caveman/config.json in cwd', (tmp) => {
  fs.mkdirSync(path.join(tmp, '.caveman'));
  fs.writeFileSync(path.join(tmp, '.caveman', 'config.json'),
    JSON.stringify({ defaultMode: 'lite' }

no repo config, no user config', (tmp) => {
  process.chdir(tmp)


  if not page or not isinstance(page, Selector):  # pragma: no cover
            raise TypeError("Input must be of type `Selector`")
        elif not filename or not isinstance(filename, str) or not filename.strip():
            raise ValueError("Filename

html", ".txt")):
            raise ValueError("Unknown file type: filename must end with '.md', '.html', or '.txt'")
        else:
            with open(filename, "w", encoding=page.encoding) as f:
                extension = filename.split(".")[-1]

must be provided")
        elif not filename.endswith((".md", ".


                    }
                })
                .collect::<JoinSet<_>>();

            while let Some(result) = tasks.join_next().await {
                if let Ok((source, response)) = result {
                    if let Ok(resp) = response

select! {
                Ok(true) = check_github() => InstallSource::GitHub,
                Ok(source) = select_best_pypi() => InstallSource::PyPi(source),
                else => {
                    warn!("Failed to check uv source availability, falli

                   && resp.status().is_success()
                    {
                        best = source;
                        break;
                    }
                }
            }

            Ok(best)
        }

        let source = tokio::


     tokio::spawn(async move {
            let _ = conn.shutdown().await;
        });

        // ✅ Workaround 2: Use a synchronous close
        // self.connection.blocking_close();
    }
}
```

**Best practice**: Provide an explicit `async fn close(self)

 only as a safety net, not the primary cleanup path.

### select! Fairness and Starvation

```rust
use tokio::sync::mpsc;

// ❌ UNFAIR: busy_stream always wins, slow_stream starves
async fn unfair(mut fast: mpsc::Receiver<i32>, mut slow: mpsc::Receiver<i32

` method and document that callers should use it. Rely on `Drop`


ty());
        Ok(())
    }

    #[tokio::test]
    async fn test_invalid_xml_element_name() -> Result<()> {
        let dir = tempdir()?;
        let file_path = create_test_file(&dir, "invalid_name.xml", b"<1root/>").await?;
        let (code, output) =

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

    #[tokio::test]
    async fn test_valid_xml_with_cdata() -> Result<()> {
        let dir = tempdir()?;
        let content = br#"<?xml version="1.0" en


et temp = TempDir::new()?;
        let file_path = temp.path().join("not-a-dir.txt");
        fs_err::write(&file_path, b"important data")?;

        let err = remove_dir_all(&file_path, None).unwrap_err();
        assert_eq!(err.kind(), std::io::ErrorKind

rf_non_exist_directory() -> anyhow::Result<()> {
        let temp = TempDir::new()?;
        let dir_path = temp.path().join("non-existent");

        let stats = remove_dir_all(&dir_path, None)?;
        assert_eq!(stats.num_files, 0);
        assert_eq!(

::NotADirectory);
        assert!(file_path.exists(), "file must not be deleted");

        Ok(())
    }

    #[test]
    fn rm_


ve |
| `T&&` (rvalue ref) | Just `T` | Take by value = take ownership |
| `T&&` in template (universal ref) | `impl Trait` or `<T: Trait>` | Generics replace forwarding |
| `std::move(x)` | `x` (just use it) | Move is the default |
| `std::forward<T>(x)` |

and the source is invalidated:

```rust
// Rust move = memcpy the bytes, mark source as invalid
let s1 = String::from("hello");
let s2 = s1; // Bytes of s1 are copied to s2's stack slot
              // s1 is now invalid — compiler enforces this
// println

 No equivalent needed | No universal references to forward |

#### 2. Moves Are Bitwise — No Move Constructors

In C++, moving is a *user-defined operation* (move constructor / move assignment). In Rust, moving is always a **bitwise memcpy** of the value,


nded_details_structured_output() {
    let client = support::completions_client();
    let model = support::model_name();
    let agent = client
        .agent(model)
        .preamble(WEATHER_PREAMBLE)
        .temperature(0.0)
        .build();

    let

_typed::<WeatherForecast>(
            "Return JSON weather data for Los Angeles with fields city, current.temperature_f, current.humidity_pct, and current.description.",
        )
        .extended_details()
        .await
        .expect("extended prompt


tification());
		transportProvider.simulateIncomingMessage(subscribeRequest(RESOURCE_URI));
		transport.clearSentMessages();

		StepVerifier
			.create(server.notifyResourcesUpdated(new McpSchema.ResourcesUpdatedNotification("test://other/resource")))
			.

transport.getAllSentMessages())
			.as("notification for a different URI should not reach a session subscribed to a different URI")
			.isEmpty();

		server.closeGracefully().block();
	}

	@Test
	void notifyResourcesUpdated_afterUnsubscribe_doesNotNotifySe


NN(NEIGHBOR_QUANTIZER=BINARY)";
    rc = vec0_parse_vector_column(input, (int)strlen(input), &col);
    assert(rc == SQLITE_OK);
    assert(col.index_type == VEC0_INDEX_TYPE_DISKANN);
    assert(col.diskann.quantizer_type == VEC0_DISKANN_QUANTIZER_BINARY);

_column(input, (int)strlen(input), &col);
    assert(rc == SQLITE_OK);
    assert(col.diskann.search_list_size == 128);  // default (unified)
    assert(col.diskann.search_list_size_search == 256);
    assert(col.diskann.search_list_size_insert == 64);

    sqlite3_free(col.name);
  }

  // Split search_list_size: search and insert
  {
    const char *input = "emb float[128] INDEXED BY diskann(neighbor_quantizer=binary, search_list_size_search=256, search_list_size_insert=64)";
    rc = vec0_parse_vector


                      printer.stderr(),
                        "`{}` is not managed by prek, skipping.",
                        hook_path.user_display().cyan()
                    )?;
                }
                continue;
            }

            printer.stderr(),
                        "`{}` does not exist, skipping.",
                        hook_path.user_display().cyan()
                    )?;
                }
                continue;
            }
            Err(err) => return

Err(err) if err.kind() == std::io::ErrorKind::NotFound => {
                if !all {
                    writeln!(


   def __init__(
        self,
        *,
        endpoint: str,
        credential: AzureKeyCredential | TokenCredential | None = None,
        analyzer_id: Optional[str] = None,
        file_types: Optional[List[ContentUnderstandingFileType]] = None,

class ContentUnderstandingConverter(DocumentConverter):
    """Converts files using Azure Content Understanding.

    Provides high-quality document, image, audio, and video conversion
    with structured field extraction via YAML front matter.
    """


e(&toTerminate);
			char *font_family = fonts[config->fontId];

			Clay_BoundingBox bb = command->boundingBox;
			Clay_Color color = config->textColor;

			cairo_select_font_face(Clay__Cairo, font_family, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);

(cr, bb.x, bb.y + bb.height);

			cairo_set_source_rgba(cr, CLAY_TO_CAIRO(color));
			cairo_show_text(cr, text);
			cairo_close_path(cr);

			free(text);
			break;
		}
		case CLAY_RENDER_COMMAND_TYPE_BORDER: {
            Clay_BorderRenderData *config = &c

			cairo_set_font_size(cr, config->fontSize);

			cairo_move_to


home page",
				"evaluation_previous_goal": "Starting task",
				"memory": "Navigating to home page",
				"next_goal": "Navigate to home page",
				"action": [
					{{
						"navigate": {{
							"url": "{base_url}/home",
							"new_tab": false
						}}

			f"""
			{{
				"thinking": "Opening page 1 in new tab",
				"evaluation_previous_goal": "Home page loaded",
				"memory": "Opening page 1",
				"next_goal": "Open page 1",
				"action": [
					{{
						"navigate": {{
							"url": "{base_url}/page1",

				}}
				]
			}}
			""",
			# Action 2: Open page1 in new tab


        with patch("scrapling.fetchers.StealthyFetcher.fetch") as mock_fetch:
            mock_fetch.return_value = configure_selector_mock()

            result = runner.invoke(
                stealthy_fetch, [html_url, str(output_file), "--executable-

           )
            assert result.exit_code == 0
            assert mock_fetch.call_args.kwargs["executable_path"] == "/opt/custom-chromium"

        monkeypatch.setenv("SCRAPLING_EXECUTABLE_PATH", "/opt/env-chromium")
        with patch("scrapling.fe


 a content-type header, get the mimetype and charset (if present)
        mimetype: Optional[str] = None
        charset: Optional[str] = None

        if "content-type" in response.headers:
            parts = response.headers["content-type"].split(";")

in parts:
                if part.strip().startswith("charset="):
                    _charset = part.split("=")[1].strip()
                    if len(_charset) > 0:
                        charset = _charset

        # If there is a content-disposition he

           mimetype = parts.pop(0).strip()
            for part


of the elm,return dict
        """
        latex_chars = dict()
        for stag, t, e in self.process_children_list(elm, include):
            latex_chars[stag] = t
        return latex_chars

    def process_children(self, elm, include=None):
        """

 isinstance(t, Tag2Method) else str(t)
                for stag, t, e in self.process_children_list(elm, include)
            )
        )

    def process_unknow(self, elm, stag):
        return None

class Pr(Tag2Method):
    text = ""

    __val_tags =

        process children of the elm,return string
        """
        return BLANK.join(
            (
                t if not


AX_RESTORE_PASSES; pass++) {
    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 = s.replace(/\n{3,}/g, '\n\n');
  // Capitalize the first letter of each sentence we may have left lowercase.
  s = s.replace(/(^|[.!?]\s+)([a-z])/g, (_, pre, ch) => pre + ch.toUpperCase());
  return s.trim();
}

function compress(text, _opts) {
  if (ty

s.replace(PLEASANTRIES, '');
  s = s.replace(HEDGES, '');
  s = s.replace(FILLERS, '');
  s = s.replace(ARTICLES, '');
  // Collapse repeated whitespace introduced by removals.
  s = s.replace(/[ \t]{2,}/g, ' ');
  s = s.replace(/\s+([,.;:!?])/g, '$1');


ame: "all",
			input: &ExpressionOrList{
				All: []string{"true", "true"},
			},
			output: []byte(`all:
    - "true"
    - "true"`),
			err: nil,
		},
		{
			name: "all one",
			input: &ExpressionOrList{
				All: []string{"true"},
			},
			output: []byte

: []string{"true"},
			},
			output: []byte(`"true"`),
			err:    nil,
		},
	} {
		t.Run(tt.name, func(t *testing.T) {
			result, err := yaml.Marshal(tt.input)
			if !errors.Is(err, tt.err) {
				t.Errorf("wanted marshal error: %v but got: %v", tt.err, err

(`"true"`),
			err:    nil,
		},
		{
			name: "any",
			input: &ExpressionOrList{
				Any: []string{"true", "false"},
			},
			output: []byte(`any:
    - "true"
    - "false"`),
			err: nil,
		},
		{
			name: "any one",
			input: &ExpressionOrList{
				Any


es(self):
        assert _get_modality(ContentUnderstandingFileType.MP4) == "video"
        assert _get_modality(ContentUnderstandingFileType.MOV) == "video"

    def test_audio_types(self):
        assert _get_modality(ContentUnderstandingFileType.WAV) ==

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

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


tle:
                md += f": {chart.chart_title.text_frame.text}"
            md += "\\n\\n"
            data = []
            category_names = [c.label for c in chart.plots[0].categories]
            series_names = [s.name for s in chart.series]

series_names)

            for idx, category in enumerate(category_names):
                row = [category]
                for series in chart.series:
                    row.append(series.values[idx])
                data.append(row)

            markdow


AGE)))
				.consumeNextWith(resources -> {
					assertThat(resources).isNotNull().satisfies(result -> {
						assertThat(result.resources()).isNotNull();

						if (!result.resources().isEmpty()) {
							Resource firstResource = result.resources().get(0);

.uri()).isNotNull();
							assertThat(firstResource.name()).isNotNull();
						}
					});
				})
				.verifyComplete();
		});
	}

	@Test
	void testListAllResources() {
		withClient(createMcpTransport(), mcpAsyncClient -> {
			StepVerifier.create(mcpAsyncC


sert.ok(filtered.includes("Other line"));
});

test("filterSkillBodyForMode does not drop a rule bullet whose label matches a mode name", () => {
  // A rule bullet like "- Full: ..." has the same "label: text" shape as a
  // worked example, but isn't one

 `- Full: do not confuse this rule label with the mode name.\n- Lite: same risk, this is a real rule bullet.\n- lite: "real worked example"\n- ultra: "real worked example"`;

  const filtered = filterSkillBodyForMode(body, "ultra");

  assert.ok(filtered.i

 — it must survive in every mode. Only the
  // quoted, `- lite: "..."`-style bullets are real per-mode examples.
  const body =


l,
	UserMessage,
)
from browser_use.llm.messages import (
	SystemMessage as BrowserUseSystemMessage,
)

class LangChainMessageSerializer:
	"""Serializer for converting between browser-use message types and LangChain message types."""

	@staticmethod
	def

"Convert user message content for LangChain compatibility."""
		if isinstance(content, str):
			return content

		serialized_parts = []
		for part in content:
			if part.type == 'text':
				serialized_parts.append(
					{
						'type': 'text',
						'text'

_serialize_user_content(
		content: str | list[ContentPartTextParam | ContentPartImageParam],
	) -> str | list[str | dict]:
		""


  def test_markdown_table_columns_have_pipes(self, markitdown):
        """Test that form-style PDF columns are separated with pipes."""
        pdf_path = os.path.join(
            TEST_FILES_DIR, "SPARSE-2024-INV-1234_borderless_table.pdf"
        )

 = text_content.split("\n")
        table_rows = [
            line for line in lines if line.startswith("|") and line.endswith("|")
        ]

        assert len(table_rows) > 0, "Should have markdown table rows"

        # Check that at least some rows h

     if not os.path.exists(pdf_path):
            pytest.skip(f"Test file not found: {pdf_path}")

        result = markitdown.convert(pdf_path)
        text_content = result.text_content

        # Find table rows and verify column structure
        lines


ve heuristic',                       // ceiling-comment rule
  'ONE runnable check',                    // test reflex
  'flimsier algorithm',                    // robust-variant rule
  // the four "not lazy about" safety carve-outs: pin each so a reword

 'input validation at trust boundaries',
  'prevents data loss',
  'security',
  'accessibility',
  'Lazy code without its check is unfinished', // one-check promoted to headline
];

const skill = read('skills/ponytail/SKILL.md');
const sources = [['skills

in either
  // file can't silently drop one. Only validation was pinned before. These are the
  // continuous substrings present in both files ("prevents data loss" because the
  // full "error handling that prevents data loss" wraps a line in SKILL.md).


         (b"foo\r\nbar\r\n", b"bar\r\nfoo\r\n"),
            (b"# header\nfoo \\\n\nbar\n", b"# header\n\nbar\n"),
            (
                b"zeta\n-e git+ssh://url \\\n --config=#egg=Alpha\n",
                b"-e git+ssh://url \\\n --config=#egg=Alp


CE="$version"
        return 0
      fi ;;

    "win2025-eval" | "win2022-eval" | "win2019-eval" | \
    "win2019-hv" | "win2016-eval" | "win2012r2-eval" )

      if downloadWindowsEval "$version" "$lang" "$edition"; then
        MIDO_SOURCE="$version"

"Invalid VERSION specified, value \"$version\" is not recognized!"
      return 1
      ;;
  esac

  MIDO_URL=$(getMido "$version" "$lang" "")
  [ -z "$MIDO_URL" ] && return 1

  if [[ "${version,,}" == "win2008r2"* ]]; then
    MIDO_SOURCE="win2008r2-eval

     return 0
      fi ;;

    "win2008r2"*| "win81${PLATFORM,,}"* | "win10${PLATFORM,,}-enterprise"* ) ;;

    * )
      error


onze.erp_loc_a101;
	    SET @end_time = GETDATE();
        PRINT '>> Load Duration: ' + CAST(DATEDIFF(SECOND, @start_time, @end_time) AS NVARCHAR) + ' seconds';
        PRINT '>> -------------';

		-- Loading erp_px_cat_g1v2
		SET @start_time = GETDATE()

silver.erp_px_cat_g1v2';
		TRUNCATE TABLE silver.erp_px_cat_g1v2;
		PRINT '>> Inserting Data Into: silver.erp_px_cat_g1v2';
		INSERT INTO silver.erp_px_cat_g1v2 (
			id,
			cat,
			subcat,
			maintenance
		)
		SELECT
			id,
			cat,
			subcat,
			maintenanc


          rules. Defaults to the system default locale.
        :param timezone_id: Changes the timezone of the browser. Defaults to the system timezone.
        :param wait_selector_state: The state to wait for the selector given with `wait_selector`. The

 have a Chrome browser installed on your device, enable this, and the Fetcher will launch an instance of your browser and use it.
        :param load_dom: Enabled by default, wait for all JavaScript on page(s) to fully load and execute.
        :param cdp_

 default state is `attached`.
        :param real_chrome: If you


ionCantHaveBoth               = errors.New("config: expression block can't contain multiple expression types")
)

type ExpressionOrList struct {
	Expression string   `json:"-" yaml:"-"`
	All        []string `json:"all,omitempty" yaml:"all,omitempty"`
	Any

{
			if i != 0 {
				fmt.Fprintf(&sb, " && ")
			}
			fmt.Fprintf(&sb, "( %s )", pred)
		}
		return sb.String()
	case len(eol.Any) != 0:
		var sb strings.Builder
		for i, pred := range eol.Any {
			if i != 0 {
				fmt.Fprintf(&sb, " || ")
			}
			fmt.Fprin

       []string `json:"any,omitempty" yaml:"any,omitempty"`
}

func (eol ExpressionOrList) String() string {
	switch {
	case len(eol.Expression) != 0:
		return eol.Expression
	case len(eol.All) != 0:
		var sb strings.Builder
		for i, pred := range eol.All


tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'openspec-test-'));
  });

  afterEach(() => {
    fs.rmSync(tempDir, { recursive: true, force: true });
  });

  it('does not block apply on a skipped artifact when the schema requires all artifacts', async

apply block falls back to requiring every artifact,
    // including the specs-producing one - the skip must count as present.
    const schemaDir = path.join(tempDir, 'openspec', 'schemas', 'mini');
    fs.mkdirSync(schemaDir, { recursive: true });
    fs


line in content.lines() {
        for word in line.split_whitespace() {
            let word = word.to_lowercase();
            *word_count.entry(word).or_insert(0) += 1;
        }
    }

    let mut sorted: Vec<_> = word_count.into_iter().collect();

(&a.1));

    for (word, count) in sorted.into_iter().take(args.top) {
        println!("{}: {}", word, count);
    }

    Ok(())
}
```

### Phase 2: Replace Performance-Critical Components (Weeks 5-8)
```rust
// Replace CPU-intensive data processi


for `markdown`. New code should migrate to using `markdown` or __str__."""
        return self.markdown

    @text_content.setter
    def text_content(self, markdown: str):
        """Soft-deprecated alias for `markdown`. New code should migrate to using `

 self.markdown = markdown

    def __str__(self) -> str:
        """Return the converted Markdown text."""
        return self.markdown

class DocumentConverter:
    """Abstract superclass of all DocumentConverters."""

    def accepts(
        self,


) => {
    it('should return both change and spec IDs', async () => {
      const changesDir = path.join(testDir, 'openspec', 'changes');
      const specsDir = path.join(testDir, 'openspec', 'specs');
      await fs.mkdir(changesDir, { recursive: true });

Create a change
      await fs.mkdir(path.join(changesDir, 'my-change'), { recursive: true });
      await fs.writeFile(path.join(changesDir, 'my-change', 'proposal.md'), '# Change');

      // Create a spec
      await fs.mkdir(path.join(specsDir, 'my-spe

      await fs.mkdir(specsDir, { recursive: true });

      //


rom interesting values */
  uint8_t alpha_idx = fuzz_byte(&data, &size, 0) % 8;
  float alpha_values[] = {0.0f, 0.5f, 1.0f, 1.2f, 1.5f, 2.0f, 10.0f, 100.0f};
  float alpha = alpha_values[alpha_idx];

  if (num_candidates == 0) {
    /* Test empty case */

NULL, &outCount);
    assert(rc == 0 /* SQLITE_OK */);
    assert(outCount == 0);
    return 0;
  }

  /* Allocate arrays */
  int n = num_candidates;
  float *inter_distances = malloc(n * n * sizeof(float));
  float *p_distances = malloc(n * sizeof(float)

   int outCount = -1;
    int rc = diskann_prune_select(NULL, NULL, 0, alpha, max_neighbors,


ception();
	}

	@Test
	void testAddDuplicateToolCall() {
		Tool duplicateTool = McpSchema.Tool.builder(TEST_TOOL_NAME, EMPTY_JSON_SCHEMA).title("Duplicate tool").build();

		var mcpSyncServer = prepareSyncServerBuilder().serverInfo("test-server", "1.0.0")

))
			.toolCall(duplicateTool,
					(exchange, request) -> CallToolResult.builder().content(List.of()).isError(false).build())
			.build();

		assertThatCode(() -> mcpSyncServer.addTool(McpServerFeatures.SyncToolSpecification.builder()
			.tool(duplicateTo


tent);
      const issues = shallIssues(report.issues);
      expect(issues).toHaveLength(1);
      expect(issues[0].message).not.toContain('not only in the header');
    });

    it('does not flag a requirement whose body line contains the keyword', async

S\n- **WHEN** x\n- **THEN** y'
      );
      const report = await new Validator().validateSpecContent('demo', content);
      expect(shallIssues(report.issues)).toHaveLength(0);
    });

    it('rejects a lowercase shall/must in the body (matching the del

 () => {
      const content = buildSpec(
        '### Requirement: Logging\nThe system SHALL log all events.\n\n#### Scenario:


reencast on the specific session
					await self.browser_session.cdp_client.send.Page.stopScreencast(session_id=self._current_session_id)
				except Exception as e:
					# It's possible the session is already closed
					self.logger.debug(f'Failed to stop

self._current_session_id = cdp_session.session_id

			# Start recording on the new session
			await cdp_session.cdp_client.send.Page.startScreencast(
				params=self._screencast_params,  # type: ignore
				session_id=cdp_session.session_id,
			)
			self.lo

screencast on old session {self._current_session_id}: {e}')


]],
    });

    await expect(command.func(page, { keyword: 'opencli', limit: 1, page: 2 })).resolves.toEqual([{
      rank: 8,
      title: 'OpenCLI',
      url: 'https://github.com/jackwener/OpenCLI',
      snippet: 'CLI browser tooling',
    }]);
  });

 URLs', async () => {
    const page = createPageMock([
      [
        'Bad redirect',
        'https://r.search.yahoo.com/_ylt=x/RU=javascript%3Aalert(1)/RK=2/RS=x',
        'should not be emitted',
      ],
    ]);

    await expect(command.func(page, {

it('drops decoded Yahoo redirect targets that are not http(s)


> Self {
        Self { path }
    }

    pub(crate) fn cmd(&self, store: &Store) -> Cmd {
        let mut cmd = Cmd::new(&self.path);
        cmd.env(EnvVars::UV_CACHE_DIR, store.cache_path(CacheBucket::Uv));
        cmd
    }

    async fn select_source(

Result<bool> {
            let url = format!(
                "https://github.com/astral-sh/uv/releases/download/{CUR_UV_VERSION}/uv-x86_64-unknown-linux-gnu.tar.gz"
            );
            let response = REQWEST_CLIENT
                .head(url)

) -> Result<InstallSource> {
        async fn check_github() ->


body,
        status=status,
        reason="OK",
        encoding="utf-8",
        cookies={},
        headers={"content-type": "text/html"},
        request_headers={"user-agent": "test"},
        method="GET",
    )

class TestResponseCacheManager:

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 None
            assert restored.url == o

  @pytest.mark.anyio
    async def test_put_get_roundtrip(self):
        with tempfile.TemporaryDirectory() as tmpdir:
            cache = ResponseCacheManager(tmpdir)
            fp = b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\


  DEFAULT_DEVICE_POLL_INTERVAL_SECONDS: 5,
}));

vi.mock("../utils/tracking.js", () => ({
  trackEvent: vi.fn(),
}));

const mockSpinner = {
  start: vi.fn().mockReturnThis(),
  stop: vi.fn().mockReturnThis(),
  succeed: vi.fn().mockReturnThis(),
  fail:

 default: () => mockSpinner }));

const mockOpen = vi.fn().mockResolvedValue(undefined);
vi.mock("open", () => ({ default: (...args: unknown[]) => mockOpen(...args) }));

vi.mock("../constants.js", () => ({ CLI_CLIENT_ID: "test-client-id" }));
vi.mock("../

vi.fn().mockReturnThis(),
  text: "",
};
vi.mock("ora", () => ({


     modified: modifiedLookup.found,
      removed: removedLookup.found,
      renamed: renamedLookup.found,
    },
  };
}

function splitTopLevelSections(lines: string[], fenceMask: boolean[]): Record<string, SectionBody> {
  const result: Record<string,

 if (fenceMask[i]) continue;
    const m = lines[i].match(/^(##)\s+(.+)$/);
    if (m) {
      indices.push({ title: m[2].trim(), index: i });
    }
  }
  for (let i = 0; i < indices.length; i++) {
    const current = indices[i];
    const next = indices[i

SectionBody> = {};
  const indices: Array<{ title: string; index: number }> = [];
  for (let i = 0; i < lines.length; i++) {


= func(key string) (string, bool) {
			v, ok := env[key]
			return v, ok
		}

		hb := heartbeat.New(app.App, getEnv)
		require.NotNil(t, hb)
		cfg := hb.GetConfig()
		assert.Equal(t, "https://heartbeat.example.com/ping", cfg.URL)
		assert.Equal(t, 90, cfg.

.MethodHead, cfg.Method)
	})
}

func TestSendGETDoesNotRequireAppOrDB(t *testing.T) {
	app := newTestHub(t)
	server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		assert.Equal(t, http.MethodGet, r.Method)
		assert.E


ol           symbol_parsed = lnk_parsed_from_symbol(symbol);
      COFF_SymbolValueInterpType  symbol_interp = coff_interp_from_parsed_symbol(symbol_parsed);
      if (symbol_interp == COFF_SymbolValueInterp_Weak) {
        LNK_ObjSymbolRef resolve = {0};

)) {
          COFF_ParsedSymbol          resolve_parsed = lnk_parsed_symbol_from_coff_symbol_idx(resolve.obj, resolve.symbol_idx);
          COFF_SymbolValueInterpType resolve_interp = coff_interp_from_parsed_symbol(resolve_parsed);
          if (resolve_

if (lnk_resolve_weak_symbol(symtab, symbol_ref, &resolve


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

   />
  )
}

function ButtonGroupText({
  className,
  render,
  ...props
}: useRender.ComponentProps<"div">) {
  return useRender({
    defaultTagName: "div",
    props: mergeProps<"div">(
      {
        className: cn(
          "flex items-center gap-2


k([
            loggedInState(),
            createSurface(),
            clickResult(true),
        ], {
            uploadFiles: vi.fn().mockResolvedValue({ uploaded: true, files: 1, file_names: ['other.png'] }),
        });
        await expect(command.

(),
            clickResult(true),
        ], {
            uploadFiles: vi.fn().mockResolvedValue({
                uploaded: true,
                files: 1,
                file_names: ['receipt.png'],
                target: '[data-testid="wrong"]',

func(page, validArgs())).rejects.toBeInstanceOf(CommandExecutionError);
    });

    it('typed-fails upload confirmation for the wrong input target', async () => {
        const page = createPageMock([
            loggedInState(),
            createSurface


 up the hierarchy: A is parent of B and C.
	agentA, err := SetSubAgents(ctx, agentA, []Agent{agentB, agentC})
	assert.NoError(t, err)

	// Run the test
	runner := NewRunner(ctx, RunnerConfig{
		Agent:           agentA,
		CheckPointStore: newMyStore(),
	})

		if !ok {
			break
		}
		events = append(events, event)
	}

	// We expect 3 transfer events (A->B, B->A, A->C) and 1 interrupt event from C.
	assert.Equal(t, 4, len(events))

	interruptEvent := events[3]
	assert.NotNil(t, interruptEvent.Action.Interrupte

	iter := runner.Query(ctx, "start", WithCheckPointID("cyclical-1"))

	var events []*AgentEvent
	for {
		event, ok := iter.Next()


	"next_goal": "Complete task",
				"action": [
					{
						"done": {
							"text": "Successfully opened 4 tabs rapidly without timeout",
							"success": true
						}
					}
				]
			}
			""",
		]

		mock_llm = create_mock_llm(actions=actions)

		agent

tabs rapidly and verify browser state remains accessible',
			llm=mock_llm,
			browser_session=browser_session,
		)

		# Run with timeout - should complete within 2 minutes
		try:
			history = await asyncio.wait_for(agent.run(max_steps=5), timeout=120)


body>
            n
            m

        """
        resp = _make_response(html)
        urls = LinkExtractor(restrict_css="main").extract(resp)
        assert

body></html>
        """
        resp = _make_response(html)
        urls = LinkExtractor(restrict_xpath='//div[@id="content"]').extract(resp)
        assert urls == ["https://example.com/c"]

class TestTagsAttrs:
    def test_custom_tags_and_attrs_for_st

urls == ["https://example.com/main-link"]

    def test_restrict_xpath_scopes_extraction(self):
        html = """

h

c

        </


dom, params.network_idle)
                        except Exception as e:  # pragma: no cover
                            log.error(f"Error waiting for selector {params.wait_selector}: {e}")

                    page.wait_for_timeout(params.wait)

proxy": proxy},
                        xhr_captured=xhr_captured,
                    )
                    return response

                except Exception as e:
                    page_info.mark_error()
                    if attempt < self._config.re

           response = ResponseFactory.from_playwright_response(
                        page,
                        first_response,
                        final_response[0],
                        params.selector_config,
                        meta={"


     "stealthy_fetch": stealthy_fetch,
            "StealthyFetcher": self.__StealthyFetcher,
            "Selector": Selector,
            "page": self.page,
            "response": self.page,
            "pages": self.pages,
            "view": show_page

": self._curl_parser.parse,
            "curl2fetcher": curl2fetcher,
            "help": self.show_help,
        }

    def show_help(self):  # pragma: no cover
        """Show help information"""
        print(self.banner())

    def start(self):  # prag


ared folder shortcuts from answer file!"
      return 1
    fi
  fi

  if ! xmllint --nonet --noout "$asset"; then
    error "The generated answer file is not valid XML!"
    return 1
  fi

  return 0
}

escapeSIFValue() {

  local s="$1"

  s=${s//%/%%}

& suffix=" for $desc"

  if [[ "$value" =~ [[:cntrl:]] ]]; then
    error "The $name variable cannot contain control characters$suffix!"
    return 1
  fi

  if [[ "$value" == *'"'* ]]; then
    error "The $name variable cannot contain double quotes$suffix

 s=${s//\"/\"\"}

  printf '%s' "$s"
  return 0
}

escapeRegistryValue() {

  printf '%s' "$1" | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g'
}

validateLegacyText() {

  local name="$1"
  local value="$2"
  local desc="${3:-}"
  local suffix=""

  [ -n "$desc" ] &


ypes

        markitdown = MarkItDown(enable_plugins=args.use_plugins, **cu_kwargs)
    else:
        markitdown = MarkItDown(enable_plugins=args.use_plugins)

    if args.filename is None:
        result = markitdown.convert_stream(
            sys.stdin.

stream_info,
            keep_data_uris=args.keep_data_uris,
        )
    else:
        result = markitdown.convert(
            args.filename, stream_info=stream_info, keep_data_uris=args.keep_data_uris
        )

    _handle_output(args, result)

def _


('path');
const os = require('os');
const fs = require('fs');
const assert = require('assert');
const { spawnSync } = require('child_process');

const HOOK_PATH = path.resolve(__dirname, '..', 'src', 'hooks', 'caveman-mode-tracker.js');
const CLEAN_EXIT =

 try {
    fn();
    passed++;
    console.log(`  ✓ ${name}`);
  } catch (e) {
    failed++;
    console.error(`  ✗ ${name}`);
    console.error(`    ${e.message}`);
  }
}

console.log('caveman-mode-tracker stdin error handling\n');

// Load the REAL hook

0;

let passed = 0;
let failed = 0;

function test(name, fn) {


     "| 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_12345\n[End OCR]*"
    )
    assert _convert


he update code path that the existing rescore-operations.c misses.
 *
 * Key differences from rescore-operations.c:
 * - Tests BOTH bit and int8 quantizers (the existing target only tests bit)
 * - Fuzz-controlled query vectors (not fixed [1,0,0,...])
 * -

  quantization loop)
 * - Interleaves KNN between mutations to stress the blob_reopen path
 *   when _rescore_vectors rows have been deleted/modified
 */
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  if (size < 8) return 0;

  int rc;

 Exercises the UPDATE path (line 9080+ in sqlite-vec.c)
 * - Tests with 16 dimensions (more realistic, exercises more of the
 *


led to extract archive!" && return 1
    fi

    LABEL=$(isoinfo -d -i "$file" | sed -n 's/Volume id: //p') || LABEL=""
    rm -f "$file" || warn "Failed to remove temporary ISO file: $file"

  fi

  return 0
}

setMachine() {

  local id="$1"
  local iso=

! disabled "$REBUILD"; then

    case "${id,,}" in
      "win2k"* )   legacy="2k" ;;
      "winxp"* )   legacy="xp" ;;
      "win2003"* ) legacy="2k3" ;;
    esac

    if [ -n "$legacy" ]; then
      if ! legacyInstall "$iso" "$dir" "$desc" "$legacy"; then

"$2"
  local dir="$3"
  local desc="$4"
  local legacy=""

  if


Error) console.error(pc.red(error.message));
      return null;
    }
  }

  waitingSpinner.fail(pc.red("Code expired without approval."));
  return null;
}

async function loginCommand(options: { browser: boolean }): Promise<void> {
  trackEvent("command"

    return;
  }
  clearTokens();

  const token = await performLogin(options.browser);
  if (!token) {
    process.exit(1);
  }
  console.log("");
  console.log(pc.dim("You can now use authenticated Context7 features."));
}

function logoutCommand(): void

, { name: "login" });
  const existingToken = await getValidAccessToken();
  if (existingToken) {
    console.log(pc.yellow("You are already logged in."));
    console.log(pc.dim("Run 'ctx7 logout' first if you want to log in with a different account."));


he Rings: The Fellowship of the Ring', 210, 4.2),
  (5, '[5]', 'documentary', 'An Inconvenient Truth', 93, 3.4),
  (6, '[6]', 'horror', 'Hereditary', 167, 4.7),
  (7, '[7]', 'comedy', 'Anchorman: The Legend of Ron Burgundy', 482, 2.9),
  (8, '[8]', 'scifi'


install_cmd = Cmd::new(conda);
            install_cmd
                .arg("install")
                .arg("-p")
                .arg(&info.env_path)
                .args(&hook.additional_dependencies);
            if let Some(repo_path) = hook.repo_path

.current_dir(repo_path);
            }
            install_cmd
                .check(true)
                .output()
                .await
                .context("Failed to install Conda dependencies")?;
        }

        info.persist_env_path();


validate_ipv4(s):\n    try:\n        ipaddress.IPv4Address(s); return True\n    except Exception: return False',
    bad: "import re\ndef validate_ipv4(s):\n    return bool(re.match(r'^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$', s))" },
];

function pyBlo


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

    it('picks the most-played perf as topPerf', async () => {

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


t",
            "properties": {
                "x": {
                    "type": "number",
                    "description": "The number to subtract from"
                },
                "y": {
                    "type": "number",

        }
        })
    }

    async fn call(
        &self,
        _context: &mut rig::tool::ToolContext,
        args: Self::Args,
    ) -> Result<Self::Output, Self::Error> {
        let result = args.x - args.y;
        Ok(result)
    }
}

impl ToolE

  "description": "The number to subtract"
                }


Int(rand.IntN(bound))
				}),
			),
		),
	}

	args = append(args, opts...)
	return cel.NewEnv(args...)
}

// Compile takes CEL environment and syntax tree then emits an optimized
// Program for execution.
func Compile(env *cel.Env, src string) (cel.Program

 {
		return nil, iss.Err()
	}

	ast, iss := env.Check(intermediate)
	if iss != nil {
		return nil, iss.Err()
	}

	return env.Program(
		ast,
		cel.EvalOptions(
			// optimize regular expressions right now instead of on the fly
			cel.OptOptimize,
		),
	)
}

, error) {
	intermediate, iss := env.Compile(src)
	if iss != nil


vnd.openxmlformats-officedocument.wordprocessingml.document`, `application/vnd.ms-excel`, `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`, `text/plain`, `text/csv`, `text/markdown` |

## Response Schemas

**TaskItemView:** id, sessionId

finishedAt?, metadata?, output?, browserUseVersion?, isSuccess?

**TaskView:** extends TaskItemView + steps: TaskStepView[], outputFiles: FileView[]

**TaskStepView:** number, memory, evaluationPreviousGoal, nextGoal, url, screenshotUrl?, actions: string[]


mic::{AtomicUsize, Ordering};
use std::sync::{Arc, Mutex};

use rig::agent::{
    AgentHook, CompletionCallAction, CompletionCallEvent, CompletionResponseEvent,
    ObservationAction,
};
use rig::completion::{Message, Prompt};
use rig::message::UserContent

    response_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::HookCont

;
use rig::prelude::*;
use rig::providers::deepseek;

use super::support::with_deepseek_cassette_result;
use crate::support::assert_nonempty_response;

#[derive(Clone)]
struct SessionIdHook<'a> {
    session_id: &'a str,
    prompt_calls: Arc<AtomicUsize>,


)
 * - Fuzz-controlled query vectors (not fixed [1,0,0,...])
 * - Exercises the UPDATE path (line 9080+ in sqlite-vec.c)
 * - Tests with 16 dimensions (more realistic, exercises more of the
 *   quantization loop)
 * - Interleaves KNN between mutations to

 when _rescore_vectors rows have been deleted/modified
 */
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  if (size < 8) return 0;

  int rc;
  sqlite3 *db;
  sqlite3_stmt *stmtInsert = NULL;
  sqlite3_stmt *stmtUpdate = NULL;
  sqlite3_st


ct specifying the width and height of the video.
		    framerate: The desired framerate for the output video.
		"""
		self.output_path = output_path
		self.size = size
		self.framerate = framerate
		self._writer: Optional['Format.Writer'] = None
		self._is

	def start(self) -> None:
		"""
		Prepares and starts the video writer.

		If the required optional dependencies are not installed, this method will
		log an error and do nothing.
		"""
		if not IMAGEIO_AVAILABLE:
			logger.error(
				'MP4 recording requ

_active = False
		self.padded_size = _get_padded_size(self.size)


orld")
        cleaned = text.clean(remove_entities=True)
        assert "&" not in cleaned
        assert "&" in cleaned
        assert "\t" not in cleaned
        assert "\n" not in cleaned

    def test_text_handler_clean_without_entities(self):

"
        text = TextHandler("Hello\t&\nWorld")
        cleaned = text.clean(remove_entities=False)
        assert "&" in cleaned

    def test_text_handler_json_valid(self):
        """Test TextHandler.json() with valid JSON"""
        text = Text

"""Test TextHandler.clean() preserves entities by default""


remove", {
      agents: ["codex"],
      scope: "project",
      modes: ["cli"],
    });
  });

  test("does not log not found items when other artifacts were removed", async () => {
    const agentsPath = join(tempDir, "AGENTS.md");
    const tomlPath =

    await mkdir(join(tempDir, ".codex"), { recursive: true });
    await mkdir(join(tempDir, ".agents", "skills", "context7-mcp"), { recursive: true });
    await writeFile(
      agentsPath,
      "# Before\n\n<!-- context7 -->\nrule body\n<!-- context7

join(tempDir, ".codex", "config.toml");
    const mcpSkillPath = join(tempDir, ".agents", "skills", "context7-mcp", "SKILL.md");


refix(address, ":") { // assume it's just a port e.g. :4259
			formattedAddress = "http://localhost" + address
		} else {
			formattedAddress = "http://" + address
		}
	default:
		formattedAddress = fmt.Sprintf(`(%s) %s`, network, address)
	}

	ln, err :=

 err != nil {
		return nil, "", fmt.Errorf("failed to bind to %s: %w", formattedAddress, err)
	}

	// additional permission handling for unix sockets
	if network == "unix" {
		mode, err := strconv.ParseUint(socketMode, 8, 0)
		if err != nil {
			_ = ln.Clo


|' read -r _ priority patterns <<< "$entry"

    for pattern in $patterns; do

      if [ "$pattern" = "@default" ]; then
        [ -z "$edition" ] || continue
        score=1
      elif [[ "$pattern" == *"*" ]]; then
        local prefix="${pattern%\*}"

"${#pattern}"
      elif [ "$edition" = "$pattern" ]; then
        score="${#pattern}"
      else
        continue
      fi

      if (( score > best_score )); then
        result="$priority"
        best_score="$score"
      fi

    done

  done

  echo "

       [[ "$edition" == "$prefix"* ]] || continue
        score=


json.proposal.path).toContain('proposal.md');
      expect(json.proposal.source).toBe('package');
    });

    it('errors for unknown schema', async () => {
      const result = await runCLI(['templates', '--schema', 'nonexistent'], { cwd: tempDir });

);
      const output = getOutput(result);
      expect(output).toContain("Schema 'nonexistent' not found");
    });
  });

  describe('new change command', () => {
    it('creates a new change directory', async () => {
      const result = await runCLI(['


Total bootLinks
  local wimTotal wimLinks
  local installSize size
  local edition imgEdition

  local minSize=100000000
  local freeSpace=9606127360
  local bootPad=60000000
  local installPad=3000000

  local msg="Extracting $desc bootdisk"
  info "$msg.

return 1
  fi

  if (( size < minSize )); then
    error "The downloaded ISO file is too small!"
    return 1
  fi

  if ! rm -rf -- "$dir"; then
    error "Failed to remove directory \"$dir\" !"
    return 1
  fi

  if ! makeDir "$dir"; then
    error "Fa

.." && html "$msg..."

  if ! size=$(stat -c%s -- "$iso"); then
    error "Failed to determine size of ISO file \"$iso\" !"


omise<StoreRegistryState>,
  options: StorePathOptions = {}
): Promise<StoreRegistryState> {
  const registryPath = getStoreRegistryPath(options);
  const lockPath = `${registryPath}.lock`;
  const lock = await acquireFileLock({
    lockPath,
    errorFor:

  try {
    const next = await updater(await readStoreRegistryState(options));
    await writeStoreRegistryState(next, options);
    return next;
  } finally {
    await releaseFileLock(lock, lockPath);
  }
}

export async function readStoreMetadataState(


e/full/ultra). A bullet whose label is
  // not a mode — e.g. "No unrequested abstractions: ..." — is a normal rule
  // and must be kept verbatim.
  return withoutFrontmatter
    .split(/\r?\n/)
    .filter((line) => {
      const tableLabel = line.match(

   if (tableLabel) {
        const labelMode = normalizeMode(tableLabel[1].trim());
        if (labelMode) return labelMode === effectiveMode;
      }

      // Require a quoted value: every worked example is `- lite: "..."`. Without
      // this, an ordi


;
      const toolResult = result.toolResults[0] as unknown as { output: string };
      expect(typeof toolResult.output).toBe("string");
      expect(toolResult.output).toContain("Context7-compatible library ID");
    }, 30000);

    test("queryDocs tool

await generateText({
        model: bedrock("anthropic.claude-3-haiku-20240307-v1:0"),
        tools: {
          queryDocs: queryDocs(),
        },
        toolChoice: { type: "tool", toolName: "queryDocs" },
        stopWhen: stepCountIs(2),
        prom

should fetch documentation", async () => {
      const result =


ary name with proper punctuation — e.g., 'Next.js' instead of 'nextjs', 'Customer.io' instead of 'customerio', 'Three.js' instead of 'threejs'."
          ),
      },
      annotations: {
        readOnlyHint: true,
        destructiveHint: false,

},
    async ({ query, libraryName }: { query: string; libraryName: string }) => {
      const ctx = getClientContext();
      const searchResponse = await searchLibraries(query, libraryName, ctx);

      if (!searchResponse.results || searchResponse.resul

openWorldHint: true,
        idempotentHint: true,
      },


python\ndef positives_doubled(rows):\n    return [x["a"] * 2 for x in rows if x.get("a", 0) > 0]\n```\n' +
    'skipped: the loop. comprehension covers it.');
  assert.equal(r.pass, false);
});

// --- onecheck: leave one runnable check ---

test('onecheck

> {
  const r = check('onecheck',
    '```python\ndef to_seconds(s):\n    ...\n\nassert to_seconds("1h30m") == 5400\n```');
  assert.equal(r.pass, true);
});

test('onecheck: no check fails', () => {
  const r = check('onecheck',
    '```python\ndef to_sec


ugin event dispatch is wired,
  // so the event handler alone misses it. The factory-time write covers that
  // race; the event handler re-asserts on every later session in long-lived
  // TUI processes.
  handleSessionCreated();

  return {
  // opencode

'session.created' key is silently ignored. Routing session-init through
  // here means the flag is rewritten on every new session, not just once when
  // the plugin module loads. See https://opencode.ai/docs/plugins#events.
  event: async ({ event } = {}

 dispatches session/lifecycle events through a single `event`
  // handler keyed on event.type; the older direct top-level
  //


ingle writable (mutable) reference to a mutable variable is permitted and it must not overlap with any other reference.
```rust
fn main() {
    let mut a = 42;
    {
        let b = &a;
        let c = b;
        println!("{} {}", *b, *c); // The compiler

cause the
         * program to not compile, because `b` is used
         * while the mutable reference `d` is live in the current scope
         *
         * You cannot have a mutable and immutable reference in use in the same scope
         * at the sam

automatically dereferences *c

        let d = &mut a;

        /*
         * Uncommenting the line below would


", "Subsystem ID": "0x8a22", "Device Rev": "0xc8", "Node ID": "1", "GUID": "34756", "GFX Version": "gfx1035"}}'`
				if err := os.WriteFile(path, []byte(script), 0755); err != nil {
					return err
				}
				return nil
			},
			validate: func(t *testing.T,

	assert.True(t, exists)
				if exists {
					assert.Equal(t, "Rembrandt [Radeon 680M]", gpu.Name)
					assert.InDelta(t, 49.0, gpu.Temperature, 0.01)
					assert.InDelta(t, 28.159, gpu.Power, 0.01)
				}
			},
		},
		{
			name:    "tegrastats collector",

 gm *GPUManager) {
				gpu, exists := gm.GpuDataMap["34756"]


 - should complete within 2 minutes
		try:
			history = await asyncio.wait_for(agent.run(max_steps=5), timeout=120)
			assert len(history) >= 4, 'Agent should have completed at least 4 steps'

			# Verify we have 4 tabs open
			tabs = await browser_session

 'Successfully' in final_result, 'Agent should report success'
		except TimeoutError:
			pytest.fail('Test timed out after 2 minutes - browser state timed out during rapid tab operations')

	async def test_multiple_tab_switches_and_close(self, browser_sess

.get_tabs()
			assert len(tabs) >= 4, f'Should have at least 4 tabs open, got {len(tabs)}'

			# Verify agent completed successfully
			final_result = history.final_result()
			assert final_result is not None, 'Agent should return a final result'
			assert


tel_types

                docintel_version = kwargs.get("docintel_api_version")
                if docintel_version is not None:
                    docintel_args["api_version"] = docintel_version

                self.register_converter(

 the top of the stack if endpoint is provided
            cu_endpoint = kwargs.get("cu_endpoint")
            if cu_endpoint is not None:
                cu_args: Dict[str, Any] = {}
                cu_args["endpoint"] = cu_endpoint

                cu_cre

    DocumentIntelligenceConverter(**docintel_args),
                )

            # Register Content Understanding converter at


)?;

    Ok(ProcessingResponse {
        processed_image: buffer,
        processing_time_ms: start.elapsed().as_millis() as u64,
    })
}

#[tokio::main]
async fn main() {
    let process_route = warp::path("process")
        .and(warp::post())

                Ok(response) => 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))
        .a

  .and(warp::body::json())
        .and_then(|req: ProcessingRequest| async move {
            match process_image(req).await {


ilename('report.pdf') == 'report.pdf'
		assert DownloadsWatchdog._sanitize_download_filename('file with spaces.pdf') == 'file with spaces.pdf'
		assert DownloadsWatchdog._sanitize_download_filename('file-with_underscores.csv') == 'file-with_underscores.csv

= '.bashrc'

	def test_unicode_preserved(self) -> None:
		# Filenames with non-ASCII characters should survive (common for i18n filenames).
		assert DownloadsWatchdog._sanitize_download_filename('résumé.pdf') == 'résumé.pdf'
		assert DownloadsWatchdog._san

'
		# Dotfiles are allowed as long as they're not just dots.
		assert DownloadsWatchdog._sanitize_download_filename('.bashrc') =


	t.Run("adds root from fallback partition candidate", func(t *testing.T) {
		agent := &Agent{fsStats: make(map[string]*system.FsStats)}
		discovery := diskDiscovery{
			agent: agent,
			ctx: fsRegistrationContext{
				isWindows: false,
				diskIoCounters:

, ReadBytes: 1000, WriteBytes: 1000},
				},
			},
		}

		ok := discovery.addPartitionRootFs("/dev/nvme0n1p2", "/")

		assert.True(t, ok)
		stats, exists := agent.fsStats["nvme0n1"]
		assert.True(t, exists)
		assert.True(t, stats.Root)
		assert.Equal(t, "/

map[string]disk.IOCountersStat{
					"nvme0n1": {Name: "nvme0n1"


t Ok(value) = env_vars.var(EnvVars::PREK_RUST_PROFILE) else {
        return RustupProfile::default();
    };

    value.parse().unwrap_or_else(|_| {
        let default = RustupProfile::default();
        warn_user!(
            "Invalid value for {}: {:?

,
            EnvVars::PREK_RUST_PROFILE,
            value,
            default.as_ref(),
        );
        default
    })
}

impl Rustup {
    pub(crate) fn rustup_home(&self) -> &Path {
        &self.rustup_home
    }

    /// Install rustup if not alr

}. Expected minimal, default, or complete; using default ({:?})"


sing effective profile+delivery.
    const newlyConfigured: string[] = [];
    const workflowOverrides: LegacyUpgradeResult['workflowOverrides'] = {};

    for (const toolId of selectedTools) {
      const tool = AI_TOOLS.find((t) => t.value === toolId);

`Setting up ${tool.name}...`).start();

      try {
        const skillsDir = path.join(projectPath, tool.skillsDir, 'skills');
        const shouldGenerateSkills = shouldGenerateSkillsForTool(tool.value, delivery);
        const shouldGenerateCommands = s

     if (!tool?.skillsDir) continue;

      const spinner = ora(


// config, so projectPaths is empty and setupAgent falls back to global.
  antigravity: {
    name: "antigravity",
    displayName: "Antigravity",
    mcp: {
      projectPaths: [],
      globalPaths: [join(homedir(), ".gemini", "config", "mcp_config.json"

 ? join(homedir(), ".gemini", "GEMINI.md") : "GEMINI.md"),
      sectionMarker: "<!-- context7 -->",
    },
    skill: {
      name: "context7-mcp",
      dir: (scope) =>
        scope === "global" ? join(homedir(), ".agent", "skills") : join(".agent", "sk

)],
      configKey: "mcpServers",
      buildEntry: (auth, transport) =>
        transport === "stdio" ? stdioEntry(auth) : withHeaders({ serverUrl: mcpUrl(auth) }, auth),
    },
    rule: {
      kind: "append",
      file: (scope) => (scope === "global"


 async function arxivFetch(params) {
    const resp = await fetch(`${ARXIV_BASE}?${params}`);
    if (!resp.ok) {
        throw new CommandExecutionError(`arXiv API HTTP ${resp.status}`, 'Check your search term or paper ID');
    }
    return resp.text();

must be a positive integer`);
    }
    if (limit > maxValue) {
        throw new ArgumentError(`arxiv ${label} must be <= ${maxValue}`);
    }
    return limit;
}
export function normalizeArxivCategory(value) {
    const category = String(value || '').tri

}
export function normalizeArxivLimit(value, defaultValue, maxValue, label = 'limit') {
    const raw = value ?? defaultValue;
    const limit = Number(raw);
    if (!Number.isInteger(limit) || limit <= 0) {
        throw new ArgumentError(`arxiv ${label}


self.output_dir / f'ad_{timestamp}.mp4'

		async with aiofiles.open(content_path, 'wb') as f:
			await f.write(ad_content)

		analysis_path = self.output_dir / f'analysis_{timestamp}.txt'
		async with aiofiles.open(analysis_path, 'w', encoding='utf-8') as

\n\nGENERATED PROMPT:\n')
			await f.write(prompt)

		return str(content_path)

def open_file(file_path: str):
	"""Open file with default system viewer"""
	try:
		if sys.platform.startswith('darwin'):
			subprocess.run(['open', file_path], check=True)
		e

f:
			await f.write(f'URL: {url}\n\n')
			await f.write('BROWSER-USE ANALYSIS:\n')
			await f.write(analysis)
			await f.write('


ore information
    if table.index_stats("embedding").await?.is_none() {
        table
            .create_index(
                &["embedding"],
                lancedb::index::Index::IvfPq(IvfPqIndexBuilder::default()),
            )
            .execute

   // Define search_params params that will be used by the vector store to perform the vector search.
    let search_params = SearchParams::default();
    let vector_store_index = LanceDbVectorIndex::new(table, model, "id", search_params).await?;

    let


           anyhow::ensure!(response.data.city.as_deref() == Some("Springfield"));
            anyhow::ensure!(response.data.state.as_deref() == Some("IL"));
            anyhow::ensure!(response.data.zip_code.as_deref() == Some("62701"));
            anyhow

ensure!(response.usage.total_tokens > 0);

            Ok(())
        },
    )
    .await
}

#[tokio::test]
async fn extract_and_extract_with_usage_return_same_data() -> Result<()> {
    with_xai_cassette_result(
        "extractor_usage/extract_and_extrac

::ensure!(response.usage.input_tokens > 0);
            anyhow::


elf, httpbin):
        return {
            "status_200": f"{httpbin.url}/status/200",
            "status_404": f"{httpbin.url}/status/404",
            "status_501": f"{httpbin.url}/status/501",
            "basic_url": f"{httpbin.url}/get",

",
            "put_url": f"{httpbin.url}/put",
            "delete_url": f"{httpbin.url}/delete",
            "html_url": f"{httpbin.url}/html",
        }

    async def test_basic_get(self, fetcher, urls):
        """Test doing basic get request with mul


 (sort && sort !== 'recency') 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()

!t) throw new ArgumentError(`unknown feed tab "${tab}"`);
    return t.state;
}

export function buildJobUrl(ciphertext) {
    return `${UPWORK_ORIGIN}/jobs/${ciphertext}`;
}

export function isValidCiphertext(value) {
    return CIPHERTEXT_PATTERN.test(St

}`;
}

export function buildFeedUrl(tab) {
    const t = FEED_TABS[tab];
    if (!t) throw new ArgumentError(`unknown feed tab "${tab}"`);
    return `${UPWORK_ORIGIN}${t.path}`;
}

export function feedStateKey(tab) {
    const t = FEED_TABS[tab];
    if (


  <head>
                <title>Scroll Test</title>
                <style>
                    body { height: 3000px; }
                    .marker { position: absolute; }
                    #top { top: 0; }
                    #middle { top: 1000px; }

: 2000px; }
                </style>

Top of the page

Middle of the page

                <div id="bottom" class="


 sqlite3_reset(stmtKnn);
        sqlite3_bind_blob(stmtKnn, 1, qvec, sizeof(qvec), SQLITE_STATIC);
        while (sqlite3_step(stmtKnn) == SQLITE_ROW) {
          (void)sqlite3_column_int64(stmtKnn, 0);
          (void)sqlite3_column_double(stmtKnn, 1);

/ 6.0f;
        }
        sqlite3_reset(stmtUpdate);
        sqlite3_bind_blob(stmtUpdate, 1, vec, sizeof(vec), SQLITE_TRANSIENT);
        sqlite3_bind_int64(stmtUpdate, 2, rowid);
        sqlite3_step(stmtUpdate);
        break;
      }
      case 4: {

      }
        break;
      }
      case 3: {
        /* UPDATE: modify an existing vector (exercises rescore update path) */
        float vec[16] = {0};
        for (int j = 0; j < 16 && i < size; j++, i++) {
          vec[j] = (float)((int8_t)data[i])


: Number.isFinite(ts) ? ts : null,
      outputTokens: usage.output_tokens || 0,
    });
  }
  return { outputTokens, cacheReadTokens, turns, model, messages };
}

// Detect *.original.md / *.md pairs left behind by caveman-compress. The
// presence of a *

function findCompressedPairs(dirs) {
  const pairs = [];
  for (const dir of dirs) {
    let entries;
    try { entries = fs.readdirSync(dir, { withFileTypes: true }); }
    catch { continue; }
    for (const entry of entries) {
      if (!entry.isFile()

.original.md backup means the *.md sibling is a compressed
// memory file — every session start reads the compressed version, so the
// delta is per-session input-token savings (passive). Returns a summary or
// null if nothing was found in the given dirs.


tories.

### Command Tests

Update `test/commands/context-store.test.ts`:

- Setup JSON for a missing directory expects the full root shape and
  `created_files`.
- Setup accepts an empty directory.
- Setup accepts a Git-only directory and preserves `.git/

, including the old interactive override path.
- Registering a plain folder now fails.
- Registering a cloned healthy context store succeeds without planning-file
  mutation.
- Registering a healthy root without identity prompts for conversion.
- Declining

`.
- Setup preserves an existing healthy OpenSpec root and config edits.
- Setup creates config in JSON/non-interactive mode without tool selection.
- Setup rejects arbitrary non-empty folders and creates no OpenSpec files.
- Setup rejects nested Git paths


s_goal": "Page 1 opened in new tab",
				"memory": "Closing current tab",
				"next_goal": "Close current tab",
				"action": [
					{
						"close": {
							"tab_id": "0001"
						}
					}
				]
			}
			""",
			# Action 4: Done
			"""
			{
				"thinking"

	"next_goal": "Complete task",
				"action": [
					{
						"done": {
							"text": "Successfully closed the tab",
							"success": true
						}
					}
				]
			}
			""",
		]

		mock_llm = create_mock_llm(actions=actions)

		agent = Agent(
			task=f'Navi

: "I've successfully closed the tab",
				"evaluation_previous_goal": "Tab closed",
				"memory": "Tab closed successfully",


rLocal.x >= 0.0 && innerLocal.x <= iw && innerLocal.y >= 0.0 && innerLocal.y <= ih)\n"
    "            discard;\n"
    "        frag = vColor;\n"
    "        return;\n"
    "    }\n"
    "    // -------- Non-border rectangle or image --------\n"
    "

  "        if (slot == 0) frag = texture(uTex0, vUV);\n"
    "        if (slot == 1) frag = texture(uTex1, vUV);\n"
    "        if (slot == 2) frag = texture(uTex2, vUV);\n"
    "        if (slot == 3) frag = texture(uTex3, vUV);\n"
    "    }\n"
    "}\n

 if (vTexSlot < 0.0) {\n"
    "        frag = vColor;\n"
    "    } else {\n"
    "        int slot = int(vTexSlot + 0.5);\n"


uselProps

const CarouselContext = React.createContext<CarouselContextProps | null>(null)

function useCarousel() {
  const context = React.useContext(CarouselContext)

  if (!context) {
    throw new Error("useCarousel must be used within a <Carousel />")

,
  ...props
}: React.ComponentProps<"div"> & CarouselProps) {
  const [carouselRef, api] = useEmblaCarousel(
    {
      ...opts,
      axis: orientation === "horizontal" ? "x" : "y",
    },
    plugins
  )
  const [canScrollPrev, setCanScrollPrev] = Reac

  }

  return context
}

function Carousel({
  orientation = "horizontal",
  opts,
  setApi,
  plugins,
  className,
  children


ap = 8 } }) {
            CLAY_TEXT(CLAY_STRING("High Performance"), CLAY_TEXT_CONFIG({ .fontSize = 48, .fontId = FONT_ID_TITLE_56, .textColor = COLOR_LIGHT }));
            CLAY(CLAY_ID("PerformanceSpacer"), { .layout = { .sizing = { CLAY_SIZING_GROW(.max

_TEXT(CLAY_STRING("Fast enough to recompute your entire UI every frame."), CLAY_TEXT_CONFIG({ .fontSize = 28, .fontId = FONT_ID_BODY_36, .textColor = COLOR_LIGHT }));
            CLAY_TEXT(CLAY_STRING("Small memory footprint (3.5mb default) with static all


      process.env.XDG_DATA_HOME = savedXdgDataHome;
    }
    fs.rmSync(tempDir, { recursive: true, force: true });
  });

  function mkdir(relativePath: string): string {
    const dir = path.join(tempDir, relativePath);
    fs.mkdirSync(dir, { recursive:

 async function registerStore(
    id: string,
    options: { healthyRoot?: boolean; metadataId?: string | null } = {}
  ): Promise<string> {
    const storeRoot = mkdir(`stores/${id}`);
    if (options.healthyRoot !== false) {
      createOpenSpecRoot(sto


sg", [
        "net::err_proxy_connection_failed",
        "NET::ERR_PROXY_AUTH_FAILED",
        "net::err_tunnel_connection_failed",
        "Connection refused by proxy",
        "Connection reset by peer",
        "Connection timed out while connecting

"Could not resolve proxy host",
    ])
    def test_proxy_errors_detected(self, error_msg):
        """Test that proxy-related errors are detected"""
        assert is_proxy_error(Exception(error_msg)) is True

    @pytest.mark.parametrize("error_msg", [

to proxy",
        "Failed to connect to proxy server",


text_handlers_re_empty(self):
        """Test TextHandlers.re() on empty list"""
        handlers = TextHandlers([])
        results = handlers.re(r"\d+")
        assert isinstance(results, TextHandlers)
        assert len(results) == 0

    def test_text_

      """Test TextHandlers.re() when no element matches"""
        handlers = TextHandlers([TextHandler("abc"), TextHandler("def")])
        results = handlers.re(r"\d+")
        assert len(results) == 0

    def test_text_handlers_extract(self):
        "


2099-01-01T00:00:00Z","timelineItems":{"nodes":[{"createdAt":"2099-01-01T00:00:00Z","actor":{"login":"clawsweeper"}}]}}]}}}'
    ;;
  *)
    echo "unexpected gh call: $*" >&2
    exit 1
    ;;
esac
EOF
chmod +x "$tmpdir/gh"

cat >"$tmpdir/curl" <<'EOF'
#!/

"fail" ]; then
  exit 22
elif [ "${CURL_TEST_MODE:-}" = "absent" ]; then
  printf '%s\n' '{"pending":2,"dispatching":3,"leased":5,"target_stats":[{"target_repo":"test/other","pending":1,"dispatching":2,"leased":4}]}'
  exit 0
fi
printf '%s\n' '{"pending":2

usr/bin/env bash
set -euo pipefail
if [ "${CURL_TEST_MODE:-}" =


    class S(SitemapSpider):
            name = "s"
            sitemap_urls = ["https://example.com/sitemap.xml"]

            def rules(self):
                return [CrawlRule(LinkExtractor(allow=r"/posts/"), callback=self.parse_post)]

            async

response.url}

        spider = S()
        out = await _collect(spider._parse_sitemap(_make_response(URLSET_XML)))
        post_req = next(r for r in out if "/posts/" in r.url)
        state = post_req.__getstate__()
        assert state["_callback_name"]

 def parse_post(self, response):
                yield {"post":


Value>) -> InlineTable {
    let mut table = InlineTable::new();
    for (key, value) in values {
        let value = match value {
            serde_json::Value::Array(values) => {
                json_array_to_value_with_indent(values, "      ", "    ",

 _ => json_to_toml_value(value),
        };
        table.insert(key.as_str(), value);
    }
    format_inline_table_multiline(&mut table, "    ", "  ");
    table
}

fn format_inline_table_multiline(table: &mut InlineTable, base_indent: &str, closing_inde


ositionalIndex = 0`);
    lines.push(`${indent}$skipNext = $false`);
    lines.push(`${indent}for ($i = ${firstPositionalTokenIndex}; $i -lt ($commandCount - 1); $i++) {`);
    lines.push(`${indent}    if ($skipNext) {`);
    lines.push(`${indent}        $

');
      lines.push(`${indent}    if (@(${flagList}) -contains $token) {`);
      lines.push(`${indent}        $skipNext = $true`);
      lines.push(`${indent}        continue`);
      lines.push(`${indent}    }`);
      lines.push(`${indent}    if ($toke

skipNext = $false`);
    lines.push(`${indent}        continue`);
    lines.push(`${indent}    }`);
    lines.push(`${indent}    $token = $tokens[$i]`);

    if (valueFlags.length > 0) {
      const flagList = valueFlags.map((flag) => `"${flag}"`).join(',


t string, port uint16, userIDs []string) (*core.Record, error) {
// 	systemCollection, err := app.FindCollectionByNameOrId("systems")
// 	if err != nil {
// 		return nil, err
// 	}

// 	system := core.NewRecord(systemCollection)
// 	system.Set("name", name

/ 	system.Set("port", port)
// 	system.Set("users", userIDs)
// 	system.Set("status", "pending")

// 	return system, app.Save(system)
// }

// Helper function to create a fingerprint record
func createConfigTestFingerprint(app core.App, systemID, token, fi


 backup was incomplete, continuing with installation..."
      fi

      return 1

    fi
  fi

  [ -f "$boot" ] && hasData && return 0

  [ ! -f "$iso" ] && return 1
  [ ! -s "$iso" ] && return 1

  # Check if the ISO was already processed by our script

=1 status=none | tr -d '\000')
  magic="$(printf '%s' "$magic" | od -A n -t x1 -v | tr -d ' \n')"
  local byte="16"
  enabled "$MANUAL" && byte="17"

  if [[ "$magic" != "$byte" ]]; then

    info "The ISO will be processed again because the configuration


!= nil {
			log.Fatalf("failed to fetch robots.txt from URL: %v", err)
		}
		defer resp.Body.Close() //nolint:errcheck
		input = resp.Body
	} else {
		file, err := os.Open(*inputFile)
		if err != nil {
			log.Fatalf("failed to open input file: %v", err)

	}
		}()
		input = file
	}

	// Parse robots.txt
	rules, err := parseRobotsTxt(input)
	if err != nil {
		log.Fatalf("failed to parse robots.txt: %v", err)
	}

	// Convert to Anubis rules
	anubisRules := convertToAnubisRules(rules)

	// Check if any rules w

}
		defer func() {
			if err := file.Close(); err != nil {
				log.Fatalf("can't close output file %s: %v", file.Name(), err)


geSystem.cache_clear()
            StorageSystemMixin._get_base_url.cache_clear()

            storage_b = SQLiteStorageSystem(storage_file=db_path, url="https://site-b.com")
            assert storage_b.retrieve("shared-id") is None
        finally:

>

Text

")
        storage.save(element, "path-test")

        result = storage.retrieve("path-test")
        assert result is not None
        assert "path" in result
        # Path should be a list of tag names from roo

       storage_a.close()
            storage_b.close()
            if os.path.exists(db_path):
                os.unlink(db_path)

    def test_element_path_is_stored(self):
        storage = self._make_storage()
        element = self._make_element("<html


ataState> {
  return parseStoreMetadataState(
    await fs.readFile(getStoreMetadataPath(storeRoot), 'utf-8')
  );
}

export async function readOptionalStoreMetadataState(
  storeRoot: string
): Promise<StoreMetadataState | null> {
  try {
    return await

isFileNotFoundError(error)) {
      return null;
    }

    throw error;
  }
}

export async function writeStoreMetadataState(
  storeRoot: string,
  state: StoreMetadataState
): Promise<void> {
  await FileSystemUtils.writeFile(
    getStoreMetadataPath(s

 readStoreMetadataState(storeRoot);
  } catch (error) {
    if (


                    if not session._is_alive:
                        await session.__aenter__()

            if isinstance(session, FetcherSession):
                client = session._client

                if isinstance(client, _ASyncSessionLogic):

        url=request.url,
                        **kwargs,
                    )
                else:
                    # Sync session or other types - shouldn't happen in async context
                    raise TypeError(f"Session type {type(client)} n

               kwargs = request._session_kwargs.copy()
                    method = cast(SUPPORTED_HTTP_METHODS, kwargs.pop("method", "GET"))
                    response = await client._make_request(
                        method=method,


ABSOLUTELY IMPOSSIBLE to continue.
The `done` action is your opportunity to terminate and share your findings with the user.
- Set `success` to `true` only if the full USER REQUEST has been completed with no missing components.
- If any part of the request

- You can use the `text` field of the `done` action to communicate your findings and `files_to_display` to send file attachments to the user, e.g. `["results.md"]`.
- Put ALL the relevant information you found so far in the `text` field when you call `don

is missing, incomplete, or uncertain, set `success` to `false`.


ict.get("den"))

    def do_func(self, elm):
        """
        the Function-Apply object (Examples:sin cos)
        """
        c_dict = self.process_children_dict(elm)
        func_name = c_dict.get("fName")
        return func_name.replace(FUNC_PLACE,

 latex_chars.append(FUNC[t])
                else:
                    raise NotImplementedError("Not support func %s" % t)
            else:
                latex_chars.append(t)
        t = BLANK.join(latex_chars)
        return t if FUNC_PLACE in t else

c_dict.get("e"))

    def do_fname(self, elm):
        """
        the func name
        """
        latex_chars = []
        for stag, t, e in self.process_children_list(elm):
            if stag == "r":
                if FUNC.get(t):


from '@jackwener/opencli/registry';
import {
    OPENALEX_BASE,
    appendMailto,
    bareDoi,
    bareId,
    openalexFetch,
    reconstructAbstract,
    requireWorkRef,
} from './utils.js';

const SELECT_FIELDS = [
    'id', 'doi', 'title', 'publication_

', 'related_works', 'language', 'abstract_inverted_index',
].join(',');

cli({
    site: 'openalex',
    name: 'work',
    access: 'read',
    description: 'Fetch a single OpenAlex Work (paper / preprint / book) — metadata + abstract',
    domain: 'api.ope

year', 'publication_date',
    'cited_by_count', 'authorships', 'primary_location', 'open_access', 'type',
    'referenced_works


/
// When a tool implements both a standard and an enhanced interface, ToolsNode
// prioritises the enhanced interface.
type EnhancedInvokableTool interface {
	BaseTool
	InvokableRun(ctx context.Context, toolArgument *schema.ToolArgument, opts ...Option) (

 EnhancedStreamableTool is the streaming variant of [EnhancedInvokableTool].
//
// It streams [schema.ToolResult] chunks, enabling incremental multimodal
// output. The caller is responsible for closing the returned [schema.StreamReader].
type EnhancedStre


(conversation_id, evicted, carry_over)
    }
}

/// A simple thread-safe in-memory [`ConversationMemory`] backed by a `HashMap`.
///
/// Messages are stored in process memory only and lost on restart. Useful for
/// tests, examples, and short-lived agents.

`] to apply a history-shaping
/// transformation on every load (truncation, summarization, re-ordering, etc.).
/// Reusable named policies live in the `rig-memory` companion crate.
#[derive(Clone, Default)]
pub struct InMemoryConversationMemory {
    inner

 Pass a closure to
/// [`InMemoryConversationMemory::with_filter


						// Still validate basic properties
									if (content instanceof TextResourceContents textContent) {
										assertThat(textContent.text()).isNotNull();
									}
									else if (content instanceof BlobResourceContents blobContent) {

}
							}
						}
					}
				})
				.verifyComplete();
		});
	}

	@Test
	void testListResourceTemplatesWithoutInitialization() {
		verifyCallSucceedsWithImplicitInitialization(client -> client.listResourceTemplates(McpSchema.FIRST_PAGE),
				"listing reso

	assertThat(blobContent.blob()).isNotNull();
									}


 }
)

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

 data-slot="alert-title"
      className={cn(
        "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
        className
      )}
      {...props}
    />
  )
}

function AlertDescription

  {...props}
    />
  )
}

function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div


ry   = index_size == 2 ? 8 : 4;
      U32 stream_count_max       = (directory_size - 4) / size_of_stream_entry;
      U32 stream_count__inner    = ClampTop(stream_count_raw, stream_count_max);
      U32 all_stream_entries_off = 4;
      U32 all_indices_off

   stream_count = stream_count__inner;
      streams      = push_array_no_zero(arena, MSF_RawStream, stream_count);

      // iterate sizes and indices in lock step
      U32            entry_cursor = all_stream_entries_off;
      U32            inde

        = all_stream_entries_off + (stream_count__inner * size_of_stream_entry);

      // set output buffer and count


/';
export const STRATEGY = 'cookie';
export const PRIMARY_PRICE_SELECTORS = [
    '#corePrice_feature_div .a-offscreen',
    '#corePriceDisplay_desktop_feature_div .a-offscreen',
    '#corePrice_desktop .a-offscreen',
    '#apex_desktop .a-offscreen',

    '#priceblock_ourprice',
    '#priceblock_dealprice',
    '#tp_price_block_total_price_ww',
];
const ROBOT_TEXT_PATTERNS = [
    'Sorry, we just need to make sure you\'re not a robot',
    'Enter the characters you see below',
    'Type the characters y

 '#newAccordionRow_0 .a-offscreen',
    '#price_inside_buybox',


l: mcpUrl(auth) }, auth),
    },
    rule: {
      kind: "append",
      file: (scope) => (scope === "global" ? join(homedir(), ".gemini", "GEMINI.md") : "GEMINI.md"),
      sectionMarker: "<!-- context7 -->",
    },
    skill: {
      name: "context7-mcp"

detect: {
      projectPaths: [".agent"],
      globalPaths: [join(homedir(), ".gemini", "antigravity"), join(homedir(), ".agent")],
    },
  },

  gemini: {
    name: "gemini",
    displayName: "Gemini CLI",
    mcp: {
      projectPaths: [join(".gemini",

,
      dir: (scope) =>
        scope === "global" ? join(homedir(), ".agent", "skills") : join(".agent", "skills"),
    },


total === 0) {
    spinner?.warn(`No documentation found for: "${query}"`);
    if (!spinner) log.warn(`No documentation found for: "${query}"`);
    return;
  }

  spinner?.stop();

  if (options.json) {
    console.log(JSON.stringify(ctx, null, 2));

const snippet of ctx.codeSnippets) {
      log.plain(pc.bold(snippet.codeTitle));
      if (snippet.codeDescription) log.dim(snippet.codeDescription);
      log.blank();
      for (const code of snippet.codeList) {
        log.plain("```" + code.language);

return;
  }

  log.blank();

  if (ctx.codeSnippets) {
    for (


o is not None:
            raise MissingDependencyException(
                MISSING_DEPENDENCY_MESSAGE.format(
                    converter=type(self).__name__,
                    extension=".xls",
                    feature="xls",
                )

_exc_info[
                1
            ].with_traceback(  # type: ignore[union-attr]
                _xls_dependency_exc_info[2]
            )

        sheets = pd.read_excel(file_stream, sheet_name=None, engine="xlrd")
        md_content = ""
        fo


on't cause errors"""
        proxies = [f"http://p{i}:8080" for i in range(10)]
        rotator = ProxyRotator(proxies)
        results = []

        def get_proxies(n):
            for _ in range(n):
                results.append(rotator.get_proxy())

       assert all(p in proxies for p in results)

    def test_thread_pool_concurrent_access(self):
        """Test concurrent access using ThreadPoolExecutor"""
        proxies = ["http://p1:8080", "http://p2:8080", "http://p3:8080"]
        rotator = Pro

      threads = [Thread(target=get_proxies, args=(100,)) for _ in range(10)]
        for t in threads:
            t.start()
        for t in threads:
            t.join()

        # All results should be valid proxies
        assert len(results) == 1000


0), CLAY_SIZING_FIT(.min = windowHeight - 50) }, .childAlignment = {0, CLAY_ALIGN_Y_CENTER}, .padding = { 82, 82, 32, 32 }, .childGap = 64 }, .backgroundColor = COLOR_RED }) {
        CLAY(CLAY_ID("DebuggerLeftText"), { .layout = { .sizing = { CLAY_SIZING_

DebuggerSpacer"), { .layout = { .sizing = { CLAY_SIZING_GROW(.max = 16) }} }) {}
            CLAY_TEXT(CLAY_STRING("Clay includes built in \"Chrome Inspector\"-style debug tooling."), CLAY_TEXT_CONFIG({ .fontSize = 28, .fontId = FONT_ID_BODY_36, .textColor

PERCENT(0.5) }, .layoutDirection = CLAY_TOP_TO_BOTTOM, .childGap = 8 } }) {
            CLAY_TEXT(CLAY_STRING("Integrated Debug Tools"), CLAY_TEXT_CONFIG({ .fontSize = 52, .fontId = FONT_ID_TITLE_56, .textColor = COLOR_LIGHT }));
            CLAY(CLAY_ID("


/www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>https://example.com/en/page</loc>
    <xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/page"/>
    <xhtml:link rel="alternate"

></sitemap>
  <sitemap><loc>https://example.com/products-sitemap.xml</loc></sitemap>
  <sitemap><loc>https://example.com/skip-sitemap.xml</loc></sitemap>
</sitemapindex>
"""

def _make_response(body: bytes, url: str = "https://example.com/sitemap.xml", hea

 hreflang="de" href="https://example.com/de/page"/>
  </url>
</urlset>
"""

INDEX_XML = b"""<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap><loc>https://example.com/posts-sitemap.xml</loc


'.agents') / 'skills' / 'browser-use' / 'SKILL.md',
	Path('.claude') / 'skills' / 'browser-use' / 'SKILL.md',
	Path('.codex') / 'skills' / 'browser-use' / 'SKILL.md',
	Path('.copilot') / 'skills' / 'browser-use' / 'SKILL.md',
	Path('.cursor') / 'skills' /

 'bin'
	bin_dir.mkdir()

	uv = bin_dir / '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',

'browser-use' / 'SKILL.md',
	Path('.gemini') / 'skills' / 'browser-use' / 'SKILL.md',
	Path('.config') / 'opencode' / 'skills' / 'browser-use' / 'SKILL.md',
)

def _fake_browser_harness_tools(tmp_path: Path, skill_text: str) -> Path:
	bin_dir = tmp_path /