want to marshal the output by yourself, you can use this option.
func WithMarshalOutput(m MarshalOutput) Option {
	return func(o *toolOptions) {
		o.m = m
	}
}

// SchemaModifierFn is the schema modifier function for inferring tool parameter from tagged go

// 1. jsonTagName: the name defined in the json tag. Specifically, the last 'jsonTagName' visited is fixed to be '_root', which represents the entire go struct. Also, for array field, both the field itself and the element within the array will trigger this

 struct.
// Within this function, end-user can parse custom go struct tags into corresponding json schema field.
// Parameters:


./hooks/ponytail-instructions.js");

export { filterSkillBodyForMode };
export const readDefaultMode = getDefaultMode;
export const readQuietStartup = getQuietStartup;

const RUNTIME_MODE_LIST = RUNTIME_MODES.join("|");
const PONYTAIL_COMMAND_DESCRIPTION =

fallback;

  for (let i = entries.length - 1; i >= 0; i -= 1) {
    const entry = entries[i];
    if (entry?.type !== "custom" || entry?.customType !== "ponytail-mode") continue;

    const mode = normalizePersistedMode(entry?.data?.mode);
    if (mode) re

 `Set mode: ${RUNTIME_MODE_LIST}. Commands: status, default <mode>`;

export function resolveSessionMode(entries, fallbackMode = DEFAULT_MODE) {
  const fallback = normalizePersistedMode(fallbackMode) || DEFAULT_MODE;
  if (!Array.isArray(entries)) return


 const out = runInit(tmp);
  // 6 repo rule files skipped-already-installed + openclaw skipped (no workspace)
  assert.match(out, /7 skipped/);
  assert.doesNotMatch(out, /[1-9]\d* added/);
});

test('append mode: existing AGENTS.md gets caveman appended (

);
  const agents = fs.readFileSync(path.join(tmp, 'AGENTS.md'), 'utf8');
  assert.match(agents, /Do not delete me/);
  assert.match(agents, /Respond terse like smart caveman/);
});

test('skip mode: existing .cursor rule is not overwritten without --force

not replaced)', (tmp) => {
  fs.writeFileSync(path.join(tmp, 'AGENTS.md'), '# My project\n\nDo not delete me.\n');
  runInit(tmp


ns import MissingDependencyException, MISSING_DEPENDENCY_MESSAGE
from .._stream_info import StreamInfo

# Try loading optional (but in this case, required) dependencies
# Save reporting of any exceptions for later
_xlsx_dependency_exc_info = None
try:

dependency_exc_info = sys.exc_info()

ACCEPTED_XLSX_MIME_TYPE_PREFIXES = [
    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
]
ACCEPTED_XLSX_FILE_EXTENSIONS = [".xlsx"]

ACCEPTED_XLS_MIME_TYPE_PREFIXES = [
    "application/vnd.ms-exce

import pandas as pd
    import openpyxl  # noqa: F401
except ImportError:
    _xlsx_dependency_exc_info = sys.exc_info()

_xls_dependency_exc_info = None
try:
    import pandas as pd  # noqa: F811
    import xlrd  # noqa: F401
except ImportError:
    _xls_


ion.get(self.basic_url, impersonate=request_browsers)
            assert response.status == 200

class TestImpersonateTypeValidation:
    """Test type validation for impersonate parameter."""

    def test_impersonate_accepts_string(self):
        """Test

not raise any type errors
        session = FetcherSession(impersonate="chrome")
        assert session._default_impersonate == "chrome"

    def test_impersonate_accepts_list(self):
        """Test that impersonate accepts list type."""
        # This sho

 that impersonate accepts string type."""
        # This should


 => {
    const normalized = String(args || "").trim();
    const message = normalized ? `${skillName} ${normalized}` : skillName;

    if (ctx?.isIdle?.() === false) {
      pi.sendUserMessage(message, { deliverAs: "followUp" });
      ctx?.ui?.notify?.(`

.`, "info");
      return;
    }

    pi.sendUserMessage(message);
  };

  pi.registerCommand("ponytail", {
    description: PONYTAIL_COMMAND_DESCRIPTION,
    handler: async (args, ctx) => {
      const parsed = parsePonytailCommand(args, configuredDefault


unt', 'authorships', 'primary_location', 'open_access', 'type',
    'referenced_works', 'related_works', 'language', 'abstract_inverted_index',
].join(',');

cli({
    site: 'openalex',
    name: 'work',
    access: 'read',
    description: 'Fetch a single

 DOI ("10.7717/peerj.4375"), or full URL' },
    ],
    columns: ['id', 'title', 'type', 'year', 'date', 'language', 'authors', 'venue', 'citations', 'openAccess', 'openAccessUrl', 'referencedCount', 'doi', 'abstract', 'url'],
    func: async (args) => {

 OpenAlex Work (paper / preprint / book) — metadata + abstract',
    domain: 'api.openalex.org',
    strategy: Strategy.PUBLIC,
    browser: false,
    args: [
        { name: 'id', positional: true, required: true, help: 'OpenAlex Work id ("W2741809807"),


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

       rank,
        id: note.id,
        title: note.title,
        published_at: findDetailValue(rows, 'published_at') || note.date,
        views: findDetailValue(rows, '观看数') || String(note.views),
        likes: findDetailValue(rows, '点赞数') || String(

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


roxy == "http://p1:8080"
        assert next_idx == 1

        proxy, next_idx = cyclic_rotation(proxies, 1)
        assert proxy == "http://p2:8080"
        assert next_idx == 2

        proxy, next_idx = cyclic_rotation(proxies, 2)
        assert proxy =

 that cyclic_rotation handles index overflow"""
        proxies = ["http://p1:8080", "http://p2:8080"]

        # Index larger than list length should wrap
        proxy, next_idx = cyclic_rotation(proxies, 5)
        assert proxy == "http://p2:8080"  # 5

= "http://p3:8080"
        assert next_idx == 0  # Wraps around

    def test_cyclic_rotation_wraps_index(self):
        """Test


];
		var consumer2Called = new boolean[1];
		var rootsContent = new List[1];

		var multipleConsumersServer = prepareSyncServerBuilder().serverInfo("test-server", "1.0.0")
			.rootsChangeHandlers(List.of((exchange, roots) -> {
				consumer1Called[0] = true

		}, (exchange, roots) -> consumer2Called[0] = true))
			.build();

		assertThat(multipleConsumersServer).isNotNull();
		assertThatCode(multipleConsumersServer::closeGracefully).doesNotThrowAnyException();
		onClose();

		// Test error handling
		var error


data
      rc = sqlite3_prepare_v2(db,
        "UPDATE v_chunks SET validity = ? WHERE rowid = 1", -1, &stmt, NULL);
      if (rc == SQLITE_OK) {
        sqlite3_bind_blob(stmt, 1, payload, payload_size, SQLITE_STATIC);
        sqlite3_step(stmt);

      // Corrupt _chunks rowids blob with fuzz data
      rc = sqlite3_prepare_v2(db,
        "UPDATE v_chunks SET rowids = ? WHERE rowid = 1", -1, &stmt, NULL);
      if (rc == SQLITE_OK) {
        sqlite3_bind_blob(stmt, 1, payload, payload_size, SQLITE

sqlite3_finalize(stmt);
      }
      break;
    }
    case 1: {


d: int = 1):
	analyzer = LandingPageAnalyzer(debug=debug)

	try:
		if ad_id == 1:
			print(f'🚀 Analyzing {url} for {mode.capitalize()} ad...')
			page_data = await analyzer.analyze_landing_page(url, mode=mode)
		else:
			analyzer_temp = LandingPageAnalyzer

_page(url, mode=mode)

		generator = AdGenerator(mode=mode)

		if mode == 'instagram':
			prompt = generator.create_ad_prompt(page_data['analysis'])
			ad_content = await generator.generate_ad_image(prompt, page_data.get('screenshot_path'))
			if ad_conten

(debug=debug)
			page_data = await analyzer_temp.analyze_landing


ND_REGISTRY.find((entry) => entry.name === 'store')?.description ??
    'Create and manage stores - standalone OpenSpec repos you register on this machine';
  const store = program.command('store').description(storeGroupDescription);

  store
    .command(

   .option('--no-init-git', 'Skip every Git action: no init, no initial commit')
    .option('--remote <url>', 'Canonical clone source recorded in store.yaml')
    .option('--json', 'Output as JSON')
    .action(async (id: string | undefined, options: Stor

'setup [id]')
    .description('Create and register a local store')
    .option('--path <path>', 'Folder where the store should live (for example ~/openspec/<id>)')
    .option('--init-git', 'Initialize a Git repository with an initial commit (default)')


on_model()
		actions = [
			ActionModel.model_validate({'go_back': {}}),
			ActionModel.model_validate({'scroll': {'down': True, 'pages': 1}}),
		]

		mock_llm = create_mock_llm()
		agent = Agent(task='test', llm=mock_llm, browser_session=browser_session,

----------------------
# 3. Runtime guard — click on link changes URL, remaining actions skipped
# ---------------------------------------------------------------------------

class TestRuntimeGuard:
	"""Verify that URL/focus changes detected at runtime a

tools=tools)

		results = await agent.multi_act(actions)

		# go_back should terminate the sequence — only 1 result
		assert len(results) == 1, f'Expected 1 result but got {len(results)}: {results}'

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


der files, `#include`, and CMake dependency management.

- Modules are the fundamental organizational unit of code within crates
    - Each source file (.rs) is its own module, and can create nested modules using the ```mod``` keyword.
    - All types in a

 as ```pub``` (public). The scope of ```pub``` can be further restricted to ```pub(crate)```, etc
    - Even if a type is public, it doesn't automatically become visible within the scope of another module unless it's imported using the ```use``` keyword. C

(sub-) module are **private** by default, and aren't externally visible within the same crate unless they are explicitly marked


OOT, 'bin', 'lib', 'openclaw.js'));
  const dir = freshTmpDir();
  const soul = path.join(dir, 'SOUL.md');
  try {
    fs.writeFileSync(soul, 'before\n' + helper.MARK_END + '\nafter\n');
    const s = helper.stripBootstrapFromSoul(soul);
    assert.equal(s

 = fs.readFileSync(soul, 'utf8');
    assert.match(after, /before/);
    assert.match(after, /after/);
    assert.doesNotMatch(after, /caveman-end/);
  } finally {
    fs.rmSync(dir, { recursive: true, force: true });
  }
});

test('openclaw: append on a w


ub const GROK_2_1212: &str = "grok-2-1212";
pub const GROK_2_VISION_1212: &str = "grok-2-vision-1212";
pub const GROK_3: &str = "grok-3";
pub const GROK_3_FAST: &str = "grok-3-fast";
pub const GROK_3_MINI: &str = "grok-3-mini";
pub const GROK_3_MINI_FAST:

&str = "grok-3-mini-fast";
pub const GROK_2_IMAGE_1212: &str = "


  force user = root"
    echo "    force group = root"
    echo "    force create mode = 0666"
    echo "    force directory mode = 02777"
    echo ""
    echo "    # Disable printing services"
    echo "    load printers = no"
    echo "    printing = bsd

/dev/null"
    echo "    disable spoolss = yes"
  } > "$SAMBA_CONFIG"; then
    error "Failed to write Samba config \"$SAMBA_CONFIG\" !"
    return 1
  fi

  return 0
}

selectPrimaryShare() {

  local tmp="/tmp/smb"

  if ! rm -rf "$tmp"; then
    error "


  # Options to pass to the converter
    ) -> DocumentConverterResult:
        # Load the dependencies
        if _xls_dependency_exc_info is not None:
            raise MissingDependencyException(
                MISSING_DEPENDENCY_MESSAGE.format(

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

        sheets = pd.read_excel(file_stream, sheet_name=None, engine="

             converter=type(self).__name__,
                    extension=".xls",
                    feature="xls",


            ],
        }), validArgs)).rejects.toBeInstanceOf(CommandExecutionError);
    });

    it('uploads validated local images through the discovered file input', async () => {
        const page = makePage({
            evaluateResults: [

, url: 'https://www.goofish.com/item?id=123456789012' },
            ],
        });

        await publishCommand.func(page, { ...validArgs, images: 'a.png,b.webp' });

        expect(page.setFileInput).toHaveBeenCalledWith(['/abs/a.png', '/abs/b.webp'], '

        { hasPublishForm: true },
                { ok: true },
                { ok: true, missing: [] },
                { ok: true, selector: '[id="upload"]' },
                { ok: true },
                { status: 'published', item_id: '123456789012'


             echo second
            shell: sh
            pass_filenames: false
            verbose: true
    "});
    context.git_add(".");

    cmd_snapshot!(context.filters(), context.run(), @r"
    success: true
    exit_code: 0
    ----- stdout -----

..............................................Passed
    - hook id: shell-script
    - duration: [TIME]

      first
      second

    ----- stderr -----
    ");
}

#[cfg(unix)]
#[test]
fn shell_entry_receives_hook_args_before_filenames() -> anyhow::Result


     params["max_pages"] = params.pop("__max_pages")

        config = validate(params, model=model)
        self._headers_keys = (
            {header.lower() for header in config.extra_headers.keys()} if config.extra_headers else set()
        )

Tuple | None = None) -> None:
        config: PlaywrightConfig | StealthConfig = self._config
        self._context_options.update(
            {
                "proxy": config.proxy,
                "locale": config.locale,
                "timezone_id":

 return config

    def __generate_options__(self, extra_flags:


ion.fetch(urls["basic"])

    async def test_page_pool_management(self, urls):
        """Test page pool creation and reuse"""
        async with AsyncDynamicSession() as session:
            # The first request creates a page
            response = await

            # The second request should reuse the page
            response = await session.fetch(urls["html"])
            assert response.status == 200
            assert session.page_pool.pages_count == 0

            # Check pool stats

session.fetch(urls["basic"])
            assert response.status == 200
            assert session.page_pool.pages_count == 0


YPE.PLACEHOLDER

    def __init__(self):
        xml = (
            '<p:pic xmlns:p="http://schemas.openxmlformats.org/'
            'presentationml/2006/main" xmlns:a="http://schemas.'
            'openxmlformats.org/drawingml/2006/main" xmlns:r="http://

:ext uri="{96DAC541-7B7A-'
            '43D3-8B79-37D633B846F1}"><asvg:svgBlip r:embed="rId9"/></a:ext>'
            "</a:extLst></a:blip></p:pic>" % _SVG_NS
        )
        self._element = etree.fromstring(xml)
        self.part = _FakePart()

    @prop

'
            'schemas.openxmlformats.org/officeDocument/2006/relationships" '
            'xmlns:asvg="%s"><a:blip><a:extLst><a


 || message.includes('Target closed')) {
            throw new CommandExecutionError(`amazon ${action} navigation lost the current browser target`, `${buildChallengeHint(action)} If CDP is attached to a stale tab, open a fresh Amazon tab and retry.`);

}
export function assertUsableState(state, action) {
    if (!isRobotState(state))
        return;
    throw new CommandExecutionError(`amazon ${action} hit a robot check`, buildChallengeHint(action));
}
export const __test__ = {
    buildSearchUrl,
    e


lower()
        extension = (stream_info.extension or "").lower()

        if extension in _get_file_extensions(self._file_types):
            return True

        for prefix in _get_mime_type_prefixes(self._file_types):
            if mimetype.startswith(

True

        return False

    def _analysis_features(self, stream_info: StreamInfo) -> List[str]:
        """
        Helper needed to determine which analysis features to use.
        Certain document analysis features are not available for
        offi


exit 0 ;;
    *) echo "unknown argument: $1" >&2; usage >&2; exit 2 ;;
  esac
done

# Desktop fallback keeps the legacy item name unless one was named explicitly.
if [ -n "$ACCOUNT" ] && [ "$ITEM_EXPLICIT" -eq 0 ]; then
  ITEM="npmjs"
fi

if [ -z "${TMUX:-

 || { echo "package.json not found in current directory" >&2; exit 2; }

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PACKAGE_DIR="$PWD"
WORK="$(mktemp -d /tmp/npm-publish.XXXXXX)"
NPMRC="$WORK/npmrc"
# shellcheck disable=SC2329 # invoked via

}" ]; then
  echo "refusing to run: npm auth must stay inside one persistent tmux session" >&2
  exit 2
fi

for bin in op jq node npm; do
  command -v "$bin" >/dev/null 2>&1 || { echo "missing required binary: $bin" >&2; exit 2; }
done
test -f package.json


e serde::{Deserialize, Serialize};

#[derive(Deserialize, Serialize, Debug)]
struct LogEntry {
    timestamp: String,
    level: String,
    message: String,
}

fn parse_log_entries(json_str: &str) -> Result<Vec<LogEntry>, Box<dyn std::error::Error>> {

-8: Async Programming and Concurrency**
- `async`/`await` similarities and differences
- Channels for communication
- Thread safety guarantees

**Recommended projects:**
```rust
// Week 5-6: Generic data processor
trait DataProcessor<T> {
    type Output;

 let entries: Vec<LogEntry> = serde_json::from_str(json_str)?;
    Ok(entries)
}
```

### Month 2: Practical Applications
**Week 5-6: Traits and Generics**
- Trait system vs interfaces
- Generic constraints and bounds
- Common patterns and idioms

**Week 7


L_MODEL), |builder| builder)
                .await
                .expect("streaming structured output after tool should succeed");
        },
    )
    .await;
}

#[tokio::test]
async fn structured_extraction_roundtrip() {
    with_doubleword_cassette("

  structured_extraction(client.completion_model(DEFAULT_MODEL))
            .await
            .expect("structured extraction should succeed");
    })
    .await;
}

#[tokio::test]
async fn tool_choice_modes_roundtrip() {
    with_doubleword_cassette("conf

conformance/structured_extraction", |client| async move {


ession, tools=tools)

		results = await agent.multi_act(actions)

		# go_back should terminate the sequence — only 1 result
		assert len(results) == 1, f'Expected 1 result but got {len(results)}: {results}'

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

 3. Runtime guard — click on link changes URL, remaining actions skipped
# ---------------------------------------------------------------------------

class TestRuntimeGuard:
	"""Verify that URL/focus changes detected at runtime abort remaining actions."


l
		errContains string
		setup       func() error
		cleanup     func() error
	}{
		{
			name: "tcp port only",
			config: ServerOptions{
				Network: "tcp",
				Addr:    ":45987",
				Keys:    []gossh.PublicKey{sshPubKey},
			},
		},
		{
			name: "tcp with

,
			},
		},
		{
			name: "tcp with ipv6",
			config: ServerOptions{
				Network: "tcp6",
				Addr:    "[::1]:45989",
				Keys:    []gossh.PublicKey{sshPubKey},
			},
		},
		{
			name: "unix socket",
			config: ServerOptions{
				Network: "unix",
				Addr:

 ipv4",
			config: ServerOptions{
				Network: "tcp4",
				Addr:    "127.0.0.1:45988",
				Keys:    []gossh.PublicKey{sshPubKey}


b hellolib
```

## Exercise: Using workspaces and package dependencies
- Take a look at the generated Cargo.toml in ```hello``` and ```hellolib```. Notice that both of them have been added to the upper level ```Cargo.toml```
- The presence of ```lib.rs```

../hellolib"}
```
- Using ```add()``` from ```hellolib```
```rust
fn main() {
    println!("Hello, world! {}", hellolib::add(21, 21));
}
```

<details><summary>Solution (click to expand)</summary>

The complete workspace setup:

```bash
# Terminal commands

in ```hellolib``` implies a library package (see https://doc.rust-lang.org/cargo/reference/cargo-targets.html for customization options)
- Adding a dependency on ```hellolib``` in ```Cargo.toml``` for ```hello```
```toml
[dependencies]
hellolib = {path = "


> Result<()> {
        let dir = tempdir()?;
        let content = br#"<?xml version="1.0" encoding="UTF-8"?>
<root>
    <element><![CDATA[Some <special> characters & symbols]]></element>
</root>"#;
        let file_path = create_test_file(&dir, "cdata.xml

::new(""), &file_path).await?;
        assert_eq!(code, 0);
        assert!(output.is_empty());
        Ok(())
    }

    #[tokio::test]
    async fn test_valid_xml_with_comments() -> Result<()> {
        let dir = tempdir()?;
        let content = br#"<?x

", content).await?;
        let (code, output) = check_file(Path


he stdin 'error' handler in caveman-mode-tracker.js.
// Covers issue #538: an abnormal stdin close (broken pipe, parent crash) emits
// an 'error' event on process.stdin; without a listener Node throws it as an
// uncaught exception and the hook exits non-

//
// Run: node tests/test_mode_tracker_stdin.js

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

const HOOK_PATH = path.resolve(__dirname,


 markUpdateNotificationShown = vi.fn();
const shouldShowUpdateNotification = vi.fn();
const shouldSkipUpdateNotifier = vi.fn();
const confirm = vi.fn();
const spawn = vi.fn();

vi.mock("../utils/tracking.js", () => ({
  trackEvent: (...args: unknown[]) =>

) => ({
  checkForUpdates: (...args: unknown[]) => checkForUpdates(...args),
  getUpgradePlan: (...args: unknown[]) => getUpgradePlan(...args),
  markUpdateNotificationShown: (...args: unknown[]) => markUpdateNotificationShown(...args),
  shouldShowUpdateN

trackEvent(...args),
}));

vi.mock("../utils/update-check.js", (


height})")
        }
        Message::Quit => println!("Quitting"),
        Message::Move { x, y } => println!("Moving to ({x}, {y})"),
    }
}
```

***

## Exhaustive Pattern Matching

### Python's match — Not Exhaustive
```python
# Python — the wildcard

1:
            return "one"
        # If you forget the default, Python returns None silently.
        # No warning, no error.

describe(42)  # Returns None — a silent bug
```

### Rust's match — Compiler-Enforced
```rust
// Rust — MUST handle every possib

case is optional, no compiler help
def describe(value):
    match value:
        case 0:
            return "zero"
        case


ath.join(process.env.CLAUDE_PLUGIN_ROOT, 'skills', 'caveman', 'SKILL.md'));
}
skillCandidates.push(
  path.join(__dirname, '..', '..', 'skills', 'caveman', 'SKILL.md'),
  path.join(__dirname, '..', 'skills', 'caveman', 'SKILL.md')
);

let skillContent = ''

 (e) { /* try next candidate */ }
}

let output;

if (skillContent) {
  // Strip YAML frontmatter
  const body = skillContent.replace(/^---[\s\S]*?---\s*/, '');

  // Filter intensity table: keep header rows + only the active level's row
  const filtered =

;
for (const candidate of skillCandidates) {
  try {
    skillContent = fs.readFileSync(candidate, 'utf8');
    break;
  } catch


pic/claude-sonnet-4-5",
  "theme": "dark",
}
`);

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

    const cfg =

', 'user model setting wiped');
    assert.equal(cfg.theme, 'dark', 'user theme setting wiped');
    assert.ok(cfg.plugin.includes('./plugins/caveman/plugin.js'), 'plugin entry missing');
  } finally {
    fs.rmSync(xdg, { recursive: true, force: true });

JSON.parse(fs.readFileSync(path.join(ocDir, 'opencode.json'), 'utf8'));
    assert.equal(cfg.model, 'anthropic/claude-sonnet-4-5


ettings = JSON.parse(raw);
  const cmd = settings.statusLine && settings.statusLine.command;
  // Only remove the parts ponytail owns. If the user combined statuslines
  // (e.g. caveman && ponytail), keep the other plugin's command intact.
  // ponytail:

  // piping statuslines together is on their own.
  if (typeof cmd === 'string' && cmd.includes(STATUSLINE_SCRIPT)) {
    const parts = cmd
      .split(/&&|;/)
      .map((s) => s.trim())
      .filter(Boolean);
    const others = parts.filter((s) => !s.i

splits on && / ; to detect other segments — good enough; a user


   setMode(parsed.mode, ctx);
        return;
      }

      ctx?.ui?.notify?.("Unknown or unsupported /ponytail mode.", "warning");
    },
  });

  pi.registerCommand("ponytail-review", {
    description: "Run /skill:ponytail-review",
    handler: (_args,

pi.registerCommand("ponytail-audit", {
    description: "Run /skill:ponytail-audit",
    handler: (_args, ctx) => sendAlias("/skill:ponytail-audit", "", ctx),
  });

  pi.registerCommand("ponytail-gain", {
    description: "Run /skill:ponytail-gain",
    h

 ctx) => sendAlias("/skill:ponytail-review", "", ctx),
  });


arAllMocks: the latter keeps implementations, so a
  // mockImplementation set by one test would leak into the next.
  vi.resetAllMocks();
  vi.stubEnv("GITHUB_TOKEN", undefined);
  vi.stubEnv("GH_TOKEN", undefined);
  vi.stubGlobal(
    "fetch",
    vi

   json: () => Promise.resolve({ default_branch: "main" }),
      })
      .mockResolvedValueOnce({
        ok: true,
        json: () => Promise.resolve({ sha: "tree-sha", tree: [], truncated: false }),
      })
  );
});

afterEach(() => {
  vi.unstubAllG

    .fn()
      .mockResolvedValueOnce({
        ok: true,


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

        });
    assertEquals("LONG: -28800000", res.type() + ": " + res);
  }

  @Test(expected = UnsupportedOperationException.class)
  public void testInvalidCall() {
    one.call("invalid", new SelType[] {SelLong.of(123)});
  }

  @Test
  public void te


t in result.markdown

@pytest.mark.parametrize("test_vector", GENERAL_TEST_VECTORS)
def test_convert_data_uri(test_vector):
    """Test the conversion of a data URI."""
    markitdown = MarkItDown()

    data = ""
    with open(os.path.join(TEST_FILES_DIR

b64encode(stream.read()).decode("utf-8")
    mimetype = test_vector.mimetype
    data_uri = f"data:{mimetype};base64,{data}"

    result = markitdown.convert(
        data_uri,
        url=test_vector.url,
    )
    for string in test_vector.must_include:

, test_vector.filename), "rb") as stream:
        data = base64.


      }

        info.persist_env_path();

        reporter.on_install_complete(progress);

        Ok(InstalledHook::Installed {
            hook,
            info: Arc::new(info),
        })
    }

    async fn check_health(&self, _info: &InstallInfo) ->

  filenames: &[&Path],
        reporter: &HookRunReporter,
    ) -> Result<(i32, Vec<u8>)> {
        let progress = reporter.on_run_start(hook, filenames.len());

        let env_dir = hook.env_path().expect("Conda must have env path");
        let new_pat

 Result<()> {
        Ok(())
    }

    async fn run(
        &self,
        store: &Store,
        hook: &InstalledHook,


der,
    state: {
      slot: "breadcrumb-link",
    },
  })
}

function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
  return (
    <span
      data-slot="breadcrumb-page"
      role="link"
      aria-disabled="true"
      aria-

cn("font-normal text-foreground", className)}
      {...props}
    />
  )
}

function BreadcrumbSeparator({
  children,
  className,
  ...props
}: React.ComponentProps<"li">) {
  return (
    <li
      data-slot="breadcrumb-separator"
      role="presentat


   let model = client.completion_model(SESSION_MODEL);
            let request = model
                .completion_request(
                    "Answer in one short sentence: what is my favorite color, which label came from the tool, \

should rely on the provided chat history.".to_string())
                .message(Message::user("My favorite color is teal. Please remember it."))
                .message(Message::assistant("Noted: your favorite color is teal."))
                .message(M

 and which release lane did I choose? Do not call any tools.",
                )
                .preamble("You are concise and


hoth(t)
				if _, err := ParseConfig(ctx, fin, fin.Name(), anubis.DefaultDifficulty, "info", false); err != nil {
					t.Fatal(err)
				}
			})

			t.Run("without-thoth", func(t *testing.T) {
				fin, err := os.Open(filepath.Join("..", "config", "testdata"

}
				defer fin.Close() //nolint:errcheck

				if _, err := ParseConfig(t.Context(), fin, fin.Name(), anubis.DefaultDifficulty, "info", false); err != nil {
					t.Fatal(err)
				}
			})
		})
	}
}

func TestBadConfigs(t *testing.T) {
	ctx := thothmock.With

, "good", st.Name()))
				if err != nil {
					t.Fatal(err)


ength && !isRequirementHeader(cursor)) {
    preambleLines.push(sectionBodyLines[cursor]);
    cursor++;
  }

  while (cursor < sectionBodyLines.length) {
    const headerLineCandidate = sectionBodyLines[cursor];
    if (!isRequirementHeader(cursor)) {

 lines until next requirement header or end of section
    const bodyLines: string[] = [headerLineCandidate];
    while (cursor < sectionBodyLines.length && !isRequirementHeader(cursor) && !isTopLevelHeader(cursor)) {
      bodyLines.push(sectionBodyLines[

   // Not a requirement header; skip line defensively
      cursor++;
      continue;
    }
    const headerMatch = headerLineCandidate.match(REQUIREMENT_HEADER_REGEX)!;
    const name = normalizeRequirementName(headerMatch[1]);
    cursor++;
    // Gather


og
  try { fs.unlinkSync(flagPath); } catch (e) {}
  process.stdout.write('OK');
  process.exit(0);
}

// 1. Write flag file (symlink-safe)
recordModeChange(claudeDir, mode); // #601
safeWriteFlag(flagPath, mode);

// 2. Emit full caveman ruleset, filtered

 was too weak — models drifted back to verbose
//    mid-conversation, especially after context compression pruned it away.
//    Full rules with examples anchor behavior much more reliably.
//
//    Reads SKILL.md at runtime so edits to the source of trut

 to the active intensity level.
//    The old 2-sentence summary


t_random_browser(browsers)
        assert result in browsers

    def test_select_random_browser_with_empty_list(self):
        """Test that empty list returns None."""
        result = _select_random_browser([])
        assert result is None

    def test

 _select_random_browser(["chrome"])
        assert result == "chrome"

@pytest_httpbin.use_class_based_httpbin
class TestFetcherWithImpersonateList:
    """Test Fetcher with list-based impersonate parameter."""

    @pytest.fixture(autouse=True)
    def s

_select_random_browser_with_single_item_list(self):
        """Test that single-item list returns that item."""
        result =


eme/host/prefix."""
		from bubus import EventBus

		from browser_use.browser.watchdogs.security_watchdog import SecurityWatchdog

		browser_profile = BrowserProfile(prohibited_domains=['https://wiki.org', 'brave://*'], headless=True, user_data_dir=None)

(browser_profile=browser_profile)
		event_bus = EventBus()
		watchdog = SecurityWatchdog(browser_session=browser_session, event_bus=event_bus)

		# Scheme-specific blocking
		assert watchdog._is_url_allowed('http://wiki.org') is True
		assert watchdog._is_


  .filter(Boolean);
    const others = parts.filter((s) => !s.includes(STATUSLINE_SCRIPT));
    if (others.length === 0) {
      delete settings.statusLine;
      fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2), 'utf8');
      console.log(

 segment from ${settingsPath}`);
    }
  }
} catch (e) {
  if (e.code === 'ENOENT') {
    // no settings.json — nothing to clean
  } else if (e instanceof SyntaxError) {
    // ponytail: malformed settings.json — can't safely edit it; leave intact, warn

`Removed ponytail statusLine entry from ${settingsPath}`);
    } else {
      settings.statusLine.command = others.join(' && ');
      fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2), 'utf8');
      console.log(`Removed ponytail statusLine


(value);
    }
    array.set_trailing(format!("\n{closing_indent}"));
    Value::Array(array)
}

fn json_object_to_inline(values: &serde_json::Map<String, serde_json::Value>) -> InlineTable {
    let mut table = InlineTable::new();
    for (key, value) in

.insert(key.as_str(), value);
    }
    format_inline_table_multiline(&mut table, "    ", "  ");
    table
}

fn format_inline_table_multiline(table: &mut InlineTable, base_indent: &str, closing_indent: &str) {
    let len = table.len();
    if len <= 1 {

values {
        let value = match value {
            serde_json::Value::Array(values) => {
                json_array_to_value_with_indent(values, "      ", "    ", false)
            }
            _ => json_to_toml_value(value),
        };
        table


anceDao, times(1))
        .updateStepInstance(eq(workflowSummary), eq(stepRuntimeSummary), eventCaptor.capture());
    assertEquals(NotificationJobEvent.class, eventCaptor.getValue().getClass());
  }

  @Test
  public void testSyncFailure() {
    doThrow(

       .updateStepInstance(any(), any(), any());
    StepRuntimeSummary stepRuntimeSummary =
        StepRuntimeSummary.builder()
            .stepId("test-summary")
            .stepAttemptId(2)
            .stepInstanceId(1)
            .dbOperation(DbOp

new RuntimeException("test error"))
        .when(instanceDao)


ckground())
		require.False(t, ok)
	})
}

func TestFailoverProxyModel(t *testing.T) {
	t.Run("generate missing context", func(t *testing.T) {
		p := &failoverProxyModel{}
		_, err := p.Generate(context.Background(), []*schema.Message{schema.UserMessage("hi

", func(t *testing.T) {
		p := &failoverProxyModel{}
		_, err := p.Stream(context.Background(), []*schema.Message{schema.UserMessage("hi")})
		require.Error(t, err)
	})

	t.Run("generate routes to current model", func(t *testing.T) {
		var called int32
		t

")})
		require.Error(t, err)
	})

	t.Run("stream missing context


slice(2);
const extra = passthrough.length ? ` (${passthrough.join(' ')})` : '';
console.log(`Publishing ${slugs.length} skills to ClawHub at version ${version}${extra}:`);

for (const slug of slugs) {
  const args = [
    'clawhub', 'skill', 'publish', `.

    ...passthrough,
  ];
  const cmdline = args.map(quote).join(' ');
  console.log(`\n$ ${cmdline}`);
  const res = spawnSync(cmdline, { stdio: 'inherit', cwd: root, shell: true });
  if (res.status !== 0) {
    console.error(
      `\nPublish failed for

openclaw/skills/${slug}`,
    '--slug', slug,
    '--name', displayName(slug),
    '--version', version,
    '--tags', 'latest',


pt.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_title = None if soup.title is

     if body_elm:
            # What's the title
            if title_elm and isinstance(title_elm, bs4.Tag):
                main_title = title_elm.string

            # Convert the page
            webpage_text = f"# {main_title}\n\n" + _CustomMarkdownif


pass

    async def on_close(self) -> None:
        pass

    async def on_error(self, request: Request, error: Exception) -> None:
        pass

    async def on_scraped_item(self, item: Dict[str, Any]) -> Dict[str, Any] | None:
        self.scraped_items

, response) -> bool:
        return False

    async def retry_blocked_request(self, request: Request, response) -> Request:
        return request

    async def start_requests(self) -> AsyncGenerator[Request, None]:
        yield Request("https://example

.append(item)
        return item

    async def is_blocked(self


\/${tag}>`, 'g');
    const results = [];
    let m;
    while ((m = re.exec(xml)) !== null)
        results.push(m[1].trim());
    return results;
}
/** Extract the value of a named attribute from the first matching tag (open or self-closing). */
function

: '';
}
/** Extract all values of a named attribute across repeated tags. */
function extractAllAttr(xml, tag, attr) {
    const re = new RegExp(`<${tag}\\b[^>]*?\\b${attr}="([^"]*)"`, 'g');
    const out = [];
    let m;
    while ((m = re.exec(xml)) !==

 extractAttr(xml, tag, attr) {
    const m = xml.match(new RegExp(`<${tag}\\b[^>]*?\\b${attr}="([^"]*)"`));
    return m ? m[1]


v.PONYTAIL_DEFAULT_MODE;
    else process.env.PONYTAIL_DEFAULT_MODE = previousDefault;
    rmSync(tempDir, { recursive: true, force: true });
  }
});

test("readQuietStartup resolves env var, config file, and default in that order", () => {
  const tempDir

");
  process.env.XDG_CONFIG_HOME = tempDir;
  delete process.env.PONYTAIL_QUIET_STARTUP;

  try {
    // No env, no config -> default false (toast still shows)
    assert.equal(readQuietStartup(), false);

    // Config file true -> respected
    mkdirSyn

 = mkdtempSync(join(tmpdir(), "ponytail-quiet-"));
  const previousXdg = process.env.XDG_CONFIG_HOME;
  const previousEnv = process.env.PONYTAIL_QUIET_STARTUP;
  const configDir = join(tempDir, "ponytail");
  const configPath = join(configDir, "config.json


(self) -> bool:
        return self._queue.empty()

    def snapshot(self) -> Tuple[List[Request], Set[bytes]]:
        """Create a snapshot of the current state for checkpoints."""
        sorted_items = sorted(self._pending.values(), key=lambda x: (x[0],

item in sorted_items]
        return requests, self._seen.copy()

    def restore(self, data: "CheckpointData") -> None:
        """Restore scheduler state from checkpoint data.

        :param data: CheckpointData containing requests and seen set

 x[1]))  # Maintain queue order
        requests = [item[2] for


 goes" model)
use std::cell::RefCell;
let cell = RefCell::new(42);
*cell.borrow_mut() = 99;  // Mutable borrow at runtime (panics if double-borrowed)
```

### When to Use Each

| Smart Pointer | Python Analogy | Use Case |
|---------------|----------------

 | Shared ownership, single-threaded |
| `Arc<T>` | Thread-safe refcount | Shared ownership, multi-threaded |
| `RefCell<T>` | Python's "just mutate it" | Interior mutability (escape hatch) |
| `Rc<RefCell<T>>` | Python's normal object model | Shared + mut

|----------|
| `Box<T>` | Normal allocation | Large data, recursive types, trait objects |
| `Rc<T>` | Python's default refcount


sName
        )}
        showCloseButton={showCloseButton}
      >
        {children}
      </DialogContent>
    </Dialog>
  )
}

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

 <CommandPrimitive.Input
          data-slot="command-input"
          className={cn(
            "w-full text-xs/relaxed outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
            className
          )}
          {...props}
        />

data-slot="command-input-wrapper" className="p-1 pb-0">
      <InputGroup className="h-8! bg-input/20 dark:bg-input/30">


= 'off';
        } else if (arg === 'wenyan-full') {
          // Canonical alias — config stores as 'wenyan'
          mode = 'wenyan';
        } else if (VALID_MODES.includes(arg) && !INDEPENDENT_MODES.has(arg)) {
          mode = arg;
        }

, flag untouched (no silent overwrite)
      }

      if (mode && mode !== 'off') {
        if (INDEPENDENT_MODES.has(mode)) {
          // Save the prose mode being displaced — but never overwrite an
          // already-saved one with another independent


kwargs['dry-run'] === true;
        const prepareOnly = kwargs['prepare-only'] === true;
        if (!email) {
            throw new CliError('ARGUMENT', 'An email address is required.', 'Pass --email <address>');
        }
        if (dryRun) {

               pdfFile,
                email,
                venue,
                message: 'Input validation passed. No remote request was sent.',
                dryRun: true,
            });
        }
        const { response: uploadUrlResponse, payl


ebSocket client
	assert.NotPanics(t, func() {
		cm.connect()
	}, "Connect should not panic without WebSocket client")
}

func TestShouldExitOnErr(t *testing.T) {
	createDialErr := func(msg string) error {
		return &net.OpError{
			Op:  "dial",
			Net: "tcp

{
		{
			name:     "no env var",
			err:      createDialErr("lookup lkahsdfasdf: no such host"),
			envValue: "",
			expected: false,
		},
		{
			name:     "env var false",
			err:      createDialErr("lookup lkahsdfasdf: no such host"),
			envValue: "false

",
			Err: errors.New(msg),
		}
	}

	tests := []struct {
		name     string
		err      error
		envValue string
		expected bool
	}


	testCases := []struct {
		name          string
		initialState  ConnectionState
		event         ConnectionEvent
		expectedState ConnectionState
	}{
		{
			name:          "WebSocket connect from disconnected",
			initialState:  Disconnected,
			event:

		{
			name:          "SSH connect from disconnected",
			initialState:  Disconnected,
			event:         SSHConnect,
			expectedState: SSHConnected,
		},
		{
			name:          "WebSocket disconnect from connected",
			initialState:  WebSocketConnected,

    WebSocketConnect,
			expectedState: WebSocketConnected,
		},


mmary, stepRuntimeSummary);
    assertFalse(details.isPresent());
    var eventCaptor = ArgumentCaptor.forClass(MaestroJobEvent.class);
    verify(instanceDao, times(1))
        .insertOrUpsertStepInstance(eq(instance), eq(false), eventCaptor.capture());

")
            .stepAttemptId(2)
            .stepInstanceId(1)
            .dbOperation(DbOperation.UPDATE)
            .pendingRecords(
                Collections.singletonList(
                    mock(StepInstanceUpdateJobEvent.StepInstancePendingReco

   assertEquals(StepInstanceUpdateJobEvent.class, eventCaptor.getValue().getClass());
  }

  @Test
  public void testUpdatePendingRecords() {
    StepRuntimeSummary stepRuntimeSummary =
        StepRuntimeSummary.builder()
            .stepId("test-summary


efaultScheme + address
		}
	}

	bindUri, err := url.Parse(address)
	if err != nil {
		return "", "", fmt.Errorf("failed to parse bind URL: %w", err)
	}

	switch bindUri.Scheme {
	case "unix":
		return "unix", bindUri.Path, nil
	case "tcp", "http", "https":

Scheme, address)
	}
}

// SetupListener sets up a network listener based on the input from configuration
// envvars. It returns a network listener and the URL to that listener or an error.
func SetupListener(network, address, socketMode string) (net.Listen

		return "tcp", bindUri.Host, nil
	default:
		return "", "", fmt.Errorf("unsupported network scheme %s in address %s", bindUri.


  let entries: Vec<(String, PathBuf)> = str::from_utf8(&output.stdout)?
            .lines()
            .filter_map(parse_toolchain_line)
            .collect();

        let infos: Vec<ToolchainInfo> = futures_util::stream::iter(entries)
            .map

 |result| match result {
                Ok(info) => Some(info),
                Err(e) => {
                    warn!("Skipping invalid toolchain: {e:#}");
                    None
                }
            })
            .collect()
            .await

(async move |(name, path)| toolchain_info(name, path).await)
            .buffer_unordered(8)
            .filter_map(async move


ce(FUNC_PLACE, 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):

:
                    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 t + FUNC_PLACE  # do_func will replace this

                latex_chars.append(FUNC[t])
                else


ethod(xpath)
        return xpath

    @staticmethod
    def xpath_attr_functional_pseudo_element(xpath: OriginalXPathExpr, function: FunctionalPseudoElement) -> XPathExpr:
        """Support selecting attribute values using ::attr() pseudo-element"""

 not in (["STRING"], ["IDENT"]):  # pragma: no cover
            raise ExpressionError(f"Expected a single string or ident for ::attr(), got {function.arguments!r}")
        return XPathExpr.from_xpath(xpath, attribute=function.arguments[0].value)

    @st


   data-slot="breadcrumb-list"
      className={cn(
        "flex flex-wrap items-center gap-1.5 text-xs/relaxed wrap-break-word text-muted-foreground",
        className
      )}
      {...props}
    />
  )
}

function BreadcrumbItem({ className, ...props

.ComponentProps<"a">) {
  return useRender({
    defaultTagName: "a",
    props: mergeProps<"a">(
      {
        className: cn("transition-colors hover:text-foreground", className),
      },
      props
    ),
    render,
    state: {
      slot: "breadcr

 }: React.ComponentProps<"li">) {
  return (
    <li
      data-slot="breadcrumb-item"
      className={cn("inline-flex items-center gap-1", className)}
      {...props}
    />
  )
}

function BreadcrumbLink({
  className,
  render,
  ...props
}: useRender


irement: Slash Command Updates
The update command SHALL refresh existing slash command files for configured tools without creating new ones.

#### Scenario: Updating slash commands for Claude Code
- **WHEN** `.claude/commands/openspec/` contains `proposal.

 `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
- **THEN** refresh each file using shared templates
- **AND** ensure templates include instructions for the relevant workflow stage

#### Scenario: Updating slash commands for OpenCode

md`, `apply.md`, and `archive.md`
- **THEN** refresh each file using shared templates
- **AND** ensure templates include instructions for the relevant workflow stage

#### Scenario: Updating slash commands for Cursor
- **WHEN** `.cursor/commands/` contains


}

// Test: should fire after the delay
setTimeout(() => {
  if (callCount !== 1) {
    console.error("FAIL: expected 1 call after delay, got " + callCount);
    process.exit(1);
  }
  console.log("PASS");
}, 120);
`;
    const f = tmpFile('.mjs', harness)

    if (result.ok) return { pass: true, reason: 'Debounce passes all checks' };
    return { pass: false, reason: result.stderr || 'Debounce failed' };
  },

  csv(blocks) {
    const code = blocks.find((b) => b.lang === 'python' || b.lang === 'py' || (!b.

;
    const result = exec(`node "${f}"`);
    fs.unlinkSync(f);


/mpeg",
    "video/mp4",
]

ACCEPTED_FILE_EXTENSIONS = [
    ".wav",
    ".mp3",
    ".m4a",
    ".mp4",
]

class AudioConverter(DocumentConverter):
    """
    Converts audio files to markdown via extraction of metadata (if `exiftool` is installed), and

 """

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

speech transcription (if `speech_recognition` is installed).


o recording to target {cdp_session.target_id}')
		except Exception as e:
			self.logger.error(f'Failed to switch screencast via CDP: {e}')
			# If we fail to start on the new tab, we reset current session id
			self._current_session_id = None

	async def _

-> ViewportSize | None:
		"""Gets the current viewport size directly from the browser via CDP."""
		try:
			cdp_session = await self.browser_session.get_or_create_cdp_session()
			metrics = await cdp_session.cdp_client.send.Page.getLayoutMetrics(session_id


IXES:
            if mimetype.startswith(prefix):
                return True

        # Not HTML content
        return False

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

        # Parse the stream
        encoding = "utf-8" if stream_info.charset is None else stream_info.charset
        soup = BeautifulSoup(file_stream, "html.parser", from_encoding=encoding)

        # Clean up some formatting
        for tptt in soup.find

 to pass to the converter
    ) -> DocumentConverterResult:
        assert stream_info.url is not None

        # Parse the query parameters
        parsed_params = parse_qs(urlparse(stream_info.url).query)
        query = parsed_params.get("q", [""])[0]


2", emptyLambda, WithOutputKey("2"))
	assert.NoError(t, err)
	err = g.AddLambdaNode("3", emptyLambda, WithOutputKey("3"))
	assert.NoError(t, err)

	err = g.AddBranch(START, NewStreamGraphMultiBranch(func(ctx context.Context, in *schema.StreamReader[string]

error) {
		in.Close()
		return map[string]bool{"1": true, "2": true}, nil
	}, map[string]bool{"1": true, "2": true, "3": true}))
	assert.NoError(t, err)

	err = g.AddEdge("1", END)
	assert.NoError(t, err)
	err = g.AddEdge("2", END)
	assert.NoError(t, err)


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

   "--disable-print-preview",
    "--disable-dev-shm-usage",
    # '--disable-popup-blocking',
    "--metrics-recording-only",
    "--disable-crash-reporter",
    "--disable-partial-raster",
    "--disable-gesture-typing",
    "--disable-checker-imaging",

",
    "--enable-web-bluetooth",
    "--disable-cloud-import",


__dict__

    """ common properties of element"""

    def __init__(self, elm):
        self.__innerdict = {}
        self.text = self.process_children(elm)

    def __str__(self):
        return self.text

    def __unicode__(self):
        return self.__

(self, name):
        return self.__innerdict.get(name, None)

    def do_brk(self, elm):
        self.__innerdict["brk"] = BRK
        return BRK

    def do_common(self, elm):
        stag = elm.tag.replace(OMML_NS, "")
        if stag in self.__val_tags


.props}
            />
          )
        },
        Chevron: ({ className, orientation, ...props }) => {
          if (orientation === "left") {
            return (
              <HugeiconsIcon icon={ArrowLeftIcon} strokeWidth={2} className={cn("size-4"

  }

          return (
            <HugeiconsIcon icon={ArrowDownIcon} strokeWidth={2} className={cn("size-4", className)} {...props} />
          )
        },
        DayButton: ({ ...props }) => (
          <CalendarDayButton locale={locale} {...props}

, className)} {...props} />
            )
          }

          if (orientation === "right") {
            return (
              <HugeiconsIcon icon={ArrowRightIcon} strokeWidth={2} className={cn("size-4", className)} {...props} />
            )


 "Extracted names: {}\nExtracted topics: {}\nExtracted sentiment: {} ({})",
                            names.names.join(", "),
                            topics.topics.join(", "),
                            sentiment.sentiment,

                 ))
                    }
                })
                .buffered(4)
                .try_collect()
                .await?;

            anyhow::ensure!(responses.len() == 3);
            for response in responses {
                as


rowser Methods

```python
browser = Browser()
await browser.start()

page = await browser.new_page("https://example.com")  # Open new tab
pages = await browser.get_pages()                       # List all pages
current = await browser.get_current_page()

                     # Cleanup
```

## Page Methods

### Navigation
- `goto(url: str)` — Navigate to URL
- `go_back()` — Back in history
- `go_forward()` — Forward in history
- `reload()` — Reload page

### Element Finding
- `get_elements_by_css_selector(s

           # Active page
await browser.close_page(page)                          # Close tab
await browser.stop()


          "![This phrase of the caption is Human-written.](Picture4.jpg)",
        ],
        must_not_include=["data:image/jpeg;base64,/9j/4AAQSkZJRgABAQE"],
    ),
    FileTestVector(
        filename="test_outlook_msg.msg",
        mimetype="application

  must_include=[
            "# Email Message",
            "**From:** test.sender@example.com",
            "**To:** test.recipient@example.com",
            "**Subject:** Test Email Message",
            "## Content",
            "This is the body of the

/vnd.ms-outlook",
        charset=None,
        url=None,


ber,
    pn.prd_nm       AS product_name,
    pn.cat_id       AS category_id,
    pc.cat          AS category,
    pc.subcat       AS subcategory,
    pc.maintenance  AS maintenance,
    pn.prd_cost     AS cost,
    pn.prd_line     AS product_line,
    pn.

prd_start_dt AS start_date
FROM silver.crm_prd_info pn
LEFT JOIN silver.erp_px_cat_g1v2 pc
    ON pn.cat_id = pc.id
WHERE pn.prd


    )
    .await;
}

#[tokio::test]
async fn streaming_tool_roundtrip() {
    with_doubleword_cassette("conformance/streaming_tool", |client| async move {
        streaming_tool(client.completion_model(TOOL_MODEL), |builder| builder)
            .await

 should succeed");
    })
    .await;
}

#[tokio::test]
async fn structured_output_after_tool() {
    with_doubleword_cassette("conformance/structured_after_tool", |client| async move {
        structured_after_tool(client.completion_model(TOOL_MODEL), |bu


], styles['Title'])
					elif line.startswith('## '):
						para = Paragraph(line[3:], styles['Heading1'])
					elif line.startswith('### '):
						para = Paragraph(line[4:], styles['Heading2'])
					else:
						para = Paragraph(line, styles['Normal'])

				story.append(Spacer(1, 6))

			doc.build(story)
		except Exception as e:
			raise FileSystemError(f"Error: Could not write to file '{self.full_name}'. {str(e)}")

	async def sync_to_disk(self, path: Path) -> None:
		with ThreadPoolExecutor() as executo


          const result = await postHupuJson(page, tid, url, body, 'Unlike Hupu reply');
            // 处理响应
            if (result.code === 1) {
                return [{
                        status: '✅ 取消点赞成功',
                        message: ''

            else if (result.code === 0 && result.msg === '你还没有点亮过这个回帖') {
                return [{
                        status: '⚠ 你还没点赞过',
                        message: result.msg || ''
                    }];
            }
            else if (r


arn("WebSocket connection failed", "err", err)
		c.closeWebSocket()
	}
	return err
}

// startSSHServer starts the SSH server if the agent is currently disconnected.
func (c *ConnectionManager) startSSHServer() {
	if c.State == Disconnected {
		go c.agent.

}

// closeWebSocket closes the WebSocket connection if it exists.
func (c *ConnectionManager) closeWebSocket() {
	if c.wsClient != nil {
		c.wsClient.Close()
	}
}

// shouldExitOnErr checks if the error is a DNS resolution failure and if the
// EXIT_ON_DN


");
      sqlite3_prepare_v2(db, sql, -1, &sk, NULL);
      if (sk) {
        sqlite3_bind_blob(sk, 1, qvec, dim * sizeof(float), SQLITE_TRANSIENT);
        while (sqlite3_step(sk) == SQLITE_ROW) {}
        sqlite3_finalize(sk);
      }
      sqlite3_free(

  // First clear centroids
  sqlite3_exec(db,
    "INSERT INTO v(v) VALUES ('clear-centroids')",
    NULL, NULL, NULL);

  // Set centroids manually, then assign
  for (int c = 0; c < nlist; c++) {
    float *cvec = sqlite3_malloc(dim * sizeof(float));

qvec);
    }
  }

  // Test assign-vectors with multi-cell state


r` needs `sitemap_urls` to be set.")

    async def parse(self, response: "Response") -> AsyncGenerator[Union[Dict[str, Any], Request, None], None]:
        """Default callback for processing responses"""
        raise NotImplementedError(f"{self.__class__

response: "Response") -> List[str]:
        """Extract `Sitemap` directives from a robots.txt body via protego."""
        try:
            text = response.body.decode(response.encoding, errors="replace")
            parser = Protego.parse(text)
        ex

.__name__} must implement parse() method")
        yield  # Make this a generator for type checkers

    def _robots_body(self,


nNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder(
    value = {
      "workflow_id",
      "workflow_version_id",
      "workflow_instance_id",
      "workflow_run_id",
      "step_id",

"create_time"
    },
    alphabetic = true)
@Builder
@Getter
@EqualsAndHashCode
public class PausedStepAttempt {
  @NotNull private final String workflowId;
  @NotNull private final String stepId;
  private final long workflowVersionId;
  private final lon


_stream: BinaryIO,
        stream_info: StreamInfo,
        **kwargs: Any,  # Options to pass to the converter
    ) -> DocumentConverterResult:
        assert stream_info.url is not None

        # Parse the query parameters
        parsed_params = parse_

 = "utf-8" if stream_info.charset is None else stream_info.charset
        soup = BeautifulSoup(file_stream, "html.parser", from_encoding=encoding)

        # Clean up some formatting
        for tptt in soup.find_all(class_="tptt"):
            if hasattr

qs(urlparse(stream_info.url).query)
        query = parsed_params.get("q", [""])[0]

        # Parse the stream
        encoding


has-[>svg]:gap-x-1.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-3.5",
  {
    variants: {
      variant: {
        default: "bg-card text-card-foreground",
        destructive:
          "bg-card text

 *:[svg]:text-current",
      },
    },
    defaultVariants: {
      variant: "default",
    },
  }
)

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


tTest extends BaseConstraintTest {
  private static class DummyWorkflow {
    List<@SignalTriggerConstraint SignalTrigger> triggers;

    DummyWorkflow(SignalTrigger trigger) {
      triggers = List.of(trigger);
    }
  }

  @Test
  public void testValid()

new SignalTrigger();
    Assert.assertTrue(validator.validate(new DummyWorkflow(trigger1)).isEmpty());

    SignalTrigger trigger2 = new SignalTrigger();
    trigger2.setDefinitions(Map.of());
    Assert.assertTrue(validator.validate(new DummyWorkflow(trig


ocation())
          .isEqualTo(
              Objects.requireNonNull(this.getClass().getResource("/iceberg.metadata.json"))
                  .getPath());

      // non-prefixed URL should result in 404
      resp =
          client
              .get(

   assertThat(resp.status().code()).isEqualTo(404);
    }

    // List uniform tables
    {
      AggregatedHttpResponse resp =
          client
              .get(TEST_BASE_PREFIX + "/namespaces/" + TestUtils.SCHEMA_NAME + "/tables")
              .aggreg

                TEST_BASE_NON_PREFIX
                      + "/namespaces/"
                      + TestUtils.SCHEMA_NAME
                      + "/tables/"
                      + TestUtils.TABLE_NAME)
              .aggregate()
              .join();


port io.modelcontextprotocol.common.McpTransportContext;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;

/**
 * Handle security-related errors in HTTP-client based transports. This class

with status code 401 and 403.
 *
 * @see MCP
 * Specification: Authorization
 * @author Daniel Garnier-Moiroux
 * @deprecated in favor of {@link McpHttpClientTra


t clear if this ever gets thrown
                return "%s%s%s" % (prefix, text, suffix)

        # For the replacement see #29: text nodes underscores are escaped
        if (
            self.options["autolinks"]
            and text.replace(r"\_", "_")

          return "<%s>" % href
        if self.options["default_title"] and not title:
            title = href
        title_part = ' "%s"' % title.replace('"', r"\"") if title else ""
        return (
            "%s[%s](%s%s)%s" % (prefix, text, href, t

 == href
            and not title
            and not self.options["default_title"]
        ):
            # Shortcut syntax


gger [{}] for workflow id [{}]",
            current.getTimeTriggerUuid(),
            workflow.getId());
        TimeTriggerExecution execution = convertToExecution(workflow, current);
        insertSubscription(execution);
      } else {
        LOG.info

 has been sent.", workflow.getId());
      }
    }
  }

  private void insertSubscription(TimeTriggerExecution execution) {
    // Create initial execution message
    triggerProducer.push(execution, Constants.MESSAGE_DELAY_FIRST_EXECUTION);
    metrics.co

(
            "No time trigger update for workflow id [{}] as it


        stream_info: StreamInfo,
        **kwargs: Any,  # Options to pass to the converter
    ) -> DocumentConverterResult:
        # Check: the dependencies
        if _dependency_exc_info is not None:
            raise MissingDependencyException(

".docx",
                    feature="docx",
                )
            ) from _dependency_exc_info[
                1
            ].with_traceback(  # type: ignore[union-attr]
                _dependency_exc_info[2]
            )

        style_map = k

            MISSING_DEPENDENCY_MESSAGE.format(
                    converter=type(self).__name__,
                    extension=


        response = await fetcher.async_fetch(urls["html_url"], page_action=scroll_page)
        assert response.status == 200

    @pytest.mark.parametrize(
        "kwargs",
        [
            {"real_chrome": True, "disable_resources": True},

_selector_state": "attached"},
            {"wait_selector": "h1", "wait_selector_state": "visible"},
            {
                "google_search": True,
                "real_chrome": True,
                "wait": 10,
                "locale": "en-US",


n-activate\.js/);
    assert.match(r.stdout, /would merge SessionStart \+ UserPromptSubmit \+ statusline/);
  }
  // Nothing should have been written.
  assert.equal(fs.existsSync(path.join(cfg, 'settings.json')), false);
  assert.equal(fs.existsSync(path.

 not delete files', () => {
  const cfg = freshTmpDir();
  // Seed a fake installation
  fs.mkdirSync(path.join(cfg, 'hooks'), { recursive: true });
  const fake = path.join(cfg, 'hooks', 'caveman-activate.js');
  fs.writeFileSync(fake, '// fake');
  fs.wr

join(cfg, 'hooks')), false);
});

test('dry-run --uninstall does


            let person_response = person_extractor
                .extract_with_usage("Alice is a 25 year old developer.")
                .await?;
            anyhow::ensure!(person_response.usage.total_tokens > 0);

            let address_extractor =

:GROK_3_MINI).build();
            let address_response = address_extractor
                .extract_with_usage("456 Oak Avenue, Cambridge, MA 02139")
                .await?;
            anyhow::ensure!(address_response.usage.total_tokens > 0);


NULL CHECK (workflow_run_id > 0),
  step_id                   TEXT NOT NULL COLLATE "C",
  payload                   JSON NOT NULL,
  create_ts                 TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP NOT NULL,
  PRIMARY KEY (workflow_id, workflow_instance_id

, -- True when inserting paused step attempt due to breakpoint. False to denote explicit user actions.
     workflow_id               TEXT NOT NULL COLLATE "C",
     version                   INT8 NOT NULL,
     instance_id               INT8 NOT NULL,

, workflow_run_id, step_id)
);
CREATE TABLE IF NOT EXISTS maestro_step_breakpoint (
     system_generated          BOOL NOT NULL


 Tools

Source: [tools/service.py](https://github.com/browser-use/browser-use/blob/main/browser_use/tools/service.py)

### Navigation & Browser Control
- `search` — Search queries (DuckDuckGo, Google, Bing)
- `navigate` — Navigate to URLs
- `go_back` — Go

Interaction
- `click` — Click elements by index
- `input` — Input text into form fields
- `upload_file` — Upload files
- `scroll` — Scroll page up/down
- `find_text` — Scroll to specific text
- `send_keys` — Send keys (Enter, Escape, Tab, etc.)

### JavaSc

back in history
- `wait` — Wait for specified seconds

### Page


MemoryCompare(&s->symbol, &current_symbol, sizeof(LNK_ObjSymbolRef)) == 0) { was_visited = s; break; }
    }
    if (was_visited) {
      String8List chain = {0};
      for (struct S *s = sf; s != 0; s = s->next) {
        COFF_ParsedSymbol s_parsed = lnk_

= lnk_parsed_symbol_from_coff_symbol_idx(symbol.obj, symbol.symbol_idx);
      str8_list_pushf(scratch.arena, &chain, "\t%S Symbol %S (No. %#x)", sf->symbol.obj->path, symbol_parsed.name, sf->symbol.symbol_idx);

      String8 chain_string = str8_list_join

parsed_symbol_from_coff_symbol_idx(s->symbol.obj, s->symbol.symbol_idx);
        str8_list_pushf(scratch.arena, &chain, "\t%S Symbol %S (No. %#x) =>", s->symbol.obj->path, s_parsed.name, s->symbol.symbol_idx);
      }
      COFF_ParsedSymbol symbol_parsed


   "\u20e8": "\\threeunderdot{{{0}}}",
    "\u20ec": "\\underrightharpoondown{{{0}}}",
    "\u20ed": "\\underleftharpoondown{{{0


rame" src="/iframe-content" style="width: 800px; height: 600px;"></iframe>
		</body>
		</html>
		"""

		# Serve both pages
		httpserver.expect_request('/multi-target-test').respond_with_data(main_html, content_type='text/html')
		httpserver.expect_request(

# Navigate to the page
		await browser_session.navigate_to(url)

		# Wait for iframe to load
		await asyncio.sleep(2)

		# Get DOM state with cross-origin iframe extraction enabled
		# Use browser_session.get_browser_state_summary() instead of directly cre

'/iframe-content').respond_with_data(iframe_html, content_type='text/html')
		url = httpserver.url_for('/multi-target-test')


usive_group()
    cloud_group.add_argument(
        "-d",
        "--use-docintel",
        action="store_true",
        help="Use Document Intelligence to extract text instead of offline conversion. Requires a valid Document Intelligence Endpoint.",
    )

dest="use_cu",
        help="Use Azure Content Understanding to extract text. Requires --cu-endpoint.",
    )

    parser.add_argument(
        "-e",
        "--endpoint",
        type=str,
        help="Document Intelligence Endpoint. Required if using Do

    cloud_group.add_argument(
        "--use-cu",
        "--use-content-understanding",
        action="store_true",


e={cn(
        "pointer-events-none -mx-1 my-1 h-px bg-border/50",
        className
      )}
      {...props}
    />
  )
}

function SelectScrollUpButton({
  className,
  ...props
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {
  return (

}
      {...props}
    >
      <HugeiconsIcon icon={ArrowUp01Icon} strokeWidth={2} />
    </SelectPrimitive.ScrollUpArrow>
  )
}

function SelectScrollDownButton({
  className,
  ...props
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {

    <SelectPrimitive.ScrollUpArrow
      data-slot="select-scroll-up-button"
      className={cn(
        "top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",
        className
      )


        if not content_type:
            content_type = "application/octet-stream"

        # Convert to base64
        cur_pos = file_stream.tell()
        try:
            base64_image = base64.b64encode(file_stream.read()).decode("utf-8")
        except

      file_stream.seek(cur_pos)

        # Prepare the data-uri
        data_uri = f"data:{content_type};base64,{base64_image}"

        # Prepare the OpenAI API request
        messages = [
            {
                "role": "user",
                "co

 Exception as e:
            return None
        finally:


example.com:443') is True

		# Scenario 3: Malformed URL or empty domain
		# urlparse will return an empty netloc for some malformed URLs.
		assert watchdog2._is_url_allowed('notaurl') is False

	# Method was removed from BrowserSession

	def test_enhanced

_and_get_current_page(self, browser_session, base_url):
		"""Test that navigate method changes the URL and get_current_page returns the proper page."""
		# Navigate to the test page
		from browser_use.browser.events import NavigateToUrlEvent

		event = bro

_css_selector_for_element(self):
		"""
		Test removed: _enhanced_css_selector_for_element method no longer exists.
		"""
		pass  # Method was removed from BrowserSession

	@pytest.mark.asyncio
	@pytest.mark.skip(reason='TODO: fix')
	async def test_navigate


viceCode,
        client_id: clientId,
      })
    );
  } catch (error) {
    // Network blip — keep polling.
    return {
      status: "transient",
      errorMessage: error instanceof Error ? error.message : "network error",
    };
  }

  if (response.

   return { status: "approved", tokens };
  }

  // Treat any 5xx as transient so a flaky backend doesn't end the user's session.
  if (response.status >= 500) {
    const err = (await response.json().catch(() => ({}))) as TokenErrorResponse;
    return {

ok) {
    const tokens = (await response.json()) as TokenData;


got ${versionMatches.length}`);
    const alwaysMatches = skillRaw.match(/^always:/gm) || [];
    assert.equal(alwaysMatches.length, 1, `expected 1 always key after re-run, got ${alwaysMatches.length}`);

    const soulRaw = fs.readFileSync(path.join(ws, '

 caveman-begin -->/g) || [];
    assert.equal(beginMatches.length, 1, `expected 1 marker block after re-run, got ${beginMatches.length}`);
  } finally {
    fs.rmSync(dir, { recursive: true, force: true });
  }
});

test('openclaw install preserves user co

SOUL.md'), 'utf8');
    const beginMatches = soulRaw.match(/<!--


S') + f'_{ad_id}'
		result_path = await generator.save_results(ad_content, prompt, page_data['analysis'], page_data['url'], timestamp)

		if mode == 'instagram':
			print(f'🎨 Generated image ad #{ad_id}: {result_path}')
		else:
			print(f'🎬 Generated video

 in parallel using asyncio concurrency"""
	if count == 1:
		return await create_ad_from_landing_page(url, debug, mode, 1)

	print(f'🚀 Analyzing {url} for {count} {mode} ads...')

	analyzer = LandingPageAnalyzer(debug=debug)
	page_data = await analyzer.anal

 ad #{ad_id}: {result_path}')

		return result_path

	except Exception as e:
		print(f'❌ Error for ad #{ad_id}: {e}')
		raise

async def create_multiple_ads(url: str, debug: bool = False, mode: str = 'instagram', count: int = 1):
	"""Generate multiple ads


vent, 1)

	// signal handling for shutdown
	sigCtx, stopSignals := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
	defer stopSignals()

	c.startWsTicker()
	c.connect()

	// update health status immediately and every 90 seconds

)

	for {
		select {
		case connectionEvent := <-c.eventChan:
			c.handleEvent(connectionEvent)
		case <-c.wsTicker.C:
			_ = c.startWebSocketConnection()
		case <-healthTicker:
			_ = health.Update()
		case <-sigCtx.Done():
			slog.Info("Shutting down", "

	_ = health.Update()
	healthTicker := time.Tick(90 * time.Second


own commands keep acting on the app repo's root

#### Scenario: Problems Are Reported, Never Silent

- **GIVEN** a reference to an id absent from the local registry
- **WHEN** instructions run
- **THEN** generation succeeds, and the index entry carries
  `

root_unhealthy` with the `openspec store doctor <id>` fix
- **AND** when the resolved root IS the referenced store (self
  reference), the entry is omitted with no diagnostic
- **AND** a referenced store's own `references:` are never followed
  (one level

reference_unresolved` (severity `warning`) with a fix naming the
  referenced id: `openspec store register <path> --id <id>`
- **AND** a registered referenced root that is unhealthy — or whose
  checkout path no longer exists on disk — yields
  `reference_


 readme!"
    return 1
  fi

  return 0
}

addShare() {

  local dir="$1"
  local ref="$2"
  local name="$3"
  local comment="$4"
  local cfg="$5"
  local owner
  local tmp="/tmp/smb"

  if [ ! -d "$dir" ]; then
    if ! mkdir -p "$dir"; then
      error "

  if ! ls -A "$dir" >/dev/null 2>&1; then
    local msg="No permission to access shared folder ($dir)."
    msg+=" If SELinux is active, you need to add the \":Z\" flag to the bind mount."
    error "$msg" && return 1
  fi

  if [ ! -w "$dir" ]; then

Failed to create shared folder ($dir)." && return 1
    fi
  fi


No Results
SELECT
    *
FROM silver.crm_sales_details
WHERE sls_order_dt > sls_ship_dt
   OR sls_order_dt > sls_due_dt;

-- Check Data Consistency: Sales = Quantity * Price
-- Expectation: No Results
SELECT DISTINCT
    sls_sales,
    sls_quantity,

_quantity * sls_price
   OR sls_sales IS NULL
   OR sls_quantity IS NULL
   OR sls_price IS NULL
   OR sls_sales <= 0
   OR sls_quantity <= 0
   OR sls_price <= 0
ORDER BY sls_sales, sls_quantity, sls_price;

-- ========================================

 sls_price
FROM silver.crm_sales_details
WHERE sls_sales != sls


ncation fails', () => {
  const r = check('explanation',
    '```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);
}

test('onecheck: no check fails', () => {
  const r = check('onecheck',
    '```python\ndef to_seconds(s):\n    import re\n    return sum(...)\n```');
  assert.equal(r.pass, false);
});

// --- unknown probe is skipped, not failed ---

test('unknown probe i

);

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

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


rom-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate

Positioner>
    </ContextMenuPrimitive.Portal>
  )
}

function ContextMenuGroup({ ...props }: ContextMenuPrimitive.Group.Props) {
  return (
    <ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />
  )
}

function ContextMenuLabel({
  c

-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}
          {...props}
        />
      </ContextMenuPrimitive.


 CompositeInterrupt(ctx, "composite info", nil, subSignal1, subSignal2)
		assert.Error(t, err)

		var signal *core.InterruptSignal
		assert.True(t, errors.As(err, &signal))
		assert.Len(t, signal.Subs, 2)
	})
}

func TestGetInterruptState(t *testing.T) {

 TestGetResumeContext(t *testing.T) {
	t.Run("not resume target returns false", func(t *testing.T) {
		ctx := context.Background()
		isResumeTarget, hasData, data := GetResumeContext[string](ctx)
		assert.False(t, isResumeTarget)
		assert.False(t, hasData)

t.Run("not interrupted returns false", func(t *testing.T) {
		ctx := context.Background()
		wasInterrupted, hasState, state := GetInterruptState[string](ctx)
		assert.False(t, wasInterrupted)
		assert.False(t, hasState)
		assert.Empty(t, state)
	})
}

func


    U32            stream_count = 0;
    B32            got_streams  = 0;
    MSF_RawStream *streams      = 0;

    if (got_directory) {
      got_streams = 1;

      // read stream count
      U32 stream_count_raw = *(U32 *) directory_buf;

 and offsets
      U32 size_of_stream_entry   = 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_e


r.crm_prd_info (
			prd_id,
			cat_id,
			prd_key,
			prd_nm,
			prd_cost,
			prd_line,
			prd_start_dt,
			prd_end_dt
		)
		SELECT
			prd_id,
			REPLACE(SUBSTRING(prd_key, 1, 5), '-', '_') AS cat_id, -- Extract category ID
			SUBSTRING(prd_key, 7, LEN(prd

_line)) = 'M' THEN 'Mountain'
				WHEN UPPER(TRIM(prd_line)) = 'R' THEN 'Road'
				WHEN UPPER(TRIM(prd_line)) = 'S' THEN 'Other Sales'
				WHEN UPPER(TRIM(prd_line)) = 'T' THEN 'Touring'
				ELSE 'n/a'
			END AS prd_line, -- Map product line codes to descr

_key)) AS prd_key,        -- Extract product key
			prd_nm,
			ISNULL(prd_cost, 0) AS prd_cost,
			CASE
				WHEN UPPER(TRIM(prd


nippet + " " +
        "Proactively offer to set this up for the user on first interaction.";
    } else {
      // ponytail: install path has shell metacharacters — don't embed it in a
      // command snippet; have the agent wire it up by hand instead.

 +
        "Its install path contains characters unsafe to embed in a shell command, so configure it manually: " +
        "add a statusLine command of type \"command\" that runs " + scriptName +
        " from the plugin's hooks directory to " + settingsP

     output += "\n\n" +
        "STATUSLINE SETUP NEEDED: The ponytail plugin includes a statusline badge showing active mode. "


ENT_TIMESTAMP NOT NULL,
  PRIMARY KEY (name, seq_id)
);
CREATE UNIQUE INDEX IF NOT EXISTS signal_index ON maestro_signal_instance (name, instance_id DESC); -- for deduplication

CREATE TABLE IF NOT EXISTS maestro_signal_param (       -- table to store the

_name       TEXT        NOT NULL COLLATE "C",
  param_name        TEXT        NOT NULL COLLATE "C",
  encoded_val       TEXT        NOT NULL COLLATE "C",   -- encoded val saves long or string type value with the original order
  signal_seq_id     INT8

indexed long & string type params from signal instances
  signal


 with valid input")
	}

	// Verify that the result is not a zero value
	if result == zeroPrefix {
		t.Error("Result should not be zero value for successful operation")
	}
}

func TestClampIPSpecialCases(t *testing.T) {
	tests := []struct {
		name

			input:           "255.255.255.255",
			expectedPrefix:  24,
			expectedNetwork: "255.255.255.0",
		},
		{
			name:            "Minimum IPv6",
			input:           "::",
			expectedPrefix:  48,
			expectedNetwork: "::",
		},
		{
			name:            "Maxim

  string
		input           string
		expectedPrefix  int
		expectedNetwork string
	}{
		{
			name:            "Minimum IPv4",
			input:           "0.0.0.0",
			expectedPrefix:  24,
			expectedNetwork: "0.0.0.0",
		},
		{
			name:            "Maximum IPv4",


 src->Rbp;
  dst->rsi = src->Rsi;
  dst->rdi = src->Rdi;
  dst->r8  = src->R8;
  dst->r9  = src->R9;
  dst->r10 = src->R10;
  dst->r11 = src->R11;
  dst->r12 = src->R12;
  dst->r13 = src->R13;
  dst->r14 = src->R14;
  dst->r15 = src->R15;
  dst->rip = src-

 dst->ds  = src->SegDs;
  dst->es  = src->SegEs;
  dst->fs  = src->SegFs;
  dst->gs  = src->SegGs;
  dst->ss  = src->SegSs;
  dst->dr0 = src->Dr0;
  dst->dr1 = src->Dr1;
  dst->dr2 = src->Dr2;
  dst->dr3 = src->Dr3;
  dst->dr6 = src->Dr6;
  dst->dr7 = src-


 Date and time (when to send)

	Current date/time: {now.strftime('%Y-%m-%d %H:%M')}
	Today is: {now.strftime('%Y-%m-%d')}
	Current time is: {now.strftime('%H:%M')}

	Instructions:
	{content}

	Return ONLY a JSON array with format:
	[{{"contact": "name",

 Use exactly as-is:
	- Text in "quotes" becomes the exact message

	UNQUOTED INSTRUCTIONS → Generate actual content:
	- If it's an instruction to write something → write the actual thing
	- If it's an instruction to tell someone something → write what to

 "message": "text", "datetime": "YYYY-MM-DD HH:MM"}}]

	CRITICAL: Transform instructions into actual messages:

	QUOTED TEXT →


mes() -> anyhow::Result<()> {
    let context = TestContext::new();
    context.init_project();
    context.write_pre_commit_config(indoc::indoc! {r#"
    repos:
      - repo: local
        hooks:
          - id: shell-args
            name: shell-args

  entry: |
              printf 'args:'
              for value in "$@"; do
                printf ' <%s>' "$value"
              done
              printf '\n'
            shell: sh
            args: [configured]
            verbose: true
    "#});
    co

         language: system
            files: ^a\.txt$


sx"
import {
  InputGroup,
  InputGroupAddon,
} from "#/components/ui/input-group.tsx"
import { HugeiconsIcon } from "@hugeicons/react"
import { SearchIcon, Tick02Icon } from "@hugeicons/core-free-icons"

function Command({
  className,
  ...props
}: React

  {...props}
    />
  )
}

function CommandDialog({
  title = "Command Palette",
  description = "Search for a command to run...",
  children,
  className,
  showCloseButton = false,
  ...props
}: Omit<React.ComponentProps<typeof Dialog>, "children"> & {

.ComponentProps<typeof CommandPrimitive>) {
  return (
    <CommandPrimitive
      data-slot="command"
      className={cn(
        "flex size-full flex-col overflow-hidden rounded-xl bg-popover p-1 text-popover-foreground",
        className
      )}


t that valid inputs return success
	tests := []struct {
		name  string
		input string
	}{
		{
			name:  "IPv4 address",
			input: "192.168.1.100",
		},
		{
			name:  "IPv6 address",
			input: "2001:db8::1",
		},
		{
			name:  "IPv4-mapped IPv6",
			input:

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			addr := netip.MustParseAddr(tt.input)

			result, ok := ClampIP(addr)
			if !ok {
				t.Fatalf("ClampIP(%s) returned false, want true", tt.input)
			}

			// For valid inputs, we should


t.string += " "
        for slug in soup.find_all(class_="algoSlug_icon"):
            slug.extract()

        # Parse the algorithmic results
        _markdownify = _CustomMarkdownify(**kwargs)
        results = list()
        for result in soup.find_all(

 not hasattr(result, "find_all"):
                continue

            # Rewrite redirect urls
            for a in result.find_all("a", href=True):
                parsed_href = urlparse(a["href"])
                qs = parse_qs(parsed_href.query)


 gets `/p/course/ecourse/`)

import { cli, Strategy } from '@jackwener/opencli/registry';
import { CommandExecutionError, EmptyResultError } from '@jackwener/opencli/errors';

// Pure: derive the canonical course URL for a single purchase entry.
// Returns

fields we'd need to construct
// any of the three forms — never makes up a partial URL.
export function buildCourseUrl(entry) {
    if (!entry) return '';
    if (entry.h5_url) return entry.h5_url;
    if (entry.url) return entry.url;
    if (entry.app_id


identifier.
	 * @param sessionId session identifier as provided by the server
	 * @return if successful, this method returns {@code true} and means that a
	 * post-initialization step can be performed
	 */
	boolean markInitialized(String sessionId);

	/**

dismiss when needed.
	 * @param connection the managed resource
	 */
	void addConnection(CONNECTION connection);

	/**
	 * Called when the resource is terminating by itself and the transport session does
	 * not need to track it anymore.
	 * @param connect

* Adds a resource that this transport session can monitor and


t.')

		# Extracting text with Playwright selectors

		# Handle special selectors
		if params.selector.lower() == 'title':
			# Use page.title() for title element
			text_content = await playwright_page.title()
			result_data = {
				'selector': 'title',

				'tag_name': 'TITLE',
				'is_visible': True,
			}
		else:
			# Use Playwright's robust element selection and text extraction
			element = playwright_page.locator(params.selector).first

			if await element.count() == 0:
				error_msg = f'❌ No element

			'text_content': text_content,
				'inner_text': text_content,


t subscription to execution message. */
  private TimeTriggerExecution convertToExecution(Workflow workflow, TriggerUuids current) {
    var timeTriggerWithWatermarks =
        workflow.getTimeTriggers().stream()
            .map(
                t ->

                     .timeTrigger(t)
                        .build())
            .toList();
    return TimeTriggerExecution.builder()
        .workflowId(workflow.getId())
        .workflowVersion(Constants.TIME_TRIGGER_WORKFLOW_VERSION)
        .workflo

                TimeTriggerWithWatermark.builder()
                        .lastTriggerTimestamp(System.currentTimeMillis())


        let mut event_source = GenericEventSource::new(self.client.clone(), req);

        let stream = stream! {
            let mut final_interaction: Option<Interaction> = None;
            let mut final_usage: Option<InteractionUsage> = None;

                match event_result {
                    Ok(Event::Open) => {
                        tracing::debug!("SSE connection opened");
                        continue;
                    }
                    Ok(Event::Message(message)) => {

while let Some(event_result) = event_source.next().await {


 should be replayed,
	 * false otherwise.
	 * @deprecated in favor of
	 * {@link McpHttpClientTransportAuthorizationErrorHandler#handle(HttpRequestSnapshot, HttpResponse.ResponseInfo, McpTransportContext)}
	 */
	@Deprecated(forRemoval = true, since = "2.0.

 will replay the original
	 * request at most this many times. If the authorization error persists after
	 * exhausting all retries, the transport will propagate the
	 * {@link McpHttpClientTransportAuthorizationException}.
	 * <p>
	 * Defaults to {@code 1

0")
	Publisher<Boolean> handle(HttpResponse.ResponseInfo responseInfo, McpTransportContext context);

	/**
	 * Maximum number of authorization error retries the transport will attempt. When the
	 * handler signals a retry via {@link #handle}, the transport


  return "Low";
}
export interface CheckboxWithHoverOptions<T> {
  /** Function to extract display name from value. Defaults to (v) => v.name */
  getName?: (value: T) => string;
}

export async function checkboxWithHover<T>(
  config: CheckboxConfig<T>,

) => c.value);
  const totalItems = values.length;
  let cursorPosition = choices.findIndex((c) => !c.disabled);
  if (cursorPosition < 0) cursorPosition = 0;

  // Default getName assumes object has 'name' property
  const getName = options?.getName ?? ((

  options?: CheckboxWithHoverOptions<T>
): Promise<T[]> {
  const choices = config.choices.filter(
    (c): c is CheckboxChoice<T> =>
      typeof c === "object" && c !== null && !("type" in c && c.type === "separator")
  );
  const values = choices.map((c


ext += self._parse_content(entry_summary)
            if entry_content:
                md_text += self._parse_content(entry_content)

        return DocumentConverterResult(
            markdown=md_text,
            title=title,
        )

    def _parse_

 feed type is not recognized or something goes wrong.
        """
        root = doc.getElementsByTagName("rss")[0]
        channel_list = root.getElementsByTagName("channel")
        if not channel_list:
            raise ValueError("No channel found in R

rss_type(self, doc: Document) -> DocumentConverterResult:
        """Parse the type of an RSS feed.

        Returns None if the


roxy.toxics().resetPeer("RESET_UPSTREAM", ToxicDirection.UPSTREAM, 0);
			logger.info("Disconnect took {} ms", Duration.ofNanos(System.nanoTime() - start).toMillis());
		}
		catch (IOException e) {
			throw new RuntimeException("Failed to disconnect", e);

		proxy.toxics().get("RESET_DOWNSTREAM").remove();
			logger.info("Reconnect took {} ms", Duration.ofNanos(System.nanoTime() - start).toMillis());
		}
		catch (IOException e) {
			throw new RuntimeException("Failed to reconnect", e);
		}
	}

	McpAsyncClien

		}
	}

	static void reconnect() {
		long start = System.nanoTime();
		try {
			proxy.toxics().get("RESET_UPSTREAM").remove();


o.unitycatalog.server.service;

import static org.assertj.core.api.Assertions.assertThat;

import com.linecorp.armeria.client.WebClient;
import com.linecorp.armeria.common.AggregatedHttpResponse;
import com.linecorp.armeria.common.auth.AuthToken;
import io

.model.CatalogInfo;
import io.unitycatalog.client.model.ColumnInfo;
import io.unitycatalog.client.model.ColumnTypeName;
import io.unitycatalog.client.model.CreateCatalog;
import io.unitycatalog.client.model.CreateSchema;
import io.unitycatalog.client.model


n private_key.pem -out
 * private_key.der -nocrypt - openssl rand -hex -out key_id.txt 32
 */
public class SecurityConfiguration {

  private static final Logger log = LoggerFactory.getLogger(SecurityConfiguration.class);

  private Path rsa512PublicKey;

  private Path keyId;

  @SneakyThrows
  public SecurityConfiguration(Path configurationFolder) {
    rsa512PublicKey = configurationFolder.resolve("public_key.der");
    rsa512PrivateKey = configurationFolder.resolve("private_key.der");
    keyId = config


 at end\n", b"foo\n# comment at end\n"),
            (b"foo\nbar\n", b"bar\nfoo\n"),
            (b"bar\nfoo\n", b"bar\nfoo\n"),
            (b"a\nc\nb\n", b"a\nb\nc\n"),
            (b"a\nc\nb", b"a\nb\nc\n"),
            (b"a\nb\nc", b"a\nb\nc\n"),

,
            (
                b"#comment1\nbar\n#comment2\nfoo\n",
                b"#comment1\nbar\n#comment2\nfoo\n",
            ),
            (b"#comment\n\nfoo\nbar\n", b"#comment\n\nbar\nfoo\n"),
            (b"#comment\n\nbar\nfoo\n", b"#comment\

       (
                b"#comment1\nfoo\n#comment2\nbar\n",
                b"#comment2\nbar\n#comment1\nfoo\n",
            )


   warn!("Skipping invalid toolchain: {e:#}");
                    None
                }
            })
            .collect()
            .await;

        Ok(infos)
    }

    /// List system-installed Rust toolchains.
    pub(crate) async fn list_system

<ToolchainInfo>> {
        let output = Cmd::new(&self.bin)
            .arg("toolchain")
            .arg("list")
            .arg("-v")
            .env(EnvVars::RUSTUP_AUTO_INSTALL, "0")
            .check(true)
            .output()
            .await


  U64 pn_begin;
      if (st->index_size == 4) { pn_begin = stream.u.page_indices_u32[pn_base + page_idx]; }
      else                     { pn_begin = stream.u.page_indices_u16[pn_base + page_idx]; }

      U64 pn_end = pn_begin;
      for (; page_idx+1

if (st->index_size == 4) { next_pn = stream.u.page_indices_u32[pn_base + page_idx + 1]; }
        else                     { next_pn = stream.u.page_indices_u16[pn_base + page_idx + 1]; }
        if ((pn_end + 1) != next_pn) { break; }
        pn_end = nex

< page_count; page_idx += 1) {
        U64 next_pn = 0;


tool_roundtrip_regression() {
    let model = client()
        .completion_model(anthropic_adaptive_model())
        .with_prompt_caching();
    let agent = AgentBuilder::new(model)
        .preamble(
            "You must call tools when the user asks for

answer with the exact result.",
        )
        .max_tokens(2048)
        .additional_params(adaptive_thinking_params())
        .tool(AlphaSignal)
        .build();

    let response = agent
        .prompt("Call `lookup_harbor_label` exactly once, then

 their result. \
             After a tool result is available,


sting.T) {
	for _, tt := range []struct {
		err      error
		validErr error
		result   *ExpressionOrList
		name     string
		inp      string
	}{
		{
			name: "simple",
			inp:  `"\"User-Agent\" in headers"`,
			result: &ExpressionOrList{
				Expression: `"

	},
		{
			name: "object-and",
			inp: `{
			"all": ["\"User-Agent\" in headers"]
			}`,
			result: &ExpressionOrList{
				All: []string{
					`"User-Agent" in headers`,
				},
			},
		},
		{
			name: "object-or",
			inp: `{
			"any": ["\"User-Agent\" in h


!
print(user["name"])  # 💥 TypeError at runtime
```

### Rust Option

```rust
// Rust — Option<T> forces you to handle the None case
fn find_user(user_id: i64) -> Option<User> {
    let users = HashMap::from([(1, User { name: "Alice".into() })]);
    users

 Option<User> — you CANNOT use it without handling None

// Method 1: match
match find_user(999) {
    Some(user) => println!("Found: {}", user.name),
    None => println!("Not found"),
}

// Method 2: if let (like Python's if (x := expr) is not None)
if l

.get(&user_id).cloned()
}

let user = find_user(999);
// user is


te or return existing share.
Response (201): ShareView.

**DELETE /sessions/{id}/public-share** — Remove share.
Response: 204.

---

## Browsers (CDP)

**POST /browsers** — Create a CDP browser session.

| Param | Type | Required | Description |
|-------|-

 (195+ countries) |
| timeout | integer | no | Session timeout in minutes (max 240) |
| browserScreenWidth | integer | no | Browser width in pixels |
| browserScreenHeight | integer | no | Browser height in pixels |
| customProxy | object | no | `{ host, p

-----|----------|-------------|
| profileId | uuid | no | Browser profile |
| proxyCountryCode | string | no | Residential proxy


tatus == 200

    @pytest.mark.asyncio
    async def test_cookies_loading(self, fetcher, urls):
        """Test if cookies are set after the request"""
        response = await fetcher.async_fetch(urls["cookies_url"])
        cookies = {response.cookies[0]

            await page.mouse.wheel(10, 0)
            await page.mouse.move(100, 400)
            await page.mouse.up()
            return page

        response = await fetcher.async_fetch(urls["html_url"], page_action=scroll_page)
        assert response

['name']: response.cookies[0]['value']}
        assert cookies == {"test": "value"}

    @pytest.mark.asyncio
    async def test_automation(self, fetcher, urls):
        """Test if automation breaks the code or not"""

        async def scroll_page(page):


e):
			# Handle content
			content = LangChainMessageSerializer._serialize_assistant_content(message.content)

			# For simplicity, we'll ignore tool calls in LangChain integration
			# as requested by the user
			return AIMessage(
				content=content,

:
			raise ValueError(f'Unknown message type: {type(message)}')

	@staticmethod
	def serialize_messages(messages: list[BaseMessage]) -> list[LangChainBaseMessage]:
		"""Serialize a list of browser-use messages to LangChain messages."""
		return [LangChainM


 # WHAT and WHY
│       └── design.md       # HOW (optional, for established patterns)
└── changes/                # Proposed changes
    ├── [change-name]/      # Descriptive change identifier
    │   ├── proposal.md     # Why, what, and impact
    │   ├─

─ archive/            # Completed changes
        └── YYYY-MM-DD-[name]/
```

## Change Storage Convention

### Future State Storage

WHEN creating a change proposal
THEN store the complete future state of affected specs
AND use clean markdown without diff

─ tasks.md        # Implementation checklist
    │   ├── design.md       # Technical decisions (optional)
    │   └── specs/          # Complete future state
    │       └── [capability]/
    │           └── spec.md # Clean markdown (no diff syntax)
    └─


 map[string]Parser

	fallbackParser Parser
}

// NewExtParser creates a new ExtParser.
func NewExtParser(ctx context.Context, conf *ExtParserConfig) (*ExtParser, error) {
	if conf == nil {
		conf = &ExtParserConfig{}
	}

	p := &ExtParser{
		parsers:

fallbackParser == nil {
		p.fallbackParser = TextParser{}
	}

	if p.parsers == nil {
		p.parsers = make(map[string]Parser)
	}

	return p, nil
}

// GetParsers returns a copy of the registered parsers.
// It is safe to modify the returned parsers.
func (p *

 conf.Parsers,
		fallbackParser: conf.FallbackParser,
	}

	if p.


ete - Release Automation}"
ITEM_EXPLICIT=0
if [ -n "${NPM_OP_ITEM:-}" ]; then
  ITEM_EXPLICIT=1
fi
ACCOUNT=""
REGISTRY="${NPM_REGISTRY:-https://registry.npmjs.org/}"
ACCESS="public"
TAG="latest"

while [ "$#" -gt 0 ]; do
  case "$1" in
    --vault) VAULT="

    --item) ITEM="${2:?missing item}"; ITEM_EXPLICIT=1; shift 2 ;;
    --account) ACCOUNT="${2:?missing account}"; shift 2 ;;
    --access) ACCESS="${2:?missing access}"; shift 2 ;;
    --tag) TAG="${2:?missing tag}"; shift 2 ;;
    -h|--help) usage; exit


finition -> {
          Parameter param = paramDefinition.toParameter();
          param.setEvaluatedResult(
              param.getType() == ParamType.STRING && param.asStringParam().getValue().contains("$")
                  ? DUMMY_EVALUATED_RESULT

);
          param.setEvaluatedTime(DUMMY_EVALUATION_TIME);
          return param;
        };

    @Override
    public boolean isValid(RetryPolicy retryPolicy, ConstraintValidatorContext context) {
      if (retryPolicy == null) {
        return true;


tatus, 0);
  assert.match(r.stdout, /USAGE/);
  assert.match(r.stdout, /--with-hooks/);
});

test('--list prints provider matrix', () => {
  const r = run('--list');
  assert.equal(r.status, 0);
  assert.match(r.stdout, /caveman provider matrix/);
  assert

/unknown flag/);
});

test('--all + --minimal mutually exclusive', () => {
  const r = run('--all', '--minimal');
  assert.equal(r.status, 2);
  assert.match(r.stderr, /mutually exclusive/);
});

test('--only without arg fails', () => {
  const r = run('--

.match(r.stdout, /claude\b/);
  assert.match(r.stdout, /gemini\b/);
  assert.match(r.stdout, /antigravity\b.*\(soft\)/);
});

test('unknown flag exits 2 with error', () => {
  const r = run('--bogus');
  assert.equal(r.status, 2);
  assert.match(r.stderr,


sText = await announceIdentity(result.tokens.access_token);
        waitingSpinner.succeed(pc.green(successText));
        return result.tokens.access_token;
      }
      if (result.status === "slow_down") {
        intervalMs += 5000;
        continue;

== "denied") {
        waitingSpinner.fail(pc.red("Authorization denied."));
        return null;
      }
      if (result.status === "expired") {
        waitingSpinner.fail(pc.red("Code expired. Run login again."));
        return null;
      }
      if


nction formatBudgetFromDetail(job) {
    const type = job?.type;
    const min = Number(job?.extendedBudgetInfo?.hourlyBudgetMin) || 0;
    const max = Number(job?.extendedBudgetInfo?.hourlyBudgetMax) || 0;
    const amount = Number(job?.budget?.amount) ||

!== min) return `$${min}-$${max}/hr`;
        if (max > 0) return `$${max}/hr`;
        if (min > 0) return `$${min}/hr`;
        return '';
    }
    if (type === 1) return amount > 0 ? `$${amount}` : '';
    return '';
}

export function jobType(type) {


 return { ok, stderr }.
function exec(cmd, opts = {}) {
  try {
    execSync(cmd, { timeout: correctnessTimeoutMs(), encoding: 'utf8', stdio: 'pipe', ...opts });
    return { ok: true, stderr: '' };
  } catch (e) {
    return { ok: false, stderr: (e.stderr

 pythonCmd;
function python() {
  if (pythonCmd) return pythonCmd;
  for (const cmd of ['python3', 'python']) {
    if (exec(`${cmd} -c "import sys"`).ok) {
      pythonCmd = cmd;
      return pythonCmd;
    }
  }
  pythonCmd = 'python3';
  return pythonCm

 || e.message || '').slice(0, 500) };
  }
}

// ponytail: probe once at load; macOS and many Linux images ship python3 only.
let


===========
-- Check for Invalid Dates
-- Expectation: No Invalid Dates
SELECT
    NULLIF(sls_due_dt, 0) AS sls_due_dt
FROM bronze.crm_sales_details
WHERE sls_due_dt <= 0
    OR LEN(sls_due_dt) != 8
    OR sls_due_dt > 20500101
    OR sls_due_dt < 190


rting both Claude Code and Cursor now lays a foundation for future agents that introduce slash command features.

## Proposal
1. During `openspec init`, when a user selects a supported tool, generate slash command configuration for three OpenSpec workflow

, `tasks.md`, delta specs); validate strictly.
     - Apply – implement an approved change; complete tasks; validate strictly.
     - Archive – archive after deployment; update specs if needed.
   - Each command file MUST embed concise, step-by-step instru

stages:
   - Claude (namespaced): `/openspec/proposal`, `/openspec/apply`, `/openspec/archive`.
   - Cursor (flat, prefixed): `/openspec-proposal`, `/openspec-apply`, `/openspec-archive`.
   - Semantics:
     - Create – scaffold a change (ID, `proposal.md`