diff --git a/docs/architecture/document-sources.md b/docs/architecture/document-sources.md index 3a8f3d469ca..cac5bb4b72d 100644 --- a/docs/architecture/document-sources.md +++ b/docs/architecture/document-sources.md @@ -739,8 +739,8 @@ hook sends with a session's prompt, files or transcript (`context.pack`, `code.s the latest user message through `memory.search` and persist conversation items through `memory.set`, so both are session content. Its coalesced delivery through `memory.bulk_set` has the same class. Automatic tool interception also sends -`code.test_gate`, `code.symbol`, `code.enclosing` and `tracker.duplicate_check` with -session-derived inputs. The rule decides; the +`code.test_gate`, `code.symbol`, `code.outline`, `code.enclosing` and +`tracker.duplicate_check` with session-derived inputs. The rule decides; the registry's classes and a test over what the shipped hooks send pin the full set. Once a session has seen the flag, no Loom hook sends any op from it, reads included, and diff --git a/docs/concepts/memory.md b/docs/concepts/memory.md index ba87cd92042..a4cb42f716c 100644 --- a/docs/concepts/memory.md +++ b/docs/concepts/memory.md @@ -598,7 +598,9 @@ The links are read where the code is: namespace, the memories linked to code in each file or naming it by its path or a tail of it (a bare filename, `search/handler.py`; an absolute path is trusted to name a file below the root that it ends in), each with its `code_state`, within `code_result_lessons_tokens`. Each - row carries `path`, `memory_key`, `namespace`, `excerpt`, `code_state`, `changed_since` (the + row carries `path`, `memory_key`, `namespace`, `excerpt`, `code_state`, `rev` (the first 12 + characters of the commit its link was anchored at) for a linked row, `first_written` (the + day it was first written) for a row with a code state, `changed_since` (the commit that put its code in a changed, unresolved or missing state) when one is known, and `supersedes_key` when it replaces an older row, and `code_moved` (its links to code in the file that is now at another path or symbol than it was written against) when there are @@ -623,7 +625,8 @@ The links are read where the code is: names the first indexed commit at which it read so, and a line whose code is now at another path or symbol says where (each hit lists those links as `code_moved`); `context.pack` decision lines carry the same note, and its memory lines a - `code_state=@` label with `(code moved: …)` ahead of the text. + `code_state=` label (`@` when a commit put it there) with + `(code moved: …)` ahead of the text. - `memory.get` returns the links as `code` (each with its lines, any `suggestion`, and `was_path` and `was_symbol` when the code moved); `memory.search` hits read from a memory's own row carry its worst link as `code_state` and, when that is @@ -636,11 +639,39 @@ The links are read where the code is: and leaves `memory_ask_code_staleness` on, `memory.ask` gives its synthesis a note of the memories whose code moved, changed or went, with the same clause for a link now at another path or symbol. +- Each of those reads says of a memory that names code which state it is in, the commit + its link was anchored at (`code_rev` on a search hit, `rev` on a line or a lesson) and + a day, under a label that says which day it is. `first_written` is the day of the + memory's first write: a `memory.for_file` line, a lesson (the field `first_written`) + and a startup recall line print it, and no later write moves it. `written` is the day + the text served was written: a line of a search hit prints it from the hit's + `created_at`, the search document's, which a write of the text (`memory.set`, + `memory.update_by_id`) and `memory.restore` stamp again. For a memory whose text was + written again or restored, `written` is therefore a later day than `first_written`. + Neither is the row's `updated_at`: an unpin, a lock, an unlock or a label moves neither. + The commit is the repository's indexed head when the link was made or last re-anchored; + for a link made after its memory that is a later commit than the writer worked at. + A search hit read from a memory's own row that shows no link state, and whose text + names a file by a path with a directory, is `unlinked`: the read has no comparison + with code to show for it. Where no repository is indexed that is every such hit, and a + hit whose only link is pending or in a repository the caller may not read is marked + the same way. A `memory.for_file` line and a lesson are marked likewise; a memory that + names its file only in `files`, by a bare file name or by a symbol is not. `unlinked` + is a label a read gives: no row and no parked search page stores it. + A reply that serves a memory with a code state says once what was compared: no code + for an `unlinked` memory, and for every other state the repository as Loom indexed + it, which is not the caller's checkout. That sentence is `code_note` on + `memory.search`, the first line of a reader block, of a `context.pack` block and of + `loom_search`'s plain lines, the line after the header of a `memory.for_file` + block, and the `note` of a review brief's `rationale` section, whose rows carry the + `memory.for_file` line. A block takes the sentence's room from the budget of the row + that prints with it, so a row left out takes its part of the sentence with it. - `namespace.validate` lists memories whose code changed, was not found again or is gone, in the repositories the caller may read, and the edits that bring a memory's text up to a rename its link followed. -A memory with no link reads exactly as one whose code is current. `namespace.validate` +A memory with no link carries no link state: a read marks it `unlinked` when its text +names a file by its path, and serves it without a label otherwise. `namespace.validate` counts the served memories that name code (a backticked or qualified name, a call, or `files`) and hold no link, by cause, as `info` findings: diff --git a/docs/features/code-index/history-and-prs.md b/docs/features/code-index/history-and-prs.md index fdf1936b7a9..054860a95fb 100644 --- a/docs/features/code-index/history-and-prs.md +++ b/docs/features/code-index/history-and-prs.md @@ -88,7 +88,9 @@ rows, those with something to check first. It serves whole rows, `check` rows fi then constraints. `LOOM_CODE_REVIEW_BRIEF_RATIONALE_TOKENS` defaults to `0` (unlimited); a positive setting or request token budget trims whole rows to fit. Each row carries the pre-edit block's line for it with its value cut at the line length (source, -`(pinned)` and the code-change note kept), `pinned`, `code_state` and a `verdict`. Each +`(pinned)` and the code-change note kept), `pinned`, `code_state` and a `verdict`. When +a served row has a code state the section's `note` says what it was compared with: the +repository as Loom indexed it, not the caller's checkout. Each changed file read is one `memory.for_file` read: four ClickHouse reads (files match, code links, their memories, the linked rows; a file with many links slices the last), each keeping up to 50 rows with up to `LOOM_MEMORY_FOR_FILE_WHOLE_TOKENS` × 48 bytes of value. diff --git a/docs/features/integrations/claude-code.md b/docs/features/integrations/claude-code.md index c30eb2bb6b1..f529f31b5b2 100644 --- a/docs/features/integrations/claude-code.md +++ b/docs/features/integrations/claude-code.md @@ -9,7 +9,7 @@ The `loom` plugin for Claude Code does three things in one install: call, and the agent has nothing to remember to do. - **Steers the agent to the code index** inside a Loom-indexed repository. Whole-file reads and tree-wide greps are redirected to `code.*` operations, and an edit gets the - file's rules before it and its blast radius after it. + file's rules before it, and its blast radius and the tests linked to the file after it. Source: `integrations/claude-code-plugin/`, Node ESM scripts with no dependencies. The Codex build runs the same scripts; see [codex.md](codex.md). @@ -55,9 +55,12 @@ end of this section are the exceptions. The plugin sends: - token usage and the model name (Claude Code only); - after each edit in an indexed checkout, the outline of that file's uncommitted diff against `HEAD`, to `code.impact` (`LOOM_BLAST_RADIUS=off` stops it); -- at Stop in an indexed checkout, the outline of the diff of the files the session - changed, or of the whole uncommitted tree when the client gives no transcript, to - `code.test_gate` (`LOOM_TEST_GATE=off` stops it). A diff's outline, up to 200,000 +- the first time a session changes a file in an indexed checkout, with an edit tool or a + shell command that names it, the outline of that file's uncommitted diff, to + `code.test_gate` (`LOOM_TEST_GATE=off` stops it), and once more at the Stop of a + session that ran no test since its last code change, for the files it changed. With + `LOOM_TEST_GATE=block` the outline goes at Stop only, for the files the session changed, + or for the whole uncommitted tree when the client gives no transcript. A diff's outline, up to 200,000 characters, is its file paths, its hunk line ranges and, in a code file, the last identifier before the first `(` of each hunk header's context, usually the enclosing function's name. Git takes that context from a line above the hunk in the old file, @@ -185,8 +188,8 @@ Every option is optional; Claude Code asks once, and an empty answer falls back Count agent tool calls and hook requests separately. Before Claude chooses a tool, the prompt hook can search the code index and supply matching symbols and line ranges. Claude can use those pointers through a targeted `Read` with no explicit Loom tool call. -The test gate also calls `code.test_gate` itself; it names test obligations and does not -execute the tests. Zero explicit calls alone does not establish that Loom was unused. +The test gate also calls `code.test_gate` itself; it names the tests linked to a changed +file and does not execute them. Zero explicit calls alone does not establish that Loom was unused. Check the setup in this order: @@ -391,11 +394,24 @@ It stays quiet for untracked files, empty diffs, repeated impact results, an una index or a failed request. Edits performed through `Bash`, including scripts using `python` or `sed`, do not match either edit hook. +The test gate's line does follow a shell edit. It runs on `PostToolUse` after `Bash` and +`PowerShell`, and rides the blast-radius hook after `Edit`, `Write` and `MultiEdit`. It +emits one line per changed file, `Loom tests for : `, the first time the +session changes that file, and only when the command names the file's path, the file +differs from `HEAD`, it was written after the session began, and there is something to +name: a test the index links to it and the checkout has, the file itself when it is a +test, or, with no such test, the changed functions the index links no test to. It +stays quiet for a file whose tests an earlier line named or the command itself ran, a +comment-only change, an untracked file, a file already asked about in the session, an +unavailable index or a request that failed twice, and always with `LOOM_TEST_GATE=block` +or `off`. + Headless sessions support `hookSpecificOutput.additionalContext`; ordinary visible assistant output does not prove whether that context reached the model. Capture `--debug hooks,mcp` output privately and redact tokens and authorization headers before sharing it. Include the hook event, tool name, hook output and relevant stream events. -Correlate them with server requests to `memory.for_file` and `code.impact` to distinguish +Correlate them with server requests to `memory.for_file`, `code.impact` and +`code.test_gate` to distinguish hook matching, request execution, nonempty context and delivery to the agent. ## Configuration @@ -471,13 +487,14 @@ The wiring is `hooks/hooks.json`; `hooks/HOOKS.md` has per-hook notes. | PreToolUse (Read, Grep, Bash) | `loom-code-shunt.mjs` | the code shunt and the tracker shunt ([next section](#the-code-shunt)) | `LOOM_CODE_SHUNT=off`, `LOOM_TRACKER_SHUNT=off` | | PreToolUse (Edit, Write, MultiEdit, NotebookEdit) | `loom-file-context.mjs` | what Loom knows about the file about to change (`memory.for_file`): your rules and the repository's shared rules and design decisions; once per file per 30 min | `LOOM_FILE_CONTEXT=off` | | PostToolUse (Loom tools) | `loom-mentor-hint.mjs` | lifts a result's `hint` into context, once per hint code per session | `LOOM_MENTOR_HINTS=off` | -| PostToolUse (Edit, Write, MultiEdit) | `loom-blast-radius.mjs` | one line from `code.impact`: callers, tests reaching the change, co-change files not yet touched | `LOOM_BLAST_RADIUS=off` | +| PostToolUse (Edit, Write, MultiEdit) | `loom-blast-radius.mjs` | one line from `code.impact`: callers, tests reaching the change, co-change files not yet touched; on a file's first edit, the test gate's line beside it in place of the tests | `LOOM_BLAST_RADIUS=off` | +| PostToolUse (Bash, PowerShell) | `loom-test-gate.mjs` | one line per file the command changed, naming the command of the file's tests, or the changed functions the index links no test to (`code.test_gate`); once per file and per test per session, on the tool result ([the test gate](#the-test-gate)) | `LOOM_TEST_GATE=off` | | UserPromptSubmit | `loom-record.mjs` | the prompt's one process: runs `loom-prompt-pack` and `loom-prompt-recall` in the hook and prints their context as one answer, writes the run's begin to the session's run state, and hands the prompt's recording scripts (`loom-run`, the namespace audit) to a detached process | each script's own | | PostToolUse, PostToolUseFailure, Stop, SessionEnd | `loom-record.mjs` | runs the event's recording scripts (the rows below for those events, the gates excepted) in one process: detached after a tool call and at Stop, so the session does not wait for their requests, and in the hook itself at SessionEnd | each script's own | | PostToolUse, PostToolUseFailure (any tool) | `loom-capture.mjs` | one episodic observation per tool call (`observe.record`); a failed call is typed `error` | none | | Stop, SessionEnd | `loom-conversation.mjs` | appends new chat turns to the conversation plane (`conversation.append`) | `LOOM_CAPTURE_CONVERSATIONS=false` | | Stop | `loom-usage.mjs` | posts the session's token usage to `cost.record_turns` | `LOOM_USAGE=off` | -| Stop | `loom-test-gate.mjs` | for changes this session made, blocks "done" once with the tests `code.test_gate` says the change obliges, unless your latest prompt ends with "Do not run the tests", or pytest already ran them to its summary line, failures included, and nothing was edited or run since (exact conditions: **Answered stops** in the plugin README) | `LOOM_TEST_GATE=off` | +| Stop | `loom-test-gate.mjs` | for changes this session made, blocks "done" once with the tests `code.test_gate` says the change obliges, unless a test runner ran since the last code change or your latest prompt ends with "Do not run the tests"; with `LOOM_TEST_GATE=block`, unless pytest ran the named tests to its summary line and nothing was edited or run since ([the test gate](#the-test-gate)) | `LOOM_TEST_GATE=off` | | Stop | `loom-validate-gate.mjs` | blocks once when `namespace.validate` finds errors or warnings on the memory keys this session wrote | `LOOM_VALIDATE_GATE=off` | | Stop | `loom-namespace-health.mjs` | one line when `namespace.audit` finds a critical misuse of the namespace, pointing at the `loom-optimize` skill; the audit is asked once per session, by the first prompt's detached process, and told at a Stop | `LOOM_NAMESPACE_HEALTH=off` | | Stop, PreCompact | `loom-working-memory.mjs` | refreshes the working-memory note (`session:`): goal, git status, files edited, last reply | `LOOM_WORKING_MEMORY=off` | @@ -491,7 +508,7 @@ requests) run `node`, `git` and `grep` on your machine: `git` reads the checkout remotes, branch, `HEAD` commit, status and diffs, and `grep` searches uncommitted files for the pattern of a grep the plugin redirects to the code index. The `loom-session` skill's brief script also runs `git log` for the commits since the last brief. The test -gate (the hook that, when a reply ends, names the tests a change needs) runs no Python: +gate (the hook that names the tests of a file you change) runs no Python: for a pytest test it picks the interpreter of the checkout's virtualenv, the active one (`VIRTUAL_ENV`) or a `python3` or `python` on `PATH`, checking that the interpreter's file exists without running it. @@ -584,6 +601,7 @@ Beyond the off switches in the table: | `LOOM_PROMPT_PACK_MIN_CONF` | unset | a `retrieval_confidence` gate for search pointers (low risk is 0.7 up); unset, that label | | `LOOM_FILE_CONTEXT_TTL_MIN` | `30` | minutes before the same file's context is fetched again | | `LOOM_BLAST_DEPTH` | `1` | `code.impact` depth for the blast-radius line | +| `LOOM_TEST_GATE` | unset | `block`: no line at edit time, and a stop passes only on the named tests; `off`: no gate | | `LOOM_TEST_GATE_DEPTH` | `2` | hops the test gate follows (1–3) | | `LOOM_OBSERVE_DEDUPE_S` | `60` | a repeated read in this window is not observed again; `0` disables | | `LOOM_OBSERVE_SKIP_TOOLS` | a built-in list | comma-separated tool names (with `*` globs) that produce no observation | @@ -592,24 +610,67 @@ Beyond the off switches in the table: `integrations/claude-code-plugin/README.md` documents the remaining knobs. +## The test gate + +The test gate tells the agent which tests constrain a file when it changes the file. In +an indexed checkout, the tool call that first changes a file comes back with one extra +line when Loom has a test to name for it: + +```text +Loom tests for src/app/router.py: .venv/bin/python -m pytest tests/test_router.py +``` + +- **What it names.** For a source file, the tests `code.test_gate` links to it through + its name, the mined test map or the call graph, each of them present in the checkout. + For a test file, the file itself. A test is given as one command where the harness is + known (`LOOM_CODE_TEST_GATE_RUN_TEMPLATES` on the server adds yours) and by path where + it is not. For pytest the line names the checkout's interpreter without starting it. +- **With no test to name.** A source file with no such test in the checkout gets the + changed functions in place of a command: `the index links no test to Router::match`. + That is the index's view, not a fact about your tests: its call graph is a floor, and + a test can reach a function the graph holds no edge to. +- **When.** Once per file and once per test per session, on the result of the edit tool + or shell command that changed the file. It costs no model request, and a session that + never runs the tests has still been told which ones they are. A file is asked about at + its first change only, so a function changed later in the same file is not named. A + test that shell command itself runs is not named on its own result. +- **At the end of the session.** A session that ran no test since its last code change + is held once per distinct change, with the tests the change obliges and the functions + the index links no test to. A held stop costs the session one more model request, so + any test run since that change lets the stop pass: a shell command that starts a test + runner and finished no earlier than the newest write among the code files the session + changed. A documentation or prose file (`.md`, `.rst`, `.txt`, a changelog) written + after the run holds nothing. The gate reads that command for a runner's name only. Which tests ran and how they went cannot be read + reliably from shell commands, so that judgement stays with the agent and with CI. The + plugin README lists the runners under **Stops that pass**. + +To hold the stop until the named tests ran on the final tree, set `LOOM_TEST_GATE=block` +in the environment Claude Code starts in. The gate then prints nothing at edit time, and +blocks "done" once per distinct change unless the transcript already answers the ask; the +plugin README lists the exact conditions under **Answered stops**. That mode also holds a +session that ran the tests in a way the gate does not read. `LOOM_TEST_GATE=off` turns +the gate off. + ## The code shunt -Inside an indexed checkout, `loom-code-shunt.mjs` denies bulk reads and names the op to -call instead: an identifier goes to `code.symbol`, a literal or regex to `code.grep`, -words to `code.search`. The index answers with the enclosing unit and its callers, not a -whole file. - -| Tool call | Denied when | -| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `Read` of a whole file | the file is indexed, unmodified, and longer than `LOOM_SHUNT_MAX_LINES` (800) | -| `Read` with `offset` / `limit`, or a `sed -n` / `head` / `tail` / `awk` slice | the span exceeds `LOOM_SHUNT_READ_CAP` (0 = off); at most twice per file per session | -| `Grep` over a directory; `rg`, `grep -r`, `cat` in Bash | the scope is inside the indexed tree | -| a grep for one symbol name in one file | once per symbol per session, with the exact `code.symbol` call | -| `gh issue list --search`, `gh search issues` | once per query, answered by `tracker.duplicate_check` with the closest reported items | - -Everything else passes: targeted reads, single-file greps, pipelines, files you modified -or have not committed, unindexed repositories. The same command passes on the next try -after a symbol or tracker-shunt denial. +Inside an indexed checkout, `loom-code-shunt.mjs` denies a bulk read and puts the +index's answer in the denial: a file's functions, methods, classes and structs with their +lines and headers, a symbol's definition, the tracker's verdict. A denial costs the agent a +request, so the hook gives one only when it holds that answer in full. + +| Tool call | Denied when | +| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | +| `Read` of a whole file | the file is indexed, unmodified, longer than `LOOM_SHUNT_MAX_LINES` (800), and outlined in full by the index | +| `Read` with `offset` / `limit`, or a `sed -n` / `head` / `tail` / `awk` slice | the span exceeds `LOOM_SHUNT_READ_CAP` (0 = off); at most twice per file per session | +| `cat`, `bat`, `nl` or `tac` of a whole file in Bash | the whole-file rule, when the read is the whole command | +| a grep for one symbol name in one file | once per symbol per session, when the index holds exactly one definition | +| `gh issue list --search`, `gh search issues` | once per query, answered by `tracker.duplicate_check` with the closest reported items | + +Everything else passes: targeted reads, greps over a directory, single-file greps, files +you modified or have not committed, unindexed repositories, and any call the index does +not answer in full within 2.5 s. A Bash command of several parts (`;`, `&&`, `||`, a newline or a pipe) is +never denied, because a denial withholds every part; its reads and greps are still +counted. The same command passes on the next try after a symbol or tracker-shunt denial. Staleness does not turn the shunt off: an unmodified file is answered as of its indexed commit, and the deny text names the commit. To search your working tree instead, set diff --git a/docs/pages/adoption.astro b/docs/pages/adoption.astro index 07893d6c939..fbae9b8807d 100644 --- a/docs/pages/adoption.astro +++ b/docs/pages/adoption.astro @@ -7,6 +7,7 @@ export const prerender = false; const result = await readAdoptionPage(Astro.request, Astro.url, "self-hosted"); if (result instanceof Response) return result; for (const [name, value] of result.headers) Astro.response.headers.set(name, value); -const directoryRefresh = Astro.request.method === "POST" && Astro.request.headers.get("X-Loom-Adoption-Fragment") === "domains"; +const directoryRefresh = + Astro.request.method === "POST" && Astro.request.headers.get("X-Loom-Adoption-Fragment") === "domains"; --- diff --git a/docs/reference/environment.md b/docs/reference/environment.md index c24fdc3f695..ea9d32cf67a 100644 --- a/docs/reference/environment.md +++ b/docs/reference/environment.md @@ -123,12 +123,12 @@ See [Python SDK](./python-sdk.md) and [TypeScript SDK](./typescript-sdk.md). ## Coding-agent plugins and hook scripts -| Variable | Read by | Default | Meaning | -| ------------------------------------------ | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `LOOM_ORG`, `LOOM_NAMESPACE`, `LOOM_AGENT` | the plugins' `lib/loom-client.mjs`, `integrations/cursor/`, `integrations/generic/`, `dev/loom_init.py` | `~/.loom/config.json`, then the token's claims, then `default` / `coding` / the client's name | The identity the hooks and scripts write captured rows under. | -| `LOOM_HOOK_TIMEOUT_MS` | the plugins' `lib/loom-client.mjs` | 5 × the measured `/v1/health` round trip, between 3000 and 8000 | The timeout that aborts each hook request; `loom doctor --client` reports it. | -| `LOOM_HOOK_EXIT_MS` | the plugins' `lib/loom-client.mjs` | `LOOM_HOOK_TIMEOUT_MS` | How long a hook process waits after it sends before it exits. | -| `LOOM_SHUNT_READ_CAP` | the plugins' `hooks/loom-code-shunt.mjs` | `0` (off) | Lines above which a ranged read of an indexed, unmodified file is sent to the code tools instead. | +| Variable | Read by | Default | Meaning | +| ------------------------------------------ | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `LOOM_ORG`, `LOOM_NAMESPACE`, `LOOM_AGENT` | the plugins' `lib/loom-client.mjs`, `integrations/cursor/`, `integrations/generic/`, `dev/loom_init.py` | `~/.loom/config.json`, then the token's claims, then `default` / `coding` / the client's name | The identity the hooks and scripts write captured rows under. | +| `LOOM_HOOK_TIMEOUT_MS` | the plugins' `lib/loom-client.mjs` | 5 × the measured `/v1/health` round trip, between 3000 and 8000 | The timeout that aborts each hook request; `loom doctor --client` reports it. | +| `LOOM_HOOK_EXIT_MS` | the plugins' `lib/loom-client.mjs` | `LOOM_HOOK_TIMEOUT_MS` | How long a hook process waits after it sends before it exits. | +| `LOOM_SHUNT_READ_CAP` | the plugins' `hooks/loom-code-shunt.mjs` | `0` (off) | Lines above which a ranged read of an indexed, unmodified file is denied with its declarations. | See [Claude Code plugin](../features/integrations/claude-code.md). diff --git a/docs/reference/operations/code.md b/docs/reference/operations/code.md index 0b947579272..f2c2338c8a2 100644 --- a/docs/reference/operations/code.md +++ b/docs/reference/operations/code.md @@ -292,7 +292,7 @@ What does this symbol call — forward call edges (depth<=3), tier-marked like c | Output field | Type | Meaning | | --- | --- | --- | -| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `changed_since`, `code_moved` and `supersedes_key` when they apply. | +| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `rev`, `first_written`, `changed_since`, `code_moved` and `supersedes_key`… | | `lessons_left_out` | `int` | How many rows about those files the lessons' token cap or a cut left out, with the rows another row read for the answer supersedes. | | `edges` | `list[CodeEdgeWire]` | The call-graph edges found, hop by hop; the far end (`from_*` for callers, `to_*` for callees) is the answer. | | `seed_symbols` | `list[str]` | Qualified names of the definitions the walk started from; empty when refused as ambiguous. | @@ -346,7 +346,7 @@ Find callers before editing shared code. | Output field | Type | Meaning | | --- | --- | --- | -| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `changed_since`, `code_moved` and `supersedes_key` when they apply. | +| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `rev`, `first_written`, `changed_since`, `code_moved` and `supersedes_key`… | | `lessons_left_out` | `int` | How many rows about those files the lessons' token cap or a cut left out, with the rows another row read for the answer supersedes. | | `edges` | `list[CodeEdgeWire]` | The call-graph edges found, hop by hop; the far end (`from_*` for callers, `to_*` for callees) is the answer. | | `seed_symbols` | `list[str]` | Qualified names of the definitions the walk started from; empty when refused as ambiguous. | @@ -391,7 +391,7 @@ Briefing at the START of a task, instead of exploring file by file. | Output field | Type | Meaning | | --- | --- | --- | -| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `changed_since`, `code_moved` and `supersedes_key` when they apply. | +| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `rev`, `first_written`, `changed_since`, `code_moved` and `supersedes_key`… | | `lessons_left_out` | `int` | How many rows about those files the lessons' token cap or a cut left out, with the rows another row read for the answer supersedes. | | `context` | `str` | The pack as Markdown text; for `unavailable`, a short note saying the PR has no pack yet. | | `tokens_used` | `int` | Estimated tokens of `context`. | @@ -642,7 +642,7 @@ Batched `path:line` -> enclosing function. | Output field | Type | Meaning | | --- | --- | --- | -| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `changed_since`, `code_moved` and `supersedes_key` when they apply. | +| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `rev`, `first_written`, `changed_since`, `code_moved` and `supersedes_key`… | | `lessons_left_out` | `int` | How many rows about those files the lessons' token cap or a cut left out, with the rows another row read for the answer supersedes. | | `results` | `list[dict[str, Any]]` | one entry per input location, input order preserved: {path, line, symbol, symbol_id, qualified_name, signature, tier, kind, start_line, end_line} kind is "function" / "method" / "fixture" for a line inside a function body; "class"… | | `resolved` | `int` | Locations that landed inside a function, type, or document section. | @@ -790,7 +790,7 @@ Literal or regex search of indexed source with enclosing symbols and coverage. | Output field | Type | Meaning | | --- | --- | --- | -| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `changed_since`, `code_moved` and `supersedes_key` when they apply. | +| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `rev`, `first_written`, `changed_since`, `code_moved` and `supersedes_key`… | | `lessons_left_out` | `int` | File lessons omitted by symbol focus, a token budget, truncation or supersession. | | `matches` | `list[dict[str, Any]]` | {path, line, text, scope, scope_start_line, scope_end_line} per matching LINE, path/line ordered except when prioritize_patterns gives different literals first-page slots. scope_* is the span of the enclosing unit named by `scope` (0/0… | | `related` | `RelatedGrepEvidence \| None` | Related source for a qualified argument or member, separate from literal matches. | @@ -883,7 +883,7 @@ Symbol-shaped (name/symbol_id) or diff-shaped (files/diff) blast radius. | Output field | Type | Meaning | | --- | --- | --- | -| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `changed_since`, `code_moved` and `supersedes_key` when they apply. | +| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `rev`, `first_written`, `changed_since`, `code_moved` and `supersedes_key`… | | `lessons_left_out` | `int` | How many rows about those files the lessons' token cap or a cut left out, with the rows another row read for the answer supersedes. | | `impacted_symbols` | `list[dict[str, Any]]` | Each row {qualified_name, path, hop, tier}; a row whose function is a registration function (`REGISTER_FUNCTION(X)`, `registerStorageFoo`) carries `via: "registration"` — the seed is reached through a registry; the key is absent otherwise. | | `impacted_tests` | `list[dict[str, Any]]` | Tests the test map ties to the seed and impacted paths: {test_path, src_path, confidence}. | @@ -1060,7 +1060,7 @@ Tell loom what you did with a code answer, by its trace_run_id: 'used_in_answer' | Output field | Type | Meaning | | --- | --- | --- | -| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `changed_since`, `code_moved` and `supersedes_key` when they apply. | +| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `rev`, `first_written`, `changed_since`, `code_moved` and `supersedes_key`… | | `lessons_left_out` | `int` | How many rows about those files the lessons' token cap or a cut left out, with the rows another row read for the answer supersedes. | | `path` | `str` | The repo-relative path read, normalised from the request. | | `entries` | `list[dict[str, Any]]` | source order: {kind, qualified_name, signature, start_line, end_line, tier} | @@ -1160,7 +1160,7 @@ Read indexed lines. | Output field | Type | Meaning | | --- | --- | --- | -| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `changed_since`, `code_moved` and `supersedes_key` when they apply. | +| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `rev`, `first_written`, `changed_since`, `code_moved` and `supersedes_key`… | | `lessons_left_out` | `int` | How many rows about those files the lessons' token cap or a cut left out, with the rows another row read for the answer supersedes. | | `results` | `list[CodeReadRange]` | | | `as_of` | `dict[str, Any]` | | @@ -1568,7 +1568,7 @@ Find implementations by question, behavior or identifier using `query`. | Output field | Type | Meaning | | --- | --- | --- | -| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `changed_since`, `code_moved` and `supersedes_key` when they apply. | +| `lessons` | `list[dict[str, Any]]` | The memories about the answer's top files, best first, capped at `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, code_state}, with `rev`, `first_written`, `changed_since`, `code_moved` and `supersedes_key`… | | `lessons_left_out` | `int` | File lessons omitted by symbol focus, a token budget, truncation or supersession. | | `results` | `list[CodeUnit]` | The ranked units served on this page, cut to top_k and the token budget; empty on an abstain with no pool or a not-covered path. | | `route` | `str` | symbol_exact \| hybrid \| symbol_miss_hybrid | diff --git a/docs/reference/operations/memory.md b/docs/reference/operations/memory.md index eff1610bd52..d7764f89d92 100644 --- a/docs/reference/operations/memory.md +++ b/docs/reference/operations/memory.md @@ -1956,6 +1956,7 @@ Semantic search over the agent's own memory. | Output field | Type | Meaning | | --- | --- | --- | | `results` | `list[_MemorySearchHit]` | The ranked hits, best first; empty when nothing passed the noise floor. | +| `code_note` | `str` | What the search compared, of the `results` this output was built with: no code for an `unlinked` hit, and for any other `code_state` the repository as indexed, not the caller's checkout. '' when no hit names code. | | `reader_block` | `str` | render="reader" only: the results as one prompt block ("[date] [key] (type) excerpt", ordered as memory.ask would read them) and the synthesizer's instructions, so an external reader scores what the ask reader scores on the same hits. | | `reader_instructions` | `str` | render="reader" only: the synthesizer instructions memory.ask pairs with `reader_block`; empty otherwise. | | `bodies_returned` | `int` | bodies="unit" accounting: whole values served / withheld for budget, and the estimated tokens those bodies added (len/4). | diff --git a/integrations/claude-code-plugin/.claude-plugin/plugin.json b/integrations/claude-code-plugin/.claude-plugin/plugin.json index 55afdfb92c9..2c54f8fe797 100644 --- a/integrations/claude-code-plugin/.claude-plugin/plugin.json +++ b/integrations/claude-code-plugin/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "loom", "displayName": "ClickHouse Loom", - "version": "1.2.67", + "version": "1.2.69", "description": "Shared long-term memory and code intelligence for Claude Code, self-hosted on ClickHouse. MCP tools to save and recall decisions, preferences and corrections across sessions and teammates; lifecycle hooks that capture each session with no model call; a code index that answers where-is, who-calls and blast-radius questions with line-accurate units instead of whole-file reads.", "author": { "name": "ClickHouse" diff --git a/integrations/claude-code-plugin/README.md b/integrations/claude-code-plugin/README.md index 7bf6e81ab9d..1ed41fb2295 100644 --- a/integrations/claude-code-plugin/README.md +++ b/integrations/claude-code-plugin/README.md @@ -95,8 +95,8 @@ Loom's MCP requests) run `node`, `git` and `grep` on your machine: `git` reads the checkout's remotes, branch, `HEAD` commit, status and diffs, and `grep` searches uncommitted files for the pattern of a grep the plugin redirects to the code index. The `loom-session` skill's brief script also runs `git log` for the -commits since the last brief. The test gate (the hook that, when a reply ends, -names the tests a change needs) runs no Python: for a pytest test it picks the +commits since the last brief. The test gate (the hook that names the tests of a +file you change) runs no Python: for a pytest test it picks the interpreter of the checkout's virtualenv, the active one (`VIRTUAL_ENV`) or a `python3` or `python` on `PATH`, checking that the interpreter's file exists without running it. @@ -142,36 +142,41 @@ the duplicate, run `claude mcp remove -s user`. ## What it wires -| Lifecycle event | Script | What it does | -| --------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `UserPromptSubmit` | `loom-record.mjs` | The prompt's one process. Runs the two lookups the prompt waits for (`loom-prompt-pack`, `loom-prompt-recall`) in the hook itself and prints what they found as one `additionalContext`; writes the run's begin to the session's run state and hands the prompt's recording scripts (`loom-run`, `loom-namespace-health`'s audit) to a detached process and exits, as after a tool call. | -| `PostToolUse`, `PostToolUseFailure`, `Stop`, `SessionEnd` | `loom-record.mjs` | Runs the event's recording scripts (`loom-capture`, `loom-conversation`, `loom-usage`, `loom-working-memory`, `loom-run`'s close, `loom-session-memory`, `loom-session-brief`) in one process. After a tool call and at `Stop` that process is detached and the hook exits, so the session does not wait for their requests. At `SessionEnd` it is the hook itself, which exits when they have returned: a host torn down when the client exits would end a detached process first. | -| `PostToolUse` | `loom-capture.mjs` | Records one episodic observation of the tool action (heuristic type, file list). | -| `PostToolUseFailure` | `loom-capture.mjs` | Same, typed `error` — the bug-triage signal (errors + the subsequent fix). | -| `SessionStart` | `loom-session-start.mjs` | **First session, no credential:** signs this machine up (see `LOOM_AUTO_SIGNUP`) and points the user to the claim page for the namespace; nothing to paste. Then: injects a token-budgeted context primer (profile + relevant memories) via `context.pack`, so the agent starts knowing your context. Beside it, one line names the checkout's code namespace and the repository's memory tag, or says why no index was looked up, so a session start that prints nothing is a fault unless `LOOM_CODE_MAP=false`. How to route a lookup is in the MCP entry's startup instructions on a toolset with a `coding` part; any other toolset, and a wiring whose entry the plugin does not mount (Codex, a hand-wired client), gets it in the primer. **On by default**, once per session; `LOOM_INJECT_CONTEXT=false` to disable. | -| `PreToolUse` (Edit / Write / MultiEdit / NotebookEdit) | `loom-file-context.mjs` | Asks `memory.for_file` what loom knows about the target file (its files facet) and injects the rendered block as additional context — a constraint arrives **before** the edit, not as a review comment. One lookup per (session, file) per 30 min; never a permission decision. `LOOM_FILE_CONTEXT=off` disables. | -| `PostToolUse` (loom tools) | `loom-mentor-hint.mjs` | **The store's advice reaches the model**: a loom tool result may carry one `hint` — the plane this agent is not using, named from the call it just made (a `memory.get` that missed, a search that abstained where the code index answers, a stack trace written as a memory, a duplicate write). The hook lifts it out of the result JSON into additional context, once per code per session. No request of its own. `LOOM_MENTOR_HINTS=off` disables. | -| `PostToolUse` (Edit / Write / MultiEdit) | `loom-blast-radius.mjs` | In a loom-indexed repo, diffs the edited file against HEAD and asks `code.impact` (depth 1) what the touched symbols reach. Injects **one line**: callers, tests reaching the change, and the co-change partner files this session has not touched — the sibling-file miss, surfaced while the edit is still open. Same touched set reported once per session. `LOOM_BLAST_RADIUS=off` disables. | -| `UserPromptSubmit` | `loom-prompt-recall.mjs` | **Default `first`**: one bounded recall on the first qualifying prompt of a session, including empty or abstaining answers. Clear named code-only questions skip default recall without consuming the attempt; mixed memory requests still qualify. `LOOM_PROMPT_RECALL=on` for every prompt, `off` to disable. One `context.pack` per prompt restricted to `memories`, `decisions`, `procedures` with the prompt as the query; injects the plane-tagged blocks the session has not seen, only when memory is not abstaining and `retrieval_confidence ≥ 0.5`, capped at 1,200 chars (`LOOM_PROMPT_RECALL_MAX_CHARS`). The memory-side sibling of the prompt pack: active retrieval — the model gets what memory knows about the prompt without asking — done per prompt, never per tool turn. | -| `UserPromptSubmit` | `loom-prompt-pack.mjs` | On by default (`LOOM_PROMPT_PACK=off` turns it off). One bounded lookup: `code.symbol`, `code.callers` or `code.impact` for an explicit named question, otherwise `code.search` (top 3, no bodies). Self-contained requests, local-only changes and explicit memory questions skip code retrieval. Search emits only where the index labels its own answer low-risk (or, with `LOOM_PROMPT_PACK_MIN_CONF` set, from that confidence), and without abstention; its pointers are candidates, and nothing tells the model to stop searching; typed answers preserve ambiguity and static-analysis limits. Named implementation or behavior questions request a whole definition body within 600 server-budget tokens; location/signature requests stay pointer-only and oversized bodies stay elided. No fallback request follows an empty typed answer. Pointers are deduplicated within the current answer, so later prompts can receive changed evidence. | -| `Stop` | `loom-test-gate.mjs` | With uncommitted changes **this session made** in a loom-indexed repo (the dirty paths the transcript shows an edit tool targeted or a shell command named, written since the session began, by the file's modification time; a tree left dirty before the session gates nothing, even when a command reads or runs its files), asks `code.test_gate` what the change obliges — the tests that reach it, in evidence order with a `run` command when the harness is derivable, and the touched functions no test reaches — and blocks the stop **once** per distinct change with a reason that names them. The second stop on the same change passes: the tests were named before "done", the choice to run them is the agent's. A stop whose transcript already answers the ask to run tests is not blocked, and so names no untested function (**Answered stops**, below). `LOOM_TEST_GATE=off` disables; `LOOM_TEST_GATE_DEPTH` sets the hops (1–3). | -| `Stop` | `loom-validate-gate.mjs` | **Compile green before done**: collects the memory keys this session wrote from the transcript, asks `namespace.validate` for a report scoped to exactly those keys, and blocks the stop **once** per distinct key set with the error and warning findings that name them (a conflict you opened, a fact whose `valid_to` has passed, an attestation your edit made stale) and each check's remedy. `info` findings never block; the second stop on the same keys passes. `LOOM_VALIDATE_GATE=off` disables. | -| `Stop` | `loom-namespace-health.mjs` | **The store tells you when the namespace is misused**: once per session, one `namespace.audit` over the last day (no samples) for the session's namespace, asked by the first prompt's detached process so that a stop does not wait for it (a stop asks in place only when that process died before its answer); when it carries a critical finding — exact-key reads dwarfing searches, double-encoded values, rows the embedder gave up on, leases in the memory plane — you get **one line** naming the codes and `/loom-optimize`, once per session, at the first stop that finds the verdict, as a block-once reason (the one channel a Stop hook has to the model). Healthy namespace, no token, slow or down server: nothing. The same summary rides `context.pack` as the `namespace_health` section at session start. `LOOM_NAMESPACE_HEALTH=off` disables. | -| `Stop` | `loom-usage.mjs` | Posts the session's own model usage (input, cache read, cache creation by TTL, output; deduped by message id, sidechains skipped) to `cost.record_turns`; the **server** prices it into `loom.agent_turn_usage` from the same table it prices its own upstream spend with. Turns "did loom make this session cheaper" into a standing series instead of a hand-run paired experiment. Needs a writer token. `LOOM_USAGE=off` disables. | -| `UserPromptSubmit` | `loom-run.mjs` | Opens the session's **run** on the first prompt (`run.begin`: goal = the prompt, `run_id = cc-`, or the id `run.begin` answers instead; the prompt does not wait for that answer, so the SessionStart primer, the prompt's recall and a first tool observation keep the derived id, or on a resumed session the previous run's id). Later prompts are no-ops once a begin was answered or refused; after a timeout, a 408, 429 or 5xx the next prompt asks again with the same id, and SessionEnd closes it if no answer ever came. Until then the session's run-state file in the temp directory (readable by you only) holds that begin's body, which every retry re-sends: the prompt, redacted and cut to 8000 characters. One row per session in `loom.agent_runs`; every observation the capture hook records carries the same `run_id`, so `run.get` replays the session — goal, observations, memories written, cost. `LOOM_RUN_LEDGER=off` disables. | -| `SessionEnd` | `loom-run.mjs` | Closes the run (`run.complete`) with the transcript's last assistant text as `final_response` and `outcome: none` — the hook knows the run ended, not whether it succeeded, and never guesses which memories were used; that stays the agent's own `run.complete` call (`memories_used`, `reflection`). | -| `PreCompact` | `loom-capture.mjs` | Crystallizes the session before the context window is dropped. | -| `Stop`, `PreCompact` | `loom-working-memory.mjs` | Writes the session's **working-memory note** — one `working_memory.set` per project (`session:`, agent scope): the goal (first prompt), `git status --short --branch`, the files edited this session, the last reply — framed as a bookmark, not a source of facts (the next session's model answered a fact question from this line without searching). Deduped on content, so an unchanged turn writes nothing. `context.pack` loads working memory first in the SessionStart primer and Claude Code fires SessionStart again after a compaction, so the note written a moment before the drop is the first thing the agent reads after it. Not retrieval memory: never embedded or ranked. `LOOM_WORKING_MEMORY=off` disables. With `LOOM_PLUGIN_SCRATCHPAD=1` the Stop hook also appends the turn's one-line conclusion to the run's `scratchpad` block at run scope. | -| `Stop` / `SessionEnd` | `loom-capture.mjs` | Crystallizes the finished session. | -| `PreCompact`, `SessionEnd` | `loom-session-brief.mjs` | Revises the branch's **session brief**: the transcript since the last save becomes typed events (asks, replies, edits, commands with their descriptions, errors, reads, todo lists, PR/commit identifiers a command printed; zero model tokens) posted to `session.brief_save`, which condenses them under a budget and revises `auto//` — goal, status, next steps, decisions and why, what was tried and dropped, what was done, open questions, files, the rules you set, pointers. The `loom-session` skill restores one on request: you pick which (a number from `list`, a key, or a session) and restores it with the client's compaction summary (or `--transcript` for every recorded turn as well). Not retrieval memory: never embedded or ranked. Detached flusher; per-session cursor; a first save needs an ask and some work behind it. `LOOM_SESSION_BRIEF=off` disables. | -| `SessionEnd` | `loom-session-memory.mjs` | Hands the session's real turns (last 200, bounded) to `memory.set_from_messages(defer=true)` once, so loom extracts the facts, writes the **session summary**, judges the outcome and distils reflections. The turns are kept as the facts' source evidence. A session with under 40 bytes (UTF-8) of user and assistant text is not sent, because the extraction call's fixed prompt outweighs what it can yield: a rule stated in it is not extracted, and it gets no session summary, outcome judgement or reflections. `LOOM_SESSION_MEMORY=off` disables. | -| `Stop` / `SessionEnd` | `loom-conversation.mjs` | Appends new chat turns from the transcript to the conversation plane (→ the dashboard's Conversations page). Deterministic, every turn; per-session cursor + `msg_id`=transcript uuid dedup. Text blocks only — an image the user pasted becomes a `[image: ]` placeholder beside its text, and a tool result that returned images leaves one `tool` turn `[image: N image results returned by a tool]`; the bytes never leave the machine. Off-switch: `LOOM_CAPTURE_CONVERSATIONS=false`. | +| Lifecycle event | Script | What it does | +| --------------------------------------------------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `UserPromptSubmit` | `loom-record.mjs` | The prompt's one process. Runs the two lookups the prompt waits for (`loom-prompt-pack`, `loom-prompt-recall`) in the hook itself and prints what they found as one `additionalContext`; writes the run's begin to the session's run state and hands the prompt's recording scripts (`loom-run`, `loom-namespace-health`'s audit) to a detached process and exits, as after a tool call. | +| `PostToolUse`, `PostToolUseFailure`, `Stop`, `SessionEnd` | `loom-record.mjs` | Runs the event's recording scripts (`loom-capture`, `loom-conversation`, `loom-usage`, `loom-working-memory`, `loom-run`'s close, `loom-session-memory`, `loom-session-brief`) in one process. After a tool call and at `Stop` that process is detached and the hook exits, so the session does not wait for their requests. At `SessionEnd` it is the hook itself, which exits when they have returned: a host torn down when the client exits would end a detached process first. | +| `PostToolUse` | `loom-capture.mjs` | Records one episodic observation of the tool action (heuristic type, file list). | +| `PostToolUseFailure` | `loom-capture.mjs` | Same, typed `error` — the bug-triage signal (errors + the subsequent fix). | +| `SessionStart` | `loom-session-start.mjs` | **First session, no credential:** signs this machine up (see `LOOM_AUTO_SIGNUP`) and points the user to the claim page for the namespace; nothing to paste. Then: injects a token-budgeted context primer (profile + relevant memories) via `context.pack`, so the agent starts knowing your context. Beside it, one line names the checkout's code namespace and the repository's memory tag, or says why no index was looked up, so a session start that prints nothing is a fault unless `LOOM_CODE_MAP=false`. How to route a lookup is in the MCP entry's startup instructions on a toolset with a `coding` part; any other toolset, and a wiring whose entry the plugin does not mount (Codex, a hand-wired client), gets it in the primer. **On by default**, once per session; `LOOM_INJECT_CONTEXT=false` to disable. | +| `PreToolUse` (Edit / Write / MultiEdit / NotebookEdit) | `loom-file-context.mjs` | Asks `memory.for_file` what loom knows about the target file (its files facet) and injects the rendered block as additional context — a constraint arrives **before** the edit, not as a review comment. One lookup per (session, file) per 30 min; never a permission decision. `LOOM_FILE_CONTEXT=off` disables. | +| `PostToolUse` (loom tools) | `loom-mentor-hint.mjs` | **The store's advice reaches the model**: a loom tool result may carry one `hint` — the plane this agent is not using, named from the call it just made (a `memory.get` that missed, a search that abstained where the code index answers, a stack trace written as a memory, a duplicate write). The hook lifts it out of the result JSON into additional context, once per code per session. No request of its own. `LOOM_MENTOR_HINTS=off` disables. | +| `PostToolUse` (Edit / Write / MultiEdit) | `loom-blast-radius.mjs` | In a loom-indexed repo, diffs the edited file against HEAD and asks `code.impact` (depth 1) what the touched symbols reach. Injects **one line**: callers, tests reaching the change, and the co-change partner files this session has not touched — the sibling-file miss, surfaced while the edit is still open. Same touched set reported once per session. The first edit of a file in a session also carries the test gate's line (next row), which stands in for the radius's count of tests where it names the file's tests, so an edit gets one line. `LOOM_BLAST_RADIUS=off` disables the radius. | +| `PostToolUse` (Bash / PowerShell) | `loom-test-gate.mjs` | **The tests are named when the file changes.** After a shell command in a loom-indexed repo, asks `code.test_gate` about each file the command changed (a dirty path it names, written since the session began) and attaches **one line** per file with the command of the tests the index links to it, or of the file itself when it is a test: `Loom tests for src/a.py: .venv/bin/python -m pytest tests/test_a.py`. Once per file and once per test per session, on the tool result, so it costs no model request; an edit tool's call gets the same line from `loom-blast-radius.mjs`. A file with no such test gets the changed functions the index links no test to: `Loom tests for src/a.py: the index links no test to Router::match`. A comment-only change names nothing (**Tests at edit time**, below). `LOOM_TEST_GATE=off` disables; `LOOM_TEST_GATE_DEPTH` sets the hops (1–3). | +| `UserPromptSubmit` | `loom-prompt-recall.mjs` | **Default `first`**: one bounded recall on the first qualifying prompt of a session, including empty or abstaining answers. Clear named code-only questions skip default recall without consuming the attempt; mixed memory requests still qualify. `LOOM_PROMPT_RECALL=on` for every prompt, `off` to disable. One `context.pack` per prompt restricted to `memories`, `decisions`, `procedures` with the prompt as the query; injects the plane-tagged blocks the session has not seen, only when memory is not abstaining and `retrieval_confidence ≥ 0.5`, capped at 1,200 chars (`LOOM_PROMPT_RECALL_MAX_CHARS`). The memory-side sibling of the prompt pack: active retrieval — the model gets what memory knows about the prompt without asking — done per prompt, never per tool turn. | +| `UserPromptSubmit` | `loom-prompt-pack.mjs` | On by default (`LOOM_PROMPT_PACK=off` turns it off). One bounded lookup: `code.symbol`, `code.callers` or `code.impact` for an explicit named question, otherwise `code.search` (top 3, no bodies). Self-contained requests, local-only changes and explicit memory questions skip code retrieval. Search emits only where the index labels its own answer low-risk (or, with `LOOM_PROMPT_PACK_MIN_CONF` set, from that confidence), and without abstention; its pointers are candidates, and nothing tells the model to stop searching; typed answers preserve ambiguity and static-analysis limits. Named implementation or behavior questions request a whole definition body within 600 server-budget tokens; location/signature requests stay pointer-only and oversized bodies stay elided. No fallback request follows an empty typed answer. Pointers are deduplicated within the current answer, so later prompts can receive changed evidence. | +| `Stop` | `loom-test-gate.mjs` | **Holds a session that ran no test since its last code change.** With uncommitted changes **this session made** in a loom-indexed repo (the dirty paths the transcript shows an edit tool targeted or a shell command named, written since the session began, by the file's modification time; a tree left dirty before the session gates nothing, even when a command reads or runs its files), asks `code.test_gate` what the change obliges — the tests that reach it, in evidence order with a `run` command when the harness is derivable, and the touched functions no test reaches — and blocks the stop **once** per distinct change with a reason that names them. The second stop on the same change passes. By default any test run since the last code change lets the stop pass, and nothing is asked (**Stops that pass**, below); with `LOOM_TEST_GATE=block` only a run of the named tests does (**Answered stops**, below). `LOOM_TEST_GATE=off` disables. | +| `Stop` | `loom-validate-gate.mjs` | **Compile green before done**: collects the memory keys this session wrote from the transcript, asks `namespace.validate` for a report scoped to exactly those keys, and blocks the stop **once** per distinct key set with the error and warning findings that name them (a conflict you opened, a fact whose `valid_to` has passed, an attestation your edit made stale) and each check's remedy. `info` findings never block; the second stop on the same keys passes. `LOOM_VALIDATE_GATE=off` disables. | +| `Stop` | `loom-namespace-health.mjs` | **The store tells you when the namespace is misused**: once per session, one `namespace.audit` over the last day (no samples) for the session's namespace, asked by the first prompt's detached process so that a stop does not wait for it (a stop asks in place only when that process died before its answer); when it carries a critical finding — exact-key reads dwarfing searches, double-encoded values, rows the embedder gave up on, leases in the memory plane — you get **one line** naming the codes and `/loom-optimize`, once per session, at the first stop that finds the verdict, as a block-once reason (the one channel a Stop hook has to the model). Healthy namespace, no token, slow or down server: nothing. The same summary rides `context.pack` as the `namespace_health` section at session start. `LOOM_NAMESPACE_HEALTH=off` disables. | +| `Stop` | `loom-usage.mjs` | Posts the session's own model usage (input, cache read, cache creation by TTL, output; deduped by message id, sidechains skipped) to `cost.record_turns`; the **server** prices it into `loom.agent_turn_usage` from the same table it prices its own upstream spend with. Turns "did loom make this session cheaper" into a standing series instead of a hand-run paired experiment. Needs a writer token. `LOOM_USAGE=off` disables. | +| `UserPromptSubmit` | `loom-run.mjs` | Opens the session's **run** on the first prompt (`run.begin`: goal = the prompt, `run_id = cc-`, or the id `run.begin` answers instead; the prompt does not wait for that answer, so the SessionStart primer, the prompt's recall and a first tool observation keep the derived id, or on a resumed session the previous run's id). Later prompts are no-ops once a begin was answered or refused; after a timeout, a 408, 429 or 5xx the next prompt asks again with the same id, and SessionEnd closes it if no answer ever came. Until then the session's run-state file in the temp directory (readable by you only) holds that begin's body, which every retry re-sends: the prompt, redacted and cut to 8000 characters. One row per session in `loom.agent_runs`; every observation the capture hook records carries the same `run_id`, so `run.get` replays the session — goal, observations, memories written, cost. `LOOM_RUN_LEDGER=off` disables. | +| `SessionEnd` | `loom-run.mjs` | Closes the run (`run.complete`) with the transcript's last assistant text as `final_response` and `outcome: none` — the hook knows the run ended, not whether it succeeded, and never guesses which memories were used; that stays the agent's own `run.complete` call (`memories_used`, `reflection`). | +| `PreCompact` | `loom-capture.mjs` | Crystallizes the session before the context window is dropped. | +| `Stop`, `PreCompact` | `loom-working-memory.mjs` | Writes the session's **working-memory note** — one `working_memory.set` per project (`session:`, agent scope): the goal (first prompt), `git status --short --branch`, the files edited this session, the last reply — framed as a bookmark, not a source of facts (the next session's model answered a fact question from this line without searching). Deduped on content, so an unchanged turn writes nothing. `context.pack` loads working memory first in the SessionStart primer and Claude Code fires SessionStart again after a compaction, so the note written a moment before the drop is the first thing the agent reads after it. Not retrieval memory: never embedded or ranked. `LOOM_WORKING_MEMORY=off` disables. With `LOOM_PLUGIN_SCRATCHPAD=1` the Stop hook also appends the turn's one-line conclusion to the run's `scratchpad` block at run scope. | +| `Stop` / `SessionEnd` | `loom-capture.mjs` | Crystallizes the finished session. | +| `PreCompact`, `SessionEnd` | `loom-session-brief.mjs` | Revises the branch's **session brief**: the transcript since the last save becomes typed events (asks, replies, edits, commands with their descriptions, errors, reads, todo lists, PR/commit identifiers a command printed; zero model tokens) posted to `session.brief_save`, which condenses them under a budget and revises `auto//` — goal, status, next steps, decisions and why, what was tried and dropped, what was done, open questions, files, the rules you set, pointers. The `loom-session` skill restores one on request: you pick which (a number from `list`, a key, or a session) and restores it with the client's compaction summary (or `--transcript` for every recorded turn as well). Not retrieval memory: never embedded or ranked. Detached flusher; per-session cursor; a first save needs an ask and some work behind it. `LOOM_SESSION_BRIEF=off` disables. | +| `SessionEnd` | `loom-session-memory.mjs` | Hands the session's real turns (last 200, bounded) to `memory.set_from_messages(defer=true)` once, so loom extracts the facts, writes the **session summary**, judges the outcome and distils reflections. The turns are kept as the facts' source evidence. A session with under 40 bytes (UTF-8) of user and assistant text is not sent, because the extraction call's fixed prompt outweighs what it can yield: a rule stated in it is not extracted, and it gets no session summary, outcome judgement or reflections. `LOOM_SESSION_MEMORY=off` disables. | +| `Stop` / `SessionEnd` | `loom-conversation.mjs` | Appends new chat turns from the transcript to the conversation plane (→ the dashboard's Conversations page). Deterministic, every turn; per-session cursor + `msg_id`=transcript uuid dedup. Text blocks only — an image the user pasted becomes a `[image: ]` placeholder beside its text, and a tool result that returned images leaves one `tool` turn `[image: N image results returned by a tool]`; the bytes never leave the machine. Off-switch: `LOOM_CAPTURE_CONVERSATIONS=false`. | **Team file rules.** The file-context hook reads two places in one `memory.for_file` request: your own namespace, and the repository's **primary code namespace** (its trunk branch's — `code-clickhouse` for every ClickHouse branch), named by the checkout's cached `code.repos` entry. A namespace you cannot read is skipped silently, so access follows repository access. Rules from the code namespace render as `Team rule (by alice, 3 days ago) [constraint]: … [id: ]` and design decisions (typed or tagged `decision`) as `Decision (by alice, 3 days ago) (pinned): … — source: [id: ]` (`(pinned)` only when someone pinned it, else no mark; `(source changed)` once its source document no longer says it), a newer rule the conflict check linked to an older one sits above it (`supersedes rule by …`, or `supersedes decision by …`), and one footer line says how to remove a wrong one. Every member of the repository may add a rule there (`memory.set` with `files` and the tag `constraint`) and revise or delete the rules they wrote; a maintainer may delete any — from an agent (`memory.delete` on the `[id:]` key) or from the dashboard (pick the code namespace under _show system_, open the memory, Delete). A refused delete answers a `hint` naming the author and what to do instead. `memory.set` fills `files` from the value when you do not pass it. Auto-extracted session facts never go to the code namespace. -**Untested functions.** The index's call graph is a floor: a test may reach a function the graph holds no edge to, such as a constructor the test calls by building the object. Beside tests to run that the checkout has, the reason therefore lists the functions as the index's view, `the index links no test to: … (the tests named here may still reach it)`. With no such test it reads `no test reaches: …` and asks for a test. +**Tests at edit time.** The test gate names a file's tests on the tool call that changes it, where the agent is still working on the file. For a source file they are the tests the index links to it through its name, the test map or the call graph, each of them present in the checkout, with the tests that have no known runner listed by path; for a test file, the file's own command. A file with no test to name in the checkout gets the changed functions the index links no test to instead (`the index links no test to Router::match`), worded as the index's view, because its call graph is a floor. A file is asked about once per session, at its first change, so a function changed later in the same file is not named; a file the server gave no answer for is asked about once more, at the next call that names it; at most four files are asked about per tool call. A test is named once per session, so the test you edit after its source file adds no second line. A test the tool call's own command runs is not named on the result of that run: its command stands there whole, in this checkout, so `pytest tests/test_a.py::test_one`, `docker exec app pytest tests/test_a.py` and `echo "pytest tests/test_a.py"` still get the line. -**Answered stops.** The test gate does not block, and so names no untested function, when it names tests, each of them is in the checkout and the transcript already answers the ask to run them, in one of two ways. Your latest prompt ends with the sentence "Do not run the tests" (also `don't` or `never`, and `tests`, `any tests` or `the test suite`). Or the transcript shows a Bash command that ran pytest on each named test, by its file or a directory above it that is below the checkout root, and whose output holds a whole summary line for each pytest in it: one that counts tests failed or passed and none deselected. A run that failed answers, since the session has read its failures; a collection that stopped at an error (`1 error in 0.12s`) does not, and neither does a line that counts a failure or an error when a pytest in the command has `--exitfirst`, `--maxfail` or a short flag holding `x` (`-x`, `-qx`, also `-rx`), since that run stopped before the files after it. No output answers that holds the line pytest prints above the summary of a run it ended early (`stopping after 1 failures`, `Interrupted: …`), which also shows a limit or `--sw` set in a configuration file or in `PYTEST_ADDOPTS`; `| tail -1` cuts that line, and such a run then answers. The command has no `--ignore`, `--deselect`, `--lf`, `--sw` or `--continue-on-collection-errors` and no quote in pytest's arguments; its runs count from the first pytest after which it runs only pytest, `tail`, `head`, `grep` and `echo` and holds no backquote and no redirect to a file other than `/dev/null`, so the second run of `git stash; pytest tests; git stash pop; pytest tests` answers and no run of `pytest tests; git stash; pytest tests; git stash pop` or of `pytest tests; git diff --stat` does; the transcript shows no edit-tool call and no other Bash or PowerShell call after that; no tracked file is deleted; and no uncommitted or untracked file was modified later. A run of the whole checkout names no path below the root, so a bare `pytest` and `pytest .` do not answer. Before pytest in its simple command only variable assignments, `env`, `timeout`, `uv run` or `poetry run`, an interpreter's `-m` and a path may stand: `python -u -m pytest tests` and `docker exec app pytest tests` do not answer. Runs in several commands add up only while each later command holds nothing before the first of its runs that count but what launches it: one that does anything else first, a `cd` included, answers for its own runs alone. The word after a pytest flag written without `=` is read as that flag's value, not as a path that ran, unless the flag is a cluster of `-q`, `-v`, `-x`, `-s` and `-l`: `pytest --no-header tests` does not answer. Quotes in the rest of the command are not read, so a `|`, `;` or `>` inside one counts as if unquoted: a run piped into `grep -E "passed|failed"` does not answer. +**Stops that pass.** By default the test gate holds the end of a session only when the session ran no test since its last code change. Whether a session ran the right tests, and how they went, cannot be read reliably from its shell commands: a session that runs the whole suite, compares against a stashed tree or pipes pytest through `grep` has run the tests in a way no fixed rule reads, and a gate that holds the stop on that reading holds sessions that did the work. So the stop passes, before anything is asked of the server, when the transcript holds a shell command that starts a test runner and finished no earlier than the newest write among the code files the session changed. A changed file that is documentation or prose by its name (`.md`, `.mdx`, `.rst`, `.adoc`, `.txt` other than `CMakeLists.txt` and a requirements file, or a `CHANGELOG`, `CHANGES`, `HISTORY` or `NEWS` file) is left out of that comparison, so a note written after the run holds nothing; so is a deleted file. A runner is `pytest`, `unittest`, `tox`, `nox`, `jest`, `vitest`, `mocha`, `nextest`, `rspec`, `phpunit`, `ctest` or `clickhouse-test`, or `go`, `cargo`, `npm`, `pnpm`, `yarn`, `bun`, `deno`, `make`, `mvn`, `gradle`, `dotnet`, `swift`, `bazel`, `mix`, `rake` or `node` with an argument in which `test` or `tests` follows no letter and no lower-case letter follows it (`make test-unit`, `node --test`, `gradle :app:test`, `gradlew testDebugUnitTest`, but not `npm install x@latest` or `npm install @testing-library/react`). The command's output is not read: a run that failed, ran other tests or ran in a container passes, and so does a command that only names a runner, such as `grep -rn pytest .`. A session that wrote a changed code file after its last such command, or that ran none, is held once per distinct change with the tests to run and the functions the index links no test to; a harness the list does not name is not seen, and that stop is held once too. A latest prompt that ends with "Do not run the tests" passes when the gate names tests the checkout has. With no transcript the stop is not held. A team that wants the stop held until the named tests ran on the final tree sets `LOOM_TEST_GATE=block` in the environment Claude Code starts in; the two paragraphs below describe that mode, which names nothing at edit time. + +**Untested functions.** The index's call graph is a floor: a test may reach a function the graph holds no edge to, such as a constructor the test calls by building the object. Beside tests to run that the checkout has, the reason of a held stop therefore lists the functions as the index's view, `the index links no test to: … (the tests named here may still reach it)`. With no such test it reads `no test reaches: …` and asks for a test. + +**Answered stops.** With `LOOM_TEST_GATE=block`, the test gate does not block, and so names no untested function, when it names tests, each of them is in the checkout and the transcript already answers the ask to run them, in one of two ways. Your latest prompt ends with the sentence "Do not run the tests" (also `don't` or `never`, and `tests`, `any tests` or `the test suite`). Or the transcript shows a Bash command that ran pytest on each named test, by its file or a directory above it that is below the checkout root, and whose output holds a whole summary line for each pytest in it: one that counts tests failed or passed and none deselected. A run that failed answers, since the session has read its failures; a collection that stopped at an error (`1 error in 0.12s`) does not, and neither does a line that counts a failure or an error when a pytest in the command has `--exitfirst`, `--maxfail` or a short flag holding `x` (`-x`, `-qx`, also `-rx`), since that run stopped before the files after it. No output answers that holds the line pytest prints above the summary of a run it ended early (`stopping after 1 failures`, `Interrupted: …`), which also shows a limit or `--sw` set in a configuration file or in `PYTEST_ADDOPTS`; `| tail -1` cuts that line, and such a run then answers. The command has no `--ignore`, `--deselect`, `--lf`, `--sw` or `--continue-on-collection-errors` and no quote in pytest's arguments; its runs count from the first pytest after which it runs only pytest, `tail`, `head`, `grep` and `echo` and holds no backquote and no redirect to a file other than `/dev/null`, so the second run of `git stash; pytest tests; git stash pop; pytest tests` answers and no run of `pytest tests; git stash; pytest tests; git stash pop` or of `pytest tests; git diff --stat` does; the transcript shows no edit-tool call and no other Bash or PowerShell call after that; no tracked file is deleted; and no uncommitted or untracked file was modified later. A run of the whole checkout names no path below the root, so a bare `pytest` and `pytest .` do not answer. Before pytest in its simple command only variable assignments, `env`, `timeout`, `uv run` or `poetry run`, an interpreter's `-m` and a path may stand: `python -u -m pytest tests` and `docker exec app pytest tests` do not answer. Runs in several commands add up only while each later command holds nothing before the first of its runs that count but what launches it: one that does anything else first, a `cd` included, answers for its own runs alone. The word after a pytest flag written without `=` is read as that flag's value, not as a path that ran, unless the flag is a cluster of `-q`, `-v`, `-x`, `-s` and `-l`: `pytest --no-header tests` does not answer. Quotes in the rest of the command are not read, so a `|`, `;` or `>` inside one counts as if unquoted: a run piped into `grep -E "passed|failed"` does not answer. The scripts are standalone Node ESM (`.mjs`) with **zero dependencies** — no Loom SDK, no `node_modules`. They run on any Node ≥ 18 (global `fetch` + @@ -350,7 +355,7 @@ path. | `LOOM_HOOK_TIMEOUT_MS` | derived (3000–8000) | Request abort ceiling. By default it is 5× the round trip the SessionStart hook measured against this server (`GET /v1/health`, cached per server for six hours), clamped to 3–8 s; setting the variable overrides that and `loom doctor --client` flags the override. | | `LOOM_CODE_SHUNT` | `on` | `off` disables the bulk-read shunt entirely. | | `LOOM_SHUNT_MAX_LINES` | `800` | `Read`/`cat` of an indexed, unmodified file longer than this is shunted. | -| `LOOM_SHUNT_READ_CAP` | `0` (off) | Read-window cap in lines: a **ranged** `Read` (`offset`/`limit`) of an indexed, unmodified file whose span is longer than this is shunted to `code.enclosing` / `code.symbol` / `code.outline`, at most twice per file per session; then it passes as `cap_spent`. The agent bench's arm D sets `200`. | +| `LOOM_SHUNT_READ_CAP` | `0` (off) | Read-window cap in lines: a **ranged** `Read` (`offset`/`limit`) of an indexed, unmodified file whose span is longer than this is denied with the declarations in the span, at most twice per file per session; then it passes as `cap_spent`. The agent bench's arm D sets `200`. | | `LOOM_SHUNT_RESOLVE_TIMEOUT_MS` | `8000` | Bound for the shunt's once-per-ten-minutes repository lookup (`code.repos` for the checkout's `owner/name`, then `code.index_status`), separate from the 3 s per-tool-call default: the listing takes the server 1–2 s and a remote round trip rides on top. A lookup that does not answer is cached as _unresolved_ for 60 s and retried, never as "not indexed". | | `LOOM_SHUNT_GREP` / `LOOM_SHUNT_BASH` | `on` | Shunt tree-wide `Grep` / bulk `cat`,`nl`,`tac`,`rg`,`grep -r` in `Bash`; a `sed -n 'A,Bp'`, `head -n N`, `tail -n +A` or `awk 'NR>=A && NR<=B'` slice of one file is a ranged read under the read-window cap. | | `LOOM_TRACKER_SHUNT` | `on` | `off` lets `gh issue list --search` / `gh search issues` run without the tracker record answering first. `LOOM_TRACKER_SHUNT_TIMEOUT_MS` (default `3000`) bounds the one tracker.duplicate_check call. | @@ -391,19 +396,34 @@ and lose line numbers). What is shunted, and what passes: -| Tool call | Shunted when | Passes | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `Read file` | file is under the indexed prefixes, unmodified in the working tree, and longer than `LOOM_SHUNT_MAX_LINES` (800) | `offset`/`limit` given; small, binary, unindexed or locally modified files | -| `Read file offset/limit` | `LOOM_SHUNT_READ_CAP` > 0 and the span (limit defaults to Claude Code's 2000, clipped to the file) is longer than the cap, on an indexed, unmodified file — until the file's two denials this session are spent | spans within the cap; modified, untracked, binary or unindexed files (`targeted_span`); the third and later over-cap reads of the same file (`cap_spent`) | -| `Grep pattern [dir]` | the scope is a directory inside the indexed tree | a single file as scope | -| `Grep "Class::method" file`, `Bash: grep -n "Class::method" file` | the pattern names one symbol — a `::` path, or a mixed-case / snake_case identifier of 8+ characters with a lowercase letter — and the file is under the indexed prefixes: denied **once per symbol per session** with the exact `loom_code_symbol` call | the second grep for the same symbol (`symbol_grep_spent`); ALL_CAPS constants, short words, regexes, strings (`single_file_grep`) | -| `Bash: cat/bat/nl/tac file`, `rg pat [dir]`, `grep -r pat [dir]` | same rules as above | pipelines, redirects, pattern-driven `sed`/`awk`, non-recursive grep | -| `Bash: sed -n 'A,Bp' file`, `head -n N file`, `tail -n +A file`, `awk 'NR>=A && NR<=B' file` | the ranged-Read rule: `LOOM_SHUNT_READ_CAP` > 0 and the slice is longer than the cap, on an indexed, unmodified file | slices within the cap; no cap configured; several files; `-c` bytes | -| `Bash: gh issue list … --search q`, `gh search issues q …` (also inside `&&` / `;` chains) | the checkout is indexed and the tracker record answers one bounded `tracker.duplicate_check` on the search words and any `Ns::Class::method` frames in them: the deny carries the verdict and the closest reported items | the same command on the next try, `gh issue view N`, `gh pr …`, a listing without `--search`, pipelines, an unbound or unauthorized tracker namespace, a timeout, `LOOM_TRACKER_SHUNT=off` | - -The deny reason picks the op from the pattern shape — identifier → `code.symbol`, -regex/literal → `code.grep`, words → `code.search` — and says how to pass -through (a targeted `Read`, a single-file grep). It never names the +| Tool call | Shunted when | Passes | +| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `Read file` | file is under the indexed prefixes, unmodified in the working tree, longer than `LOOM_SHUNT_MAX_LINES` (800), and outlined in full by the index: the deny lists its declarations | `offset`/`limit` given; small, binary, unindexed or locally modified files; a file whose outline is cut short or unanswered (`index_unanswered`) | +| `Read file offset/limit` | `LOOM_SHUNT_READ_CAP` > 0 and the span (limit defaults to Claude Code's 2000, clipped to the file) is longer than the cap, on an indexed, unmodified file — until the file's two denials this session are spent; the deny lists the declarations in the span | spans within the cap; modified, untracked, binary or unindexed files (`targeted_span`); the third and later over-cap reads of the same file (`cap_spent`); a span the index cannot describe in full (`index_unanswered`) | +| `Grep pattern [dir]` | never: a grep over a directory runs | matching lines (`tree_content_grep`); a file list or counts (`file_list_grep`); a single file as scope (`single_file_grep`) | +| `Grep "Class::method" file`, `Bash: grep -n "Class::method" file` | the pattern names one symbol — a `::` path, or a mixed-case / snake_case identifier of 8+ characters with a lowercase letter — the file is under the indexed prefixes, and the index holds exactly one definition: denied **once per symbol per session** with that definition | the second grep for the same symbol (`symbol_grep_spent`); a symbol with no definition or several, or no answer in 2.5 s (`index_unanswered`); ALL_CAPS constants, short words, regexes, strings (`single_file_grep`) | +| `Bash: cat/bat/nl/tac file`, `rg pat [dir]`, `grep -r pat [dir]` | the whole-file `Read` rule for `cat`/`bat`/`nl`/`tac` and the symbol rule for a one-file `grep`, when the read or grep is the whole command; never `rg` or `grep -r` over a directory | a command of several parts (`;`, `&&`, `\|\|`, a newline or a pipe: `compound_command`), redirects, pattern-driven `sed`/`awk`, non-recursive grep | +| `Bash: sed -n 'A,Bp' file`, `head -n N file`, `tail -n +A file`, `awk 'NR>=A && NR<=B' file` | the ranged-Read rule: `LOOM_SHUNT_READ_CAP` > 0 and the slice is longer than the cap, on an indexed, unmodified file, when the slice is the whole command; `tail -n N file` is judged as the file's last N lines | slices within the cap; no cap configured; several files; a command of several parts; `-c` bytes | +| `Bash: gh issue list … --search q`, `gh search issues q …` (as the whole command) | the checkout is indexed and the tracker record answers one bounded `tracker.duplicate_check` on the search words and any `Ns::Class::method` frames in them: the deny carries the verdict and the closest reported items | the same command on the next try, `gh issue view N`, `gh pr …`, a listing without `--search`, a command of several parts, an unbound or unauthorized tracker namespace, a timeout, `LOOM_TRACKER_SHUNT=off` | + +A deny carries the index's answer (a file's declarations with their lines and +headers, a symbol's definition, the tracker's verdict) and says how to pass +through (a ranged read). The declarations are the kinds `code.outline` lists by +default: functions, methods, classes, structs and the units of tests, build +files and SQL. An interface, type alias, enum or constant is not among them, +and the deny says so. A refusal costs the agent a request, so the hook +gives one only with that answer in full: when the index does not hold it or +does not reply in 2.5 s, the call runs. A Bash command of several parts is +never refused, because a refusal withholds every part and only one of them is +the read the hook judged; its reads and greps are still counted as passes, +under `compound_command` where the same call alone would have asked the index. +A whole file's outline is asked for with a budget of 4,000 tokens, and a file +whose outline does not fit is read. With that budget the longest deny measured +over 301 large files of a C++ repository was 8,400 characters; the server +counts an entry at a quarter of its JSON length, so long signatures make a +longer one. A whole file whose lookup gave no declarations (no reply, an empty +outline or a cut one) is not asked about again in that session. The +deny never names the `LOOM_CODE_SHUNT=off` switch: a deny that names its own bypass gets `LOOM_CODE_SHUNT=off grep -r …` as the agent's next command, which measures compliance rather than the index. Repo detection is one @@ -420,16 +440,16 @@ unknown repo → the tool call proceeds untouched. Cached decisions take ~60 ms. default off). A ranged `Read` passes the whole-file rule by definition, so an agent that has learned the rule reads `offset=1 limit=2000` instead — the same bulk read with a different shape. With the cap set, a ranged read of an -indexed, unmodified file whose span is longer than the cap is denied with a -redirect that names the span: `code.enclosing locations=: -neighbours=true` for the unit enclosing the first line (with callers, callees -and tests), `code.symbol` for a name, `code.outline` to pick a smaller span, -and "read at most `` lines at a time" if the file must be read directly. +indexed, unmodified file whose span is longer than the cap is denied with the +declarations in the span (lines, qualified name, header) from one +`code.outline` call, and "read the ones you need, at most `` lines at a +time". A span the index cannot describe in full passes and spends no denial. Each file may be denied this way **twice per session**, and the third over-cap read of that file passes with reason `cap_spent`, so a model that insists is never denied the same file forever. The count is kept in `$TMPDIR/loom-shunt-cap-.json` as `{"": n}`, beside -the symbol-grep (`sym:`) and tracker-search (`qa:`) budgets. A denial is given +the symbol-grep (`sym:`) and tracker-search (`qa:`) budgets and the whole files +whose lookup gave no declarations (`miss:`). A denial is given only when its spend was written: while that file cannot be kept (tmp not writable, or a file planted there), every over-cap read, symbol grep and answered tracker search passes as if its budget were spent. A @@ -445,7 +465,7 @@ server, token and repository: its own, those ended sessions left and those of sessions still running, each posted once. The batch is reported to loom as two `code.outcome` rows (`action=shunt_hit` with `tokens_saved` = bytes of the avoided file ÷ 4 — or of the avoided span, for a -read-cap denial — and `action=shunt_pass`; `targets` +read-cap denial — less the deny text's own characters ÷ 4, and `action=shunt_pass`; `targets` holds one tool name per decision, so `length(targets)` is the count) — fire-and-forget with a 300 ms ceiling, and **only** on a deny (which already paid a server round trip) or once 50 lines are pending, so a pass-through never diff --git a/integrations/claude-code-plugin/hooks/HOOKS.md b/integrations/claude-code-plugin/hooks/HOOKS.md index de79d4b834c..73ac562d1cc 100644 --- a/integrations/claude-code-plugin/hooks/HOOKS.md +++ b/integrations/claude-code-plugin/hooks/HOOKS.md @@ -97,10 +97,11 @@ receives on stdout. | UserPromptSubmit, in loom-record | loom-prompt-recall | prompt, cwd, session_id | its context | context.pack | `LOOM_PROMPT_RECALL=off` | | UserPromptSubmit, detached | loom-run | prompt, session_id | none | run.begin on the first prompt; appends the turn journal | `LOOM_RUN_LEDGER=off` | | UserPromptSubmit, detached | loom-namespace-health | cwd, session_id | none | namespace.audit, once per session; the verdict goes to the session's state file | `LOOM_NAMESPACE_HEALTH=off` | -| PreToolUse Read\|Grep\|Bash | loom-code-shunt | tool_name, tool_input, cwd | JSON permission decision | code.repos; deny text | `LOOM_CODE_SHUNT=off` | +| PreToolUse Read\|Grep\|Bash | loom-code-shunt | tool_name, tool_input, cwd | JSON permission decision | code.repos; one code.outline, code.symbol or tracker.duplicate_check before a deny; deny text | `LOOM_CODE_SHUNT=off` | | PreToolUse Edit\|Write\|MultiEdit\|NotebookEdit | loom-file-context | tool_input, session_id | JSON additionalContext | memory.for_file | `LOOM_FILE_CONTEXT=off` | | PostToolUse loom tools | loom-mentor-hint | tool_name, tool_response | JSON additionalContext | none | `LOOM_MENTOR_HINTS=off` | -| PostToolUse Edit\|Write\|MultiEdit | loom-blast-radius | tool_input, cwd | JSON additionalContext | code.impact | `LOOM_BLAST_RADIUS=off` | +| PostToolUse Edit\|Write\|MultiEdit | loom-blast-radius | tool_input, cwd, transcript head | JSON additionalContext | code.impact; code.test_gate for a file's first edit (`LOOM_TEST_GATE=off` or `block` stops that one) | `LOOM_BLAST_RADIUS=off` | +| PostToolUse Bash\|PowerShell | loom-test-gate | tool_input, cwd, transcript head | JSON additionalContext | code.test_gate for each changed file the command names, once per file | `LOOM_TEST_GATE=off` or `block` | | PostToolUse, PostToolUseFailure, Stop, SessionEnd (timeout 10) | loom-record | the payload | none | after a tool call and at Stop, starts one detached process, which runs the event's `detached` rows; at SessionEnd, runs the event's `in loom-record` rows itself | each script's own | | PostToolUse, PostToolUseFailure, detached | loom-capture | tool_*, session_id, cwd | none | observe.record; code.outcome; the recalled-keys stash | no token | | PreCompact | loom-capture | session_id | none | observe.crystallize | no token | @@ -109,7 +110,7 @@ receives on stdout. | Stop, detached | loom-capture | session_id | none | observe.crystallize | no token | | Stop, detached | loom-conversation | transcript, last_assistant_message | none | conversation.append via the flusher | `LOOM_CAPTURE_CONVERSATIONS=false` | | Stop, detached | loom-usage | transcript | none | cost.record_turns | `LOOM_USAGE=off` | -| Stop | loom-test-gate | transcript, cwd | JSON block once | code.test_gate | `LOOM_TEST_GATE=off` | +| Stop | loom-test-gate | transcript, cwd | JSON block once | code.test_gate, when the transcript shows no test run since the last code change (`testedSince`); with LOOM_TEST_GATE=block, unless the named tests ran | `LOOM_TEST_GATE=off` | | Stop | loom-validate-gate | transcript | JSON block once | namespace.validate | `LOOM_VALIDATE_GATE=off` | | Stop | loom-namespace-health | cwd, session_id | JSON block once | none: tells the stored verdict once (namespace.audit is asked here by a wiring with no detached process, on the first Stop, and when the prompt's ask is overdue) | `LOOM_NAMESPACE_HEALTH=off` | | Stop, detached | loom-working-memory | transcript, cwd | none | working_memory.set when the note changed | `LOOM_WORKING_MEMORY=off` | @@ -212,13 +213,25 @@ detached (`lib/flush-job.mjs` holds its job shapes and delivery policy). rows left out (each only when the server's text ends with that footer). One lookup per (session, file) per 30 min; fail-open; never a permission decision. LOOM_FILE_CONTEXT=off disables. -- **loom-code-shunt.** In a loom-indexed repo, whole-file Reads (> - LOOM_SHUNT_MAX_LINES, default 800), tree-wide Greps and bulk `cat`/`rg` in - Bash are denied with a reason naming the code.* op to call instead. +- **loom-code-shunt.** In a loom-indexed repo, a whole-file Read or `cat` of + a file longer than LOOM_SHUNT_MAX_LINES (default 800) is denied with the + file's declarations (lines, qualified name, header) from one code.outline + call (its default kinds: functions, methods, classes, structs and the like, + not interfaces, type aliases, enums or constants, which the denial says), + and a one-file grep for a symbol with its definition from one + code.symbol call, once per symbol per session. A denial needs that answer + in full: an outline its 4,000-token budget cut short, no single definition, + or no reply within 2.5 s lets the call run (pass reason index_unanswered), + and a whole file whose lookup gave no declarations, answered or not, is + asked about once per session. + A Bash command of several parts (`;`, `&&`, `||`, a newline or a pipe) is + never denied, since a denial withholds every part; its reads and greps are + counted as passes, under compound_command where the same call alone would + have asked the index, and cost no lookup. Fail-open; targeted reads (offset/limit, single file) and modified files pass. With LOOM_SHUNT_READ_CAP= (default 0 = off) a ranged Read whose span is longer than the cap on an indexed, unmodified file is denied - too — redirect to code.enclosing/code.symbol/code.outline — at most twice + too, with the declarations in those lines, at most twice per file per session ($TMPDIR/loom-shunt-cap-.json), then it passes as cap_spent. The deny text never names LOOM_CODE_SHUNT=off. The once-per-10-min repository lookup names @@ -226,7 +239,8 @@ detached (`lib/flush-job.mjs` holds its job shapes and delivery policy). (LOOM_SHUNT_RESOLVE_TIMEOUT_MS, default 8000) and, when it does not answer, is recorded as unresolved and retried within a minute, never cached as not-indexed. A sed -n 'A,Bp' / head -n N / tail -n +A / awk NR-range slice - of one indexed file in Bash is a ranged read under the same cap. + of one indexed file in Bash is a ranged read under the same cap; + tail -n N is judged as the file's last N lines. LOOM_CODE_SHUNT=off disables. - **loom-mentor-hint.** On a loom tool result, lifts the store's one `hint` (and `hint_code`) out of the result and hands it back as @@ -238,7 +252,10 @@ detached (`lib/flush-job.mjs` holds its job shapes and delivery policy). only (`diffHeaders`) and asks code.impact (depth 1) what the touched symbols reach; injects one line — callers, tests reaching the change, and co-change partner files this session has not touched. The same touched set is - reported once per session. LOOM_BLAST_RADIUS=off disables. + reported once per session. It is the one hook wired for an edit tool, so + it also carries the test gate's line for the file's first edit (see + loom-test-gate), which replaces its own count of tests where it names + the file's tests: one line per edit. LOOM_BLAST_RADIUS=off disables the radius, not that line. - **loom-capture.** PostToolUse and PostToolUseFailure record one episodic `observe.record` per tool call (zero-token heuristic typing, inputs and outputs truncated to 800 characters, the session's run id attached); @@ -309,15 +326,45 @@ detached (`lib/flush-job.mjs` holds its job shapes and delivery policy). prompt. A wiring that starts the script at Stop only (Codex, a hand-wired client) asks on the first Stop and waits for the answer. Later stops make no call. -- **loom-test-gate.** With uncommitted changes this session made in a - loom-indexed repo (dirty paths the transcript shows an edit tool targeted - or a shell command named, written since the session's first row; a tree - left dirty before the session gates nothing), sends the change's paths, hunk ranges and function names only - (`diffHeaders`) to code.test_gate for its obligations and blocks the stop - once per distinct change with a reason naming them. A Claude Code stop - whose transcript already answers the ask to run tests is not blocked - (`runAnswered` in lib/test-gate.mjs); a Codex rollout answers nothing. - LOOM_TEST_GATE=off disables; LOOM_TEST_GATE_DEPTH sets hops (1-3). +- **loom-test-gate.** Names the tests of a changed file, and holds the + stop of a session that ran no test since its last code change. By default it names + them when the file changes: after a Bash or + PowerShell command (and, through loom-blast-radius, after an edit tool) + it takes the dirty paths the call named or targeted that were written + since the session's first row, asks code.test_gate about each one not + asked about yet this session (`adviceFiles`, `adviceLines` in + lib/test-gate.mjs; at most four per call; a comment-only change is not + asked about) and prints one line per file as additionalContext on that + tool result: the commands of the tests the index links to the file that + the checkout has, or the file's own command when it is a test. A file + with no such test gets the changed functions the index links no test + to. A file is asked about at its first change only, so a function + changed later in it is not named; one the server gave no answer for is + asked about once more. A test is named once per session, and not when + the call's own command runs it in this checkout as a whole command + (`runsHere`). The line costs no model request. A call that names no + unasked dirty file costs one git call and no request; in a checkout the + shared cache says is not indexed, no git call either. + At Stop, with uncommitted changes this session made in a loom-indexed + repo (dirty paths the transcript shows an edit tool targeted or a shell + command named, written since the session's first row; a tree left dirty + before the session gates nothing), it sends the change's paths, hunk + ranges and function names only (`diffHeaders`) to code.test_gate for its + obligations and blocks the stop once per distinct change with a reason + naming them. By default a stop passes, and asks the server nothing, when + the transcript holds a shell command that starts a test runner and + finished no earlier than the newest write among the changed code files, + documentation and prose left out by name + (`testedSince`, `lastCodeChange`): the command's text is read for a + runner's name only, not for which tests ran or how they went, so a run + that failed, was piped or ran between `git stash` and `git stash pop` + passes, in a Claude Code transcript or a Codex rollout. With no + transcript the default holds no stop. + With LOOM_TEST_GATE=block nothing is printed at edit time, and a Claude + Code stop passes only when its transcript already answers the ask to run + the named tests (`runAnswered` in lib/test-gate.mjs); a Codex rollout + answers nothing there. + LOOM_TEST_GATE=off disables both; LOOM_TEST_GATE_DEPTH sets hops (1-3). - **loom-usage.** Reads the transcript's last MiB, dedupes assistant turns by message id (sidechains skipped) and posts their raw usage counters to cost.record_turns; the server prices them. Not wired for Codex, whose diff --git a/integrations/claude-code-plugin/hooks/hooks.json b/integrations/claude-code-plugin/hooks/hooks.json index fd63e065eba..1002267c3e7 100644 --- a/integrations/claude-code-plugin/hooks/hooks.json +++ b/integrations/claude-code-plugin/hooks/hooks.json @@ -65,6 +65,16 @@ } ] }, + { + "matcher": "Bash|PowerShell", + "hooks": [ + { + "type": "command", + "command": "node", + "args": ["${CLAUDE_PLUGIN_ROOT}/hooks/loom-test-gate.mjs", "PostToolUse"] + } + ] + }, { "matcher": "*", "hooks": [ diff --git a/integrations/claude-code-plugin/hooks/loom-blast-radius.mjs b/integrations/claude-code-plugin/hooks/loom-blast-radius.mjs index d152bc317e8..e77f1a8c5dc 100644 --- a/integrations/claude-code-plugin/hooks/loom-blast-radius.mjs +++ b/integrations/claude-code-plugin/hooks/loom-blast-radius.mjs @@ -8,11 +8,19 @@ // the agent is still in the edit, which is when a missed sibling file is // cheap to fix. // +// The test gate's edit-time line rides the same context: the first edit of a +// file this session also asks `code.test_gate` for the file's tests and names +// their command (lib/test-gate.mjs), in place of the radius's own count of +// tests, or names the changed functions the index links no test to. This hook +// is the only one wired for an edit tool, so an edit gets one line. +// LOOM_TEST_GATE=block or off leaves the radius alone. +// // Fail-open everywhere: no token, not an indexed repo, untracked file, empty -// diff, server slow → nothing is printed. One bounded request (3 s). The same -// touched-symbol set for a file is reported once per session. +// diff, server slow → nothing is printed. Each request is bounded (3 s) and +// the two go out together. The same touched-symbol set for a file is reported +// once per session. // -// LOOM_BLAST_RADIUS=off disable +// LOOM_BLAST_RADIUS=off disable the radius; the tests line stays // LOOM_BLAST_MAX_NAMES=5 callers named inline // LOOM_BLAST_DEPTH=1 impact depth (1 or 2) // LOOM_BLAST_PER_HOP=50 impacted rows requested per hop (counts stay exact) @@ -35,15 +43,17 @@ import { relativeForLookup, targetPath } from "../lib/file-context.mjs"; import { resolveIndexedRepo } from "../lib/repo-scope.mjs"; import { readSessionState, writeSessionState } from "../lib/tmp-state.mjs"; import { blastPayload, blastSignature, decideEmit, impactBody, renderBlast } from "../lib/blast-radius.mjs"; +import { adviceFiles, adviceLines, gateMode } from "../lib/test-gate.mjs"; const ENABLED = envSwitch("LOOM_BLAST_RADIUS", true); +const ADVISE = gateMode() === "advise"; const MAX_NAMES = Number(process.env.LOOM_BLAST_MAX_NAMES || 5); const DEPTH = Math.min(2, Math.max(1, Number(process.env.LOOM_BLAST_DEPTH || 1))); const PER_HOP = Math.min(500, Math.max(1, Number(process.env.LOOM_BLAST_PER_HOP || 50))); const TOOLS = new Set(["Edit", "Write", "MultiEdit", "apply_patch"]); async function main() { - if (!ENABLED) { + if (!ENABLED && !ADVISE) { scheduleExit(0); return; } @@ -87,37 +97,34 @@ async function main() { // on it yet; empty = the edit was a no-op or already committed. The outline is // sent in its place; with no `+++` path in it (a mode-only change, a binary file, // a header dropped for a line end) the server has nothing to read. - const diff = git(["diff", ...DIFF_ARGS, "--unified=0", "HEAD", "--", rel], root, { - timeoutMs: 2000, - raw: true, - }); + const diff = ENABLED + ? git(["diff", ...DIFF_ARGS, "--unified=0", "HEAD", "--", rel], root, { timeoutMs: 2000, raw: true }) + : ""; const outline = diffHeaders(diff, 200_000); - if (!/^\+\+\+ /m.test(outline)) { - scheduleExit(0); - return; - } + const files = ADVISE ? adviceFiles(payload, { root, cwd }).files : []; + const [impact, advice] = await Promise.all([ + /^\+\+\+ /m.test(outline) + ? postBounded("code.impact", impactBody(repo, outline, { depth: DEPTH, perHop: PER_HOP }), { + token, + serverUrl: resolveServerUrl(), + }) + : null, + files.length ? adviceLines(payload, files, { root, repo, token }) : [], + ]); - const impact = await postBounded("code.impact", impactBody(repo, outline, { depth: DEPTH, perHop: PER_HOP }), { - token, - serverUrl: resolveServerUrl(), - }); - if (!impact) { - scheduleExit(0); - return; + let blast = ""; + if (impact) { + const touchedPaths = git(["diff", "--name-only", "HEAD"], root, { timeoutMs: 2000 }) + .split("\n") + .map((s) => s.trim()) + .filter(Boolean); + const decision = decideEmit(readSessionState("blast", payload.session_id), rel, blastSignature(rel, impact)); + writeSessionState("blast", payload.session_id, decision.cache); + // A tests line for this file names their command, so the radius does not count them too. + const named = advice.some((a) => a.rel === rel && a.tests); + if (decision.emit) blast = renderBlast(rel, impact, { maxNames: MAX_NAMES, touchedPaths, tests: !named }); } - - const touchedPaths = git(["diff", "--name-only", "HEAD"], root, { timeoutMs: 2000 }) - .split("\n") - .map((s) => s.trim()) - .filter(Boolean); - const decision = decideEmit(readSessionState("blast", payload.session_id), rel, blastSignature(rel, impact)); - writeSessionState("blast", payload.session_id, decision.cache); - if (!decision.emit) { - scheduleExit(0); - return; - } - - const text = renderBlast(rel, impact, { maxNames: MAX_NAMES, touchedPaths }); + const text = [blast, advice.map((a) => a.text).join("\n")].filter(Boolean).join(" "); if (text) process.stdout.write(JSON.stringify(blastPayload(text)) + "\n"); scheduleExit(0); } diff --git a/integrations/claude-code-plugin/hooks/loom-code-shunt.mjs b/integrations/claude-code-plugin/hooks/loom-code-shunt.mjs index bdad1917e96..4c21d2d51be 100755 --- a/integrations/claude-code-plugin/hooks/loom-code-shunt.mjs +++ b/integrations/claude-code-plugin/hooks/loom-code-shunt.mjs @@ -6,18 +6,22 @@ // // Input: the host's PreToolUse JSON on stdin (tool_name, tool_input, cwd, // session_id). Output: nothing (the call proceeds) or one `deny` whose -// reason names the op to call instead. Nothing else ever blocks. +// reason carries the index's answer: the declarations of the lines a read +// asked for, a symbol's definition, the tracker's verdict. Nothing else ever +// blocks. // -// Fail-open: no token, no repository or an unindexed one, an unanswered -// lookup, a modified or untracked file, a targeted read → the call proceeds. +// Fail-open: no token, no repository or an unindexed one, a lookup the index +// did not answer in full, a modified or untracked file, a targeted read, a +// Bash command of several parts → the call proceeds. // Bounds: the repository lookup (cached 10 min, 1 min when unanswered) has -// LOOM_SHUNT_RESOLVE_TIMEOUT_MS (8 s); a symbol answer 2.5 s; a tracker -// answer LOOM_TRACKER_SHUNT_TIMEOUT_MS (3 s); the whole process exits by -// DEADLINE_MS. +// LOOM_SHUNT_RESOLVE_TIMEOUT_MS (8 s); a symbol or outline answer 2.5 s; a +// tracker answer LOOM_TRACKER_SHUNT_TIMEOUT_MS (3 s); the whole process exits +// by DEADLINE_MS. // // Side effects, all in $TMPDIR: the shared repository cache // (lib/repo-scope.mjs); per-session denial budgets for the read-window cap, -// symbol greps and tracker searches (sessionStatePath "shunt-cap"); the +// symbol greps and tracker searches, and the whole files whose lookup gave no +// declarations (sessionStatePath "shunt-cap"); the // user's decision log (tmpStatePath "shunt-log") and its unflushed copy, one // batch per reporting scope and session (repo.pending, named by batchKind in // lib/shunt-ledger.mjs), all through lib/tmp-state.mjs's private-file helpers, @@ -43,6 +47,7 @@ import { } from "../lib/loom-client.mjs"; import { DEFAULT_MAX_LINES, + DEFAULT_OUTLINE_BUDGET, DEFAULT_READ_CAP, SYMBOL_GREP_DENIALS_PER_SYMBOL, TRACKER_SEARCH_DENIALS_PER_QUERY, @@ -50,6 +55,7 @@ import { classifyGrep, wantsLines, classifyRead, + declarationsInSpan, denyGhSearchWithAnswer, denySymbolGrepWithAnswer, localFirstOn, @@ -58,11 +64,11 @@ import { readSpan, runLocalGrep, spendCapBudget, - symbolAnswerText, symbolInPattern, trackerAnswerText, + wholeSymbolAnswer, } from "../lib/code-shunt.mjs"; -import { ghIssueSearchInCommand, parseBashBulkSegments } from "../lib/shell-command.mjs"; +import { ghIssueSearchInCommand, isCompoundCommand, parseBashBulkSegments } from "../lib/shell-command.mjs"; import { aggregateShuntLog, batchKind, @@ -92,6 +98,10 @@ const SHUNT_BASH = envSwitch("LOOM_SHUNT_BASH", true); // indexed checkout is answered by the tracker record first. `LOOM_TRACKER_SHUNT=off`. const SHUNT_TRACKER = envSwitch("LOOM_TRACKER_SHUNT", true); const TRACKER_SEARCH_TIMEOUT_MS = Math.max(500, Number(process.env.LOOM_TRACKER_SHUNT_TIMEOUT_MS || 3000) || 3000); +// One symbol or outline answer, asked only for a call the local rules would +// refuse. A call it does not answer runs having waited for it: once per symbol +// or whole file per session, at each over-cap read. +const LOOKUP_TIMEOUT_MS = 2500; const LOG_ON = envSwitch("LOOM_SHUNT_LOG", true); const REPORT_ON = envSwitch("LOOM_SHUNT_REPORT", true); const FLUSH_TIMEOUT_MS = 300; @@ -156,8 +166,10 @@ function deny(reason) { ); } -/** Per-session denial counts, {key: n}, for three budgets: over-cap reads (the - * file's path), symbol greps (`sym:`) and answered tracker searches (`qa:`). +/** Per-session counts, {key: n}: three denial budgets, over-cap reads (the + * file's path), symbol greps (`sym:`) and answered tracker searches (`qa:`), + * and the whole files whose lookup gave no declarations (`miss:`), asked + * about once. * {} when the file is missing or refused. A denial is given only when its * spend was written: when the file cannot be kept (tmp not writable, or a file * planted there) the call passes as if its budget were spent, so a planted @@ -168,6 +180,11 @@ function readCapCounts(sessionId) { // The pass reason for a call whose budget spend could not be written: it passes. const BUDGET_UNRECORDED = "budget_unrecorded"; +// A Bash command of several parts is never refused: a refusal withholds every +// part. Its reads and greps are still counted as passes. +const COMPOUND_COMMAND = { deny: null, reason: "compound_command" }; +// The index did not answer in full, so there is nothing to refuse with. +const INDEX_UNANSWERED = { deny: null, reason: "index_unanswered" }; /** True when the spend was kept. */ function writeCapCounts(sessionId, counts) { @@ -289,14 +306,50 @@ function settle(repo, { tool, verdict, tokens, path = "", span = { start: 0, end endLine: span.end, }); if (shouldFlushShunt({ denied, pending: unflushed })) flushPending(repo); - return denied; +} + +/** The index's declarations in `span` of `rel`: one bounded code.outline. [] + * when it did not answer for the whole span. */ +async function indexedDeclarations(repo, rel, span) { + if (!repo.namespace) return []; + const outline = await postBounded( + "code.outline", + { + org: repo.org || "", + namespace: repo.namespace, + path: rel, + token_budget: DEFAULT_OUTLINE_BUDGET, + include_lessons: false, + consumer: "claude-code-shunt", + }, + { timeoutMs: LOOKUP_TIMEOUT_MS }, + ); + return declarationsInSpan(outline, span); +} + +/** The declarations a refusal of this read would list, [] when the index does + * not hold them all. A whole file (`missKey` set) is asked about once per + * session: a lookup that gave none, whether the index answered with an empty + * or cut outline or did not answer, is kept in the counts file under that + * key, so an unreachable server costs each file one wait. The counts are read + * again for the write: another hook of the session may have spent a budget + * during the lookup. */ +async function readDeclarations(repo, rel, span, sessionId, missKey) { + if (missKey && capBudgetSpent(readCapCounts(sessionId), missKey, 1)) return []; + const declarations = await indexedDeclarations(repo, rel, span); + if (missKey && !declarations.length) writeCapCounts(sessionId, spendCapBudget(readCapCounts(sessionId), missKey)); + return declarations; } /** Read-shaped decision (Read tool or `cat`): classify, price, span. A * ranged read consults the session's cap budget first; a cap denial spends - * one of the file's denials. */ -function settleRead(repo, { tool, rel, abs, offset, limit, sessionId, ctxBase, denyRewrite }) { + * one of the file's denials. A denial carries the declarations of the lines + * asked for; without them, or inside a `compound` command, the read passes. + * `fromEnd`: the slice is the file's last `limit` lines (`tail -n N`). */ +async function settleRead(repo, opts) { + const { tool, rel, abs, limit, fromEnd, sessionId, ctxBase, denyRewrite, compound } = opts; const lineCount = countLines(abs); + const offset = fromEnd ? Math.max(1, lineCount - limit + 1) : opts.offset; const bytes = fileBytes(abs); const ranged = offset != null || limit != null; const capCounts = READ_CAP > 0 && ranged ? readCapCounts(sessionId) : {}; @@ -310,22 +363,29 @@ function settleRead(repo, { tool, rel, abs, offset, limit, sessionId, ctxBase, d readCap: READ_CAP, capCounts, }; + const span = readSpan({ lineCount, offset, limit }); let verdict = classifyRead(readCtx, MAX_LINES); - if (verdict.capped && !writeCapCounts(sessionId, spendCapBudget(capCounts, rel))) + if (verdict.deny && compound) verdict = COMPOUND_COMMAND; + else if (verdict.deny) { + const asked = ranged ? span : { start: 1, end: lineCount }; + const declarations = await readDeclarations(repo, rel, asked, sessionId, ranged ? "" : `miss:${rel}`); + verdict = declarations.length ? classifyRead({ ...readCtx, declarations }, MAX_LINES) : INDEX_UNANSWERED; + } + if (verdict.capped && !writeCapCounts(sessionId, spendCapBudget(readCapCounts(sessionId), rel))) verdict = { deny: null, reason: BUDGET_UNRECORDED }; if (verdict.deny && denyRewrite) verdict.deny = denyRewrite(verdict.deny); - // A whole-file hit kept the whole file out; a cap hit kept the SPAN out - // (what the ranged read would have let in); a pass let its span in. - const tokens = - verdict.deny && !verdict.capped - ? estimateTokensSaved(bytes) - : estimateTokensRead({ bytes, lineCount, offset, limit }); - return settle(repo, { tool, verdict, tokens, path: rel, span: readSpan({ lineCount, offset, limit }) }); + // What the read lets into the context: the whole file, or the span of a + // ranged read. A hit kept that out, less the refusal's own text. + const read = estimateTokensRead({ bytes, lineCount, offset, limit }); + const tokens = verdict.deny ? Math.max(0, read - estimateTokensSaved(verdict.deny.length)) : read; + settle(repo, { tool, verdict, tokens, path: rel, span }); } /** classifyGrep with the symbol rule's once-per-symbol budget: - * the budget shares the read-cap counts file under a `sym:` key. */ -function classifySymbolGrep(ctx, sessionId) { + * the budget shares the read-cap counts file under a `sym:` key. Inside a + * `compound` command the grep that would be a symbol lookup passes as one, + * and spends nothing. */ +function classifySymbolGrep(ctx, sessionId, compound = false) { const symbol = ctx.isFile ? symbolInPattern(ctx.pattern) : ""; if (!symbol) return classifyGrep(ctx); const key = `sym:${symbol}`; @@ -335,46 +395,44 @@ function classifySymbolGrep(ctx, sessionId) { symbol, symbolBudgetSpent: capBudgetSpent(counts, key, SYMBOL_GREP_DENIALS_PER_SYMBOL), }); + if (verdict.symbol && compound) return COMPOUND_COMMAND; if (verdict.symbol && !writeCapCounts(sessionId, spendCapBudget(counts, key))) return { deny: null, reason: BUDGET_UNRECORDED }; return verdict; } -/** A symbol-grep denial fetches the definition itself (one bounded code.symbol - * call, 2.5 s) — otherwise the turn costs three model rounds (denied grep, - * loom_code_symbol, confirming grep) and tens of seconds when the index and - * the checkout disagree. The index answer is the answer, whatever commit the - * checkout is on; only named files the caller modified get their local grep - * inlined. */ +/** A symbol-grep denial carries the definition: one bounded code.symbol call, + * so the turn is one model round, not three (denied grep, loom_code_symbol, + * confirming grep). The index answer is the answer, whatever commit the + * checkout is on; named files the caller modified get their local grep + * inlined. When the index holds no single definition, does not answer in + * time, or those lines do not fit, the grep runs. */ async function answerSymbolDeny(verdict, repo, ctx, { cwd = repo.root, files = [] } = {}) { - if (!verdict.deny || !verdict.symbol || !repo.namespace) return verdict; - try { - const res = await postBounded( - "code.symbol", - { - org: repo.org || "", - namespace: repo.namespace, - name: verdict.symbol, - include_body: false, - include_history: false, - include_examples: false, - include_lessons: false, - }, - { timeoutMs: 2500 }, - ); - const dirtyFiles = files.filter((f) => { - const rel = pathUnder(repo.root, path.resolve(cwd, f)); - return rel != null && gitStatusClass(repo.root, rel) !== ""; - }); - const localGrep = dirtyFiles.length - ? localGrepText(runLocalGrep(cwd, ctx.pattern, dirtyFiles), { pattern: ctx.pattern, files: dirtyFiles }) - : ""; - const answer = symbolAnswerText(res, { asOf: repo.asOf, namespace: repo.namespace, localGrep, dirtyFiles }); - if (answer) verdict.deny = denySymbolGrepWithAnswer({ ...ctx, symbol: verdict.symbol }, answer); - } catch { - /* the plain redirect stands */ - } - return verdict; + if (!verdict.symbol) return verdict; + if (!repo.namespace) return INDEX_UNANSWERED; + const res = await postBounded( + "code.symbol", + { + org: repo.org || "", + namespace: repo.namespace, + name: verdict.symbol, + include_body: false, + include_history: false, + include_examples: false, + include_lessons: false, + }, + { timeoutMs: LOOKUP_TIMEOUT_MS }, + ); + const dirtyFiles = files.filter((f) => { + const rel = pathUnder(repo.root, path.resolve(cwd, f)); + return rel != null && gitStatusClass(repo.root, rel) !== ""; + }); + const localGrep = dirtyFiles.length + ? localGrepText(runLocalGrep(cwd, ctx.pattern, dirtyFiles), { pattern: ctx.pattern, files: dirtyFiles }) + : ""; + const answer = wholeSymbolAnswer(res, { asOf: repo.asOf, namespace: repo.namespace, localGrep, dirtyFiles }); + if (!answer) return INDEX_UNANSWERED; + return { ...verdict, deny: denySymbolGrepWithAnswer({ ...ctx, symbol: verdict.symbol }, answer) }; } /** A GitHub issue search is a question the tracker record @@ -471,7 +529,7 @@ async function main() { const abs = path.resolve(cwd, String(input.file_path || "")); const rel = pathUnder(root, abs); if (rel == null) return; - settleRead(repo, { tool, rel, abs, offset: input.offset, limit: input.limit, sessionId, ctxBase }); + await settleRead(repo, { tool, rel, abs, offset: input.offset, limit: input.limit, sessionId, ctxBase }); return; } @@ -519,39 +577,43 @@ async function main() { } if (tool === "Bash" && SHUNT_BASH) { - // Each bulk segment of a `;` / `&&` / `|` chain is judged in order; the - // first deny ends the call (one deny per hook), passes are all counted. - for (const bulk of parseBashBulkSegments(commandText(input))) { - if (await settleBashBulk(repo, { bulk, cwd: path.resolve(cwd, bulk.cwd || "."), sessionId, ctxBase })) return; + // Each bulk segment of a `;` / `&&` / `|` chain is counted in order; only + // a command that is one read or one grep can be denied. + const command = commandText(input); + const compound = isCompoundCommand(command); + for (const bulk of parseBashBulkSegments(command)) { + await settleBashBulk(repo, { bulk, cwd: path.resolve(cwd, bulk.cwd || "."), sessionId, ctxBase, compound }); } } } -/** One bulk-shaped Bash segment; true when it was denied. */ -async function settleBashBulk(repo, { bulk, cwd, sessionId, ctxBase }) { +/** One bulk-shaped Bash segment. Inside a `compound` command it passes: no + * lookup is made and no denial budget is spent. */ +async function settleBashBulk(repo, { bulk, cwd, sessionId, ctxBase, compound }) { const root = repo.root; if (bulk.kind === "read") { const abs = path.resolve(cwd, bulk.file); const rel = pathUnder(root, abs); - if (rel == null) return false; + if (rel == null) return; // A `sed -n 'A,Bp'` / `head -n N` / `tail -n +A` / // `awk 'NR>=A && NR<=B'` slice carries its span, so the read-window - // cap judges it exactly as Read(offset, limit); a whole-file `cat`, - // `nl`, `tac`, `sed -n p` keeps the whole-file rule. + // cap judges it exactly as Read(offset, limit); `tail -n N` carries a + // length alone, counted back from the file's last line; a whole-file + // `cat`, `nl`, `tac`, `sed -n p` keeps the whole-file rule. const cmdName = bulk.cmd || "cat"; - return settleRead(repo, { + await settleRead(repo, { tool: `Bash:${cmdName}`, rel, abs, sessionId, ctxBase, + compound, offset: bulk.offset, limit: bulk.limit, - denyRewrite: (t) => - t - .replace("Whole-file reads are", `\`${cmdName}\` of a whole file is`) - .replace(/^loom-code-shunt: Read of /, `loom-code-shunt: \`${cmdName}\` of `), + fromEnd: bulk.offset == null && bulk.limit != null, + denyRewrite: (t) => t.replace(/^loom-code-shunt: Read of /, `loom-code-shunt: \`${cmdName}\` of `), }); + return; } const abs = path.resolve(cwd, bulk.dir); const rel = pathUnder(root, abs); @@ -559,7 +621,7 @@ async function settleBashBulk(repo, { bulk, cwd, sessionId, ctxBase }) { try { isFile = fs.statSync(abs).isFile(); } catch { - return false; + return; } const ctx = { ...ctxBase, @@ -568,11 +630,11 @@ async function settleBashBulk(repo, { bulk, cwd, sessionId, ctxBase }) { pattern: bulk.pattern, modified: isFile && rel != null ? gitStatusClass(root, rel) : "", }; - const verdict = await answerSymbolDeny(classifySymbolGrep(ctx, sessionId), repo, ctx, { + const verdict = await answerSymbolDeny(classifySymbolGrep(ctx, sessionId, compound), repo, ctx, { cwd, files: bulk.files || [bulk.dir], }); - return settle(repo, { tool: "Bash:grep", verdict, tokens: 0, path: rel || "" }); + settle(repo, { tool: "Bash:grep", verdict, tokens: 0, path: rel || "" }); } main() diff --git a/integrations/claude-code-plugin/hooks/loom-test-gate.mjs b/integrations/claude-code-plugin/hooks/loom-test-gate.mjs index 013b96f64e3..deecee88c48 100644 --- a/integrations/claude-code-plugin/hooks/loom-test-gate.mjs +++ b/integrations/claude-code-plugin/hooks/loom-test-gate.mjs @@ -1,30 +1,47 @@ #!/usr/bin/env node -// loom-test-gate — Stop hook. +// loom-test-gate — PostToolUse (Bash|PowerShell) and Stop. // -// On Stop, if the working tree has uncommitted changes THIS SESSION made +// PostToolUse, the default (LOOM_TEST_GATE unset): after a shell command +// that changed files in a loom-indexed repo, ask `code.test_gate` about each +// one and attach ONE line per file naming the command of the tests the +// index links to it, or of the file itself when it is a test, or the changed +// functions the index links no test to when there is no test to name; once +// per file and once per test per session. The line rides the tool result, so it +// costs no model request, and it arrives while the file is still being +// edited. An edit tool's call gets the same line from loom-blast-radius, the +// one hook wired for those tools. +// +// Stop: if the working tree has uncommitted changes THIS SESSION made // in a loom-indexed repo, ask `code.test_gate` for the change's obligations // (tests to run, untested touched functions) and block the stop ONCE per // distinct change with a reason that names them. "This session's" is read // from the transcript: dirty paths an edit tool targeted or a shell command // named, written since the session began (by the file's modification time); // a tree left dirty before the session does not gate a turn that changed -// nothing. A Claude Code transcript that already answers the ask does not -// block either (`runAnswered` in lib/test-gate.mjs); a Codex rollout answers -// nothing, so its stop blocks. +// nothing. By default any test run since the session's last code change +// lets the stop pass, whatever it ran and however it went (`testedSince`, +// `lastCodeChange` in lib/test-gate.mjs): the stop is held for a session +// that ran no test since its last code change, and nothing is asked of the +// server for one that ran some. A documentation file changed after the run +// holds nothing. +// +// With LOOM_TEST_GATE=block nothing is named at edit time, and the stop +// passes only when a Claude Code transcript shows the named tests ran on the +// tree as it stands (`runAnswered`); a Codex rollout answers nothing there, +// so its stop blocks. // // Fail-open everywhere: no token, not an indexed repo, clean tree, nothing // of the tree touched this session, server down, second stop on the same -// change — the agent stops as normal. Without a transcript path the whole -// dirty tree is the change. -// LOOM_TEST_GATE=off disables; LOOM_TEST_GATE_DEPTH (1-3) sets the hops. +// change — the agent stops as normal. Without a transcript path the default +// holds no stop, and LOOM_TEST_GATE=block takes the whole dirty tree as the +// change. +// LOOM_TEST_GATE=off disables both; LOOM_TEST_GATE_DEPTH (1-3) sets the hops. -import fs from "node:fs"; -import path from "node:path"; import crypto from "node:crypto"; import { git, gitToplevel, - pathUnder, + normalizeToolName, postBounded, readStdinJson, DIFF_ARGS, @@ -32,30 +49,54 @@ import { resolveServerUrl, resolveToken, scheduleExit, - envSwitch, } from "../lib/loom-client.mjs"; -import { resolveIndexedRepo } from "../lib/repo-scope.mjs"; +import { cachedUnindexed, resolveIndexedRepo } from "../lib/repo-scope.mjs"; import { readSessionState, writeSessionState } from "../lib/tmp-state.mjs"; import { readAllLines } from "../lib/transcript.mjs"; import { + adviceFiles, + adviceLines, + advicePayload, checkoutPython, commentOnlyDiff, decideBlock, + gateDepth, + gateMode, gatePayload, gateSignature, + lastCodeChange, newestChange, renderGate, runAnswered, sessionScope, sessionStart, + testedSince, + testsIn, writtenSince, } from "../lib/test-gate.mjs"; -const ENABLED = envSwitch("LOOM_TEST_GATE", true); -const DEPTH = Math.min(3, Math.max(1, Number(process.env.LOOM_TEST_GATE_DEPTH || 2))); +const MODE = gateMode(); +const DEPTH = gateDepth(); +const AFTER_TOOL = process.argv[2] === "PostToolUse"; + +/** After a shell command: the line for the files it changed, or nothing. */ +async function advise(payload, token) { + const tool = normalizeToolName(payload.tool_name); + if (tool !== "Bash" && tool !== "PowerShell") return; + const cwd = payload.cwd || process.cwd(); + // This runs after every shell command: a checkout already known to have no index costs no git call. + if (cachedUnindexed(cwd)) return; + const { root, files } = adviceFiles(payload, { cwd }); + if (!files.length) return; + const repo = await resolveIndexedRepo(root, { consumer: "claude-code-testgate" }); + if (!repo.indexed) return; + const lines = await adviceLines(payload, files, { root, repo, token, depth: DEPTH }); + const out = advicePayload(lines.map((l) => l.text).join("\n")); + if (out) process.stdout.write(JSON.stringify(out) + "\n"); +} async function main() { - if (!ENABLED) { + if (MODE === "off" || (AFTER_TOOL && MODE === "block")) { scheduleExit(0); return; } @@ -65,6 +106,11 @@ async function main() { return; } const payload = await readStdinJson(); + if (AFTER_TOOL) { + await advise(payload, token); + scheduleExit(0); + return; + } // A Stop fired by our own block must never block again. if (payload.stop_hook_active) { scheduleExit(0); @@ -93,6 +139,11 @@ async function main() { scheduleExit(0); return; } + // The default holds the stop of a session whose transcript shows no test run since its last code change. + if (MODE === "advise" && (!transcript || testedSince(rows, lastCodeChange(root, changed)))) { + scheduleExit(0); + return; + } const repo = await resolveIndexedRepo(root, { consumer: "claude-code-testgate" }); if (!repo.indexed) { scheduleExit(0); @@ -127,16 +178,7 @@ async function main() { }, { token, serverUrl: resolveServerUrl() }, ); - const testExists = (testPath) => { - const target = path.resolve(root, testPath); - if (!pathUnder(root, target)) return false; - try { - return fs.statSync(target).isFile(); - } catch { - // A stale index row or another checkout's test is an explicit gap. - return false; - } - }; + const testExists = testsIn(root); // The newest file time among the uncommitted and untracked files. const lastModified = () => { const untracked = git(["ls-files", "-z", "--others", "--exclude-standard"], root, { diff --git a/integrations/claude-code-plugin/lib/blast-radius.mjs b/integrations/claude-code-plugin/lib/blast-radius.mjs index d4dd5cc6d21..9e8a93b6524 100644 --- a/integrations/claude-code-plugin/lib/blast-radius.mjs +++ b/integrations/claude-code-plugin/lib/blast-radius.mjs @@ -65,13 +65,15 @@ function base(p) { /** * Render the blast line, or "" when there is nothing worth saying. * `touchedPaths` = files edited this session (repo-relative) so co-change - * partners the agent already touched are not reported as missing. + * partners the agent already touched are not reported as missing. With + * `tests` false the tests reaching the change are left out: the test gate's + * line beside this one names their command. */ -export function renderBlast(rel, impact, { maxNames = 5, touchedPaths = [] } = {}) { +export function renderBlast(rel, impact, { maxNames = 5, touchedPaths = [], tests: namesTests = true } = {}) { if (!impact) return ""; const touched = (impact.touched_symbols || []).map((s) => short(s.qualified_name)).filter(Boolean); const impacted = (impact.impacted_symbols || []).filter((s) => s && s.qualified_name); - const tests = (impact.impacted_tests || []).filter((t) => t && t.test_path); + const tests = namesTests ? (impact.impacted_tests || []).filter((t) => t && t.test_path) : []; const already = new Set([rel, ...touchedPaths.map(String)]); const missing = (impact.co_change_missing || []).filter((m) => m && m.path && !already.has(String(m.path))); if (!impacted.length && !tests.length && !missing.length) return ""; // owners alone are not a radius diff --git a/integrations/claude-code-plugin/lib/code-shunt.mjs b/integrations/claude-code-plugin/lib/code-shunt.mjs index d0ef83bfc62..6b4cfd32bac 100644 --- a/integrations/claude-code-plugin/lib/code-shunt.mjs +++ b/integrations/claude-code-plugin/lib/code-shunt.mjs @@ -10,6 +10,14 @@ import { recalledDataBlock } from "./prompt-recall.mjs"; // with its path, line span, callers and as-of commit, so the shunt redirects // the BULK reflex to it; anything targeted passes. // +// A refusal costs the agent a request, so it must hand over what the call was +// after: a read is refused only with the declarations of the lines it asked +// for, a symbol grep only with the one definition the index holds. When the +// index did not answer in full, the call runs. The declarations are the kinds +// code.outline lists by default: functions, methods, classes, structs and the +// units of tests, build files and SQL. An interface, type alias, enum or +// constant is not among them, and the refusal says so. +// // The index describes merged code at its as-of commit. A file the checkout // modified or git does not track always passes: only the working tree can // answer for it (blast radius covers the diff after an edit). @@ -20,29 +28,23 @@ import { recalledDataBlock } from "./prompt-recall.mjs"; export const DEFAULT_MAX_LINES = 800; // Read-window cap. A RANGED read (offset/limit given) of an indexed, -// unmodified file whose span is longer than this many lines is redirected to -// the enclosing unit; 0 = off, the default until a bench sets one. The cap -// has a per-session, per-file budget so a model that insists is never denied -// the same file forever. +// unmodified file whose span is longer than this many lines is refused with +// the declarations in its lines; 0 = off, the default until a bench sets one. +// The cap has a per-session, per-file budget so a model that insists is never +// denied the same file forever. export const DEFAULT_READ_CAP = 0; export const READ_CAP_DENIALS_PER_FILE = 2; -// code.outline's default budget, and the outline's measured price per file -// line (147 indexed files changed by 30 recent PRs of a large C++ repository): -// 0.581 tokens of whole-row budgeted entries per file line. -// The deny text quotes the estimate so the model can weigh it against the -// file it was about to read; ctx.outlineTokens overrides when a caller knows. -export const DEFAULT_OUTLINE_BUDGET = 1500; -export const OUTLINE_TOKENS_PER_LINE = 0.58; - -/** Rough token price of `loom code.outline` for a file of `lineCount` lines: - * the measured per-line rate, floored at a small header and capped by the - * op's default budget (whole-row budgeting never exceeds it). */ -export function estimateOutlineTokens(lineCount, budget = DEFAULT_OUTLINE_BUDGET) { - const n = Number(lineCount); - if (!Number.isFinite(n) || n <= 0) return 0; - return Math.min(budget, Math.max(50, Math.round(n * OUTLINE_TOKENS_PER_LINE))); -} +// The token budget of the code.outline call behind a read refusal: the +// refusal carries every declaration of the lines asked for, so a file whose +// outline does not fit is read, not refused. Measured on 301 files over 800 +// lines of a large C++ repository, an outline costs a median 2.2 budgeted +// tokens per file line and its lines in the refusal 1.9 characters per +// budgeted token: 4000 held the outline of 62% of those files, and the +// longest refusal was 8,400 characters. That is a measurement, not a limit: +// the server counts an entry at a quarter of its JSON length, so long +// signatures make a longer refusal. +export const DEFAULT_OUTLINE_BUDGET = 4000; const BINARY_EXT = new Set([ ".png", @@ -112,10 +114,12 @@ export const PASS_REASONS = Object.freeze([ "cap_spent", // ranged read over the read-window cap, but this file's denial budget is spent "symbol_grep_spent", // single-file grep for a symbol, but this symbol's denial budget is spent "budget_unrecorded", // a denial whose budget spend could not be written: passed rather than lock the agent out + "compound_command", // a Bash command of several parts: a refusal would withhold every part + "index_unanswered", // the index did not answer the lookup in full: nothing to refuse with ]); -// A grep whose pattern names one symbol is a symbol lookup — -// denied once per symbol per session with the exact loom_code_symbol call. +// A grep whose pattern names one symbol is a symbol lookup: the index is +// asked once per symbol per session, and the grep is denied with its answer. export const SYMBOL_GREP_DENIALS_PER_SYMBOL = 1; /** The symbol a grep pattern names, or "": a `Class::method` path, or a @@ -171,7 +175,10 @@ function classifyRangedRead(ctx) { /** * Classify a Read call. `ctx` = {rel, prefixes, lineCount, modified, offset, limit, - * readCap, capCounts}. `modified` may be a boolean or the git + * readCap, capCounts, declarations}. `declarations` are the index's, for the + * lines asked for (declarationsInSpan); the denial text lists them. The hook + * asks for them once the verdict is a hit and refuses only when it holds them. + * `modified` may be a boolean or the git * status class ("modified" | "untracked"). Returns {deny, reason}: deny is the * denial text (null on a pass), reason is "hit" for a deny and one of * PASS_REASONS for a pass; a hit under the read-window cap also carries @@ -203,45 +210,71 @@ function scopeSentence(ctx) { return ` Pass namespace: "${ctx.namespace}" on that call — this checkout's index.`; } +/** The outline entries a read of `span` would show: the declarations that + * overlap it, in source order. [] when `outline` (a code.outline answer) does + * not hold them all: nothing indexed for the file, or a list its budget cut + * at or before the span's last line. */ +export function declarationsInSpan(outline, span) { + const entries = (Array.isArray(outline?.entries) ? outline.entries : []).filter( + (e) => e && e.qualified_name && e.start_line > 0, + ); + if (!entries.length || !span?.start) return []; + if (Number(outline.elided) > 0 && entries[entries.length - 1].start_line <= span.end) return []; + return entries.filter((e) => e.start_line <= span.end && Math.max(e.end_line || 0, e.start_line) >= span.start); +} + +/** One line per declaration: its lines, its qualified name, its header. */ +function declarationLines(declarations) { + return (Array.isArray(declarations) ? declarations : []) + .map((e) => { + const header = String(e.signature || "") + .replace(/\s+/g, " ") + .trim(); + return `${e.start_line}-${e.end_line || e.start_line} ${e.qualified_name}${header ? ` ${header}` : ""}`; + }) + .join("\n"); +} + +// What a read refusal's list holds, said in the refusal: code.outline's default kinds. +const OUTLINE_COLUMNS = + "(lines, qualified name, header; it lists functions, methods, classes and structs, " + + "not interfaces, type aliases, enums or constants)"; + +const READ_DIRECTLY = "Uncommitted edits are invisible to the index: if you changed this file, read it directly."; + function denyCapText(ctx, span, cap) { - const { rel, lineCount } = ctx; + const { rel } = ctx; const n = span.end - span.start + 1; - const outlineTokens = ctx.outlineTokens ?? estimateOutlineTokens(lineCount); return ( `loom-code-shunt: Read of ${rel} lines ${span.start}-${span.end} is ${n} lines, over the ` + `${cap}-line read window, and the file is in loom's code index` + - `${ctx.asOf ? ` (as of ${ctx.asOf.slice(0, 12)})` : ""}. Ask for the unit instead of the ` + - `window: loom code.enclosing locations=${rel}:${span.start} neighbours=true (the symbol ` + - `enclosing line ${span.start}, with its callers, callees and tests), then code.symbol ` + - `name= for the definition with its path:line span, or ` + - `code.outline path=${rel} (declarations with line spans, ~${outlineTokens} tokens) to pick ` + - `a smaller span. Read at most ${cap} lines at a time (offset/limit) if you must read directly. ` + - `Uncommitted edits are invisible to the index: if you changed this file, read the span directly.` + + `${ctx.asOf ? ` (as of ${ctx.asOf.slice(0, 12)})` : ""}. The index's outline of those lines ` + + `${OUTLINE_COLUMNS}:\n${declarationLines(ctx.declarations)}\n` + + `Read the ones you need, at most ${cap} lines at a time, or call loom_code_symbol ` + + `name= for one definition with its callers. ${READ_DIRECTLY}` + scopeSentence(ctx) ); } function denyReadText(ctx) { const { rel, lineCount } = ctx; - const outlineTokens = ctx.outlineTokens ?? estimateOutlineTokens(lineCount); return ( `loom-code-shunt: ${rel} is ${lineCount} lines and is in loom's code index` + - `${ctx.asOf ? ` (as of ${ctx.asOf.slice(0, 12)})` : ""}. Whole-file reads are the ` + - `expensive reflex — ask the index instead: loom code.outline path=${rel} ` + - `(declarations with line spans, ~${outlineTokens} tokens) to see what is in the file, ` + - `then Read only the span you need with offset/limit (targeted reads pass this hook) ` + - `or code.symbol (name → definition with path:line span). For a question use ` + - `code.search (question or path → ranked units); for an exact string code.grep ` + - `(hits arrive with their enclosing symbol). ` + - `Uncommitted edits are invisible to the index: if you changed this file, read the span directly.` + + `${ctx.asOf ? ` (as of ${ctx.asOf.slice(0, 12)})` : ""}. The index's outline of it ` + + `${OUTLINE_COLUMNS}:\n${declarationLines(ctx.declarations)}\n` + + `Read the lines you need (a ranged read passes this hook), or call loom_code_symbol ` + + `name= for one definition with its callers. ${READ_DIRECTLY}` + scopeSentence(ctx) ); } /** - * Classify a Grep call. `ctx` = {rel (of the search root), isFile, prefixes, pattern}. - * Returns {deny, reason} like classifyRead; a root outside the repo is - * `not_indexed` (the hook does not log it — nothing indexed was in play). + * Classify a Grep call. `ctx` = {rel (of the search root), isFile, prefixes, pattern, + * symbol, symbolBudgetSpent, answer}. Returns {deny, reason} like classifyRead; a + * root outside the repo is `not_indexed` (the hook does not log it — nothing + * indexed was in play). A symbol hit names `symbol`; its text carries `answer`, + * the index's definition (wholeSymbolAnswer), which the hook asks for and + * without which it lets the grep run. */ /** A Grep call with no output_mode that passes a line-only flag (`-n`, * `-A`, `-B`, `-C`, `context`): the caller wants matching lines. */ @@ -259,7 +292,7 @@ export function classifyGrep(ctx) { // A single-file grep for one symbol is a symbol lookup. if (ctx.symbol && underPrefixes(rel, prefixes)) { if (ctx.symbolBudgetSpent) return pass("symbol_grep_spent"); - return { deny: denySymbolGrepText(ctx), reason: "hit", symbol: ctx.symbol }; + return { deny: denySymbolGrepWithAnswer(ctx, ctx.answer || ""), reason: "hit", symbol: ctx.symbol }; } return pass("single_file_grep"); } @@ -284,10 +317,10 @@ export function localFirstOn(env = process.env) { return v === "on" || v === "true" || v === "1" || v === "yes"; } -/** The denial carries the index's answer. +/** The index's answer to "where is this symbol defined". * `result` is a code.symbol response; `asOf` the indexed commit the * session-start cache recorded (information, never a condition). "" when - * the index has no definition — the caller keeps the plain redirect. + * the index has no definition. * `localGrep` / `dirtyFiles`: the caller's own lines from named files it has * modified, the one thing the index cannot know. */ export function symbolAnswerText(result, { asOf = "", namespace = "", localGrep = "", dirtyFiles = [] } = {}) { @@ -309,6 +342,15 @@ export function symbolAnswerText(result, { asOf = "", namespace = "", localGrep return text; } +/** The symbol answer a refusal may carry, or "" when it is not whole: the + * index holds exactly one definition (several are a choice the caller's own + * grep settles), and the caller's lines from modified files all fit + * (`localGrep` is null when they do not). */ +export function wholeSymbolAnswer(result, opts = {}) { + const defs = Array.isArray(result?.definitions) ? result.definitions : []; + return defs.length === 1 && opts.localGrep !== null ? symbolAnswerText(result, opts) : ""; +} + /** The grep the model asked for, run by the hook over the named files the * caller has modified. `files` are the paths the model named; `grep` runs * directly, no shell, with the loom grep shim switched off so a shim on @@ -330,26 +372,26 @@ export function runLocalGrep(cwd, pattern, files, { exec = execFileSync, timeout }) || "", ); } catch { - return ""; // exit 1 = no match; anything else = the plain wording stands + return ""; // exit 1 = no match; anything else reads as no lines } } -/** The local grep's lines, capped, with the command and HEAD named. */ +/** The local grep's lines with the command and HEAD named; "" for no lines, + * null when they exceed `maxLines` or `maxChars`: a cut list is not the + * grep's answer, so the caller lets the grep run. */ export function localGrepText(output, { pattern = "", files = [], head = "", maxLines = 12, maxChars = 1500 } = {}) { const lines = String(output || "") .split("\n") .filter(Boolean); if (!lines.length) return ""; - const shown = lines.slice(0, maxLines); - let body = shown.join("\n"); - if (body.length > maxChars) body = body.slice(0, maxChars) + "…"; - const more = lines.length > shown.length ? `\n… ${lines.length - shown.length} more line(s)` : ""; + const body = lines.join("\n"); + if (lines.length > maxLines || body.length > maxChars) return null; const cmd = `grep -n ${JSON.stringify(String(pattern))} ${files.join(" ")}`.trim(); - return `${cmd}${head ? ` (HEAD ${String(head).slice(0, 9)})` : ""}:\n${body}${more}`; + return `${cmd}${head ? ` (HEAD ${String(head).slice(0, 9)})` : ""}:\n${body}`; } -/** The symbol-grep denial when the index answered: the answer first, the - * callers pointer, the scope — no round trip left for the model to make. */ +/** The symbol-grep denial: the index's answer first, the callers pointer, + * the scope — no round trip left for the model to make. */ export function denySymbolGrepWithAnswer(ctx, answer) { const { pattern, symbol } = ctx; return ( @@ -359,18 +401,6 @@ export function denySymbolGrepWithAnswer(ctx, answer) { ); } -function denySymbolGrepText(ctx) { - const { rel, pattern, symbol } = ctx; - return ( - `loom-code-shunt: ${JSON.stringify(String(pattern))} names a symbol — call ` + - `loom_code_symbol name=${JSON.stringify(String(symbol))} (the exact definition with path:line, ` + - `compiler tier where indexed; add uses_brief: true for its callers) instead of grepping ` + - `${rel}: a grep shows matching lines, not the definition. This grep passes on the next try; ` + - `grep for strings, or in your own uncommitted files, directly.` + - scopeSentence(ctx) - ); -} - // --------------------------------------------------------------------------- // A GitHub issue search from an indexed checkout is answered // by the tracker record first: asked "is this already reported?", a model diff --git a/integrations/claude-code-plugin/lib/repo-scope.mjs b/integrations/claude-code-plugin/lib/repo-scope.mjs index 0e91066bcc8..4b2cafce881 100644 --- a/integrations/claude-code-plugin/lib/repo-scope.mjs +++ b/integrations/claude-code-plugin/lib/repo-scope.mjs @@ -7,7 +7,9 @@ // {ts, indexed:true, org, namespace, repo, branch, prefixes, asOf, fetchedAt}. // A definite answer is trusted CACHE_TTL_MS; an unresolved one (the server // did not answer) UNRESOLVED_TTL_MS, then the next caller retries. +import fs from "node:fs"; import os from "node:os"; +import path from "node:path"; import { git, postBounded, resolveCodeRepo, resolveToken, shuntCachePath } from "./loom-client.mjs"; import { repoSlug } from "./code-shunt.mjs"; import { readPrivateFile, writeJsonFile } from "./tmp-state.mjs"; @@ -116,6 +118,22 @@ export function readCache(root, now = Date.now(), tmp = os.tmpdir()) { } } +/** True when the shared cache holds a fresh, definite answer that the + * checkout around `cwd` is not indexed. For a hook that runs after every + * shell command: the root is the nearest directory above `cwd` with a `.git` + * entry, found without starting git. Where git would name another root, or + * nothing has looked the checkout up yet, there is no entry and the answer + * is false. */ +export function cachedUnindexed(cwd, { now = Date.now(), tmp = os.tmpdir() } = {}) { + for (let dir = path.resolve(String(cwd || ".")); ; dir = path.dirname(dir)) { + if (fs.existsSync(path.join(dir, ".git"))) { + const entry = readCache(dir, now, tmp); + return Boolean(entry && !entry.indexed && !entry.unresolved); + } + if (dir === path.dirname(dir)) return false; + } +} + export function writeCache(root, entry, tmp = os.tmpdir()) { writeJsonFile(cachePathFor(root, tmp), entry); // tmp not writable: fine } diff --git a/integrations/claude-code-plugin/lib/shell-command.mjs b/integrations/claude-code-plugin/lib/shell-command.mjs index 6291eab390d..a2eeb0a4252 100644 --- a/integrations/claude-code-plugin/lib/shell-command.mjs +++ b/integrations/claude-code-plugin/lib/shell-command.mjs @@ -167,21 +167,16 @@ export function ghRepoSlug(value) { return m ? `${m[1]}/${m[2]}`.toLowerCase() : ""; } -/** A command line that may be a `&&` / `;` chain: the first segment that is a - * gh issue search, or null. Pipelines and redirects still disqualify a - * segment (their output is not a question), quotes are honoured. */ +/** The issue-search shape of a command that is one `gh` call, or null. A + * command of several parts is not judged (isCompoundCommand, or a `&` that + * starts a second command), and a redirect or an expansion disqualifies it + * (its output is not a question); quotes are honoured. */ export function ghIssueSearchInCommand(command) { - const c = String(command || ""); - if (!c.trim()) return null; - for (const seg of splitOutsideQuotes(c, LIST_SEPARATORS)) { - const s = seg.trim(); - if (!s) continue; - const bare = s.replace(/"(?:\\.|[^"\\])*"|'[^']*'/g, ""); - if (/[|>`$]/.test(bare)) continue; - const shape = ghIssueSearchShape(shTokens(s)); - if (shape) return shape; - } - return null; + const s = String(command || "").trim(); + if (!s || isCompoundCommand(s)) return null; + const bare = s.replace(/"(?:\\.|[^"\\])*"|'[^']*'/g, ""); + if (/[&>`$]/.test(bare)) return null; + return ghIssueSearchShape(shTokens(s.replace(/;\s*$/, ""))); } /** `awk '/re/…' files`, `sed -n '/re/p' file`, `git grep [-n] pattern files` @@ -220,7 +215,8 @@ export function patternSearchShape(cmd, t) { /** The span a shell read asks for: {kind:"read", file, offset, limit} — the * same shape Read(offset, limit) carries, so classifyRead judges both alike - * (limit null = to the end of the file). null when the command is not a + * (limit null = to the end of the file; a limit with no offset = the file's + * last `limit` lines, `tail -n N`). null when the command is not a * line-range read of one file (pattern-driven sed/awk, -c bytes, several * files, unknown flags with values). */ export function parseRangedShellRead(cmd, argv) { @@ -386,6 +382,14 @@ export function parseBashBulk(command) { /** A command's list separators: `;`, `&&`, `||` and newlines. */ const LIST_SEPARATORS = [";", "&&", "||", "\n"]; +/** True when a command has more than one part: a `;` / `&&` / `||` / newline + * list or a pipeline, outside quotes. The shunt never refuses one: a refusal + * withholds every part, and only one of them is the read it judged. */ +export function isCompoundCommand(command) { + const parts = splitOutsideQuotes(String(command || ""), [...LIST_SEPARATORS, "|"]); + return parts.filter((part) => part.trim()).length > 1; +} + /** `text` cut at each of `separators` that sits outside quotes; quotes are * kept in the pieces. Longer separators are tried first so `||` is not * read as two pipes. */ diff --git a/integrations/claude-code-plugin/lib/test-gate.mjs b/integrations/claude-code-plugin/lib/test-gate.mjs index 6a9521efd71..8b1ea2ebe66 100644 --- a/integrations/claude-code-plugin/lib/test-gate.mjs +++ b/integrations/claude-code-plugin/lib/test-gate.mjs @@ -1,7 +1,16 @@ -// Helpers for the loom-test-gate Stop hook (unit-tested). +// Helpers for the loom-test-gate hook (unit-tested). // -// When the agent is about to stop with uncommitted changes in a loom-indexed -// repo, ask `code.test_gate` what the change obliges: the tests that reach +// The gate names the tests a change obliges, from `code.test_gate`. By +// default it names them when the file is edited: the tool call that changed +// a file carries one line with the command of the tests the index links to +// it, or of the file itself when it is a test, or with the changed functions +// the index links no test to when it has no test to name; once per file per +// session (`adviceFiles`, `adviceLines`). +// +// At Stop it holds a session that ran no test since its last code change. +// When the agent is about to stop with uncommitted changes in a +// loom-indexed repo, it asks +// `code.test_gate` what the change obliges: the tests that reach // it (evidence-ordered, with a run command when derivable) and the touched // functions no test reaches. If either list is non-empty and this exact // change has not been gated yet this session, block the stop ONCE with a @@ -9,8 +18,14 @@ // in review. The second stop on the // same change passes: the agent has seen the obligation and either ran the // tests or chose not to, and a gate that nags is a gate that gets disabled. -// A stop whose transcript already answers the ask is not blocked at all -// (`runAnswered`): a block costs the session one more model request. +// A block costs the session one more model request, so by default any test +// run since the last write to a changed code file lets the stop pass before +// anything is asked (`testedSince`, `lastCodeChange`): which tests it ran +// and how they went is the agent's to +// judge, and a hook that reads shell text to decide it blocks sessions that +// ran them. With LOOM_TEST_GATE=block nothing is named at edit time and the +// stop passes only when the transcript shows the named tests ran on the tree +// as it stands (`runAnswered`). // // The change is the session's, not the tree's: `sessionScope` keeps only // the dirty paths the transcript shows this session edited or named in a @@ -21,10 +36,45 @@ import fs from "node:fs"; import path from "node:path"; -import { commandText, contentText, extractFiles, normalizeToolName, pathUnder } from "./loom-client.mjs"; +import { + commandText, + contentText, + DIFF_ARGS, + diffHeaders, + envSwitch, + extractFiles, + git, + gitToplevel, + normalizeToolName, + pathUnder, + postBounded, + resolveServerUrl, +} from "./loom-client.mjs"; +import { readSessionState, writeSessionState } from "./tmp-state.mjs"; +import { parseLines, readRange } from "./transcript.mjs"; const EDIT_TOOLS = new Set(["Edit", "Write", "MultiEdit", "NotebookEdit", "str_replace_editor", "apply_patch"]); +/** What the gate does, from LOOM_TEST_GATE: "advise" names an edited file's + * tests on the tool call that edited it and holds the stop of a session that + * ran no test since its last code change (unset, or any on-word); "block" names + * nothing and holds the stop until the named tests ran; "off" does neither. */ +export function gateMode(env = process.env) { + if ( + String(env.LOOM_TEST_GATE ?? "") + .trim() + .toLowerCase() === "block" + ) { + return "block"; + } + return envSwitch("LOOM_TEST_GATE", true, env) ? "advise" : "off"; +} + +/** The hops `code.test_gate` follows: LOOM_TEST_GATE_DEPTH, 1 to 3. */ +export function gateDepth(env = process.env) { + return Math.min(3, Math.max(1, Number(env.LOOM_TEST_GATE_DEPTH || 2))); +} + /** Stable signature of the change: sorted changed paths + the diff's hash. */ export function gateSignature(changedPaths, diffHash) { const paths = (changedPaths || []).map(String).filter(Boolean).sort(); @@ -62,18 +112,14 @@ export function renderGate(gate, { maxRuns = 4, maxNames = 4, python, testExists : []; const absent = new Set(missing); const tests = indexed.filter((t) => !absent.has(String(t.test_path || ""))); - const raw = [...new Set(tests.map((t) => String(t.run || "")).filter(Boolean))]; - const runs = onePytest(raw.slice(0, maxRuns)).map((r) => withPython(r, python)); + const { raw, text: runs } = runList(tests, { maxRuns, python }); const unknown = tests .filter((t) => !t.run) .map((t) => String(t.test_path || "")) .filter(Boolean); const untested = Array.isArray(gate.untested) ? gate.untested : []; const parts = []; - if (runs.length) { - const more = raw.length - maxRuns; - parts.push(`run: ${runs.join(" ; ")}${more > 0 ? ` (+${more} more)` : ""}`); - } + if (runs) parts.push(`run: ${runs}`); if (unknown.length) { const shown = unknown.slice(0, maxNames); const more = unknown.length - shown.length; @@ -85,15 +131,12 @@ export function renderGate(gate, { maxRuns = 4, maxNames = 4, python, testExists parts.push(`indexed tests not present in this checkout: ${shown.join(", ")}${more > 0 ? ` (+${more})` : ""}`); } if (untested.length) { - const names = [...new Set(untested.map((u) => short(u.qualified_name)))].filter(Boolean); - const shown = names.slice(0, maxNames); - const total = gate.untested_total || names.length; - const list = `${shown.join(", ")}${total > shown.length ? ` (+${total - shown.length})` : ""}`; + const { list, total } = untestedNames(gate, maxNames); // Beside tests to run, "no test reaches" reads as a fact about them, and // a test that builds an object reaches a constructor the graph holds no // edge to. parts.push( - runs.length || unknown.length + runs || unknown.length ? `the index links no test to: ${list} (the tests named here may still reach ${total > 1 ? "them" : "it"})` : `no test reaches: ${list}`, ); @@ -104,7 +147,7 @@ export function renderGate(gate, { maxRuns = 4, maxNames = 4, python, testExists // that went hunting for a runner. Say what the obligation actually is. const tail = missing.length ? "Run the available tests and check the missing paths against the indexed revision (deleted, renamed or different checkout); use current equivalent tests or say why not. Missing tests are not passes." - : runs.length || unknown.length + : runs || unknown.length ? "Run the tests before finishing, or say why not." : "Add a test that reaches it, or say why none is needed."; const env = @@ -116,6 +159,66 @@ export function renderGate(gate, { maxRuns = 4, maxNames = 4, python, testExists const isPytest = (run) => /^pytest(\s|$)/.test(String(run || "")); +/** The functions of a gate's `untested`, by short name: the first `maxNames` + * as `list`, with a count of the rest, and how many there are in `total`. */ +function untestedNames(gate, maxNames = 4) { + const untested = gate && Array.isArray(gate.untested) ? gate.untested : []; + const names = [...new Set(untested.map((u) => short(u.qualified_name)))].filter(Boolean); + const shown = names.slice(0, maxNames); + const total = (gate && gate.untested_total) || names.length; + const more = total > shown.length ? ` (+${total - shown.length})` : ""; + return { list: shown.length ? `${shown.join(", ")}${more}` : "", total }; +} + +/** The distinct run commands of `tests` (`raw`) and the first `maxRuns` of + * them as one text, "" when no test has one. */ +function runList(tests, { maxRuns, python }) { + const raw = [...new Set(tests.map((t) => String(t.run || "")).filter(Boolean))]; + const runs = onePytest(raw.slice(0, maxRuns)).map((r) => withPython(r, python)); + const more = raw.length - maxRuns; + return { raw, text: runs.length ? `${runs.join(" ; ")}${more > 0 ? ` (+${more} more)` : ""}` : "" }; +} + +/** + * The tests of a `code.test_gate` answer about `rel` alone that the + * edit-time line names: the ones the checkout has. For a source file they + * are the tests the index links to it; for a test file, the file itself. + * A file under a tests directory that no runner takes (a fixture, a + * conftest) is not a test to run for its own change. + */ +export function adviceTests(rel, gate, testExists) { + return (gate && Array.isArray(gate.tests) ? gate.tests : []).filter( + (t) => + t && t.test_path && (t.run || String(t.test_path) !== rel) && (!testExists || testExists(String(t.test_path))), + ); +} + +/** + * The edit-time line for `rel` from `tests` (see `adviceTests`): their + * commands, then the tests no runner is known for. With no test, it names + * `untested`, the changed functions the index links no test to, as the + * index's view: the graph is a floor, and the line has no reply in which the + * agent could say that a test does reach them. "" when there is neither. + */ +export function renderAdvice(rel, tests, { maxRuns = 4, maxNames = 4, python, untested = "" } = {}) { + const parts = [runList(tests, { maxRuns, python }).text].filter(Boolean); + const unknown = [...new Set(tests.filter((t) => !t.run).map((t) => String(t.test_path)))]; + if (unknown.length) { + const more = unknown.length - maxNames; + parts.push(`no known runner: ${unknown.slice(0, maxNames).join(", ")}${more > 0 ? ` (+${more})` : ""}`); + } + if (!parts.length && untested) parts.push(`the index links no test to ${untested}`); + return parts.length ? `Loom tests for ${rel}: ${parts.join(" · ")}` : ""; +} + +/** The tests of `tests` that `renderAdvice` prints: those of its first + * `maxRuns` commands and its first `maxNames` paths with no known runner. */ +export function printedTests(tests, { maxRuns = 4, maxNames = 4 } = {}) { + const runs = [...new Set(tests.map((t) => String(t.run || "")).filter(Boolean))].slice(0, maxRuns); + const paths = [...new Set(tests.filter((t) => !t.run).map((t) => String(t.test_path)))].slice(0, maxNames); + return tests.filter((t) => (t.run ? runs.includes(String(t.run)) : paths.includes(String(t.test_path)))); +} + /** `runs` with every `pytest ` folded into the first one: one command to * copy and one process to start. A run with an option or a second word stays * its own command. */ @@ -239,6 +342,20 @@ export function gatePayload(text) { return text ? { decision: "block", reason: text } : null; } +/** PostToolUse payload: additional context only, never a decision. */ +export function advicePayload(text) { + return text ? { hookSpecificOutput: { hookEventName: "PostToolUse", additionalContext: text } } : null; +} + +/** A predicate: is `testPath` a file of the checkout at `root`? A stale + * index row or another checkout's test is not. */ +export function testsIn(root) { + return (testPath) => { + const target = path.resolve(root, testPath); + return Boolean(pathUnder(root, target)) && isFile(target); + }; +} + /** `p` as a repo-relative posix path under `root` (resolved against `cwd` * when relative); "" when it lies outside the repo or `root` is unknown. */ function relativeToRoot(root, p, cwd) { @@ -339,6 +456,135 @@ export function writtenSince(root, paths, since) { }); } +// How much of a transcript's head is read for the session's first row. +const HEAD_BYTES = 64 * 1024; +// Files asked about for one tool call: a command that names more waits for +// the next call that names them. +const MAX_ADVICE_FILES = 4; + +/** + * The files a PostToolUse payload's tool call changed that this session has + * not been advised on, with the checkout root: the dirty paths its edit tool + * targeted or its shell command named, written since the session began. That + * is `sessionScope` and `writtenSince` over the one call, the rule the + * blocking gate applies to the whole transcript, so a command that only reads + * a file left dirty before the session names nothing. The hook runs after + * every shell command, so a call that cannot name an unasked dirty file (a + * path is named with its last segment) costs one git call, not two. + */ +export function adviceFiles(payload, { cwd, root = "" } = {}) { + const dirty = git(["diff", "--name-only", "-z", "HEAD"], root || cwd, { timeoutMs: 2000, raw: true }) + .split("\0") + .filter(Boolean); + const seen = dirty.length ? readSessionState("testadvice", payload.session_id).seen || {} : {}; + const text = `${commandText(payload.tool_input)}\n${extractFiles(payload.tool_input).join("\n")}`; + const unasked = dirty.filter((rel) => !seen[rel] && text.includes(rel.slice(rel.lastIndexOf("/") + 1))); + const top = unasked.length ? root || gitToplevel(cwd) : ""; + if (!top) return { root, files: [] }; + const call = { type: "tool_use", name: payload.tool_name, input: payload.tool_input }; + const named = sessionScope(unasked, [{ type: "assistant", message: { content: [call] } }], { root: top, cwd }); + const head = named.length && payload.transcript_path ? readRange(payload.transcript_path, 0, HEAD_BYTES) : ""; + const files = writtenSince(top, named, sessionStart(parseLines(head.toString()))).slice(0, MAX_ADVICE_FILES); + return { root: top, files }; +} + +/** `map` without its oldest keys beyond `max`. */ +function newest(map, max = 300) { + const keys = Object.keys(map); + for (const k of keys.slice(0, Math.max(0, keys.length - max))) delete map[k]; + return map; +} + +/** Adds `keys` to the session's test-advice map `field` (`seen`: files asked + * about; `retried`: files to ask about once more; `named`: tests a line + * named). The state is read and written here + * with nothing between, not locked: two hooks of one session that write in + * the same instant (parallel tool calls) keep one's entries, and the other's + * file is then asked about twice or its test named twice. */ +function remember(sessionId, field, keys) { + const state = readSessionState("testadvice", sessionId); + const map = { ...state[field] }; + for (const key of keys) map[key] = Date.now(); + writeSessionState("testadvice", sessionId, { ...state, [field]: newest(map) }); +} + +/** + * The edit-time lines for `files` (from `adviceFiles`), as `{ rel, text, + * tests }` for each file that has one: `tests` counts the tests `text` names, + * 0 when it names the functions the index links no test to. Each file is + * asked about once per session, at its first change, so a function changed + * later in the same file is not asked about. A file the server gave no + * answer for is asked about once more, at the next call that names it, so a + * server that is down costs a session two bounded requests per file and not + * one per tool call. A file whose change is comments only is not asked + * about and stays unasked: it owes no test until it changes code. A test is + * named once per session: the test file a session edits after the source + * file it tests adds no second line with the same command. A test the call's + * own command runs is not named (`runsHere`): the line would arrive on the + * result of that run. Only the diff's paths, hunk ranges and function + * names are sent (`diffHeaders`). + */ +export async function adviceLines(payload, files, { root, repo, token, depth = gateDepth() } = {}) { + const asked = files + .map((rel) => [ + rel, + git(["diff", ...DIFF_ARGS, "--unified=0", "HEAD", "--", rel], root, { timeoutMs: 2000, raw: true }), + ]) + .filter(([, diff]) => !commentOnlyDiff(diff)); + if (!asked.length) return []; + const gates = await Promise.all( + asked.map(([rel, diff]) => + postBounded( + "code.test_gate", + { + org: repo.org, + namespace: repo.namespace, + files: [rel], + diff: diffHeaders(diff, 200_000), + depth, + consumer: "claude-code-testgate", + }, + { token, serverUrl: resolveServerUrl() }, + ), + ), + ); + const state = readSessionState("testadvice", payload.session_id); + const rels = asked.map(([rel]) => rel); + // No answer (a timeout, a 5xx): the file stays unasked for one more call that names it. + const again = rels.filter((rel, i) => !gates[i] && !(state.retried || {})[rel]); + if (again.length) remember(payload.session_id, "retried", again); + if (again.length < rels.length) { + remember( + payload.session_id, + "seen", + rels.filter((rel) => !again.includes(rel)), + ); + } + const named = { ...state.named }; + const command = commandText(payload.tool_input); + const testExists = testsIn(root); + let python; + const lines = []; + const printed = []; + for (const [i, [rel]] of asked.entries()) { + const tests = adviceTests(rel, gates[i], testExists); + const fresh = tests.filter((t) => !named[t.test_path] && !(t.run && runsHere(command, String(t.run)))); + if (python === undefined && fresh.some((t) => isPytest(t.run))) python = checkoutPython(root); + // Functions are named only for a file with no test to run in this checkout. + const untested = tests.length ? "" : untestedNames(gates[i]).list; + const text = renderAdvice(rel, fresh, { python, untested }); + if (!text) continue; + // A test folded into "(+N more)" was not shown, so its own change still names it. + for (const t of printedTests(fresh)) { + named[t.test_path] = Date.now(); + printed.push(t.test_path); + } + lines.push({ rel, text, tests: fresh.length }); + } + if (printed.length) remember(payload.session_id, "named", printed); + return lines; +} + // The prompt's last sentence, whole: "Do not run the test suite.", "Please // don't run any tests". A sentence that says more (`do not run // tests/test_slow.py`, "If lint fails, do not run the tests.") or that is not @@ -373,6 +619,106 @@ const ELSEWHERE = /\b(?:ssh|docker|podman|kubectl)\s/; /** True when `head`, a command's text up to a pytest run, shows the run * started in this checkout. */ const ranHere = (head) => !ELSEWHERE.test(head) && LAUNCHER.test(head.split(/[;&|(\n]/).pop()); +/** True when `command` runs `run`, a test's whole command, in this checkout: + * `pytest tests/test_a.py::test_one` runs one test of the file, and `echo + * "pytest tests/test_a.py"` and `docker exec app pytest tests/test_a.py` run + * nothing here. */ +function runsHere(command, run) { + const at = command.indexOf(run); + return at >= 0 && /^(?:[\s;|&)]|$)/.test(command.slice(at + run.length)) && ranHere(command.slice(0, at)); +} + +// A shell command that starts a test runner, wrapped or piped in any way: a +// program `code.test_gate` names a run with or a common other one, or a +// build tool with an argument in which `test` or `tests` follows no letter +// and no lower-case letter follows it (`make test-unit`, `npm run test`, +// `node --test`, `gradle :app:test`, `gradlew testDebugUnitTest`). `import +// pytest`, `pip install pytest`, `pytest.raises`, `npm install x@latest`, +// `npm install @testing-library/react` and `node scripts/attest.js` are not +// runs. A command that only mentions a runner counts: what is read is +// whether the session ran a test at all. +const RUNNER = + /(? name === "exec" || normalizeToolName(name) === "Bash"; + +/** The command text of a Codex rollout's shell call: its `arguments` JSON + * holds a string or an argv (`["go","test"]`), whose words no space joins. */ +function rolloutCommand(call) { + let input = call.input ?? call.arguments; + if (typeof input === "string") { + try { + input = JSON.parse(input); + } catch { + return input; + } + } + return commandText(input) || (typeof input === "string" ? input : ""); +} + +/** + * True when the transcript holds a shell command that starts a test runner + * (`RUNNER`) and finished at or after `since` (epoch ms), or has no dated + * result: Claude Code rows and Codex rollout calls, sidechains skipped. Its + * output is not read, so a run that failed, was piped into `grep` or ran + * between `git stash` and `git stash pop` counts. + */ +export function testedSince(objs, since) { + const done = new Map(); + const runs = []; + for (const o of objs || []) { + const at = Date.parse((o && o.timestamp) || ""); + if (o?.type === "response_item") { + const call = o.payload || {}; + if (/_output$/.test(call.type)) done.set(call.call_id, at); + else if (rolloutShell(call.name) && RUNNER.test(rolloutCommand(call))) { + runs.push(call.call_id); + } + continue; + } + const content = o && !o.isSidechain && o.message && o.message.content; + for (const b of Array.isArray(content) ? content : []) { + if (o.type === "user" && b?.type === "tool_result") done.set(b.tool_use_id, at); + else if ( + o.type === "assistant" && + b?.type === "tool_use" && + ["Bash", "PowerShell"].includes(normalizeToolName(b.name)) && + RUNNER.test(commandText(b.input)) + ) { + runs.push(b.id); + } + } + } + return runs.some((id) => !(done.get(id) < since)); +} + +// Documentation and prose by name: a test run answers no change to one. +// `CMakeLists.txt` and a requirements file are code. +const PROSE = /\.(?:md|mdx|rst|txt|adoc)$/i; +const CHANGELOG = /(?:^|\/)(?:CHANGELOG|CHANGES|HISTORY|NEWS)$/; +const CODE_TXT = /(?:^|\/)(?:CMakeLists|[^/]*requirements[^/]*)\.txt$/i; +const isProse = (file) => CHANGELOG.test(file) || (PROSE.test(file) && !CODE_TXT.test(file)); + +/** The newest modification time, in epoch ms, among the code files of + * `files` under `root`: a test run that finished since then saw each of + * them as it stands. A documentation or prose file (`isProse`) is left out, + * so an edit to one after the run holds no stop, and so is a file that + * cannot be read (a deleted one). 0 when none is left. */ +export function lastCodeChange(root, files) { + let last = 0; + for (const file of files) { + if (isProse(file)) continue; + try { + last = Math.max(last, fs.statSync(path.join(root, file)).mtimeMs); + } catch { + // A deleted file has no time of its own. + } + } + return last; +} + // pytest's last line, whose order is fixed: failed, passed, skipped, // deselected, xfailed, xpassed, warnings, errors. A whole line starts at // "failed" or "passed" and names nothing deselected, so a -k subset is not diff --git a/integrations/claude-code-plugin/tests/blast-radius.test.mjs b/integrations/claude-code-plugin/tests/blast-radius.test.mjs index 67085f42cbc..d632851a5ea 100644 --- a/integrations/claude-code-plugin/tests/blast-radius.test.mjs +++ b/integrations/claude-code-plugin/tests/blast-radius.test.mjs @@ -42,6 +42,15 @@ test("renderBlast names callers, tests and untouched partners in one line", () = assert.ok(text.length < 520, `line stays short: ${text.length}`); }); +test("beside the test gate's line the radius counts no tests, and tests alone are then no radius", () => { + const text = renderBlast("src/Storages/MergeTree/MergeTreeData.cpp", IMPACT, { tests: false }); + assert.match(text, /3 callers in 2 files/); + assert.doesNotMatch(text, /tests reaching it/); + const onlyTests = { touched_symbols: IMPACT.touched_symbols, impacted_tests: IMPACT.impacted_tests }; + assert.match(renderBlast("a.cpp", onlyTests), /tests reaching it: 1/); + assert.equal(renderBlast("a.cpp", onlyTests, { tests: false }), ""); +}); + test("partners the session already touched are not reported as missing", () => { const text = renderBlast("src/Storages/MergeTree/MergeTreeData.cpp", IMPACT, { touchedPaths: ["src/Storages/MergeTree/MergeTreeData.h"], diff --git a/integrations/claude-code-plugin/tests/code-hooks-failopen.test.mjs b/integrations/claude-code-plugin/tests/code-hooks-failopen.test.mjs index 7e8e83ff39e..500048e31a1 100644 --- a/integrations/claude-code-plugin/tests/code-hooks-failopen.test.mjs +++ b/integrations/claude-code-plugin/tests/code-hooks-failopen.test.mjs @@ -47,10 +47,10 @@ function seedIndexed(root, tmp) { } /** Run one hook; `stdin` is a string (sent as is) or an object (JSON). */ -function run(hook, stdin, { tmp, url = REFUSED, token = "t", env = {} }) { +function run(hook, stdin, { tmp, url = REFUSED, token = "t", env = {}, event = "X" }) { return new Promise((resolve) => { const started = Date.now(); - const child = spawn(process.execPath, [path.join(HOOKS, hook), "X"], { + const child = spawn(process.execPath, [path.join(HOOKS, hook), event], { env: hostEnv({ PATH: process.env.PATH, HOME: tmp, @@ -115,6 +115,9 @@ async function withCapturingServer(fn) { return bodies; } +// The Stop test gate that takes only a run of the named tests as an answer. +const BLOCKING = { LOOM_TEST_GATE: "block" }; + const HOOK_NAMES = [ "loom-code-shunt.mjs", "loom-file-context.mjs", @@ -126,11 +129,16 @@ const HOOK_NAMES = [ test("malformed, empty and non-object stdin: every code hook exits 0 and prints nothing", async () => { const tmp = freshTmp(); for (const hook of HOOK_NAMES) { + // The test gate reads its input at a Stop in either mode, and after a shell command. + const starts = hook === "loom-test-gate.mjs" ? [{}, { env: BLOCKING }, { event: "PostToolUse" }] : [{}]; for (const stdin of ["{not json", "", "[]", "null", '"text"', "42"]) { - const r = await run(hook, stdin, { tmp }); - assert.equal(r.code, 0, `${hook} on ${JSON.stringify(stdin)}`); - assert.equal(r.out, "", `${hook} on ${JSON.stringify(stdin)}`); - assert.equal(r.err, "", `${hook} writes no stack trace on ${JSON.stringify(stdin)}`); + for (const how of starts) { + const as = `${hook} ${JSON.stringify(how)} on ${JSON.stringify(stdin)}`; + const r = await run(hook, stdin, { tmp, ...how }); + assert.equal(r.code, 0, as); + assert.equal(r.out, "", as); + assert.equal(r.err, "", `no stack trace: ${as}`); + } } } }); @@ -162,6 +170,10 @@ test("no token: nothing is asked of the server and nothing is printed", async () assert.equal(r.code, 0, hook); assert.equal(r.out, "", hook); } + const shell = { tool_name: "Bash", tool_input: { command: "sed -i s/0/1/ src/a.cpp" }, cwd: dir, session_id: "s" }; + fs.appendFileSync(path.join(dir, "src/a.cpp"), "int g() { return 1; }\n"); + const r = await run("loom-test-gate.mjs", shell, { tmp, url, token: "", event: "PostToolUse" }); + assert.equal(r.code + r.out, "0"); assert.deepEqual(seen, []); }); }); @@ -212,7 +224,7 @@ test("shunt: a server that never answers holds the call no longer than the looku }); }); -test("shunt: an indexed entry decides locally; a symbol grep whose answer hangs keeps the plain redirect", async () => { +test("shunt: an indexed entry decides locally; a symbol grep whose answer hangs runs after the lookup bound", async () => { const dir = checkout(); await withServer(null, async (url, seen, arrived) => { const tmp = freshTmp(); @@ -228,8 +240,8 @@ test("shunt: an indexed entry decides locally; a symbol grep whose answer hangs { tmp, url }, ); assert.equal(r.code, 0); - const reason = JSON.parse(r.out).hookSpecificOutput.permissionDecisionReason; - assert.match(reason, /names a symbol — call loom_code_symbol/); + assert.equal(r.out, "", "no answer to refuse with: the grep runs"); + assert.ok(seen.includes("/v1/code.symbol")); assert.ok( r.ms < 5000, r.ms < 5000 @@ -334,6 +346,41 @@ test("Stop gates: a Stop the gate itself caused never blocks again", async () => }); }); +test("test gate after a shell command: 401 and a hanging server add nothing to the call, and the file is asked about once more", async () => { + for (const status of [401, null]) { + await withServer(status, async (url, seen, arrived) => { + const op = "/v1/code.test_gate"; + const { dir, tmp } = dirtySession(); + const shell = { tool_name: "Bash", tool_input: { command: "sed -i s/0/1/ src/a.cpp" }, cwd: dir }; + const bounds = { LOOM_HOOK_TIMEOUT_MS: "500", LOOM_HOOK_EXIT_MS: "500" }; + // A request can fail before the server observes it; require a witnessed run. + let r; + let session; + for (let attempt = 0; attempt < 3 && !arrived.has(op); attempt++) { + session = `s-${attempt}`; + r = await run( + "loom-test-gate.mjs", + { ...shell, session_id: session }, + { tmp, url, env: bounds, event: "PostToolUse" }, + ); + assert.equal(r.code, 0, `${status}`); + assert.equal(r.out, "", `${status}`); + assert.ok(r.ms < 7000, `${status} took ${r.ms} ms`); + } + assert.ok(arrived.has(op), `${status}: never sent ${op} in three runs`); + const after = r.closedAt - arrived.get(op); + assert.ok(after < 1500, `${status}: ${after} ms after its request (${r.ms} ms in all)`); + // The same session's next command names the file again: one more request, then none. + const again = () => + run("loom-test-gate.mjs", { ...shell, session_id: session }, { tmp, url, env: bounds, event: "PostToolUse" }); + assert.equal((await again()).out, ""); + const asked = seen.length; + assert.equal((await again()).out, ""); + assert.equal(seen.length, asked, seen.join(",")); + }); + } +}); + test("blast radius and file context: 401 and a hanging server add nothing to the edit", async () => { for (const status of [401, null]) { await withServer(status, async (url, seen, arrived) => { @@ -438,18 +485,25 @@ test("blast radius and test gate: only the diff's paths and hunk headers reach t cwd: dir, session_id: "s", }; + // The edit's own requests: the radius and the tests line. await run("loom-blast-radius.mjs", edit, { tmp, url }); await run("loom-test-gate.mjs", { cwd: dir, session_id: "s", transcript_path: transcript }, { tmp, url }); }); - for (const op of ["/v1/code.impact", "/v1/code.test_gate"]) { - const sent = bodies.find((b) => b.url === op); - assert.ok(sent, `${op} not called: ${JSON.stringify(bodies.map((b) => b.url))}`); - assert.ok(!sent.body.diff.includes("s3cr3t-value"), op); - assert.ok(!sent.body.diff.includes("decrypted-by-textconv"), op); - assert.ok(!sent.body.diff.includes("int g()"), `${op} sends no changed line`); - assert.match(sent.body.diff, /^\+\+\+ b\/src\/a\.cpp$/m, `${op} keeps the path`); - assert.match(sent.body.diff, /^@@ .*\+\d+/m, `${op} keeps the hunk header`); - assert.equal(sent.body.diff.match(/^@@ /gm).length, 2, `${op} keeps the two hunks apart`); + // code.test_gate twice: for the tests line at the edit, and at the Stop of a session that ran no test. + for (const [op, times] of [ + ["/v1/code.impact", 1], + ["/v1/code.test_gate", 2], + ]) { + const all = bodies.filter((b) => b.url === op); + assert.equal(all.length, times, `${op}: ${JSON.stringify(bodies.map((b) => b.url))}`); + for (const sent of all) { + assert.ok(!sent.body.diff.includes("s3cr3t-value"), op); + assert.ok(!sent.body.diff.includes("decrypted-by-textconv"), op); + assert.ok(!sent.body.diff.includes("int g()"), `${op} sends no changed line`); + assert.match(sent.body.diff, /^\+\+\+ b\/src\/a\.cpp$/m, `${op} keeps the path`); + assert.match(sent.body.diff, /^@@ .*\+\d+/m, `${op} keeps the hunk header`); + assert.equal(sent.body.diff.match(/^@@ /gm).length, 2, `${op} keeps the two hunks apart`); + } } }); diff --git a/integrations/claude-code-plugin/tests/code-shunt-hook.test.mjs b/integrations/claude-code-plugin/tests/code-shunt-hook.test.mjs index cdfeec817ba..779fcd1b882 100644 --- a/integrations/claude-code-plugin/tests/code-shunt-hook.test.mjs +++ b/integrations/claude-code-plugin/tests/code-shunt-hook.test.mjs @@ -1,7 +1,8 @@ // The shunt always answers from the index unless // the developer chose local-first. A throwaway git checkout, the repo entry // seeded in the shared cache (no code.repos call), the hook run as Claude -// Code runs it, and a local server only where a call is expected. +// Code runs it, and a local server only where a call is expected: a refusal +// needs the index's answer, so every test that expects one serves it. import "./temp-home.mjs"; import { test } from "node:test"; import assert from "node:assert/strict"; @@ -13,7 +14,7 @@ import { execFileSync, spawn } from "node:child_process"; import { fileURLToPath } from "node:url"; import { cachePathFor } from "../lib/repo-scope.mjs"; import { batchKind } from "../lib/shunt-ledger.mjs"; -import { sessionStatePath, tmpStatePath } from "../lib/tmp-state.mjs"; +import { readSessionState, sessionStatePath, tmpStatePath, writeSessionState } from "../lib/tmp-state.mjs"; import { hostEnv } from "./host-env.mjs"; // The hook's per-user decision log. @@ -106,7 +107,8 @@ async function withServer(answers, fn) { req.on("end", () => { seen.push({ url: req.url, body: raw ? JSON.parse(raw) : {} }); res.setHeader("content-type", "application/json"); - res.end(JSON.stringify(answers[req.url] || {})); + const answer = answers[req.url]; + res.end(JSON.stringify((typeof answer === "function" ? answer() : answer) || {})); }); }); await new Promise((r) => server.listen(0, "127.0.0.1", r)); @@ -117,6 +119,35 @@ async function withServer(answers, fn) { } } +// The index's outline of BIG, as code.outline serves it: whole, in source order. +const OUTLINE = { + "/v1/code.outline": { + entries: [ + { kind: "function", qualified_name: "f0", signature: "int f0()", start_line: 1, end_line: 1, tier: "scip" }, + { + kind: "function", + qualified_name: "f450", + signature: "int f450()", + start_line: 451, + end_line: 451, + tier: "scip", + }, + { + kind: "function", + qualified_name: "f899", + signature: "int f899()", + start_line: 900, + end_line: 900, + tier: "scip", + }, + ], + total: 3, + returned: 3, + elided: 0, + }, +}; +const lookups = (seen) => seen.filter((s) => s.url !== "/v1/code.outcome").map((s) => s.url); + const readOf = (dir, rel) => ({ tool_name: "Read", tool_input: { file_path: path.join(dir, rel) }, @@ -124,14 +155,60 @@ const readOf = (dir, rel) => ({ session_id: "e2e", }); -test("a checkout far behind the index is still shunted", async () => { +test("a checkout far behind the index is still shunted, with the file's declarations", async () => { const { dir } = checkout({ "src/a.cpp": BIG }); - const r = await runHook(readOf(dir, "src/a.cpp"), { tmp: seed(dir) }); - assert.match( - r.deny, - /^loom-code-shunt: src\/a\.cpp is 900 lines and is in loom's code index \(as of 0123456789ab\)\./, - ); - assert.match(r.log, /\thit\tRead\t/); + await withServer(OUTLINE, async (url, seen) => { + const r = await runHook(readOf(dir, "src/a.cpp"), { tmp: seed(dir), url }); + assert.match( + r.deny, + /^loom-code-shunt: src\/a\.cpp is 900 lines and is in loom's code index \(as of 0123456789ab\)\. The index's outline of it \(lines, qualified name, header; it lists functions, methods, classes and structs, not interfaces, type aliases, enums or constants\):\n1-1 f0 int f0\(\)\n451-451 f450 int f450\(\)\n900-900 f899 int f899\(\)\nRead the lines you need/, + ); + // The file's tokens, less the refusal's own text. + const kept = Math.floor(BIG.length / 4) - Math.floor(r.deny.length / 4); + assert.match(r.log, new RegExp(`\\thit\\tRead\\t${kept}\\t`)); + assert.deepEqual(seen[0].body, { + org: "o", + namespace: "code-x", + path: "src/a.cpp", + token_budget: 4000, + include_lessons: false, + consumer: "claude-code-shunt", + }); + }); +}); + +test("a whole-file read the index cannot outline in full runs", async () => { + const { dir } = checkout({ "src/a.cpp": BIG }); + const cut = { "/v1/code.outline": { ...OUTLINE["/v1/code.outline"], total: 900, elided: 897 } }; + for (const [name, answers] of Object.entries({ cut, empty: { "/v1/code.outline": { entries: [] } }, silent: {} })) { + await withServer(answers, async (url) => { + const r = await runHook(readOf(dir, "src/a.cpp"), { tmp: seed(dir), url }); + assert.equal(r.deny, null, name); + assert.match(r.log, /\tpass\tRead\t\d+\t\tindex_unanswered\tsrc\/a\.cpp\t/, name); + }); + } + const downTmp = seed(dir); + const down = await runHook(readOf(dir, "src/a.cpp"), { tmp: downTmp }); + assert.equal(down.deny, null, "an unreachable server"); + assert.match(down.log, /\tpass\tRead\t\d+\t\tindex_unanswered\t/); + // A lookup nothing answered counts too: the file is read for the rest of the session. + await withServer(OUTLINE, async (url, seen) => { + assert.equal((await runHook(readOf(dir, "src/a.cpp"), { tmp: downTmp, url })).deny, null); + assert.deepEqual(lookups(seen), []); + }); + // The index is asked about the file once per session. + await withServer(cut, async (url, seen) => { + const tmp = seed(dir); + for (let read = 0; read < 2; read++) { + const r = await runHook(readOf(dir, "src/a.cpp"), { tmp, url }); + assert.equal(r.deny, null); + assert.match(r.log, /\tindex_unanswered\tsrc\/a\.cpp\t\d+\t\d+\n$/); + } + assert.deepEqual(lookups(seen), ["/v1/code.outline"]); + const other = await runHook({ ...readOf(dir, "src/a.cpp"), session_id: "another" }, { tmp, url }); + assert.equal(other.deny, null); + assert.deepEqual(lookups(seen), ["/v1/code.outline", "/v1/code.outline"], "another session asks for itself"); + }); }); test("local_first stands the shunt down entirely, even when HEAD is the indexed commit", async () => { @@ -246,21 +323,125 @@ test("a symbol grep is answered by the index; a named file you modified gets its assert.doesNotMatch(r.deny, /HEAD|ANSWER FROM THE INDEX|do not grep/); }); -test("a chained Bash read is judged segment by segment; the first deny wins", async () => { - const { dir } = checkout({ "src/a.cpp": BIG, "src/small.cpp": "int x;\n" }); - const tmp = seed(dir); - const bash = (command) => ({ tool_name: "Bash", tool_input: { command }, cwd: dir, session_id: "e2e" }); +const bashOf = (dir, command, session = "e2e") => ({ + tool_name: "Bash", + tool_input: { command }, + cwd: dir, + session_id: session, +}); +const SYMBOL = { + "/v1/code.symbol": { + definitions: [{ path: "src/a.cpp", start_line: 7327, end_line: 7344, symbol: "DB::renameTempPartAndAdd" }], + }, +}; + +test("a Bash command of several parts is never refused: its reads are counted, the index is not asked", async () => { + const { dir } = checkout({ + "src/a.cpp": BIG, + "src/small.cpp": "int x;\n", + "src/a.h": "bool renameTempPartAndAdd(\n", + }); // As a Git Bash command names it on Windows: forward slashes. const cdDir = dir.replace(/\\/g, "/"); - const r = await runHook(bash(`cd ${cdDir}; wc -l src/a.cpp; cat src/small.cpp; cat src/a.cpp`), { tmp }); - assert.match(r.deny, /^loom-code-shunt: src\/a\.cpp is 900 lines.*`cat` of a whole file is/); - const lines = r.log.trim().split("\n"); - assert.equal(lines.length, 2, "the small read passed and was counted, the big one denied"); - assert.match(lines[0], /\tpass\tBash:cat\t.*\tsrc\/small\.cpp\t/); - assert.match(lines[1], /\thit\tBash:cat\t/); - const p = await runHook(bash("cd src && sed -n '1,40p' a.cpp; echo ---"), { tmp: seed(dir) }); - assert.equal(p.deny, null, "a ranged read passes (no read cap set)"); - assert.match(p.log, /\tpass\tBash:sed\t.*targeted_span\tsrc\/a\.cpp\t1\t40/); + const env = { LOOM_SHUNT_READ_CAP: "200" }; + await withServer({ ...OUTLINE, ...SYMBOL }, async (url, seen) => { + const tmp = seed(dir); + const r = await runHook(bashOf(dir, `cd ${cdDir}; wc -l src/a.cpp; cat src/small.cpp; cat src/a.cpp`), { + tmp, + url, + }); + assert.equal(r.deny, null); + const lines = r.log.trim().split("\n"); + assert.equal(lines.length, 2, "both reads are counted"); + assert.match(lines[0], /\tpass\tBash:cat\t\d+\t\tunder_max_lines\tsrc\/small\.cpp\t/); + assert.match(lines[1], /\tpass\tBash:cat\t\d+\t\tcompound_command\tsrc\/a\.cpp\t/); + for (const [command, logged] of [ + ["cat src/a.cpp | head -5; cat src/a.cpp && echo ok", /\tpass\tBash:cat\t\d+\t\tcompound_command\t/], + ["make test || cat src/a.cpp", /\tpass\tBash:cat\t\d+\t\tcompound_command\t/], + ["cd src && sed -n '1,500p' a.cpp", /\tpass\tBash:sed\t\d+\t\tcompound_command\tsrc\/a\.cpp\t1\t500/], + ["cd src && sed -n '1,40p' a.cpp; echo ---", /\tpass\tBash:sed\t\d+\t\ttargeted_span\tsrc\/a\.cpp\t1\t40/], + ["git status; grep -n renameTempPartAndAdd src/a.h", /\tpass\tBash:grep\t\d+\t\tcompound_command\tsrc\/a\.h\t/], + ["git status; grep -n TODO src/a.h", /\tpass\tBash:grep\t\d+\t\tsingle_file_grep\tsrc\/a\.h\t/], + ['cd src; gh issue list --search "merge hangs"', null], + ]) { + const p = await runHook(bashOf(dir, command), { tmp: seed(dir), url, env }); + assert.equal(p.deny, null, command); + if (logged) assert.match(p.log, logged, command); + else assert.equal(p.log, "", command); + } + assert.deepEqual(lookups(seen), [], "a pass costs no lookup"); + // The same reads and the same grep, each as the whole command, are refused with the index's answer. + const cat = await runHook(bashOf(dir, "cat src/a.cpp"), { tmp: seed(dir), url }); + assert.match( + cat.deny, + /^loom-code-shunt: src\/a\.cpp is 900 lines.*The index's outline of it.*:\n1-1 f0 int f0\(\)\n/, + ); + assert.match(cat.log, /\thit\tBash:cat\t/); + const sed = await runHook(bashOf(dir, "sed -n '400,899p' src/a.cpp"), { tmp: seed(dir), url, env }); + assert.match( + sed.deny, + /^loom-code-shunt: `sed` of src\/a\.cpp lines 400-899 is 500 lines, over the 200-line read window.*The index's outline of those lines \(lines, qualified name, header; [^)]*\):\n451-451 f450 int f450\(\)\nRead the ones you need/, + ); + const grep = await runHook(bashOf(dir, "grep -n renameTempPartAndAdd src/a.h"), { tmp: seed(dir), url }); + assert.match(grep.deny, /Index answer: DB::renameTempPartAndAdd is defined at src\/a\.cpp:7327-7344/); + }); +}); + +test("a ranged read, a grep for a local variable and a grep for test names in one command all run", async () => { + const { dir } = checkout({ + "src/app/blueprints.py": Array.from({ length: 622 }, (_, i) => `x${i} = ${i}`).join("\n") + "\n", + "tests/test_blueprints.py": "def test_dotted_name_not_allowed(app, client):\n pass\n", + }); + const command = + 'sed -n 188,198p src/app/blueprints.py; grep -n "self_name" src/app/blueprints.py; ' + + 'grep -n "def test_dotted_name\\|def test_.*dot" tests/test_blueprints.py'; + await withServer({}, async (url, seen) => { + const tmp = seed(dir); + const r = await runHook(bashOf(dir, command), { tmp, url }); + assert.equal(r.deny, null); + const lines = r.log.trim().split("\n"); + assert.equal(lines.length, 3); + assert.match(lines[0], /\tpass\tBash:sed\t\d+\t\ttargeted_span\tsrc\/app\/blueprints\.py\t188\t198/); + assert.match(lines[1], /\tpass\tBash:grep\t\d+\t\tcompound_command\tsrc\/app\/blueprints\.py\t/); + assert.match(lines[2], /\tpass\tBash:grep\t\d+\t\tsingle_file_grep\ttests\/test_blueprints\.py\t/); + assert.deepEqual(lookups(seen), []); + // Alone, the grep asks the index once: it holds no definition of a local variable, so the grep runs. + const alone = bashOf(dir, 'grep -n "self_name" src/app/blueprints.py'); + const first = await runHook(alone, { tmp, url }); + assert.equal(first.deny, null); + assert.match(first.log, /\tpass\tBash:grep\t\d+\t\tindex_unanswered\tsrc\/app\/blueprints\.py\t\d+\t\d+\n$/); + const again = await runHook(alone, { tmp, url }); + assert.equal(again.deny, null); + assert.match(again.log, /\tsymbol_grep_spent\tsrc\/app\/blueprints\.py\t\d+\t\d+\n$/); + assert.deepEqual(lookups(seen), ["/v1/code.symbol"], "one lookup per symbol per session"); + }); +}); + +test("a symbol grep the index answers with several definitions, or with local lines that do not fit, runs", async () => { + const many = Array.from({ length: 20 }, () => "bool renameTempPartAndAdd(int);").join("\n") + "\n"; + const { dir } = checkout({ "src/a.h": "bool renameTempPartAndAdd(\n", "src/a.cpp": "// def\n" }); + const one = SYMBOL["/v1/code.symbol"].definitions[0]; + const grep = (session) => ({ + tool_name: "Grep", + tool_input: { pattern: "renameTempPartAndAdd", path: path.join(dir, "src/a.cpp") }, + cwd: dir, + session_id: session, + }); + await withServer({ "/v1/code.symbol": { definitions: [one, { ...one, path: "src/a.h" }] } }, async (url) => { + const r = await runHook(grep("two"), { tmp: seed(dir), url }); + assert.equal(r.deny, null); + assert.match(r.log, /\tpass\tGrep\t\d+\t\tindex_unanswered\t/); + }); + await withServer(SYMBOL, async (url) => { + assert.match((await runHook(grep("one"), { tmp: seed(dir), url })).deny, /Index answer: DB::renameTempPartAndAdd/); + fs.appendFileSync(path.join(dir, "src/a.h"), many); + const r = await runHook(bashOf(dir, "grep -n renameTempPartAndAdd src/a.cpp src/a.h", "long"), { + tmp: seed(dir), + url, + }); + assert.equal(r.deny, null, "21 local lines are more than a refusal carries"); + assert.match(r.log, /\tpass\tBash:grep\t\d+\t\tindex_unanswered\t/); + }); }); // The hook's pending batch for the seeded repository (o/code-x), the server at @@ -281,7 +462,7 @@ const posix = process.platform !== "win32"; test("a deny claims the pending batch, posts it as code.outcome and removes it", async () => { const { dir } = checkout({ "src/a.cpp": BIG }); const tmp = seed(dir); - await withServer({}, async (url, seen) => { + await withServer(OUTLINE, async (url, seen) => { const r = await runHook(readOf(dir, "src/a.cpp"), { tmp, url, env: reporting }); assert.ok(r.deny); await settle(); @@ -301,10 +482,64 @@ test("the read cap denies a file twice per session, then passes it as cap_spent" const { dir } = checkout({ "src/a.cpp": BIG }); const tmp = seed(dir); const env = { LOOM_SHUNT_READ_CAP: "200" }; - for (let i = 0; i < 2; i++) assert.ok((await runHook(rangedRead(dir), { tmp, env })).deny, `denial ${i + 1}`); - const third = await runHook(rangedRead(dir), { tmp, env }); - assert.equal(third.deny, null); - assert.match(third.log, /\tpass\tRead\t\d+\t\tcap_spent\t/); + await withServer(OUTLINE, async (url, seen) => { + for (let i = 0; i < 2; i++) { + const r = await runHook(rangedRead(dir), { tmp, url, env }); + assert.match( + r.deny, + /lines 1-500 is 500 lines.*:\n1-1 f0 int f0\(\)\n451-451 f450 int f450\(\)\nRead the ones/, + `denial ${i + 1}`, + ); + } + const third = await runHook(rangedRead(dir), { tmp, url, env }); + assert.equal(third.deny, null); + assert.match(third.log, /\tpass\tRead\t\d+\t\tcap_spent\t/); + assert.equal(lookups(seen).length, 2, "a spent budget asks nothing"); + }); + // An over-cap read the index cannot describe runs, and spends none of the file's denials. + const quiet = seed(dir); + await withServer({}, async (url) => { + const r = await runHook(rangedRead(dir), { tmp: quiet, url, env }); + assert.equal(r.deny, null); + assert.match(r.log, /\tpass\tRead\t\d+\t\tindex_unanswered\tsrc\/a\.cpp\t1\t500/); + }); + await withServer(OUTLINE, async (url) => { + assert.ok((await runHook(rangedRead(dir), { tmp: quiet, url, env })).deny, "the budget is still whole"); + }); +}); + +test("a tail slice over the read cap is refused with the declarations of the file's last lines", async () => { + const { dir } = checkout({ "src/a.cpp": BIG }); + const cmd = { tool_name: "Bash", tool_input: { command: "tail -n 300 src/a.cpp" }, cwd: dir, session_id: "e2e" }; + await withServer(OUTLINE, async (url) => { + const r = await runHook(cmd, { tmp: seed(dir), url, env: { LOOM_SHUNT_READ_CAP: "200" } }); + assert.match( + r.deny, + /^loom-code-shunt: `tail` of src\/a\.cpp lines 601-900 is 300 lines, over the 200-line read window.*:\n900-900 f899 int f899\(\)\nRead the ones/, + ); + assert.match(r.log, /\thit\tBash:tail\t\d+\t[^\t]*\t\tsrc\/a\.cpp\t601\t900\n$/); + }); +}); + +test("a budget another hook spends during a lookup is kept", async () => { + const { dir } = checkout({ "src/a.cpp": BIG }); + const tmp = seed(dir); + const counts = () => readSessionState("shunt-cap", "e2e", { tmp }); + // The stand-in server spends a symbol budget while it answers, as a parallel hook would. + const spending = (key, answer) => ({ + "/v1/code.outline": () => { + writeSessionState("shunt-cap", "e2e", { ...counts(), [key]: 1 }, { tmp }); + return answer; + }, + }); + await withServer(spending("sym:one", { entries: [] }), (url) => runHook(readOf(dir, "src/a.cpp"), { tmp, url })); + assert.deepEqual(counts(), { "sym:one": 1, "miss:src/a.cpp": 1 }); + const env = { LOOM_SHUNT_READ_CAP: "200" }; + const ranged = await withServer(spending("sym:two", OUTLINE["/v1/code.outline"]), (url) => + runHook(rangedRead(dir), { tmp, url, env }), + ); + assert.ok(ranged.deny); + assert.deepEqual(counts(), { "sym:one": 1, "miss:src/a.cpp": 1, "sym:two": 1, "src/a.cpp": 1 }); }); test("symlinks planted at the shunt's tmp files are not followed and cannot lock the agent out", { @@ -314,7 +549,7 @@ test("symlinks planted at the shunt's tmp files are not followed and cannot lock const tmp = seed(dir); const planted = {}; const victims = {}; - await withServer({}, async (url, seen) => { + await withServer(OUTLINE, async (url, seen) => { Object.assign(planted, { log: logPath(tmp), pending: pendingPath(tmp, url), @@ -344,7 +579,7 @@ test("a hard link planted at the pending batch is neither posted nor truncated", const tmp = seed(dir); const victim = path.join(tmp, "victim-log"); fs.writeFileSync(victim, plantedBatch); - await withServer({}, async (url, seen) => { + await withServer(OUTLINE, async (url, seen) => { fs.linkSync(victim, pendingPath(tmp, url)); for (let i = 0; i < 2; i++) assert.ok((await runHook(readOf(dir, "src/a.cpp"), { tmp, url, env: reporting })).deny); await settle(); @@ -359,7 +594,7 @@ test("a flush also posts the batch another session left behind", async () => { const { dir: other } = checkout({ "src/a.cpp": BIG }); const tmp = seed(dir); fs.writeFileSync(cachePathFor(other, tmp), fs.readFileSync(cachePathFor(dir, tmp))); - await withServer({}, async (url, seen) => { + await withServer(OUTLINE, async (url, seen) => { const a = await runHook({ ...readOf(dir, "src/a.cpp"), session_id: "A" }, { tmp, url, env: reporting }); assert.equal(a.deny, null, "a modified file passes; nothing is flushed yet"); await settle(); @@ -381,7 +616,7 @@ test("a flush also posts the batch another session left behind", async () => { test("a flush leaves another reporting scope's batch alone", async () => { const { dir } = checkout({ "src/a.cpp": BIG }); const tmp = seed(dir); - await withServer({}, async (url, seen) => { + await withServer(OUTLINE, async (url, seen) => { // Another repository's batch, and one this repository's lines would go to under another server. const others = [pendingPath(tmp, url, "X", "code-other"), pendingPath(tmp, "http://127.0.0.1:9", "Y")]; for (const f of others) fs.writeFileSync(f, plantedBatch, { mode: 0o600 }); @@ -446,7 +681,9 @@ test("an over-cap read whose budget cannot be written passes as budget_unrecorde const { dir } = checkout({ "src/a.cpp": BIG }); const tmp = seed(dir); plantCap(tmp); - const r = await runHook(rangedRead(dir), { tmp, env: { LOOM_SHUNT_READ_CAP: "200" } }); + const r = await withServer(OUTLINE, (url) => + runHook(rangedRead(dir), { tmp, url, env: { LOOM_SHUNT_READ_CAP: "200" } }), + ); assert.equal(r.deny, null); assert.match(r.log, /\tpass\tRead\t\d+\t\tbudget_unrecorded\t/); }); diff --git a/integrations/claude-code-plugin/tests/code-shunt.test.mjs b/integrations/claude-code-plugin/tests/code-shunt.test.mjs index a0d83fb9e7b..cc1757a56b7 100644 --- a/integrations/claude-code-plugin/tests/code-shunt.test.mjs +++ b/integrations/claude-code-plugin/tests/code-shunt.test.mjs @@ -9,12 +9,12 @@ import assert from "node:assert/strict"; import { classifyGrep, classifyRead, + declarationsInSpan, denySymbolGrepWithAnswer, denyGhSearchWithAnswer, otherSearchRepo, trackerAnswerText, TRACKER_SEARCH_DENIALS_PER_QUERY, - estimateOutlineTokens, localFirstOn, localGrepText, runLocalGrep, @@ -22,6 +22,7 @@ import { symbolAnswerText, symbolInPattern, underPrefixes, + wholeSymbolAnswer, } from "../lib/code-shunt.mjs"; import { recalledDataBlock } from "../lib/prompt-recall.mjs"; import { @@ -31,6 +32,7 @@ import { patternSearchShape, parseBashBulk, gitBashPath, + isCompoundCommand, parseBashBulkSegments, splitOutsideQuotes, } from "../lib/shell-command.mjs"; @@ -63,21 +65,32 @@ test("Read: only bulk, unmodified, indexed files are shunted", () => { modified: false, asOf: "abc123def456", }; - assert.match(decideRead(base), /code\.symbol/); - // The redirect leads with the op that answers "what is in this file?" - const reason = decideRead(base); - const lead = reason.slice(reason.indexOf("ask the index instead: ") + "ask the index instead: ".length); + // The refusal carries what the read was after: each declaration's lines, name and header. + const declarations = [ + { qualified_name: "DB::MergeTreeData", signature: "class MergeTreeData", start_line: 12, end_line: 8990 }, + { + qualified_name: "DB::MergeTreeData::renameTempPartAndAdd", + signature: "bool renameTempPartAndAdd(\n MutableDataPartPtr & part)", + start_line: 7327, + end_line: 7344, + }, + { qualified_name: "DB::helper", signature: "", start_line: 8995, end_line: 0 }, + ]; + const reason = decideRead({ ...base, declarations }); + assert.match(reason, /^loom-code-shunt: src\/Storages\/MergeTree\/MergeTreeData\.cpp is 9000 lines and is in loom's/); assert.match( - lead, - /^loom code\.outline path=src\/Storages\/MergeTree\/MergeTreeData\.cpp \(declarations with line spans, ~1500 tokens\)/, + reason, + /\(as of abc123def456\)\. The index's outline of it \(lines, qualified name, header; it lists functions, methods, classes and structs, not interfaces, type aliases, enums or constants\):\n/, ); - assert.match( - decideRead({ ...base, lineCount: 900 }), - /~522 tokens\)/, - "estimate scales with the file until the budget caps it", + assert.ok( + reason.includes( + "\n12-8990 DB::MergeTreeData class MergeTreeData\n" + + "7327-7344 DB::MergeTreeData::renameTempPartAndAdd bool renameTempPartAndAdd( MutableDataPartPtr & part)\n" + + "8995-8995 DB::helper\nRead the lines you need (a ranged read passes this hook), or call loom_code_symbol", + ), + reason, ); - assert.match(decideRead({ ...base, outlineTokens: 512 }), /~512 tokens\)/, "a known price overrides the estimate"); - assert.match(reason, /Whole-file reads are/, "the cat variant rewrites this phrase"); + assert.doesNotMatch(reason, /code\.outline/, "the outline is in the refusal, not one more call away"); assert.equal(decideRead({ ...base, offset: 100, limit: 40 }), null, "targeted span passes"); assert.equal(decideRead({ ...base, lineCount: 200 }), null, "small file passes"); assert.equal(decideRead({ ...base, modified: true }), null, "working-copy edits pass"); @@ -479,12 +492,25 @@ test("codeResponsePaths covers every code op response shape", async () => { assert.deepEqual(codeResponsePaths({ context: "pack" }), []); }); -test("estimateOutlineTokens: measured per-line rate, floored and capped by the op budget", () => { - assert.equal(estimateOutlineTokens(0), 0); - assert.equal(estimateOutlineTokens(10), 50, "floor: a header's worth"); - assert.equal(estimateOutlineTokens(400), 232); - assert.equal(estimateOutlineTokens(9000), 1500, "capped by DEFAULT_OUTLINE_BUDGET"); - assert.equal(estimateOutlineTokens(9000, 4000), 4000); +test("declarationsInSpan: the declarations a read would show, or none when the outline is cut short", () => { + const entries = [ + { qualified_name: "A", start_line: 10, end_line: 400 }, + { qualified_name: "A::f", start_line: 20, end_line: 60 }, + { qualified_name: "A::g", start_line: 70, end_line: 120 }, + { qualified_name: "h", start_line: 410, end_line: 430 }, + ]; + const names = (outline, span) => declarationsInSpan(outline, span).map((e) => e.qualified_name); + assert.deepEqual(names({ entries, elided: 0 }, { start: 1, end: 500 }), ["A", "A::f", "A::g", "h"]); + assert.deepEqual(names({ entries, elided: 0 }, { start: 65, end: 100 }), ["A", "A::g"], "the enclosing class too"); + assert.deepEqual(names({ entries, elided: 0 }, { start: 401, end: 405 }), [], "lines inside no declaration"); + // A list its budget cut is whole for a span that ends before the last entry starts. + assert.deepEqual(names({ entries, elided: 3 }, { start: 65, end: 100 }), ["A", "A::g"]); + assert.deepEqual(names({ entries, elided: 3 }, { start: 65, end: 410 }), [], "the cut may hide a declaration"); + assert.deepEqual(names({ entries, elided: 3 }, { start: 1, end: 500 }), [], "a whole file needs the whole list"); + for (const none of [null, {}, { entries: [] }, { entries: [{ start_line: 3 }] }, { indexed: false, entries: [] }]) { + assert.deepEqual(declarationsInSpan(none, { start: 1, end: 9 }), []); + } + assert.deepEqual(declarationsInSpan({ entries }, { start: 0, end: 0 }), [], "unknown span"); }); // ---- a ranged read has a window, and the window has a budget -- @@ -581,8 +607,9 @@ test("read cap: two denials per file per session, then cap_spent", () => { assert.equal(spendCapBudget({ other: 5 }, over.rel).other, 5, "other files' counts survive"); }); -test("read cap: the deny text names the path, the start line, the ops and the window", () => { - const v = classifyRead({ ...CAP_BASE, offset: 4321, limit: 900 }); +test("read cap: the deny text names the path, the lines, their declarations and the window", () => { + const declarations = [{ qualified_name: "DB::f", signature: "void f()", start_line: 4300, end_line: 4400 }]; + const v = classifyRead({ ...CAP_BASE, offset: 4321, limit: 900, declarations }); assert.match( v.deny, /^loom-code-shunt: Read of src\/Storages\/MergeTree\/MergeTreeData\.cpp lines 4321-5220 is 900 lines/, @@ -590,15 +617,12 @@ test("read cap: the deny text names the path, the start line, the ops and the wi assert.match(v.deny, /\(as of abc123def456\)/); assert.match( v.deny, - /loom code\.enclosing locations=src\/Storages\/MergeTree\/MergeTreeData\.cpp:4321 neighbours=true/, + /The index's outline of those lines \(lines, qualified name, header; [^)]*\):\n4300-4400 DB::f void f\(\)\n/, ); - assert.match(v.deny, /code\.symbol name=/); - assert.match( - v.deny, - /code\.outline path=src\/Storages\/MergeTree\/MergeTreeData\.cpp \(declarations with line spans, ~1500 tokens\)/, - ); - assert.match(v.deny, /Read at most 200 lines at a time \(offset\/limit\) if you must read directly\./); + assert.match(v.deny, /loom_code_symbol name=/); + assert.match(v.deny, /Read the ones you need, at most 200 lines at a time/); assert.match(v.deny, /Uncommitted edits are invisible to the index/); + assert.doesNotMatch(v.deny, /code\.enclosing|code\.outline/, "the scope is in the refusal, not one more call away"); }); test("deny texts never name the off switch", () => { @@ -814,7 +838,7 @@ test("symbolInPattern names a symbol, not a string", () => { assert.equal(symbolInPattern("renameTemp.*Add"), "", "a regex is a grep"); }); -test("a single-file grep for a symbol is denied once with the loom_code_symbol call, then passes", () => { +test("a single-file grep for a symbol is a hit once, carrying the index's answer, then passes", () => { const ctx = { rel: "src/Storages/MergeTree/MergeTreeData.cpp", isFile: true, @@ -822,11 +846,11 @@ test("a single-file grep for a symbol is denied once with the loom_code_symbol c pattern: "MergeTreeData::renameTempPartAndAdd\\b", symbol: "MergeTreeData::renameTempPartAndAdd", }; - const first = classifyGrep({ ...ctx, symbolBudgetSpent: false }); + const first = classifyGrep({ ...ctx, symbolBudgetSpent: false, answer: "Index answer: it is defined at a.cpp:3." }); assert.equal(first.reason, "hit"); assert.equal(first.symbol, "MergeTreeData::renameTempPartAndAdd"); + assert.match(first.deny, /names a symbol\. Index answer: it is defined at a\.cpp:3\. For its callers call/); assert.match(first.deny, /loom_code_symbol name="MergeTreeData::renameTempPartAndAdd"/); - assert.match(first.deny, /passes on the next try/); assert.equal(classifyGrep({ ...ctx, symbolBudgetSpent: true }).reason, "symbol_grep_spent"); assert.equal(classifyGrep({ ...ctx, symbol: "" }).reason, "single_file_grep", "a string grep is targeted"); assert.equal( @@ -882,10 +906,18 @@ test("a symbol-grep denial carries the index's answer, the indexed commit as inf symbolAnswerText({ definitions: [{ path: "a.cpp", start_line: 3 }] }, {}), "Index answer: the symbol is defined at a.cpp:3 (index).", ); - assert.equal(symbolAnswerText({ definitions: [] }, {}), "", "no definition: the plain redirect stands"); + assert.equal(symbolAnswerText({ definitions: [] }, {}), "", "no definition: no answer"); assert.equal(symbolAnswerText(null, {}), ""); - const two = symbolAnswerText({ definitions: [res.definitions[0], { ...res.definitions[0], start_line: 10 }] }, {}); - assert.match(two, /1 more definition\(s\)/); + const several = { definitions: [res.definitions[0], { ...res.definitions[0], start_line: 10 }] }; + assert.match(symbolAnswerText(several, {}), /1 more definition\(s\)/); + // A refusal carries only a whole answer: one definition, and every local line. + const opts = { asOf: "40acec0102bc77fb", namespace: "code-example-private" }; + assert.equal(wholeSymbolAnswer(res, opts), same); + assert.equal(wholeSymbolAnswer(several, opts), "", "several definitions: the grep settles which"); + assert.equal(wholeSymbolAnswer({ definitions: [] }, opts), "", "a local variable has no definition"); + assert.equal(wholeSymbolAnswer(null, opts), "", "no answer in time"); + assert.equal(wholeSymbolAnswer(res, { ...opts, localGrep: null }), "", "local lines that did not fit"); + assert.match(wholeSymbolAnswer(res, { ...opts, localGrep: "grep -n x a.h:\n1:x" }), /your lines from there follow/); const deny = denySymbolGrepWithAnswer( { pattern: "renameTempPartAndAdd", @@ -934,7 +966,8 @@ test("when the checkout differs, the denial carries the model's own grep lines f assert.doesNotMatch(symbolAnswerText(res, { asOf: "2f97e7397", localGrep: "" }), /local changes/); assert.equal(localGrepText("", {}), ""); const many = Array.from({ length: 20 }, (_, i) => `a.cpp:${i + 1}:x`).join("\n"); - assert.match(localGrepText(many, { maxLines: 12 }), /… 8 more line\(s\)$/); + assert.equal(localGrepText(many, { maxLines: 12 }), null, "a cut list is not the grep's answer"); + assert.equal(localGrepText("a.cpp:1:" + "x".repeat(40), { maxChars: 20 }), null); const deny = denySymbolGrepWithAnswer( { pattern: "renameTempPartAndAdd", symbol: "renameTempPartAndAdd", rel: "src/a.cpp" }, text, @@ -1076,18 +1109,46 @@ test("local-first is off by default; the option or the env turns it on", () => { assert.equal(localFirstOn({ CLAUDE_PLUGIN_OPTION_LOCAL_FIRST: "true" }), true); }); -test("a gh issue search is the tracker_search shape, chains and escapes included", () => { - const codex = `git remote get-url origin && gh auth status && gh issue list --repo ClickHouse/example-private --state all --limit 100 --search '"Added part" "covers" "existing part"' --json number,title,state,url,updatedAt`; - assert.deepEqual( - ghIssueSearchInCommand(codex), - { - kind: "tracker_search", - query: "Added part covers existing part", - frames: [], - repo: "clickhouse/example-private", - }, - "the operator's Codex command, third segment of a && chain", - ); +test("isCompoundCommand: a list or a pipeline outside quotes", () => { + for (const compound of [ + "sed -n 188,198p a.py; grep -n self_name a.py", + "cd /repo && cat a.py", + "make test || cat log.txt", + "cat a.py | head -50", + "git status\ngit diff", + "cat a.py & cat b.py | wc -l", + ]) { + assert.equal(isCompoundCommand(compound), true, compound); + } + for (const single of [ + "cat a.py", + "cat a.py;", + " grep -n 'a|b; c && d' a.py\n", + 'grep -n "def test_dotted_name\\|def test_.*dot" tests/test_blueprints.py', + "awk 'NR>=1 && NR<=9' a.py", + "grep -rn foo src 2>/dev/null", + "", + ]) { + assert.equal(isCompoundCommand(single), false, single); + } +}); + +test("a gh issue search is the tracker_search shape, escapes included; a chain is not judged", () => { + const search = `gh issue list --repo ClickHouse/example-private --state all --limit 100 --search '"Added part" "covers" "existing part"' --json number,title,state,url,updatedAt`; + assert.deepEqual(ghIssueSearchInCommand(`${search};`), { + kind: "tracker_search", + query: "Added part covers existing part", + frames: [], + repo: "clickhouse/example-private", + }); + for (const chain of [ + `git remote get-url origin && gh auth status && ${search}`, + `cd /repo; ${search}`, + `${search} & sleep 1`, + "gh search issues crash & gh pr list", + ]) { + assert.equal(ghIssueSearchInCommand(chain), null, "a refusal would withhold the other parts"); + } assert.deepEqual( ghIssueSearchInCommand(`gh issue list --repo a/b --state all --search "\\"part covers parts\\"" --json number`), { kind: "tracker_search", query: "part covers parts", frames: [], repo: "a/b" }, @@ -1129,7 +1190,8 @@ test("a gh issue search is the tracker_search shape, chains and escapes included null, "PR searches are not the tracker record's question", ); - assert.equal(ghIssueSearchInCommand("gh search issues foo | head -3"), null, "a pipeline segment is not judged"); + assert.equal(ghIssueSearchInCommand("gh search issues foo | head -3"), null, "a pipeline is not judged"); + assert.equal(ghIssueSearchInCommand("gh search issues foo > out.txt"), null, "nor a redirect"); assert.equal( ghIssueSearchInCommand("gh issue list --search 'is:open label:bug'"), null, diff --git a/integrations/claude-code-plugin/tests/hooks-json.test.mjs b/integrations/claude-code-plugin/tests/hooks-json.test.mjs index 883495fa660..f059e61dfd4 100644 --- a/integrations/claude-code-plugin/tests/hooks-json.test.mjs +++ b/integrations/claude-code-plugin/tests/hooks-json.test.mjs @@ -45,6 +45,18 @@ test("the Stop gates are wired directly: the host reads what they print", () => assert.deepEqual(wired("Stop"), ["loom-record", "loom-test-gate", "loom-validate-gate", "loom-namespace-health"]); }); +test("one hook names a changed file's tests per tool: the blast radius after an edit tool, the test gate after a shell", () => { + // Both print additional context for the call; a tool that started both would get the tests line twice. + const tools = (script) => + manifest.hooks.PostToolUse.filter((g) => g.hooks.some((h) => h.args[0].endsWith(`/hooks/${script}.mjs`))).flatMap( + (g) => g.matcher.split("|"), + ); + assert.deepEqual(tools("loom-blast-radius"), ["Edit", "Write", "MultiEdit"]); + assert.deepEqual(tools("loom-test-gate"), ["Bash", "PowerShell"]); + const gate = manifest.hooks.PostToolUse.flatMap((g) => g.hooks).find((h) => h.args[0].endsWith("loom-test-gate.mjs")); + assert.equal(gate.args[1], "PostToolUse", "the script reads its event from this argument"); +}); + test("the SessionEnd hook declares a timeout: Claude Code gives the event 1.5 s by default", () => { // The launcher runs the event's five recording scripts in its own process // and waits for them: a slow server or a loaded machine passes the default diff --git a/integrations/claude-code-plugin/tests/test-gate.test.mjs b/integrations/claude-code-plugin/tests/test-gate.test.mjs index 892df2a1406..27bedb39d70 100644 --- a/integrations/claude-code-plugin/tests/test-gate.test.mjs +++ b/integrations/claude-code-plugin/tests/test-gate.test.mjs @@ -5,10 +5,15 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; import { + advicePayload, + adviceTests, checkoutPython, decideBlock, + gateMode, gatePayload, gateSignature, + printedTests, + renderAdvice, renderGate, sessionScope, sessionStart, @@ -32,6 +37,79 @@ const GATE = { untested_total: 2, }; +test("the gate advises at edit time unless LOOM_TEST_GATE says block or off", () => { + assert.equal(gateMode({}), "advise"); + for (const v of ["on", "1", "true", "", "advise", "anything"]) + assert.equal(gateMode({ LOOM_TEST_GATE: v }), "advise", v); + for (const v of ["block", " Block ", "BLOCK"]) assert.equal(gateMode({ LOOM_TEST_GATE: v }), "block", v); + for (const v of ["off", "0", "false", "no"]) assert.equal(gateMode({ LOOM_TEST_GATE: v }), "off", v); +}); + +test("the edit-time line names the commands of the tests the index links to the file", () => { + const text = renderAdvice("src/a.py", adviceTests("src/a.py", GATE), { python: ".venv/bin/python" }); + assert.equal( + text, + "Loom tests for src/a.py: .venv/bin/python -m pytest tests/unit/test_a.py · no known runner: src/x/tests/gtest_parts.cpp", + ); + // Beside tests to run no function is named: the graph is a floor, and the line asks for no reply. + assert.doesNotMatch(text, /renameTempPartAndAdd|no test reaches|links no test/); + assert.equal( + renderAdvice("src/a.py", adviceTests("src/a.py", GATE), { python: ".venv/bin/python", untested: "Foo::bar" }), + text, + ); + assert.deepEqual(advicePayload(text), { + hookSpecificOutput: { hookEventName: "PostToolUse", additionalContext: text }, + }); +}); + +test("a changed test names its own command; a file no runner takes, a test the checkout lacks and an empty answer name nothing", () => { + const line = (rel, gate, testExists) => renderAdvice(rel, adviceTests(rel, gate, testExists)); + const own = { tests: [{ test_path: "tests/test_a.py", why: "changed_test", run: "pytest tests/test_a.py" }] }; + assert.equal(line("tests/test_a.py", own), "Loom tests for tests/test_a.py: pytest tests/test_a.py"); + // A fixture or a conftest under tests/ is the gate's row for itself, with no runner. + const fixture = { tests: [{ test_path: "tests/conftest.py", why: "changed_test", run: "", run_unknown: true }] }; + assert.equal(line("tests/conftest.py", fixture), ""); + const gone = { tests: [{ test_path: "tests/gone.py", why: "test_map", run: "pytest tests/gone.py" }] }; + assert.equal( + line("src/a.py", gone, () => false), + "", + ); + assert.equal( + line("src/a.py", gone, () => true), + "Loom tests for src/a.py: pytest tests/gone.py", + ); + for (const none of [null, {}, { tests: [] }, { untested: [{ qualified_name: "m::f" }] }]) { + assert.equal(line("src/a.py", none), ""); + } + assert.equal(advicePayload(""), null); +}); + +test("a file with no test to name gets the functions the index links no test to, as the index's view", () => { + assert.equal( + renderAdvice("src/a.py", [], { untested: "MergeTreeData::renameTempPartAndAdd, Foo::bar" }), + "Loom tests for src/a.py: the index links no test to MergeTreeData::renameTempPartAndAdd, Foo::bar", + ); + assert.equal(renderAdvice("src/a.py", [], { untested: "" }), ""); +}); + +test("the edit-time line folds pytest files into one command and counts the commands it leaves out", () => { + const many = ["a", "b", "c", "d", "e", "f"].map((n) => ({ + test_path: `tests/test_${n}.py`, + why: "graph_hop", + run: `pytest tests/test_${n}.py`, + })); + assert.equal( + renderAdvice("src/a.py", many), + "Loom tests for src/a.py: pytest tests/test_a.py tests/test_b.py tests/test_c.py tests/test_d.py (+2 more)", + ); + // The two it leaves out were not shown, so they are not marked as named. + const unknown = ["g", "h", "i", "j", "k"].map((n) => ({ test_path: `spec/${n}.cpp`, run: "" })); + assert.deepEqual( + printedTests([...many, ...unknown]).map((t) => t.test_path), + [...many.slice(0, 4), ...unknown.slice(0, 4)].map((t) => t.test_path), + ); +}); + test("signature is order-independent over paths and bound to the diff", () => { assert.equal(gateSignature(["b.py", "a.py"], "h1"), gateSignature(["a.py", "b.py"], "h1")); assert.notEqual(gateSignature(["a.py"], "h1"), gateSignature(["a.py"], "h2")); @@ -433,8 +511,8 @@ test("checkoutPython runs no pytest.py planted in the checkout", () => { import http from "node:http"; import { execFileSync, spawn } from "node:child_process"; import { fileURLToPath } from "node:url"; -import { declinesTests, newestChange, runAnswered } from "../lib/test-gate.mjs"; -import { cachePathFor } from "../lib/repo-scope.mjs"; +import { declinesTests, lastCodeChange, newestChange, runAnswered, testedSince } from "../lib/test-gate.mjs"; +import { cachedUnindexed, cachePathFor } from "../lib/repo-scope.mjs"; import { hostEnv } from "./host-env.mjs"; const said = (content, extra = {}) => ({ type: "user", message: { content }, ...extra }); @@ -828,10 +906,122 @@ test("a Codex rollout answers nothing", () => { assert.equal(answered(rollout), false); }); -test("the hook blocks a change whose tests never ran and lets an answered one stop", async () => { +test("any test run that finished since the change counts, whatever it ran and however it went", () => { + const since = Date.parse(edit()[0].timestamp); + for (const command of [ + SUITE, + "git stash; pytest tests; git stash pop", + "pytest tests/test_other.py -x 2>&1 | grep FAILED", + "sed -i s/1/2/ src/a.py && .venv/bin/python -m unittest discover", + "npx vitest run src/a.test.ts", + "go test ./pkg/...", + "go test ./...", + "make test-unit", + "npm run test", + "node --test", + "node --test tests/a.test.mjs", + "gradle :app:test", + "./gradlew testDebugUnitTest", + "make unit-tests", + "cargo nextest run", + "tests/clickhouse-test 01234_x", + ]) { + assert.equal(testedSince(bash(command, FAILED), since), true, command); + assert.equal(testedSince(call("PowerShell", { command }), since), true, command); + } + // A command that reads or writes a test, or installs a runner, runs none; + // neither does a build tool whose argument holds `test` inside a word. + for (const command of [ + HEREDOC, + "sed -n 1,40p tests/test_a.py", + "cat pytest.ini", + "pip install pytest", + "git diff", + "npm install x@latest", + "go install y@latest", + "make latest", + "node scripts/attest.js", + "npm install @testing-library/react", + "go get github.com/stretchr/testify", + ]) { + assert.equal(testedSince(bash(command, ""), since), false, command); + } + assert.equal(testedSince(call("Read", { command: SUITE }), since), false); + assert.equal(testedSince(bash(SUITE, PASSED, { isSidechain: true }), since), false); + // A row of another type that copies the call is not the session's call. + assert.equal(testedSince([{ ...bash(SUITE, PASSED)[0], type: "api-request-blob" }], since), false); + // A run that finished before the change does not count; one with no dated result does. + const before = bash(SUITE, PASSED); + assert.equal(testedSince(before, Date.parse(before[1].timestamp) + 1), false); + assert.equal(testedSince(before.slice(0, 1), Date.parse(before[1].timestamp) + 1), true); + // A Codex rollout's shell call counts by its output row's time. + const item = (payload, ms) => ({ type: "response_item", timestamp: new Date(ms).toISOString(), payload }); + const rollout = [ + item( + { type: "function_call", name: "shell", call_id: "c1", arguments: '{"command":["pytest","tests","-q"]}' }, + 1e12, + ), + item({ type: "function_call_output", call_id: "c1", output: "3 passed in 0.10s" }, 1e12 + 1000), + ]; + assert.equal(testedSince(rollout, 1e12 + 500), true); + assert.equal(testedSince(rollout, 1e12 + 1500), false); + // Its arguments hold an argv, a shell wrapper's script or one string. + const shell = (args) => [item({ type: "function_call", name: "shell", call_id: "c2", arguments: args }, 1e12)]; + for (const args of [ + '{"command":["go","test","./..."]}', + '{"command":["npm","test"]}', + '{"command":["bash","-lc","make test-unit"]}', + '{"cmd":"npm run test"}', + "go test ./...", + ]) { + assert.equal(testedSince(shell(args), 1e12), true, args); + } + assert.equal(testedSince(shell('{"command":["npm","install","x@latest"]}'), 1e12), false); + // The shell tool counts under each name the client gives it; another tool that names a runner does not. + const named = (name) => [ + item({ type: "function_call", name, call_id: "c3", arguments: '{"command":"pytest -q"}' }, 1e12), + ]; + for (const name of ["exec", "exec_command", "shell", "shell_command", "local_shell", "container.exec"]) { + assert.equal(testedSince(named(name), 1e12), true, name); + } + assert.equal(testedSince(named("apply_patch"), 1e12), false); + assert.equal(testedSince([], 0), false); +}); + +test("the last code change is the most recently written code file that can be read", () => { + const dir = fs.mkdtempSync(path.join(os.tmpdir(), "loom-last-code-")); + try { + for (const [file, at] of [ + ["a.py", 1e12], + ["b.py", 1e12 + 5000], + ["CMakeLists.txt", 1e12 + 6000], + ["dev-requirements.txt", 1e12 + 7000], + ["README.md", 1e12 + 9000], + ["notes.txt", 1e12 + 9000], + ["guide.rst", 1e12 + 9000], + ["CHANGELOG", 1e12 + 9000], + ]) { + fs.writeFileSync(path.join(dir, file), "x\n"); + fs.utimesSync(path.join(dir, file), new Date(at), new Date(at)); + } + assert.equal(lastCodeChange(dir, ["b.py", "a.py", "deleted.py"]), 1e12 + 5000); + // Documentation and prose are left out, by extension or by a changelog's name. + assert.equal( + lastCodeChange(dir, ["a.py", "b.py", "README.md", "notes.txt", "guide.rst", "CHANGELOG"]), + 1e12 + 5000, + ); + assert.equal(lastCodeChange(dir, ["a.py", "CMakeLists.txt"]), 1e12 + 6000); + assert.equal(lastCodeChange(dir, ["a.py", "dev-requirements.txt"]), 1e12 + 7000); + assert.equal(lastCodeChange(dir, ["README.md", "deleted.py"]), 0); + } finally { + fs.rmSync(dir, { recursive: true, force: true }); + } +}); + +test("the hook holds the stop of a session that ran no test since its last code change; LOOM_TEST_GATE=block also holds one whose named tests did not run on the final tree", async () => { const dir = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), "loom-gate-hook-"))); const tmp = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), "loom-gate-hook-tmp-"))); - for (const f of ["src/a.py", "src/b.py", "tests/test_a.py"]) { + for (const f of ["src/a.py", "src/b.py", "tests/test_a.py", "docs/guide.md"]) { fs.mkdirSync(path.join(dir, path.dirname(f)), { recursive: true }); fs.writeFileSync(path.join(dir, f), "def f():\n return 1\n"); } @@ -843,6 +1033,7 @@ test("the hook blocks a change whose tests never ran and lets an answered one st execFileSync("git", args, { cwd: dir, stdio: "ignore" }); } fs.appendFileSync(path.join(dir, "src/a.py"), "def g():\n return 2\n"); + const ranBefore = bash(SUITE, PASSED); const change = call("Edit", { file_path: path.join(dir, "src/a.py") }, "updated"); // The change is as old as the session's first row, until something rewrites a file. const touch = (file, when) => fs.utimesSync(path.join(dir, file), when, when); @@ -851,13 +1042,15 @@ test("the hook blocks a change whose tests never ran and lets an answered one st cachePathFor(dir, tmp), JSON.stringify({ ts: Date.now(), indexed: true, org: "o", namespace: "code-x", repo: "x/y", prefixes: [] }), ); + const requests = []; const server = http.createServer((req, res) => { + requests.push(req.url); req.resume(); req.on("end", () => res.end(JSON.stringify(req.url === "/v1/code.test_gate" ? RUN_GATE : {}))); }); await new Promise((r) => server.listen(0, "127.0.0.1", r)); const hook = fileURLToPath(new URL("../hooks/loom-test-gate.mjs", import.meta.url)); - const stop = (session, rows) => + const stop = (session, rows, mode = "block") => new Promise((resolve) => { const transcript = path.join(tmp, `${session}.jsonl`); fs.writeFileSync( @@ -874,6 +1067,7 @@ test("the hook blocks a change whose tests never ran and lets an answered one st TMPDIR: tmp, LOOM_BASE_URL: `http://127.0.0.1:${server.address().port}`, LOOM_API_KEY: "t", + ...(mode ? { LOOM_TEST_GATE: mode } : {}), }), stdio: ["pipe", "pipe", "ignore"], }); @@ -885,6 +1079,29 @@ test("the hook blocks a change whose tests never ran and lets an answered one st try { const ran = [change, bash(SUITE, PASSED)]; const no = [said("Fix f. Do not run the test suite."), change]; + // The default: a change with no test run since it is held once, with the tests to run. + assert.match(await stop("d-never-ran", [change], ""), /"decision":"block".*pytest tests\/test_a\.py/); + assert.equal(await stop("d-never-ran", [change], ""), ""); + assert.match(await stop("d-ran-before", [ranBefore, change], ""), /"decision":"block"/); + assert.match(await stop("d-only-read", [change, bash("cat tests/test_a.py", "")], ""), /"decision":"block"/); + // Any run since the change passes: one that failed, ran another file, or was followed by more commands. + const asked = requests.length; + assert.equal(await stop("d-ran", ran, ""), ""); + assert.equal(await stop("d-failed", [change, bash("pytest tests/test_b.py -x | grep FAILED", "")], ""), ""); + assert.equal(await stop("d-then-more", [...ran, bash("rm src/helper.py", ""), bash("git diff", "")], ""), ""); + // A documentation file written after the run is not a code change. + const later = (file) => { + const edited = call("Edit", { file_path: path.join(dir, file) }, "updated"); + fs.appendFileSync(path.join(dir, file), "def h():\n return 3\n"); + touch(file, new Date(edited[1].timestamp)); + return edited; + }; + assert.equal(await stop("d-doc-after-run", [...ran, later("docs/guide.md")], ""), ""); + assert.equal(requests.length, asked, "a stop that passes on a test run asks the server nothing"); + // A second code file written after the run is: the run saw the first one only. + assert.match(await stop("d-run-between", [...ran, later("src/b.py")], ""), /"decision":"block"/); + execFileSync("git", ["checkout", "-q", "--", "src/b.py", "docs/guide.md"], { cwd: dir }); + assert.equal(await stop("d-ruled-out", no, ""), ""); assert.match(await stop("never-ran", [change]), /"decision":"block".*pytest tests\/test_a\.py/); assert.equal(await stop("never-ran", [change]), ""); // An untracked file whose name git would quote or a trim would cut does not hide the tree's age. @@ -920,3 +1137,272 @@ test("the hook blocks a change whose tests never ran and lets an answered one st fs.rmSync(tmp, { recursive: true, force: true }); } }); + +// --- the default: the tests are named on the call that changed the file + +test("a checkout the cache says is not indexed is known without git; no other entry says so", () => { + const dir = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), "loom-unindexed-"))); + const tmp = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), "loom-unindexed-tmp-"))); + const below = path.join(dir, "src", "pkg"); + fs.mkdirSync(below, { recursive: true }); + fs.mkdirSync(path.join(dir, ".git")); + const cached = (entry) => { + fs.writeFileSync(cachePathFor(dir, tmp), JSON.stringify(entry)); + return cachedUnindexed(below, { tmp }); + }; + try { + assert.equal(cachedUnindexed(below, { tmp }), false); + assert.equal(cached({ ts: Date.now(), indexed: false }), true); + assert.equal(cachedUnindexed(dir, { tmp }), true); + // The server did not answer, the answer is old, or the checkout is indexed. + assert.equal(cached({ ts: Date.now(), indexed: false, unresolved: true }), false); + assert.equal(cached({ ts: Date.now() - 3_600_000, indexed: false }), false); + assert.equal(cached({ ts: Date.now(), indexed: true, org: "o", namespace: "code-x" }), false); + } finally { + fs.rmSync(dir, { recursive: true, force: true }); + fs.rmSync(tmp, { recursive: true, force: true }); + } +}); + +test("a changed file's tests ride the tool call that changed it, once", async () => { + const dir = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), "loom-advice-"))); + const tmp = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), "loom-advice-tmp-"))); + const sources = ["src/a.py", "src/b.py", "src/d.py", "src/f.py", "src/j.py", "src/k.py", "src/old.py"]; + const tests = ["a", "b", "c", "e", "g", "h", "i"].map((n) => `tests/test_${n}.py`); + for (const f of [...sources, ...tests]) { + fs.mkdirSync(path.join(dir, path.dirname(f)), { recursive: true }); + fs.writeFileSync(path.join(dir, f), "def f():\n return 1\n"); + } + for (const args of [ + ["init", "-q"], + ["add", "."], + ["-c", "user.email=t@t", "-c", "user.name=t", "commit", "-qm", "c"], + ]) { + execFileSync("git", args, { cwd: dir, stdio: "ignore" }); + } + fs.writeFileSync( + cachePathFor(dir, tmp), + JSON.stringify({ ts: Date.now(), indexed: true, org: "o", namespace: "code-x", repo: "x/y", prefixes: [] }), + ); + // The session began a minute ago; src/old.py was left dirty an hour before it. + const transcript = path.join(tmp, "t.jsonl"); + fs.writeFileSync( + transcript, + JSON.stringify({ type: "user", timestamp: new Date(Date.now() - 60_000).toISOString() }) + "\n", + ); + const write = (file, text, when = new Date()) => { + fs.appendFileSync(path.join(dir, file), text); + fs.utimesSync(path.join(dir, file), when, when); + }; + write("src/old.py", "def parked():\n return 0\n", new Date(Date.now() - 3_600_000)); + const asked = []; + // How many of the next requests get a 500. + let failing = 0; + const server = http.createServer((req, res) => { + let raw = ""; + req.on("data", (c) => (raw += c)); + req.on("end", () => { + const body = JSON.parse(raw || "{}"); + asked.push([req.url, ...(body.files || [])].join(" ")); + if (failing-- > 0) { + res.statusCode = 500; + return res.end("{}"); + } + const stem = (body.files || []).map((f) => (f.match(/^src\/(\w+)\.py$/) || [])[1]).filter(Boolean); + const answer = { + "/v1/code.test_gate": { + obligations: true, + tests: [ + ...(body.files || []) + .filter((f) => f.startsWith("tests/")) + .map((f) => ({ test_path: f, why: "changed_test", run: `pytest ${f}` })), + ...stem.map((n) => ({ + test_path: `tests/test_${n}.py`, + why: "stem_partner", + run: `pytest tests/test_${n}.py`, + })), + ], + untested: stem.length ? [{ qualified_name: "m::g" }] : [], + }, + "/v1/code.impact": { + touched_symbols: [{ qualified_name: "m::g" }], + impacted_symbols: [{ qualified_name: "m::caller", path: "src/c.py" }], + impacted_tests: [{ test_path: "tests/test_b.py" }], + }, + }[req.url]; + res.end(JSON.stringify(answer || {})); + }); + }); + await new Promise((r) => server.listen(0, "127.0.0.1", r)); + const run = (script, event, payload, env = {}) => + new Promise((resolve) => { + const child = spawn( + process.execPath, + [fileURLToPath(new URL(`../hooks/${script}.mjs`, import.meta.url)), event], + { + env: hostEnv({ + PATH: process.env.PATH, + HOME: tmp, + TMPDIR: tmp, + LOOM_BASE_URL: `http://127.0.0.1:${server.address().port}`, + LOOM_API_KEY: "t", + ...env, + }), + stdio: ["pipe", "pipe", "ignore"], + }, + ); + let out = ""; + child.stdout.on("data", (c) => (out += c)); + child.on("close", () => resolve(out ? JSON.parse(out) : null)); + child.stdin.end(JSON.stringify({ cwd: dir, session_id: "s", transcript_path: transcript, ...payload })); + }); + const shell = (command, env) => + run("loom-test-gate", "PostToolUse", { tool_name: "Bash", tool_input: { command } }, env); + const context = (out) => out?.hookSpecificOutput?.additionalContext ?? ""; + try { + // A command that changes nothing, or only reads a file left dirty before the session, asks nothing. + assert.equal(await shell("ls src; cat src/old.py"), null); + assert.deepEqual(asked, []); + // One command edits a source file and its test: one line, since the test is named once. + write("src/a.py", "def g():\n return 2\n"); + write("tests/test_a.py", "def test_g():\n assert True\n"); + const edit = "python - <<'EOF'\nopen('src/a.py','a').write('x')\nopen('tests/test_a.py','a').write('y')\nEOF"; + const first = await shell(edit); + assert.equal(first.hookSpecificOutput.hookEventName, "PostToolUse"); + assert.match(context(first), /^Loom tests for src\/a\.py: (?:\S+ -m )?pytest tests\/test_a\.py$/); + assert.equal(first.decision, undefined); + assert.deepEqual(asked.sort(), ["/v1/code.test_gate src/a.py", "/v1/code.test_gate tests/test_a.py"]); + // Later commands that name the file, a test run among them, add nothing and ask nothing. + assert.equal(await shell(edit), null); + assert.equal(await shell("python -m pytest tests/test_a.py -q; git diff src/a.py"), null); + assert.equal(asked.length, 2); + // An edit tool's call carries the line beside the blast radius, which then counts no tests. + write("src/b.py", "def g():\n return 2\n"); + const edited = await run("loom-blast-radius", "PostToolUse", { + tool_name: "Edit", + tool_input: { file_path: path.join(dir, "src/b.py") }, + }); + assert.match( + context(edited), + /^Loom blast radius for src\/b\.py \(edited m::g\): 1 caller in 1 file: m::caller \(c\.py\)\. /, + ); + assert.match(context(edited), / Loom tests for src\/b\.py: (?:\S+ -m )?pytest tests\/test_b\.py$/); + assert.doesNotMatch(context(edited), /tests reaching it/); + // The shell hook leaves an edit tool's call to that hook, and the file is asked about once. + assert.equal( + await run("loom-test-gate", "PostToolUse", { + tool_name: "Edit", + tool_input: { file_path: path.join(dir, "src/b.py") }, + }), + null, + ); + assert.equal(await shell("sed -i s/2/3/ src/b.py"), null); + // The test of a file already named adds no second line when it changes; another test names itself. + write("tests/test_b.py", "def test_g():\n assert True\n"); + assert.equal(await shell("sed -i s/1/2/ tests/test_b.py"), null); + write("tests/test_c.py", "def test_g():\n assert True\n"); + assert.match( + context(await shell("sed -i s/1/2/ tests/test_c.py")), + /^Loom tests for tests\/test_c\.py: (?:\S+ -m )?pytest tests\/test_c\.py$/, + ); + // A file with no test in the checkout gets the functions the index links no test to, once. + write("src/d.py", "def g():\n return 2\n"); + assert.equal( + context(await shell("sed -i s/1/2/ src/d.py")), + "Loom tests for src/d.py: the index links no test to m::g", + ); + assert.equal(await shell("sed -i s/2/3/ src/d.py"), null); + // After an edit tool that line names no test, so the radius keeps its own count. + write("src/f.py", "def g():\n return 2\n"); + const unlinked = await run("loom-blast-radius", "PostToolUse", { + tool_name: "Edit", + tool_input: { file_path: path.join(dir, "src/f.py") }, + }); + assert.match( + context(unlinked), + /tests reaching it: 1 \(test_b\.py\).* Loom tests for src\/f\.py: the index links no test to m::g$/, + ); + // A test the command itself runs is not named on the result of that run, nor later. + write("tests/test_e.py", "def test_g():\n assert True\n"); + assert.equal(await shell("python -m pytest tests/test_e.py -q"), null); + assert.ok(asked.includes("/v1/code.test_gate tests/test_e.py"), asked.join(", ")); + assert.equal(await shell("sed -i s/1/2/ tests/test_e.py"), null); + // A command that runs one test of the file, runs it elsewhere or only prints its command did not run it here. + for (const [n, command] of [ + ["g", "sed -i s/1/2/ tests/test_g.py && pytest tests/test_g.py::test_g"], + ["h", "docker exec app pytest tests/test_h.py"], + ["i", 'echo "pytest tests/test_i.py"'], + ]) { + write(`tests/test_${n}.py`, "def test_g():\n assert True\n"); + assert.match( + context(await shell(command)), + new RegExp(`^Loom tests for tests/test_${n}\\.py: (?:\\S+ -m )?pytest tests/test_${n}\\.py$`), + command, + ); + } + // A file the server gave no answer for is asked about at the next call that names it, once. + failing = 1; + write("src/j.py", "def g():\n return 2\n"); + assert.equal(await shell("sed -i s/1/2/ src/j.py"), null); + assert.equal( + context(await shell("sed -i s/2/3/ src/j.py")), + "Loom tests for src/j.py: the index links no test to m::g", + ); + failing = 2; + write("src/k.py", "def g():\n return 2\n"); + assert.equal(await shell("sed -i s/1/2/ src/k.py"), null); + assert.equal(await shell("sed -i s/2/3/ src/k.py"), null); + assert.equal(await shell("sed -i s/3/4/ src/k.py"), null); + assert.equal(asked.filter((a) => a.endsWith("src/k.py")).length, 2, asked.join(", ")); + failing = 0; + // A comment-only change owes no test and stays unasked until it changes code. + write("src/old.py", "# a note\n"); + execFileSync("git", ["checkout", "-q", "--", "src/old.py"], { cwd: dir }); + write("src/old.py", "# a note\n"); + assert.equal(await shell("echo '# a note' >> src/old.py"), null); + assert.ok(!asked.some((a) => a.endsWith("src/old.py")), asked.join(", ")); + // This transcript shows no tool call, so the stop has no change of the session's to hold. + assert.equal(await run("loom-test-gate", "Stop", {}), null); + // LOOM_TEST_GATE=block: nothing at edit time, the radius counts its tests, the stop is held. + const blocking = { LOOM_TEST_GATE: "block" }; + write("src/a.py", "def h():\n return 3\n"); + assert.equal( + await run( + "loom-test-gate", + "PostToolUse", + { session_id: "b", tool_name: "Bash", tool_input: { command: edit } }, + blocking, + ), + null, + ); + const radius = await run( + "loom-blast-radius", + "PostToolUse", + { session_id: "b", tool_name: "Edit", tool_input: { file_path: path.join(dir, "src/a.py") } }, + blocking, + ); + assert.match(context(radius), /tests reaching it: 1 \(test_b\.py\)/); + assert.doesNotMatch(context(radius), /Loom tests for/); + const stopped = await run("loom-test-gate", "Stop", { session_id: "b", transcript_path: "" }, blocking); + assert.equal(stopped.decision, "block"); + // With no transcript nothing shows that the session ran no test: the default holds no stop. + assert.equal(await run("loom-test-gate", "Stop", { session_id: "n", transcript_path: "" }), null); + // LOOM_TEST_GATE=off: neither. + const off = { LOOM_TEST_GATE: "off" }; + assert.equal( + await run( + "loom-test-gate", + "PostToolUse", + { session_id: "o", tool_name: "Bash", tool_input: { command: edit } }, + off, + ), + null, + ); + assert.equal(await run("loom-test-gate", "Stop", { session_id: "o", transcript_path: "" }, off), null); + } finally { + server.closeAllConnections(); + server.close(); + fs.rmSync(dir, { recursive: true, force: true }); + fs.rmSync(tmp, { recursive: true, force: true }); + } +}); diff --git a/integrations/codex-plugin/.codex-plugin/plugin.json b/integrations/codex-plugin/.codex-plugin/plugin.json index 2dda0958da0..a580f09f236 100644 --- a/integrations/codex-plugin/.codex-plugin/plugin.json +++ b/integrations/codex-plugin/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "loom", - "version": "1.2.67", + "version": "1.2.69", "description": "Shared long-term memory and code intelligence for Codex, self-hosted on ClickHouse. MCP tools to save and recall decisions, preferences and corrections across sessions and teammates; lifecycle hooks that capture each session with no model call; a code index that answers where-is, who-calls and blast-radius questions with line-accurate units instead of whole-file reads.", "author": { "name": "ClickHouse" diff --git a/integrations/codex-plugin/hooks/hooks.json b/integrations/codex-plugin/hooks/hooks.json index 5cd56a7d935..7f4965786e9 100644 --- a/integrations/codex-plugin/hooks/hooks.json +++ b/integrations/codex-plugin/hooks/hooks.json @@ -85,6 +85,17 @@ } ] }, + { + "matcher": "Bash|shell|exec_command|local_shell", + "hooks": [ + { + "type": "command", + "statusMessage": "Loom: Name linked tests", + "command": "sh \"${PLUGIN_ROOT}/bin/loom-node\" \"${PLUGIN_ROOT}/hooks/loom-test-gate.mjs\" PostToolUse codex", + "commandWindows": "node \"${PLUGIN_ROOT}/hooks/loom-test-gate.mjs\" PostToolUse codex" + } + ] + }, { "matcher": "*", "hooks": [ diff --git a/integrations/codex-plugin/hooks/loom-blast-radius.mjs b/integrations/codex-plugin/hooks/loom-blast-radius.mjs index d152bc317e8..e77f1a8c5dc 100644 --- a/integrations/codex-plugin/hooks/loom-blast-radius.mjs +++ b/integrations/codex-plugin/hooks/loom-blast-radius.mjs @@ -8,11 +8,19 @@ // the agent is still in the edit, which is when a missed sibling file is // cheap to fix. // +// The test gate's edit-time line rides the same context: the first edit of a +// file this session also asks `code.test_gate` for the file's tests and names +// their command (lib/test-gate.mjs), in place of the radius's own count of +// tests, or names the changed functions the index links no test to. This hook +// is the only one wired for an edit tool, so an edit gets one line. +// LOOM_TEST_GATE=block or off leaves the radius alone. +// // Fail-open everywhere: no token, not an indexed repo, untracked file, empty -// diff, server slow → nothing is printed. One bounded request (3 s). The same -// touched-symbol set for a file is reported once per session. +// diff, server slow → nothing is printed. Each request is bounded (3 s) and +// the two go out together. The same touched-symbol set for a file is reported +// once per session. // -// LOOM_BLAST_RADIUS=off disable +// LOOM_BLAST_RADIUS=off disable the radius; the tests line stays // LOOM_BLAST_MAX_NAMES=5 callers named inline // LOOM_BLAST_DEPTH=1 impact depth (1 or 2) // LOOM_BLAST_PER_HOP=50 impacted rows requested per hop (counts stay exact) @@ -35,15 +43,17 @@ import { relativeForLookup, targetPath } from "../lib/file-context.mjs"; import { resolveIndexedRepo } from "../lib/repo-scope.mjs"; import { readSessionState, writeSessionState } from "../lib/tmp-state.mjs"; import { blastPayload, blastSignature, decideEmit, impactBody, renderBlast } from "../lib/blast-radius.mjs"; +import { adviceFiles, adviceLines, gateMode } from "../lib/test-gate.mjs"; const ENABLED = envSwitch("LOOM_BLAST_RADIUS", true); +const ADVISE = gateMode() === "advise"; const MAX_NAMES = Number(process.env.LOOM_BLAST_MAX_NAMES || 5); const DEPTH = Math.min(2, Math.max(1, Number(process.env.LOOM_BLAST_DEPTH || 1))); const PER_HOP = Math.min(500, Math.max(1, Number(process.env.LOOM_BLAST_PER_HOP || 50))); const TOOLS = new Set(["Edit", "Write", "MultiEdit", "apply_patch"]); async function main() { - if (!ENABLED) { + if (!ENABLED && !ADVISE) { scheduleExit(0); return; } @@ -87,37 +97,34 @@ async function main() { // on it yet; empty = the edit was a no-op or already committed. The outline is // sent in its place; with no `+++` path in it (a mode-only change, a binary file, // a header dropped for a line end) the server has nothing to read. - const diff = git(["diff", ...DIFF_ARGS, "--unified=0", "HEAD", "--", rel], root, { - timeoutMs: 2000, - raw: true, - }); + const diff = ENABLED + ? git(["diff", ...DIFF_ARGS, "--unified=0", "HEAD", "--", rel], root, { timeoutMs: 2000, raw: true }) + : ""; const outline = diffHeaders(diff, 200_000); - if (!/^\+\+\+ /m.test(outline)) { - scheduleExit(0); - return; - } + const files = ADVISE ? adviceFiles(payload, { root, cwd }).files : []; + const [impact, advice] = await Promise.all([ + /^\+\+\+ /m.test(outline) + ? postBounded("code.impact", impactBody(repo, outline, { depth: DEPTH, perHop: PER_HOP }), { + token, + serverUrl: resolveServerUrl(), + }) + : null, + files.length ? adviceLines(payload, files, { root, repo, token }) : [], + ]); - const impact = await postBounded("code.impact", impactBody(repo, outline, { depth: DEPTH, perHop: PER_HOP }), { - token, - serverUrl: resolveServerUrl(), - }); - if (!impact) { - scheduleExit(0); - return; + let blast = ""; + if (impact) { + const touchedPaths = git(["diff", "--name-only", "HEAD"], root, { timeoutMs: 2000 }) + .split("\n") + .map((s) => s.trim()) + .filter(Boolean); + const decision = decideEmit(readSessionState("blast", payload.session_id), rel, blastSignature(rel, impact)); + writeSessionState("blast", payload.session_id, decision.cache); + // A tests line for this file names their command, so the radius does not count them too. + const named = advice.some((a) => a.rel === rel && a.tests); + if (decision.emit) blast = renderBlast(rel, impact, { maxNames: MAX_NAMES, touchedPaths, tests: !named }); } - - const touchedPaths = git(["diff", "--name-only", "HEAD"], root, { timeoutMs: 2000 }) - .split("\n") - .map((s) => s.trim()) - .filter(Boolean); - const decision = decideEmit(readSessionState("blast", payload.session_id), rel, blastSignature(rel, impact)); - writeSessionState("blast", payload.session_id, decision.cache); - if (!decision.emit) { - scheduleExit(0); - return; - } - - const text = renderBlast(rel, impact, { maxNames: MAX_NAMES, touchedPaths }); + const text = [blast, advice.map((a) => a.text).join("\n")].filter(Boolean).join(" "); if (text) process.stdout.write(JSON.stringify(blastPayload(text)) + "\n"); scheduleExit(0); } diff --git a/integrations/codex-plugin/hooks/loom-code-shunt.mjs b/integrations/codex-plugin/hooks/loom-code-shunt.mjs index bdad1917e96..4c21d2d51be 100755 --- a/integrations/codex-plugin/hooks/loom-code-shunt.mjs +++ b/integrations/codex-plugin/hooks/loom-code-shunt.mjs @@ -6,18 +6,22 @@ // // Input: the host's PreToolUse JSON on stdin (tool_name, tool_input, cwd, // session_id). Output: nothing (the call proceeds) or one `deny` whose -// reason names the op to call instead. Nothing else ever blocks. +// reason carries the index's answer: the declarations of the lines a read +// asked for, a symbol's definition, the tracker's verdict. Nothing else ever +// blocks. // -// Fail-open: no token, no repository or an unindexed one, an unanswered -// lookup, a modified or untracked file, a targeted read → the call proceeds. +// Fail-open: no token, no repository or an unindexed one, a lookup the index +// did not answer in full, a modified or untracked file, a targeted read, a +// Bash command of several parts → the call proceeds. // Bounds: the repository lookup (cached 10 min, 1 min when unanswered) has -// LOOM_SHUNT_RESOLVE_TIMEOUT_MS (8 s); a symbol answer 2.5 s; a tracker -// answer LOOM_TRACKER_SHUNT_TIMEOUT_MS (3 s); the whole process exits by -// DEADLINE_MS. +// LOOM_SHUNT_RESOLVE_TIMEOUT_MS (8 s); a symbol or outline answer 2.5 s; a +// tracker answer LOOM_TRACKER_SHUNT_TIMEOUT_MS (3 s); the whole process exits +// by DEADLINE_MS. // // Side effects, all in $TMPDIR: the shared repository cache // (lib/repo-scope.mjs); per-session denial budgets for the read-window cap, -// symbol greps and tracker searches (sessionStatePath "shunt-cap"); the +// symbol greps and tracker searches, and the whole files whose lookup gave no +// declarations (sessionStatePath "shunt-cap"); the // user's decision log (tmpStatePath "shunt-log") and its unflushed copy, one // batch per reporting scope and session (repo.pending, named by batchKind in // lib/shunt-ledger.mjs), all through lib/tmp-state.mjs's private-file helpers, @@ -43,6 +47,7 @@ import { } from "../lib/loom-client.mjs"; import { DEFAULT_MAX_LINES, + DEFAULT_OUTLINE_BUDGET, DEFAULT_READ_CAP, SYMBOL_GREP_DENIALS_PER_SYMBOL, TRACKER_SEARCH_DENIALS_PER_QUERY, @@ -50,6 +55,7 @@ import { classifyGrep, wantsLines, classifyRead, + declarationsInSpan, denyGhSearchWithAnswer, denySymbolGrepWithAnswer, localFirstOn, @@ -58,11 +64,11 @@ import { readSpan, runLocalGrep, spendCapBudget, - symbolAnswerText, symbolInPattern, trackerAnswerText, + wholeSymbolAnswer, } from "../lib/code-shunt.mjs"; -import { ghIssueSearchInCommand, parseBashBulkSegments } from "../lib/shell-command.mjs"; +import { ghIssueSearchInCommand, isCompoundCommand, parseBashBulkSegments } from "../lib/shell-command.mjs"; import { aggregateShuntLog, batchKind, @@ -92,6 +98,10 @@ const SHUNT_BASH = envSwitch("LOOM_SHUNT_BASH", true); // indexed checkout is answered by the tracker record first. `LOOM_TRACKER_SHUNT=off`. const SHUNT_TRACKER = envSwitch("LOOM_TRACKER_SHUNT", true); const TRACKER_SEARCH_TIMEOUT_MS = Math.max(500, Number(process.env.LOOM_TRACKER_SHUNT_TIMEOUT_MS || 3000) || 3000); +// One symbol or outline answer, asked only for a call the local rules would +// refuse. A call it does not answer runs having waited for it: once per symbol +// or whole file per session, at each over-cap read. +const LOOKUP_TIMEOUT_MS = 2500; const LOG_ON = envSwitch("LOOM_SHUNT_LOG", true); const REPORT_ON = envSwitch("LOOM_SHUNT_REPORT", true); const FLUSH_TIMEOUT_MS = 300; @@ -156,8 +166,10 @@ function deny(reason) { ); } -/** Per-session denial counts, {key: n}, for three budgets: over-cap reads (the - * file's path), symbol greps (`sym:`) and answered tracker searches (`qa:`). +/** Per-session counts, {key: n}: three denial budgets, over-cap reads (the + * file's path), symbol greps (`sym:`) and answered tracker searches (`qa:`), + * and the whole files whose lookup gave no declarations (`miss:`), asked + * about once. * {} when the file is missing or refused. A denial is given only when its * spend was written: when the file cannot be kept (tmp not writable, or a file * planted there) the call passes as if its budget were spent, so a planted @@ -168,6 +180,11 @@ function readCapCounts(sessionId) { // The pass reason for a call whose budget spend could not be written: it passes. const BUDGET_UNRECORDED = "budget_unrecorded"; +// A Bash command of several parts is never refused: a refusal withholds every +// part. Its reads and greps are still counted as passes. +const COMPOUND_COMMAND = { deny: null, reason: "compound_command" }; +// The index did not answer in full, so there is nothing to refuse with. +const INDEX_UNANSWERED = { deny: null, reason: "index_unanswered" }; /** True when the spend was kept. */ function writeCapCounts(sessionId, counts) { @@ -289,14 +306,50 @@ function settle(repo, { tool, verdict, tokens, path = "", span = { start: 0, end endLine: span.end, }); if (shouldFlushShunt({ denied, pending: unflushed })) flushPending(repo); - return denied; +} + +/** The index's declarations in `span` of `rel`: one bounded code.outline. [] + * when it did not answer for the whole span. */ +async function indexedDeclarations(repo, rel, span) { + if (!repo.namespace) return []; + const outline = await postBounded( + "code.outline", + { + org: repo.org || "", + namespace: repo.namespace, + path: rel, + token_budget: DEFAULT_OUTLINE_BUDGET, + include_lessons: false, + consumer: "claude-code-shunt", + }, + { timeoutMs: LOOKUP_TIMEOUT_MS }, + ); + return declarationsInSpan(outline, span); +} + +/** The declarations a refusal of this read would list, [] when the index does + * not hold them all. A whole file (`missKey` set) is asked about once per + * session: a lookup that gave none, whether the index answered with an empty + * or cut outline or did not answer, is kept in the counts file under that + * key, so an unreachable server costs each file one wait. The counts are read + * again for the write: another hook of the session may have spent a budget + * during the lookup. */ +async function readDeclarations(repo, rel, span, sessionId, missKey) { + if (missKey && capBudgetSpent(readCapCounts(sessionId), missKey, 1)) return []; + const declarations = await indexedDeclarations(repo, rel, span); + if (missKey && !declarations.length) writeCapCounts(sessionId, spendCapBudget(readCapCounts(sessionId), missKey)); + return declarations; } /** Read-shaped decision (Read tool or `cat`): classify, price, span. A * ranged read consults the session's cap budget first; a cap denial spends - * one of the file's denials. */ -function settleRead(repo, { tool, rel, abs, offset, limit, sessionId, ctxBase, denyRewrite }) { + * one of the file's denials. A denial carries the declarations of the lines + * asked for; without them, or inside a `compound` command, the read passes. + * `fromEnd`: the slice is the file's last `limit` lines (`tail -n N`). */ +async function settleRead(repo, opts) { + const { tool, rel, abs, limit, fromEnd, sessionId, ctxBase, denyRewrite, compound } = opts; const lineCount = countLines(abs); + const offset = fromEnd ? Math.max(1, lineCount - limit + 1) : opts.offset; const bytes = fileBytes(abs); const ranged = offset != null || limit != null; const capCounts = READ_CAP > 0 && ranged ? readCapCounts(sessionId) : {}; @@ -310,22 +363,29 @@ function settleRead(repo, { tool, rel, abs, offset, limit, sessionId, ctxBase, d readCap: READ_CAP, capCounts, }; + const span = readSpan({ lineCount, offset, limit }); let verdict = classifyRead(readCtx, MAX_LINES); - if (verdict.capped && !writeCapCounts(sessionId, spendCapBudget(capCounts, rel))) + if (verdict.deny && compound) verdict = COMPOUND_COMMAND; + else if (verdict.deny) { + const asked = ranged ? span : { start: 1, end: lineCount }; + const declarations = await readDeclarations(repo, rel, asked, sessionId, ranged ? "" : `miss:${rel}`); + verdict = declarations.length ? classifyRead({ ...readCtx, declarations }, MAX_LINES) : INDEX_UNANSWERED; + } + if (verdict.capped && !writeCapCounts(sessionId, spendCapBudget(readCapCounts(sessionId), rel))) verdict = { deny: null, reason: BUDGET_UNRECORDED }; if (verdict.deny && denyRewrite) verdict.deny = denyRewrite(verdict.deny); - // A whole-file hit kept the whole file out; a cap hit kept the SPAN out - // (what the ranged read would have let in); a pass let its span in. - const tokens = - verdict.deny && !verdict.capped - ? estimateTokensSaved(bytes) - : estimateTokensRead({ bytes, lineCount, offset, limit }); - return settle(repo, { tool, verdict, tokens, path: rel, span: readSpan({ lineCount, offset, limit }) }); + // What the read lets into the context: the whole file, or the span of a + // ranged read. A hit kept that out, less the refusal's own text. + const read = estimateTokensRead({ bytes, lineCount, offset, limit }); + const tokens = verdict.deny ? Math.max(0, read - estimateTokensSaved(verdict.deny.length)) : read; + settle(repo, { tool, verdict, tokens, path: rel, span }); } /** classifyGrep with the symbol rule's once-per-symbol budget: - * the budget shares the read-cap counts file under a `sym:` key. */ -function classifySymbolGrep(ctx, sessionId) { + * the budget shares the read-cap counts file under a `sym:` key. Inside a + * `compound` command the grep that would be a symbol lookup passes as one, + * and spends nothing. */ +function classifySymbolGrep(ctx, sessionId, compound = false) { const symbol = ctx.isFile ? symbolInPattern(ctx.pattern) : ""; if (!symbol) return classifyGrep(ctx); const key = `sym:${symbol}`; @@ -335,46 +395,44 @@ function classifySymbolGrep(ctx, sessionId) { symbol, symbolBudgetSpent: capBudgetSpent(counts, key, SYMBOL_GREP_DENIALS_PER_SYMBOL), }); + if (verdict.symbol && compound) return COMPOUND_COMMAND; if (verdict.symbol && !writeCapCounts(sessionId, spendCapBudget(counts, key))) return { deny: null, reason: BUDGET_UNRECORDED }; return verdict; } -/** A symbol-grep denial fetches the definition itself (one bounded code.symbol - * call, 2.5 s) — otherwise the turn costs three model rounds (denied grep, - * loom_code_symbol, confirming grep) and tens of seconds when the index and - * the checkout disagree. The index answer is the answer, whatever commit the - * checkout is on; only named files the caller modified get their local grep - * inlined. */ +/** A symbol-grep denial carries the definition: one bounded code.symbol call, + * so the turn is one model round, not three (denied grep, loom_code_symbol, + * confirming grep). The index answer is the answer, whatever commit the + * checkout is on; named files the caller modified get their local grep + * inlined. When the index holds no single definition, does not answer in + * time, or those lines do not fit, the grep runs. */ async function answerSymbolDeny(verdict, repo, ctx, { cwd = repo.root, files = [] } = {}) { - if (!verdict.deny || !verdict.symbol || !repo.namespace) return verdict; - try { - const res = await postBounded( - "code.symbol", - { - org: repo.org || "", - namespace: repo.namespace, - name: verdict.symbol, - include_body: false, - include_history: false, - include_examples: false, - include_lessons: false, - }, - { timeoutMs: 2500 }, - ); - const dirtyFiles = files.filter((f) => { - const rel = pathUnder(repo.root, path.resolve(cwd, f)); - return rel != null && gitStatusClass(repo.root, rel) !== ""; - }); - const localGrep = dirtyFiles.length - ? localGrepText(runLocalGrep(cwd, ctx.pattern, dirtyFiles), { pattern: ctx.pattern, files: dirtyFiles }) - : ""; - const answer = symbolAnswerText(res, { asOf: repo.asOf, namespace: repo.namespace, localGrep, dirtyFiles }); - if (answer) verdict.deny = denySymbolGrepWithAnswer({ ...ctx, symbol: verdict.symbol }, answer); - } catch { - /* the plain redirect stands */ - } - return verdict; + if (!verdict.symbol) return verdict; + if (!repo.namespace) return INDEX_UNANSWERED; + const res = await postBounded( + "code.symbol", + { + org: repo.org || "", + namespace: repo.namespace, + name: verdict.symbol, + include_body: false, + include_history: false, + include_examples: false, + include_lessons: false, + }, + { timeoutMs: LOOKUP_TIMEOUT_MS }, + ); + const dirtyFiles = files.filter((f) => { + const rel = pathUnder(repo.root, path.resolve(cwd, f)); + return rel != null && gitStatusClass(repo.root, rel) !== ""; + }); + const localGrep = dirtyFiles.length + ? localGrepText(runLocalGrep(cwd, ctx.pattern, dirtyFiles), { pattern: ctx.pattern, files: dirtyFiles }) + : ""; + const answer = wholeSymbolAnswer(res, { asOf: repo.asOf, namespace: repo.namespace, localGrep, dirtyFiles }); + if (!answer) return INDEX_UNANSWERED; + return { ...verdict, deny: denySymbolGrepWithAnswer({ ...ctx, symbol: verdict.symbol }, answer) }; } /** A GitHub issue search is a question the tracker record @@ -471,7 +529,7 @@ async function main() { const abs = path.resolve(cwd, String(input.file_path || "")); const rel = pathUnder(root, abs); if (rel == null) return; - settleRead(repo, { tool, rel, abs, offset: input.offset, limit: input.limit, sessionId, ctxBase }); + await settleRead(repo, { tool, rel, abs, offset: input.offset, limit: input.limit, sessionId, ctxBase }); return; } @@ -519,39 +577,43 @@ async function main() { } if (tool === "Bash" && SHUNT_BASH) { - // Each bulk segment of a `;` / `&&` / `|` chain is judged in order; the - // first deny ends the call (one deny per hook), passes are all counted. - for (const bulk of parseBashBulkSegments(commandText(input))) { - if (await settleBashBulk(repo, { bulk, cwd: path.resolve(cwd, bulk.cwd || "."), sessionId, ctxBase })) return; + // Each bulk segment of a `;` / `&&` / `|` chain is counted in order; only + // a command that is one read or one grep can be denied. + const command = commandText(input); + const compound = isCompoundCommand(command); + for (const bulk of parseBashBulkSegments(command)) { + await settleBashBulk(repo, { bulk, cwd: path.resolve(cwd, bulk.cwd || "."), sessionId, ctxBase, compound }); } } } -/** One bulk-shaped Bash segment; true when it was denied. */ -async function settleBashBulk(repo, { bulk, cwd, sessionId, ctxBase }) { +/** One bulk-shaped Bash segment. Inside a `compound` command it passes: no + * lookup is made and no denial budget is spent. */ +async function settleBashBulk(repo, { bulk, cwd, sessionId, ctxBase, compound }) { const root = repo.root; if (bulk.kind === "read") { const abs = path.resolve(cwd, bulk.file); const rel = pathUnder(root, abs); - if (rel == null) return false; + if (rel == null) return; // A `sed -n 'A,Bp'` / `head -n N` / `tail -n +A` / // `awk 'NR>=A && NR<=B'` slice carries its span, so the read-window - // cap judges it exactly as Read(offset, limit); a whole-file `cat`, - // `nl`, `tac`, `sed -n p` keeps the whole-file rule. + // cap judges it exactly as Read(offset, limit); `tail -n N` carries a + // length alone, counted back from the file's last line; a whole-file + // `cat`, `nl`, `tac`, `sed -n p` keeps the whole-file rule. const cmdName = bulk.cmd || "cat"; - return settleRead(repo, { + await settleRead(repo, { tool: `Bash:${cmdName}`, rel, abs, sessionId, ctxBase, + compound, offset: bulk.offset, limit: bulk.limit, - denyRewrite: (t) => - t - .replace("Whole-file reads are", `\`${cmdName}\` of a whole file is`) - .replace(/^loom-code-shunt: Read of /, `loom-code-shunt: \`${cmdName}\` of `), + fromEnd: bulk.offset == null && bulk.limit != null, + denyRewrite: (t) => t.replace(/^loom-code-shunt: Read of /, `loom-code-shunt: \`${cmdName}\` of `), }); + return; } const abs = path.resolve(cwd, bulk.dir); const rel = pathUnder(root, abs); @@ -559,7 +621,7 @@ async function settleBashBulk(repo, { bulk, cwd, sessionId, ctxBase }) { try { isFile = fs.statSync(abs).isFile(); } catch { - return false; + return; } const ctx = { ...ctxBase, @@ -568,11 +630,11 @@ async function settleBashBulk(repo, { bulk, cwd, sessionId, ctxBase }) { pattern: bulk.pattern, modified: isFile && rel != null ? gitStatusClass(root, rel) : "", }; - const verdict = await answerSymbolDeny(classifySymbolGrep(ctx, sessionId), repo, ctx, { + const verdict = await answerSymbolDeny(classifySymbolGrep(ctx, sessionId, compound), repo, ctx, { cwd, files: bulk.files || [bulk.dir], }); - return settle(repo, { tool: "Bash:grep", verdict, tokens: 0, path: rel || "" }); + settle(repo, { tool: "Bash:grep", verdict, tokens: 0, path: rel || "" }); } main() diff --git a/integrations/codex-plugin/hooks/loom-test-gate.mjs b/integrations/codex-plugin/hooks/loom-test-gate.mjs index 013b96f64e3..deecee88c48 100644 --- a/integrations/codex-plugin/hooks/loom-test-gate.mjs +++ b/integrations/codex-plugin/hooks/loom-test-gate.mjs @@ -1,30 +1,47 @@ #!/usr/bin/env node -// loom-test-gate — Stop hook. +// loom-test-gate — PostToolUse (Bash|PowerShell) and Stop. // -// On Stop, if the working tree has uncommitted changes THIS SESSION made +// PostToolUse, the default (LOOM_TEST_GATE unset): after a shell command +// that changed files in a loom-indexed repo, ask `code.test_gate` about each +// one and attach ONE line per file naming the command of the tests the +// index links to it, or of the file itself when it is a test, or the changed +// functions the index links no test to when there is no test to name; once +// per file and once per test per session. The line rides the tool result, so it +// costs no model request, and it arrives while the file is still being +// edited. An edit tool's call gets the same line from loom-blast-radius, the +// one hook wired for those tools. +// +// Stop: if the working tree has uncommitted changes THIS SESSION made // in a loom-indexed repo, ask `code.test_gate` for the change's obligations // (tests to run, untested touched functions) and block the stop ONCE per // distinct change with a reason that names them. "This session's" is read // from the transcript: dirty paths an edit tool targeted or a shell command // named, written since the session began (by the file's modification time); // a tree left dirty before the session does not gate a turn that changed -// nothing. A Claude Code transcript that already answers the ask does not -// block either (`runAnswered` in lib/test-gate.mjs); a Codex rollout answers -// nothing, so its stop blocks. +// nothing. By default any test run since the session's last code change +// lets the stop pass, whatever it ran and however it went (`testedSince`, +// `lastCodeChange` in lib/test-gate.mjs): the stop is held for a session +// that ran no test since its last code change, and nothing is asked of the +// server for one that ran some. A documentation file changed after the run +// holds nothing. +// +// With LOOM_TEST_GATE=block nothing is named at edit time, and the stop +// passes only when a Claude Code transcript shows the named tests ran on the +// tree as it stands (`runAnswered`); a Codex rollout answers nothing there, +// so its stop blocks. // // Fail-open everywhere: no token, not an indexed repo, clean tree, nothing // of the tree touched this session, server down, second stop on the same -// change — the agent stops as normal. Without a transcript path the whole -// dirty tree is the change. -// LOOM_TEST_GATE=off disables; LOOM_TEST_GATE_DEPTH (1-3) sets the hops. +// change — the agent stops as normal. Without a transcript path the default +// holds no stop, and LOOM_TEST_GATE=block takes the whole dirty tree as the +// change. +// LOOM_TEST_GATE=off disables both; LOOM_TEST_GATE_DEPTH (1-3) sets the hops. -import fs from "node:fs"; -import path from "node:path"; import crypto from "node:crypto"; import { git, gitToplevel, - pathUnder, + normalizeToolName, postBounded, readStdinJson, DIFF_ARGS, @@ -32,30 +49,54 @@ import { resolveServerUrl, resolveToken, scheduleExit, - envSwitch, } from "../lib/loom-client.mjs"; -import { resolveIndexedRepo } from "../lib/repo-scope.mjs"; +import { cachedUnindexed, resolveIndexedRepo } from "../lib/repo-scope.mjs"; import { readSessionState, writeSessionState } from "../lib/tmp-state.mjs"; import { readAllLines } from "../lib/transcript.mjs"; import { + adviceFiles, + adviceLines, + advicePayload, checkoutPython, commentOnlyDiff, decideBlock, + gateDepth, + gateMode, gatePayload, gateSignature, + lastCodeChange, newestChange, renderGate, runAnswered, sessionScope, sessionStart, + testedSince, + testsIn, writtenSince, } from "../lib/test-gate.mjs"; -const ENABLED = envSwitch("LOOM_TEST_GATE", true); -const DEPTH = Math.min(3, Math.max(1, Number(process.env.LOOM_TEST_GATE_DEPTH || 2))); +const MODE = gateMode(); +const DEPTH = gateDepth(); +const AFTER_TOOL = process.argv[2] === "PostToolUse"; + +/** After a shell command: the line for the files it changed, or nothing. */ +async function advise(payload, token) { + const tool = normalizeToolName(payload.tool_name); + if (tool !== "Bash" && tool !== "PowerShell") return; + const cwd = payload.cwd || process.cwd(); + // This runs after every shell command: a checkout already known to have no index costs no git call. + if (cachedUnindexed(cwd)) return; + const { root, files } = adviceFiles(payload, { cwd }); + if (!files.length) return; + const repo = await resolveIndexedRepo(root, { consumer: "claude-code-testgate" }); + if (!repo.indexed) return; + const lines = await adviceLines(payload, files, { root, repo, token, depth: DEPTH }); + const out = advicePayload(lines.map((l) => l.text).join("\n")); + if (out) process.stdout.write(JSON.stringify(out) + "\n"); +} async function main() { - if (!ENABLED) { + if (MODE === "off" || (AFTER_TOOL && MODE === "block")) { scheduleExit(0); return; } @@ -65,6 +106,11 @@ async function main() { return; } const payload = await readStdinJson(); + if (AFTER_TOOL) { + await advise(payload, token); + scheduleExit(0); + return; + } // A Stop fired by our own block must never block again. if (payload.stop_hook_active) { scheduleExit(0); @@ -93,6 +139,11 @@ async function main() { scheduleExit(0); return; } + // The default holds the stop of a session whose transcript shows no test run since its last code change. + if (MODE === "advise" && (!transcript || testedSince(rows, lastCodeChange(root, changed)))) { + scheduleExit(0); + return; + } const repo = await resolveIndexedRepo(root, { consumer: "claude-code-testgate" }); if (!repo.indexed) { scheduleExit(0); @@ -127,16 +178,7 @@ async function main() { }, { token, serverUrl: resolveServerUrl() }, ); - const testExists = (testPath) => { - const target = path.resolve(root, testPath); - if (!pathUnder(root, target)) return false; - try { - return fs.statSync(target).isFile(); - } catch { - // A stale index row or another checkout's test is an explicit gap. - return false; - } - }; + const testExists = testsIn(root); // The newest file time among the uncommitted and untracked files. const lastModified = () => { const untracked = git(["ls-files", "-z", "--others", "--exclude-standard"], root, { diff --git a/integrations/codex-plugin/lib/blast-radius.mjs b/integrations/codex-plugin/lib/blast-radius.mjs index d4dd5cc6d21..9e8a93b6524 100644 --- a/integrations/codex-plugin/lib/blast-radius.mjs +++ b/integrations/codex-plugin/lib/blast-radius.mjs @@ -65,13 +65,15 @@ function base(p) { /** * Render the blast line, or "" when there is nothing worth saying. * `touchedPaths` = files edited this session (repo-relative) so co-change - * partners the agent already touched are not reported as missing. + * partners the agent already touched are not reported as missing. With + * `tests` false the tests reaching the change are left out: the test gate's + * line beside this one names their command. */ -export function renderBlast(rel, impact, { maxNames = 5, touchedPaths = [] } = {}) { +export function renderBlast(rel, impact, { maxNames = 5, touchedPaths = [], tests: namesTests = true } = {}) { if (!impact) return ""; const touched = (impact.touched_symbols || []).map((s) => short(s.qualified_name)).filter(Boolean); const impacted = (impact.impacted_symbols || []).filter((s) => s && s.qualified_name); - const tests = (impact.impacted_tests || []).filter((t) => t && t.test_path); + const tests = namesTests ? (impact.impacted_tests || []).filter((t) => t && t.test_path) : []; const already = new Set([rel, ...touchedPaths.map(String)]); const missing = (impact.co_change_missing || []).filter((m) => m && m.path && !already.has(String(m.path))); if (!impacted.length && !tests.length && !missing.length) return ""; // owners alone are not a radius diff --git a/integrations/codex-plugin/lib/code-shunt.mjs b/integrations/codex-plugin/lib/code-shunt.mjs index d0ef83bfc62..6b4cfd32bac 100644 --- a/integrations/codex-plugin/lib/code-shunt.mjs +++ b/integrations/codex-plugin/lib/code-shunt.mjs @@ -10,6 +10,14 @@ import { recalledDataBlock } from "./prompt-recall.mjs"; // with its path, line span, callers and as-of commit, so the shunt redirects // the BULK reflex to it; anything targeted passes. // +// A refusal costs the agent a request, so it must hand over what the call was +// after: a read is refused only with the declarations of the lines it asked +// for, a symbol grep only with the one definition the index holds. When the +// index did not answer in full, the call runs. The declarations are the kinds +// code.outline lists by default: functions, methods, classes, structs and the +// units of tests, build files and SQL. An interface, type alias, enum or +// constant is not among them, and the refusal says so. +// // The index describes merged code at its as-of commit. A file the checkout // modified or git does not track always passes: only the working tree can // answer for it (blast radius covers the diff after an edit). @@ -20,29 +28,23 @@ import { recalledDataBlock } from "./prompt-recall.mjs"; export const DEFAULT_MAX_LINES = 800; // Read-window cap. A RANGED read (offset/limit given) of an indexed, -// unmodified file whose span is longer than this many lines is redirected to -// the enclosing unit; 0 = off, the default until a bench sets one. The cap -// has a per-session, per-file budget so a model that insists is never denied -// the same file forever. +// unmodified file whose span is longer than this many lines is refused with +// the declarations in its lines; 0 = off, the default until a bench sets one. +// The cap has a per-session, per-file budget so a model that insists is never +// denied the same file forever. export const DEFAULT_READ_CAP = 0; export const READ_CAP_DENIALS_PER_FILE = 2; -// code.outline's default budget, and the outline's measured price per file -// line (147 indexed files changed by 30 recent PRs of a large C++ repository): -// 0.581 tokens of whole-row budgeted entries per file line. -// The deny text quotes the estimate so the model can weigh it against the -// file it was about to read; ctx.outlineTokens overrides when a caller knows. -export const DEFAULT_OUTLINE_BUDGET = 1500; -export const OUTLINE_TOKENS_PER_LINE = 0.58; - -/** Rough token price of `loom code.outline` for a file of `lineCount` lines: - * the measured per-line rate, floored at a small header and capped by the - * op's default budget (whole-row budgeting never exceeds it). */ -export function estimateOutlineTokens(lineCount, budget = DEFAULT_OUTLINE_BUDGET) { - const n = Number(lineCount); - if (!Number.isFinite(n) || n <= 0) return 0; - return Math.min(budget, Math.max(50, Math.round(n * OUTLINE_TOKENS_PER_LINE))); -} +// The token budget of the code.outline call behind a read refusal: the +// refusal carries every declaration of the lines asked for, so a file whose +// outline does not fit is read, not refused. Measured on 301 files over 800 +// lines of a large C++ repository, an outline costs a median 2.2 budgeted +// tokens per file line and its lines in the refusal 1.9 characters per +// budgeted token: 4000 held the outline of 62% of those files, and the +// longest refusal was 8,400 characters. That is a measurement, not a limit: +// the server counts an entry at a quarter of its JSON length, so long +// signatures make a longer refusal. +export const DEFAULT_OUTLINE_BUDGET = 4000; const BINARY_EXT = new Set([ ".png", @@ -112,10 +114,12 @@ export const PASS_REASONS = Object.freeze([ "cap_spent", // ranged read over the read-window cap, but this file's denial budget is spent "symbol_grep_spent", // single-file grep for a symbol, but this symbol's denial budget is spent "budget_unrecorded", // a denial whose budget spend could not be written: passed rather than lock the agent out + "compound_command", // a Bash command of several parts: a refusal would withhold every part + "index_unanswered", // the index did not answer the lookup in full: nothing to refuse with ]); -// A grep whose pattern names one symbol is a symbol lookup — -// denied once per symbol per session with the exact loom_code_symbol call. +// A grep whose pattern names one symbol is a symbol lookup: the index is +// asked once per symbol per session, and the grep is denied with its answer. export const SYMBOL_GREP_DENIALS_PER_SYMBOL = 1; /** The symbol a grep pattern names, or "": a `Class::method` path, or a @@ -171,7 +175,10 @@ function classifyRangedRead(ctx) { /** * Classify a Read call. `ctx` = {rel, prefixes, lineCount, modified, offset, limit, - * readCap, capCounts}. `modified` may be a boolean or the git + * readCap, capCounts, declarations}. `declarations` are the index's, for the + * lines asked for (declarationsInSpan); the denial text lists them. The hook + * asks for them once the verdict is a hit and refuses only when it holds them. + * `modified` may be a boolean or the git * status class ("modified" | "untracked"). Returns {deny, reason}: deny is the * denial text (null on a pass), reason is "hit" for a deny and one of * PASS_REASONS for a pass; a hit under the read-window cap also carries @@ -203,45 +210,71 @@ function scopeSentence(ctx) { return ` Pass namespace: "${ctx.namespace}" on that call — this checkout's index.`; } +/** The outline entries a read of `span` would show: the declarations that + * overlap it, in source order. [] when `outline` (a code.outline answer) does + * not hold them all: nothing indexed for the file, or a list its budget cut + * at or before the span's last line. */ +export function declarationsInSpan(outline, span) { + const entries = (Array.isArray(outline?.entries) ? outline.entries : []).filter( + (e) => e && e.qualified_name && e.start_line > 0, + ); + if (!entries.length || !span?.start) return []; + if (Number(outline.elided) > 0 && entries[entries.length - 1].start_line <= span.end) return []; + return entries.filter((e) => e.start_line <= span.end && Math.max(e.end_line || 0, e.start_line) >= span.start); +} + +/** One line per declaration: its lines, its qualified name, its header. */ +function declarationLines(declarations) { + return (Array.isArray(declarations) ? declarations : []) + .map((e) => { + const header = String(e.signature || "") + .replace(/\s+/g, " ") + .trim(); + return `${e.start_line}-${e.end_line || e.start_line} ${e.qualified_name}${header ? ` ${header}` : ""}`; + }) + .join("\n"); +} + +// What a read refusal's list holds, said in the refusal: code.outline's default kinds. +const OUTLINE_COLUMNS = + "(lines, qualified name, header; it lists functions, methods, classes and structs, " + + "not interfaces, type aliases, enums or constants)"; + +const READ_DIRECTLY = "Uncommitted edits are invisible to the index: if you changed this file, read it directly."; + function denyCapText(ctx, span, cap) { - const { rel, lineCount } = ctx; + const { rel } = ctx; const n = span.end - span.start + 1; - const outlineTokens = ctx.outlineTokens ?? estimateOutlineTokens(lineCount); return ( `loom-code-shunt: Read of ${rel} lines ${span.start}-${span.end} is ${n} lines, over the ` + `${cap}-line read window, and the file is in loom's code index` + - `${ctx.asOf ? ` (as of ${ctx.asOf.slice(0, 12)})` : ""}. Ask for the unit instead of the ` + - `window: loom code.enclosing locations=${rel}:${span.start} neighbours=true (the symbol ` + - `enclosing line ${span.start}, with its callers, callees and tests), then code.symbol ` + - `name= for the definition with its path:line span, or ` + - `code.outline path=${rel} (declarations with line spans, ~${outlineTokens} tokens) to pick ` + - `a smaller span. Read at most ${cap} lines at a time (offset/limit) if you must read directly. ` + - `Uncommitted edits are invisible to the index: if you changed this file, read the span directly.` + + `${ctx.asOf ? ` (as of ${ctx.asOf.slice(0, 12)})` : ""}. The index's outline of those lines ` + + `${OUTLINE_COLUMNS}:\n${declarationLines(ctx.declarations)}\n` + + `Read the ones you need, at most ${cap} lines at a time, or call loom_code_symbol ` + + `name= for one definition with its callers. ${READ_DIRECTLY}` + scopeSentence(ctx) ); } function denyReadText(ctx) { const { rel, lineCount } = ctx; - const outlineTokens = ctx.outlineTokens ?? estimateOutlineTokens(lineCount); return ( `loom-code-shunt: ${rel} is ${lineCount} lines and is in loom's code index` + - `${ctx.asOf ? ` (as of ${ctx.asOf.slice(0, 12)})` : ""}. Whole-file reads are the ` + - `expensive reflex — ask the index instead: loom code.outline path=${rel} ` + - `(declarations with line spans, ~${outlineTokens} tokens) to see what is in the file, ` + - `then Read only the span you need with offset/limit (targeted reads pass this hook) ` + - `or code.symbol (name → definition with path:line span). For a question use ` + - `code.search (question or path → ranked units); for an exact string code.grep ` + - `(hits arrive with their enclosing symbol). ` + - `Uncommitted edits are invisible to the index: if you changed this file, read the span directly.` + + `${ctx.asOf ? ` (as of ${ctx.asOf.slice(0, 12)})` : ""}. The index's outline of it ` + + `${OUTLINE_COLUMNS}:\n${declarationLines(ctx.declarations)}\n` + + `Read the lines you need (a ranged read passes this hook), or call loom_code_symbol ` + + `name= for one definition with its callers. ${READ_DIRECTLY}` + scopeSentence(ctx) ); } /** - * Classify a Grep call. `ctx` = {rel (of the search root), isFile, prefixes, pattern}. - * Returns {deny, reason} like classifyRead; a root outside the repo is - * `not_indexed` (the hook does not log it — nothing indexed was in play). + * Classify a Grep call. `ctx` = {rel (of the search root), isFile, prefixes, pattern, + * symbol, symbolBudgetSpent, answer}. Returns {deny, reason} like classifyRead; a + * root outside the repo is `not_indexed` (the hook does not log it — nothing + * indexed was in play). A symbol hit names `symbol`; its text carries `answer`, + * the index's definition (wholeSymbolAnswer), which the hook asks for and + * without which it lets the grep run. */ /** A Grep call with no output_mode that passes a line-only flag (`-n`, * `-A`, `-B`, `-C`, `context`): the caller wants matching lines. */ @@ -259,7 +292,7 @@ export function classifyGrep(ctx) { // A single-file grep for one symbol is a symbol lookup. if (ctx.symbol && underPrefixes(rel, prefixes)) { if (ctx.symbolBudgetSpent) return pass("symbol_grep_spent"); - return { deny: denySymbolGrepText(ctx), reason: "hit", symbol: ctx.symbol }; + return { deny: denySymbolGrepWithAnswer(ctx, ctx.answer || ""), reason: "hit", symbol: ctx.symbol }; } return pass("single_file_grep"); } @@ -284,10 +317,10 @@ export function localFirstOn(env = process.env) { return v === "on" || v === "true" || v === "1" || v === "yes"; } -/** The denial carries the index's answer. +/** The index's answer to "where is this symbol defined". * `result` is a code.symbol response; `asOf` the indexed commit the * session-start cache recorded (information, never a condition). "" when - * the index has no definition — the caller keeps the plain redirect. + * the index has no definition. * `localGrep` / `dirtyFiles`: the caller's own lines from named files it has * modified, the one thing the index cannot know. */ export function symbolAnswerText(result, { asOf = "", namespace = "", localGrep = "", dirtyFiles = [] } = {}) { @@ -309,6 +342,15 @@ export function symbolAnswerText(result, { asOf = "", namespace = "", localGrep return text; } +/** The symbol answer a refusal may carry, or "" when it is not whole: the + * index holds exactly one definition (several are a choice the caller's own + * grep settles), and the caller's lines from modified files all fit + * (`localGrep` is null when they do not). */ +export function wholeSymbolAnswer(result, opts = {}) { + const defs = Array.isArray(result?.definitions) ? result.definitions : []; + return defs.length === 1 && opts.localGrep !== null ? symbolAnswerText(result, opts) : ""; +} + /** The grep the model asked for, run by the hook over the named files the * caller has modified. `files` are the paths the model named; `grep` runs * directly, no shell, with the loom grep shim switched off so a shim on @@ -330,26 +372,26 @@ export function runLocalGrep(cwd, pattern, files, { exec = execFileSync, timeout }) || "", ); } catch { - return ""; // exit 1 = no match; anything else = the plain wording stands + return ""; // exit 1 = no match; anything else reads as no lines } } -/** The local grep's lines, capped, with the command and HEAD named. */ +/** The local grep's lines with the command and HEAD named; "" for no lines, + * null when they exceed `maxLines` or `maxChars`: a cut list is not the + * grep's answer, so the caller lets the grep run. */ export function localGrepText(output, { pattern = "", files = [], head = "", maxLines = 12, maxChars = 1500 } = {}) { const lines = String(output || "") .split("\n") .filter(Boolean); if (!lines.length) return ""; - const shown = lines.slice(0, maxLines); - let body = shown.join("\n"); - if (body.length > maxChars) body = body.slice(0, maxChars) + "…"; - const more = lines.length > shown.length ? `\n… ${lines.length - shown.length} more line(s)` : ""; + const body = lines.join("\n"); + if (lines.length > maxLines || body.length > maxChars) return null; const cmd = `grep -n ${JSON.stringify(String(pattern))} ${files.join(" ")}`.trim(); - return `${cmd}${head ? ` (HEAD ${String(head).slice(0, 9)})` : ""}:\n${body}${more}`; + return `${cmd}${head ? ` (HEAD ${String(head).slice(0, 9)})` : ""}:\n${body}`; } -/** The symbol-grep denial when the index answered: the answer first, the - * callers pointer, the scope — no round trip left for the model to make. */ +/** The symbol-grep denial: the index's answer first, the callers pointer, + * the scope — no round trip left for the model to make. */ export function denySymbolGrepWithAnswer(ctx, answer) { const { pattern, symbol } = ctx; return ( @@ -359,18 +401,6 @@ export function denySymbolGrepWithAnswer(ctx, answer) { ); } -function denySymbolGrepText(ctx) { - const { rel, pattern, symbol } = ctx; - return ( - `loom-code-shunt: ${JSON.stringify(String(pattern))} names a symbol — call ` + - `loom_code_symbol name=${JSON.stringify(String(symbol))} (the exact definition with path:line, ` + - `compiler tier where indexed; add uses_brief: true for its callers) instead of grepping ` + - `${rel}: a grep shows matching lines, not the definition. This grep passes on the next try; ` + - `grep for strings, or in your own uncommitted files, directly.` + - scopeSentence(ctx) - ); -} - // --------------------------------------------------------------------------- // A GitHub issue search from an indexed checkout is answered // by the tracker record first: asked "is this already reported?", a model diff --git a/integrations/codex-plugin/lib/repo-scope.mjs b/integrations/codex-plugin/lib/repo-scope.mjs index 0e91066bcc8..4b2cafce881 100644 --- a/integrations/codex-plugin/lib/repo-scope.mjs +++ b/integrations/codex-plugin/lib/repo-scope.mjs @@ -7,7 +7,9 @@ // {ts, indexed:true, org, namespace, repo, branch, prefixes, asOf, fetchedAt}. // A definite answer is trusted CACHE_TTL_MS; an unresolved one (the server // did not answer) UNRESOLVED_TTL_MS, then the next caller retries. +import fs from "node:fs"; import os from "node:os"; +import path from "node:path"; import { git, postBounded, resolveCodeRepo, resolveToken, shuntCachePath } from "./loom-client.mjs"; import { repoSlug } from "./code-shunt.mjs"; import { readPrivateFile, writeJsonFile } from "./tmp-state.mjs"; @@ -116,6 +118,22 @@ export function readCache(root, now = Date.now(), tmp = os.tmpdir()) { } } +/** True when the shared cache holds a fresh, definite answer that the + * checkout around `cwd` is not indexed. For a hook that runs after every + * shell command: the root is the nearest directory above `cwd` with a `.git` + * entry, found without starting git. Where git would name another root, or + * nothing has looked the checkout up yet, there is no entry and the answer + * is false. */ +export function cachedUnindexed(cwd, { now = Date.now(), tmp = os.tmpdir() } = {}) { + for (let dir = path.resolve(String(cwd || ".")); ; dir = path.dirname(dir)) { + if (fs.existsSync(path.join(dir, ".git"))) { + const entry = readCache(dir, now, tmp); + return Boolean(entry && !entry.indexed && !entry.unresolved); + } + if (dir === path.dirname(dir)) return false; + } +} + export function writeCache(root, entry, tmp = os.tmpdir()) { writeJsonFile(cachePathFor(root, tmp), entry); // tmp not writable: fine } diff --git a/integrations/codex-plugin/lib/shell-command.mjs b/integrations/codex-plugin/lib/shell-command.mjs index 6291eab390d..a2eeb0a4252 100644 --- a/integrations/codex-plugin/lib/shell-command.mjs +++ b/integrations/codex-plugin/lib/shell-command.mjs @@ -167,21 +167,16 @@ export function ghRepoSlug(value) { return m ? `${m[1]}/${m[2]}`.toLowerCase() : ""; } -/** A command line that may be a `&&` / `;` chain: the first segment that is a - * gh issue search, or null. Pipelines and redirects still disqualify a - * segment (their output is not a question), quotes are honoured. */ +/** The issue-search shape of a command that is one `gh` call, or null. A + * command of several parts is not judged (isCompoundCommand, or a `&` that + * starts a second command), and a redirect or an expansion disqualifies it + * (its output is not a question); quotes are honoured. */ export function ghIssueSearchInCommand(command) { - const c = String(command || ""); - if (!c.trim()) return null; - for (const seg of splitOutsideQuotes(c, LIST_SEPARATORS)) { - const s = seg.trim(); - if (!s) continue; - const bare = s.replace(/"(?:\\.|[^"\\])*"|'[^']*'/g, ""); - if (/[|>`$]/.test(bare)) continue; - const shape = ghIssueSearchShape(shTokens(s)); - if (shape) return shape; - } - return null; + const s = String(command || "").trim(); + if (!s || isCompoundCommand(s)) return null; + const bare = s.replace(/"(?:\\.|[^"\\])*"|'[^']*'/g, ""); + if (/[&>`$]/.test(bare)) return null; + return ghIssueSearchShape(shTokens(s.replace(/;\s*$/, ""))); } /** `awk '/re/…' files`, `sed -n '/re/p' file`, `git grep [-n] pattern files` @@ -220,7 +215,8 @@ export function patternSearchShape(cmd, t) { /** The span a shell read asks for: {kind:"read", file, offset, limit} — the * same shape Read(offset, limit) carries, so classifyRead judges both alike - * (limit null = to the end of the file). null when the command is not a + * (limit null = to the end of the file; a limit with no offset = the file's + * last `limit` lines, `tail -n N`). null when the command is not a * line-range read of one file (pattern-driven sed/awk, -c bytes, several * files, unknown flags with values). */ export function parseRangedShellRead(cmd, argv) { @@ -386,6 +382,14 @@ export function parseBashBulk(command) { /** A command's list separators: `;`, `&&`, `||` and newlines. */ const LIST_SEPARATORS = [";", "&&", "||", "\n"]; +/** True when a command has more than one part: a `;` / `&&` / `||` / newline + * list or a pipeline, outside quotes. The shunt never refuses one: a refusal + * withholds every part, and only one of them is the read it judged. */ +export function isCompoundCommand(command) { + const parts = splitOutsideQuotes(String(command || ""), [...LIST_SEPARATORS, "|"]); + return parts.filter((part) => part.trim()).length > 1; +} + /** `text` cut at each of `separators` that sits outside quotes; quotes are * kept in the pieces. Longer separators are tried first so `||` is not * read as two pipes. */ diff --git a/integrations/codex-plugin/lib/test-gate.mjs b/integrations/codex-plugin/lib/test-gate.mjs index 6a9521efd71..8b1ea2ebe66 100644 --- a/integrations/codex-plugin/lib/test-gate.mjs +++ b/integrations/codex-plugin/lib/test-gate.mjs @@ -1,7 +1,16 @@ -// Helpers for the loom-test-gate Stop hook (unit-tested). +// Helpers for the loom-test-gate hook (unit-tested). // -// When the agent is about to stop with uncommitted changes in a loom-indexed -// repo, ask `code.test_gate` what the change obliges: the tests that reach +// The gate names the tests a change obliges, from `code.test_gate`. By +// default it names them when the file is edited: the tool call that changed +// a file carries one line with the command of the tests the index links to +// it, or of the file itself when it is a test, or with the changed functions +// the index links no test to when it has no test to name; once per file per +// session (`adviceFiles`, `adviceLines`). +// +// At Stop it holds a session that ran no test since its last code change. +// When the agent is about to stop with uncommitted changes in a +// loom-indexed repo, it asks +// `code.test_gate` what the change obliges: the tests that reach // it (evidence-ordered, with a run command when derivable) and the touched // functions no test reaches. If either list is non-empty and this exact // change has not been gated yet this session, block the stop ONCE with a @@ -9,8 +18,14 @@ // in review. The second stop on the // same change passes: the agent has seen the obligation and either ran the // tests or chose not to, and a gate that nags is a gate that gets disabled. -// A stop whose transcript already answers the ask is not blocked at all -// (`runAnswered`): a block costs the session one more model request. +// A block costs the session one more model request, so by default any test +// run since the last write to a changed code file lets the stop pass before +// anything is asked (`testedSince`, `lastCodeChange`): which tests it ran +// and how they went is the agent's to +// judge, and a hook that reads shell text to decide it blocks sessions that +// ran them. With LOOM_TEST_GATE=block nothing is named at edit time and the +// stop passes only when the transcript shows the named tests ran on the tree +// as it stands (`runAnswered`). // // The change is the session's, not the tree's: `sessionScope` keeps only // the dirty paths the transcript shows this session edited or named in a @@ -21,10 +36,45 @@ import fs from "node:fs"; import path from "node:path"; -import { commandText, contentText, extractFiles, normalizeToolName, pathUnder } from "./loom-client.mjs"; +import { + commandText, + contentText, + DIFF_ARGS, + diffHeaders, + envSwitch, + extractFiles, + git, + gitToplevel, + normalizeToolName, + pathUnder, + postBounded, + resolveServerUrl, +} from "./loom-client.mjs"; +import { readSessionState, writeSessionState } from "./tmp-state.mjs"; +import { parseLines, readRange } from "./transcript.mjs"; const EDIT_TOOLS = new Set(["Edit", "Write", "MultiEdit", "NotebookEdit", "str_replace_editor", "apply_patch"]); +/** What the gate does, from LOOM_TEST_GATE: "advise" names an edited file's + * tests on the tool call that edited it and holds the stop of a session that + * ran no test since its last code change (unset, or any on-word); "block" names + * nothing and holds the stop until the named tests ran; "off" does neither. */ +export function gateMode(env = process.env) { + if ( + String(env.LOOM_TEST_GATE ?? "") + .trim() + .toLowerCase() === "block" + ) { + return "block"; + } + return envSwitch("LOOM_TEST_GATE", true, env) ? "advise" : "off"; +} + +/** The hops `code.test_gate` follows: LOOM_TEST_GATE_DEPTH, 1 to 3. */ +export function gateDepth(env = process.env) { + return Math.min(3, Math.max(1, Number(env.LOOM_TEST_GATE_DEPTH || 2))); +} + /** Stable signature of the change: sorted changed paths + the diff's hash. */ export function gateSignature(changedPaths, diffHash) { const paths = (changedPaths || []).map(String).filter(Boolean).sort(); @@ -62,18 +112,14 @@ export function renderGate(gate, { maxRuns = 4, maxNames = 4, python, testExists : []; const absent = new Set(missing); const tests = indexed.filter((t) => !absent.has(String(t.test_path || ""))); - const raw = [...new Set(tests.map((t) => String(t.run || "")).filter(Boolean))]; - const runs = onePytest(raw.slice(0, maxRuns)).map((r) => withPython(r, python)); + const { raw, text: runs } = runList(tests, { maxRuns, python }); const unknown = tests .filter((t) => !t.run) .map((t) => String(t.test_path || "")) .filter(Boolean); const untested = Array.isArray(gate.untested) ? gate.untested : []; const parts = []; - if (runs.length) { - const more = raw.length - maxRuns; - parts.push(`run: ${runs.join(" ; ")}${more > 0 ? ` (+${more} more)` : ""}`); - } + if (runs) parts.push(`run: ${runs}`); if (unknown.length) { const shown = unknown.slice(0, maxNames); const more = unknown.length - shown.length; @@ -85,15 +131,12 @@ export function renderGate(gate, { maxRuns = 4, maxNames = 4, python, testExists parts.push(`indexed tests not present in this checkout: ${shown.join(", ")}${more > 0 ? ` (+${more})` : ""}`); } if (untested.length) { - const names = [...new Set(untested.map((u) => short(u.qualified_name)))].filter(Boolean); - const shown = names.slice(0, maxNames); - const total = gate.untested_total || names.length; - const list = `${shown.join(", ")}${total > shown.length ? ` (+${total - shown.length})` : ""}`; + const { list, total } = untestedNames(gate, maxNames); // Beside tests to run, "no test reaches" reads as a fact about them, and // a test that builds an object reaches a constructor the graph holds no // edge to. parts.push( - runs.length || unknown.length + runs || unknown.length ? `the index links no test to: ${list} (the tests named here may still reach ${total > 1 ? "them" : "it"})` : `no test reaches: ${list}`, ); @@ -104,7 +147,7 @@ export function renderGate(gate, { maxRuns = 4, maxNames = 4, python, testExists // that went hunting for a runner. Say what the obligation actually is. const tail = missing.length ? "Run the available tests and check the missing paths against the indexed revision (deleted, renamed or different checkout); use current equivalent tests or say why not. Missing tests are not passes." - : runs.length || unknown.length + : runs || unknown.length ? "Run the tests before finishing, or say why not." : "Add a test that reaches it, or say why none is needed."; const env = @@ -116,6 +159,66 @@ export function renderGate(gate, { maxRuns = 4, maxNames = 4, python, testExists const isPytest = (run) => /^pytest(\s|$)/.test(String(run || "")); +/** The functions of a gate's `untested`, by short name: the first `maxNames` + * as `list`, with a count of the rest, and how many there are in `total`. */ +function untestedNames(gate, maxNames = 4) { + const untested = gate && Array.isArray(gate.untested) ? gate.untested : []; + const names = [...new Set(untested.map((u) => short(u.qualified_name)))].filter(Boolean); + const shown = names.slice(0, maxNames); + const total = (gate && gate.untested_total) || names.length; + const more = total > shown.length ? ` (+${total - shown.length})` : ""; + return { list: shown.length ? `${shown.join(", ")}${more}` : "", total }; +} + +/** The distinct run commands of `tests` (`raw`) and the first `maxRuns` of + * them as one text, "" when no test has one. */ +function runList(tests, { maxRuns, python }) { + const raw = [...new Set(tests.map((t) => String(t.run || "")).filter(Boolean))]; + const runs = onePytest(raw.slice(0, maxRuns)).map((r) => withPython(r, python)); + const more = raw.length - maxRuns; + return { raw, text: runs.length ? `${runs.join(" ; ")}${more > 0 ? ` (+${more} more)` : ""}` : "" }; +} + +/** + * The tests of a `code.test_gate` answer about `rel` alone that the + * edit-time line names: the ones the checkout has. For a source file they + * are the tests the index links to it; for a test file, the file itself. + * A file under a tests directory that no runner takes (a fixture, a + * conftest) is not a test to run for its own change. + */ +export function adviceTests(rel, gate, testExists) { + return (gate && Array.isArray(gate.tests) ? gate.tests : []).filter( + (t) => + t && t.test_path && (t.run || String(t.test_path) !== rel) && (!testExists || testExists(String(t.test_path))), + ); +} + +/** + * The edit-time line for `rel` from `tests` (see `adviceTests`): their + * commands, then the tests no runner is known for. With no test, it names + * `untested`, the changed functions the index links no test to, as the + * index's view: the graph is a floor, and the line has no reply in which the + * agent could say that a test does reach them. "" when there is neither. + */ +export function renderAdvice(rel, tests, { maxRuns = 4, maxNames = 4, python, untested = "" } = {}) { + const parts = [runList(tests, { maxRuns, python }).text].filter(Boolean); + const unknown = [...new Set(tests.filter((t) => !t.run).map((t) => String(t.test_path)))]; + if (unknown.length) { + const more = unknown.length - maxNames; + parts.push(`no known runner: ${unknown.slice(0, maxNames).join(", ")}${more > 0 ? ` (+${more})` : ""}`); + } + if (!parts.length && untested) parts.push(`the index links no test to ${untested}`); + return parts.length ? `Loom tests for ${rel}: ${parts.join(" · ")}` : ""; +} + +/** The tests of `tests` that `renderAdvice` prints: those of its first + * `maxRuns` commands and its first `maxNames` paths with no known runner. */ +export function printedTests(tests, { maxRuns = 4, maxNames = 4 } = {}) { + const runs = [...new Set(tests.map((t) => String(t.run || "")).filter(Boolean))].slice(0, maxRuns); + const paths = [...new Set(tests.filter((t) => !t.run).map((t) => String(t.test_path)))].slice(0, maxNames); + return tests.filter((t) => (t.run ? runs.includes(String(t.run)) : paths.includes(String(t.test_path)))); +} + /** `runs` with every `pytest ` folded into the first one: one command to * copy and one process to start. A run with an option or a second word stays * its own command. */ @@ -239,6 +342,20 @@ export function gatePayload(text) { return text ? { decision: "block", reason: text } : null; } +/** PostToolUse payload: additional context only, never a decision. */ +export function advicePayload(text) { + return text ? { hookSpecificOutput: { hookEventName: "PostToolUse", additionalContext: text } } : null; +} + +/** A predicate: is `testPath` a file of the checkout at `root`? A stale + * index row or another checkout's test is not. */ +export function testsIn(root) { + return (testPath) => { + const target = path.resolve(root, testPath); + return Boolean(pathUnder(root, target)) && isFile(target); + }; +} + /** `p` as a repo-relative posix path under `root` (resolved against `cwd` * when relative); "" when it lies outside the repo or `root` is unknown. */ function relativeToRoot(root, p, cwd) { @@ -339,6 +456,135 @@ export function writtenSince(root, paths, since) { }); } +// How much of a transcript's head is read for the session's first row. +const HEAD_BYTES = 64 * 1024; +// Files asked about for one tool call: a command that names more waits for +// the next call that names them. +const MAX_ADVICE_FILES = 4; + +/** + * The files a PostToolUse payload's tool call changed that this session has + * not been advised on, with the checkout root: the dirty paths its edit tool + * targeted or its shell command named, written since the session began. That + * is `sessionScope` and `writtenSince` over the one call, the rule the + * blocking gate applies to the whole transcript, so a command that only reads + * a file left dirty before the session names nothing. The hook runs after + * every shell command, so a call that cannot name an unasked dirty file (a + * path is named with its last segment) costs one git call, not two. + */ +export function adviceFiles(payload, { cwd, root = "" } = {}) { + const dirty = git(["diff", "--name-only", "-z", "HEAD"], root || cwd, { timeoutMs: 2000, raw: true }) + .split("\0") + .filter(Boolean); + const seen = dirty.length ? readSessionState("testadvice", payload.session_id).seen || {} : {}; + const text = `${commandText(payload.tool_input)}\n${extractFiles(payload.tool_input).join("\n")}`; + const unasked = dirty.filter((rel) => !seen[rel] && text.includes(rel.slice(rel.lastIndexOf("/") + 1))); + const top = unasked.length ? root || gitToplevel(cwd) : ""; + if (!top) return { root, files: [] }; + const call = { type: "tool_use", name: payload.tool_name, input: payload.tool_input }; + const named = sessionScope(unasked, [{ type: "assistant", message: { content: [call] } }], { root: top, cwd }); + const head = named.length && payload.transcript_path ? readRange(payload.transcript_path, 0, HEAD_BYTES) : ""; + const files = writtenSince(top, named, sessionStart(parseLines(head.toString()))).slice(0, MAX_ADVICE_FILES); + return { root: top, files }; +} + +/** `map` without its oldest keys beyond `max`. */ +function newest(map, max = 300) { + const keys = Object.keys(map); + for (const k of keys.slice(0, Math.max(0, keys.length - max))) delete map[k]; + return map; +} + +/** Adds `keys` to the session's test-advice map `field` (`seen`: files asked + * about; `retried`: files to ask about once more; `named`: tests a line + * named). The state is read and written here + * with nothing between, not locked: two hooks of one session that write in + * the same instant (parallel tool calls) keep one's entries, and the other's + * file is then asked about twice or its test named twice. */ +function remember(sessionId, field, keys) { + const state = readSessionState("testadvice", sessionId); + const map = { ...state[field] }; + for (const key of keys) map[key] = Date.now(); + writeSessionState("testadvice", sessionId, { ...state, [field]: newest(map) }); +} + +/** + * The edit-time lines for `files` (from `adviceFiles`), as `{ rel, text, + * tests }` for each file that has one: `tests` counts the tests `text` names, + * 0 when it names the functions the index links no test to. Each file is + * asked about once per session, at its first change, so a function changed + * later in the same file is not asked about. A file the server gave no + * answer for is asked about once more, at the next call that names it, so a + * server that is down costs a session two bounded requests per file and not + * one per tool call. A file whose change is comments only is not asked + * about and stays unasked: it owes no test until it changes code. A test is + * named once per session: the test file a session edits after the source + * file it tests adds no second line with the same command. A test the call's + * own command runs is not named (`runsHere`): the line would arrive on the + * result of that run. Only the diff's paths, hunk ranges and function + * names are sent (`diffHeaders`). + */ +export async function adviceLines(payload, files, { root, repo, token, depth = gateDepth() } = {}) { + const asked = files + .map((rel) => [ + rel, + git(["diff", ...DIFF_ARGS, "--unified=0", "HEAD", "--", rel], root, { timeoutMs: 2000, raw: true }), + ]) + .filter(([, diff]) => !commentOnlyDiff(diff)); + if (!asked.length) return []; + const gates = await Promise.all( + asked.map(([rel, diff]) => + postBounded( + "code.test_gate", + { + org: repo.org, + namespace: repo.namespace, + files: [rel], + diff: diffHeaders(diff, 200_000), + depth, + consumer: "claude-code-testgate", + }, + { token, serverUrl: resolveServerUrl() }, + ), + ), + ); + const state = readSessionState("testadvice", payload.session_id); + const rels = asked.map(([rel]) => rel); + // No answer (a timeout, a 5xx): the file stays unasked for one more call that names it. + const again = rels.filter((rel, i) => !gates[i] && !(state.retried || {})[rel]); + if (again.length) remember(payload.session_id, "retried", again); + if (again.length < rels.length) { + remember( + payload.session_id, + "seen", + rels.filter((rel) => !again.includes(rel)), + ); + } + const named = { ...state.named }; + const command = commandText(payload.tool_input); + const testExists = testsIn(root); + let python; + const lines = []; + const printed = []; + for (const [i, [rel]] of asked.entries()) { + const tests = adviceTests(rel, gates[i], testExists); + const fresh = tests.filter((t) => !named[t.test_path] && !(t.run && runsHere(command, String(t.run)))); + if (python === undefined && fresh.some((t) => isPytest(t.run))) python = checkoutPython(root); + // Functions are named only for a file with no test to run in this checkout. + const untested = tests.length ? "" : untestedNames(gates[i]).list; + const text = renderAdvice(rel, fresh, { python, untested }); + if (!text) continue; + // A test folded into "(+N more)" was not shown, so its own change still names it. + for (const t of printedTests(fresh)) { + named[t.test_path] = Date.now(); + printed.push(t.test_path); + } + lines.push({ rel, text, tests: fresh.length }); + } + if (printed.length) remember(payload.session_id, "named", printed); + return lines; +} + // The prompt's last sentence, whole: "Do not run the test suite.", "Please // don't run any tests". A sentence that says more (`do not run // tests/test_slow.py`, "If lint fails, do not run the tests.") or that is not @@ -373,6 +619,106 @@ const ELSEWHERE = /\b(?:ssh|docker|podman|kubectl)\s/; /** True when `head`, a command's text up to a pytest run, shows the run * started in this checkout. */ const ranHere = (head) => !ELSEWHERE.test(head) && LAUNCHER.test(head.split(/[;&|(\n]/).pop()); +/** True when `command` runs `run`, a test's whole command, in this checkout: + * `pytest tests/test_a.py::test_one` runs one test of the file, and `echo + * "pytest tests/test_a.py"` and `docker exec app pytest tests/test_a.py` run + * nothing here. */ +function runsHere(command, run) { + const at = command.indexOf(run); + return at >= 0 && /^(?:[\s;|&)]|$)/.test(command.slice(at + run.length)) && ranHere(command.slice(0, at)); +} + +// A shell command that starts a test runner, wrapped or piped in any way: a +// program `code.test_gate` names a run with or a common other one, or a +// build tool with an argument in which `test` or `tests` follows no letter +// and no lower-case letter follows it (`make test-unit`, `npm run test`, +// `node --test`, `gradle :app:test`, `gradlew testDebugUnitTest`). `import +// pytest`, `pip install pytest`, `pytest.raises`, `npm install x@latest`, +// `npm install @testing-library/react` and `node scripts/attest.js` are not +// runs. A command that only mentions a runner counts: what is read is +// whether the session ran a test at all. +const RUNNER = + /(? name === "exec" || normalizeToolName(name) === "Bash"; + +/** The command text of a Codex rollout's shell call: its `arguments` JSON + * holds a string or an argv (`["go","test"]`), whose words no space joins. */ +function rolloutCommand(call) { + let input = call.input ?? call.arguments; + if (typeof input === "string") { + try { + input = JSON.parse(input); + } catch { + return input; + } + } + return commandText(input) || (typeof input === "string" ? input : ""); +} + +/** + * True when the transcript holds a shell command that starts a test runner + * (`RUNNER`) and finished at or after `since` (epoch ms), or has no dated + * result: Claude Code rows and Codex rollout calls, sidechains skipped. Its + * output is not read, so a run that failed, was piped into `grep` or ran + * between `git stash` and `git stash pop` counts. + */ +export function testedSince(objs, since) { + const done = new Map(); + const runs = []; + for (const o of objs || []) { + const at = Date.parse((o && o.timestamp) || ""); + if (o?.type === "response_item") { + const call = o.payload || {}; + if (/_output$/.test(call.type)) done.set(call.call_id, at); + else if (rolloutShell(call.name) && RUNNER.test(rolloutCommand(call))) { + runs.push(call.call_id); + } + continue; + } + const content = o && !o.isSidechain && o.message && o.message.content; + for (const b of Array.isArray(content) ? content : []) { + if (o.type === "user" && b?.type === "tool_result") done.set(b.tool_use_id, at); + else if ( + o.type === "assistant" && + b?.type === "tool_use" && + ["Bash", "PowerShell"].includes(normalizeToolName(b.name)) && + RUNNER.test(commandText(b.input)) + ) { + runs.push(b.id); + } + } + } + return runs.some((id) => !(done.get(id) < since)); +} + +// Documentation and prose by name: a test run answers no change to one. +// `CMakeLists.txt` and a requirements file are code. +const PROSE = /\.(?:md|mdx|rst|txt|adoc)$/i; +const CHANGELOG = /(?:^|\/)(?:CHANGELOG|CHANGES|HISTORY|NEWS)$/; +const CODE_TXT = /(?:^|\/)(?:CMakeLists|[^/]*requirements[^/]*)\.txt$/i; +const isProse = (file) => CHANGELOG.test(file) || (PROSE.test(file) && !CODE_TXT.test(file)); + +/** The newest modification time, in epoch ms, among the code files of + * `files` under `root`: a test run that finished since then saw each of + * them as it stands. A documentation or prose file (`isProse`) is left out, + * so an edit to one after the run holds no stop, and so is a file that + * cannot be read (a deleted one). 0 when none is left. */ +export function lastCodeChange(root, files) { + let last = 0; + for (const file of files) { + if (isProse(file)) continue; + try { + last = Math.max(last, fs.statSync(path.join(root, file)).mtimeMs); + } catch { + // A deleted file has no time of its own. + } + } + return last; +} + // pytest's last line, whose order is fixed: failed, passed, skipped, // deselected, xfailed, xpassed, warnings, errors. A whole line starts at // "failed" or "passed" and names nothing deselected, so a -k subset is not diff --git a/sdk/python/loom/memory.py b/sdk/python/loom/memory.py index de63f1b0af6..549e79ad165 100644 --- a/sdk/python/loom/memory.py +++ b/sdk/python/loom/memory.py @@ -398,13 +398,19 @@ class MemorySearchHit: # the number to threshold on. similarity: float = 0.0 namespace: str = "" - # The hit's worst link to code ('' when it names no indexed code): `fresh`, - # `moved`, `changed` (check the code before relying on it), `unresolved` (gone - # where it was, maybe renamed) or `missing`. + # The hit's worst link to code, compared with the repository's indexed head + # (not the caller's checkout): `fresh`, `moved`, `changed` (check the code + # before relying on it), `unresolved` (gone where it was, maybe renamed) or + # `missing`. `unlinked` for a hit that shows no link and whose text names a + # file by its path: the search has no comparison with code for it. '' when + # it names none. code_state: str = "" # The commit that put `code_state` at `changed`, `unresolved` or `missing`; '' # for any other state, and when no commit is known. code_changed_since: str = field(default="", kw_only=True) + # The commit the hit's worst link was anchored at: the repository's indexed + # head when the memory was linked or last re-anchored. '' with no link. + code_rev: str = field(default="", kw_only=True) # The hit's links whose code is now at another path or symbol than the memory # was written against: each names where it is (`path`, `symbol`, `start_line`, # `end_line`) and what the text still calls it (`was_path`, `was_symbol`). @@ -630,6 +636,7 @@ def _parse_search_hit(r: dict[str, Any]) -> MemorySearchHit: namespace=str(r.get("namespace") or ""), code_state=str(r.get("code_state") or ""), code_changed_since=str(r.get("code_changed_since") or ""), + code_rev=str(r.get("code_rev") or ""), code_moved=list(r.get("code_moved") or []), rank_score=float(r.get("rank_score") or 0.0), below_threshold=bool(r.get("below_threshold") or False), diff --git a/sdk/python/loom/ops.py b/sdk/python/loom/ops.py index 8f6a3874855..3d16c65c8b9 100644 --- a/sdk/python/loom/ops.py +++ b/sdk/python/loom/ops.py @@ -13042,9 +13042,12 @@ class MemorySearchHit(TypedDict, total=False): created_at: NotRequired[str] namespace: NotRequired[str] code_state: NotRequired[ - Union[Literal["fresh", "moved", "changed", "unresolved", "missing"], Literal[""]] + Union[ + Literal["fresh", "moved", "changed", "unresolved", "missing"], Literal["unlinked", ""] + ] ] code_changed_since: NotRequired[str] + code_rev: NotRequired[str] code_moved: NotRequired[list["CodeLink"]] body_truncated: NotRequired[bool] next: NotRequired[str] @@ -16015,6 +16018,7 @@ class MemorySearchBody(TypedDict, total=False): class MemorySearchOutput(TypedDict, total=False): results: Required[list["MemorySearchHit"]] + code_note: NotRequired[str] reader_block: NotRequired[str] reader_instructions: NotRequired[str] bodies_returned: NotRequired[int] diff --git a/sdk/rust/src/models.rs b/sdk/rust/src/models.rs index 7c1d7831658..e88fccc064f 100644 --- a/sdk/rust/src/models.rs +++ b/sdk/rust/src/models.rs @@ -160,6 +160,10 @@ pub struct SearchHit { /// other state, and when no commit is known. #[serde(default)] pub code_changed_since: String, + /// The commit the hit's worst link was anchored at: the repository's indexed head + /// when the memory was linked or last re-anchored; empty for a hit with no link. + #[serde(default)] + pub code_rev: String, /// The hit's links whose code is now at another path or symbol than the memory was /// written against, each with where it is and what the text still calls it /// (`was_path`, `was_symbol`); empty for nearly every hit. diff --git a/sdk/rust/src/wire_models.rs b/sdk/rust/src/wire_models.rs index ec89f0c2a11..55d1ac43899 100644 --- a/sdk/rust/src/wire_models.rs +++ b/sdk/rust/src/wire_models.rs @@ -3566,30 +3566,32 @@ pub struct MemorySearchHit { #[serde(default = "default_90")] pub code_changed_since: String, #[serde(default = "default_91")] - pub code_moved: Vec, + pub code_rev: String, #[serde(default = "default_92")] - pub body_truncated: bool, + pub code_moved: Vec, #[serde(default = "default_93")] - pub next: String, + pub body_truncated: bool, #[serde(default = "default_94")] - pub source_resource_id: String, + pub next: String, #[serde(default = "default_95")] - pub source_class: String, + pub source_resource_id: String, #[serde(default = "default_96")] - pub verified: bool, + pub source_class: String, #[serde(default = "default_97")] - pub explanation: String, + pub verified: bool, #[serde(default = "default_98")] - pub session_id: String, + pub explanation: String, #[serde(default = "default_99")] - pub speaker: String, + pub session_id: String, #[serde(default = "default_100")] - pub about_other: bool, + pub speaker: String, #[serde(default = "default_101")] - pub derived_from: Vec, + pub about_other: bool, #[serde(default = "default_102")] - pub score_components: std::collections::HashMap, + pub derived_from: Vec, #[serde(default = "default_103")] + pub score_components: std::collections::HashMap, + #[serde(default = "default_104")] pub resolved_from: Option, } @@ -3597,88 +3599,90 @@ pub struct MemorySearchHit { #[non_exhaustive] pub struct MemorySearchOutput { pub results: Vec, - #[serde(default = "default_104")] - pub reader_block: String, #[serde(default = "default_105")] - pub reader_instructions: String, + pub code_note: String, #[serde(default = "default_106")] - pub bodies_returned: Integer, + pub reader_block: String, #[serde(default = "default_107")] - pub bodies_elided: Integer, + pub reader_instructions: String, #[serde(default = "default_108")] - pub tokens_returned: Integer, + pub bodies_returned: Integer, #[serde(default = "default_109")] - pub namespaces_searched: Vec, + pub bodies_elided: Integer, #[serde(default = "default_110")] - pub namespaces_skipped: Vec, + pub tokens_returned: Integer, #[serde(default = "default_111")] - pub candidates_total: u64, + pub namespaces_searched: Vec, #[serde(default = "default_112")] - pub stale_dropped: Integer, + pub namespaces_skipped: Vec, #[serde(default = "default_113")] - pub next_page: String, + pub candidates_total: u64, #[serde(default = "default_114")] - pub page_offset: Integer, + pub stale_dropped: Integer, #[serde(default = "default_115")] + pub next_page: String, + #[serde(default = "default_116")] + pub page_offset: Integer, + #[serde(default = "default_117")] pub chunk_share: f64, pub embedding_model: String, - #[serde(default = "default_116")] + #[serde(default = "default_118")] pub next: String, - #[serde(default = "default_117")] + #[serde(default = "default_119")] pub scratchpad: String, - #[serde(default = "default_118")] + #[serde(default = "default_120")] pub scratchpad_blocks: Integer, - #[serde(default = "default_119")] + #[serde(default = "default_121")] pub reinforcement: Option, - #[serde(default = "default_120")] + #[serde(default = "default_122")] pub graph_seeds: Integer, - #[serde(default = "default_121")] + #[serde(default = "default_123")] pub graph_neighbors_added: Integer, - #[serde(default = "default_122")] + #[serde(default = "default_124")] pub triples_extracted_from_query: Integer, - #[serde(default = "default_123")] + #[serde(default = "default_125")] pub triples_matched: Integer, - #[serde(default = "default_124")] + #[serde(default = "default_126")] pub set_expansion_phrases: Integer, - #[serde(default = "default_125")] + #[serde(default = "default_127")] pub top_k_ceiling: Integer, - #[serde(default = "default_126")] + #[serde(default = "default_128")] pub abstain: bool, - #[serde(default = "default_127")] + #[serde(default = "default_129")] pub abstain_reason: String, - #[serde(default = "default_128")] + #[serde(default = "default_130")] pub abstain_code: String, - #[serde(default = "default_129")] + #[serde(default = "default_131")] pub degraded: Vec, - #[serde(default = "default_130")] + #[serde(default = "default_132")] pub recipe: String, - #[serde(default = "default_131")] + #[serde(default = "default_133")] pub score_explanation: String, - #[serde(default = "default_132")] + #[serde(default = "default_134")] pub retrieval_confidence: f64, - #[serde(default = "default_133")] + #[serde(default = "default_135")] pub retrieval_risk: String, - #[serde(default = "default_134")] + #[serde(default = "default_136")] pub term_leg: String, - #[serde(default = "default_135")] + #[serde(default = "default_137")] pub route_agreement: f64, - #[serde(default = "default_136")] + #[serde(default = "default_138")] pub calibration_explanation: String, - #[serde(default = "default_137")] + #[serde(default = "default_139")] pub fallback_rounds_used: Integer, - #[serde(default = "default_138")] + #[serde(default = "default_140")] pub fallback_budget_exhausted: bool, - #[serde(default = "default_139")] + #[serde(default = "default_141")] pub fallback_elapsed_ms: Integer, - #[serde(default = "default_140")] + #[serde(default = "default_142")] pub retrieval_plan: String, - #[serde(default = "default_141")] + #[serde(default = "default_143")] pub retrieval_cost_estimate: std::collections::HashMap, - #[serde(default = "default_142")] + #[serde(default = "default_144")] pub retrieval_work: std::collections::HashMap, - #[serde(default = "default_143")] + #[serde(default = "default_145")] pub pending_extraction: u64, - #[serde(default = "default_144")] + #[serde(default = "default_146")] pub derived_aggregate: Option>, } @@ -4794,15 +4798,15 @@ impl MemorySearchInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemorySetPeer { - #[serde(default = "default_156")] + #[serde(default = "default_158")] pub memory_id: String, - #[serde(default = "default_157")] + #[serde(default = "default_159")] pub memory_key: String, - #[serde(default = "default_158")] + #[serde(default = "default_160")] pub excerpt: String, - #[serde(default = "default_159")] + #[serde(default = "default_161")] pub valid_at: Option, - #[serde(default = "default_160")] + #[serde(default = "default_162")] pub similarity: f64, } @@ -4810,39 +4814,39 @@ pub struct MemorySetPeer { #[non_exhaustive] pub struct MemorySetOutput { pub version: u64, - #[serde(default = "default_145")] + #[serde(default = "default_147")] pub pinned: bool, - #[serde(default = "default_146")] + #[serde(default = "default_148")] pub memory_id: String, - #[serde(default = "default_147")] + #[serde(default = "default_149")] pub content_sha256: String, - #[serde(default = "default_148")] + #[serde(default = "default_150")] pub status: String, - #[serde(default = "default_149")] + #[serde(default = "default_151")] pub duplicate_of: String, - #[serde(default = "default_150")] + #[serde(default = "default_152")] pub namespace: String, - #[serde(default = "default_151")] + #[serde(default = "default_153")] pub memory_key: String, - #[serde(default = "default_152")] + #[serde(default = "default_154")] pub merged_into_key: String, - #[serde(default = "default_153")] + #[serde(default = "default_155")] pub degraded: Vec, - #[serde(default = "default_154")] + #[serde(default = "default_156")] pub retyped_from: String, - #[serde(default = "default_155")] + #[serde(default = "default_157")] pub conflict_verdict: String, - #[serde(default = "default_161")] + #[serde(default = "default_163")] pub peers: Vec, - #[serde(default = "default_162")] + #[serde(default = "default_164")] pub next: String, - #[serde(default = "default_163")] + #[serde(default = "default_165")] pub noop: bool, - #[serde(default = "default_164")] + #[serde(default = "default_166")] pub dry_run: bool, - #[serde(default = "default_165")] + #[serde(default = "default_167")] pub advisories: Vec, - #[serde(default = "default_166")] + #[serde(default = "default_168")] pub chunks_written: Integer, } @@ -5250,24 +5254,24 @@ pub struct OpCapability { pub budget_p99_ms: Integer, pub idempotent: bool, pub audit: bool, - #[serde(default = "default_169")] + #[serde(default = "default_171")] pub request_fields: Vec, - #[serde(default = "default_170")] + #[serde(default = "default_172")] pub response_fields: Vec, - #[serde(default = "default_171")] + #[serde(default = "default_173")] pub toolsets: Vec, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct OpsCapabilitiesOutput { - #[serde(default = "default_167")] + #[serde(default = "default_169")] pub build_commit: String, - #[serde(default = "default_168")] + #[serde(default = "default_170")] pub schema_version: String, - #[serde(default = "default_172")] + #[serde(default = "default_174")] pub ops: Vec, - #[serde(default = "default_173")] + #[serde(default = "default_175")] pub consumer_field: String, } @@ -5332,11 +5336,11 @@ pub enum OpsHealthCheckStatus { pub struct OpsHealthCheck { pub name: String, pub status: OpsHealthCheckStatus, - #[serde(default = "default_174")] + #[serde(default = "default_176")] pub detail: String, - #[serde(default = "default_175")] + #[serde(default = "default_177")] pub data: std::collections::HashMap, - #[serde(default = "default_176")] + #[serde(default = "default_178")] pub repair: String, } @@ -5355,7 +5359,7 @@ pub enum OpsHealthOutputOverall { #[non_exhaustive] pub struct OpsHealthOutput { pub checks: Vec, - #[serde(default = "default_177")] + #[serde(default = "default_179")] pub worker_status: std::collections::HashMap>, pub overall: OpsHealthOutputOverall, } @@ -5415,9 +5419,9 @@ pub struct UserNamespaceGrant { pub namespace: String, pub role: String, pub is_owner: bool, - #[serde(default = "default_178")] + #[serde(default = "default_180")] pub granted_at: Option, - #[serde(default = "default_179")] + #[serde(default = "default_181")] pub pending_role: Option, } @@ -5428,9 +5432,9 @@ pub struct UserSummary { pub contact_email: String, pub grants: Vec, pub is_platform_admin: bool, - #[serde(default = "default_180")] + #[serde(default = "default_182")] pub last_active: Option, - #[serde(default = "default_181")] + #[serde(default = "default_183")] pub has_password_auth: bool, } @@ -5439,9 +5443,9 @@ pub struct UserSummary { pub struct AdminUsersOutput { pub users: Vec, pub total: Integer, - #[serde(default = "default_182")] + #[serde(default = "default_184")] pub total_pending_elevations: Integer, - #[serde(default = "default_183")] + #[serde(default = "default_185")] pub total_active_last_7d: Integer, pub platform_admins_configured: Vec, } @@ -5526,7 +5530,7 @@ pub struct ConnectedAgent { pub ops: Integer, pub namespaces_touched: Integer, pub primary_namespace: String, - #[serde(default = "default_184")] + #[serde(default = "default_186")] pub cost_usd: f64, } @@ -5535,7 +5539,7 @@ pub struct ConnectedAgent { pub struct AgentsConnectedOutput { pub rows: Vec, pub window_hours: Integer, - #[serde(default = "default_185")] + #[serde(default = "default_187")] pub new_count: Option, } @@ -5630,32 +5634,32 @@ pub enum AssistantCitationKind { pub struct AssistantCitation { pub kind: AssistantCitationKind, pub text: String, - #[serde(default = "default_190")] + #[serde(default = "default_192")] pub verified: bool, - #[serde(default = "default_191")] + #[serde(default = "default_193")] pub reason: String, - #[serde(rename = "ref", default = "default_192")] + #[serde(rename = "ref", default = "default_194")] pub r#ref: String, - #[serde(default = "default_193")] + #[serde(default = "default_195")] pub anchor: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct AssistantAskOutput { - #[serde(default = "default_186")] + #[serde(default = "default_188")] pub mirrored: bool, - #[serde(default = "default_187")] + #[serde(default = "default_189")] pub answer: String, - #[serde(default = "default_188")] + #[serde(default = "default_190")] pub run_id: String, - #[serde(default = "default_189")] + #[serde(default = "default_191")] pub model: String, - #[serde(default = "default_194")] + #[serde(default = "default_196")] pub citations: Vec, - #[serde(default = "default_195")] + #[serde(default = "default_197")] pub support: String, - #[serde(default = "default_196")] + #[serde(default = "default_198")] pub unknown_names: Vec, } @@ -5793,7 +5797,7 @@ pub struct AuditListRow { #[non_exhaustive] pub struct AuditListOutput { pub rows: Vec, - #[serde(default = "default_197")] + #[serde(default = "default_199")] pub next_cursor: Option, } @@ -5922,11 +5926,11 @@ impl AuditListInput { pub struct BlacklistAddOutput { pub pattern_id: String, pub created_at: String, - #[serde(default = "default_198")] + #[serde(default = "default_200")] pub swept: Integer, - #[serde(default = "default_199")] + #[serde(default = "default_201")] pub swept_truncated: bool, - #[serde(default = "default_200")] + #[serde(default = "default_202")] pub sweep_error: String, } @@ -6079,7 +6083,7 @@ pub struct BlacklistRow { pub reason: String, pub created_by: String, pub hit_count: Integer, - #[serde(default = "default_201")] + #[serde(default = "default_203")] pub last_hit_at: Option, pub created_at: String, } @@ -6176,7 +6180,7 @@ impl BlacklistListInput { #[non_exhaustive] pub struct BlacklistRemoveOutput { pub removed: bool, - #[serde(default = "default_202")] + #[serde(default = "default_204")] pub removed_at: Option, } @@ -6240,7 +6244,7 @@ pub struct BlacklistSweepOutput { pub matched: Integer, pub tombstoned: Integer, pub truncated: bool, - #[serde(default = "default_203")] + #[serde(default = "default_205")] pub error: String, } @@ -6290,7 +6294,7 @@ impl BlacklistSweepInput { #[non_exhaustive] pub struct CalibrationGetOutput { pub source: String, - #[serde(default = "default_204")] + #[serde(default = "default_206")] pub embedder_model: String, pub noise_floor: f64, pub rerank_skip_above: f64, @@ -6299,21 +6303,21 @@ pub struct CalibrationGetOutput { pub abstain_threshold: f64, pub conflict_threshold: f64, pub duplicate_threshold: f64, - #[serde(default = "default_205")] + #[serde(default = "default_207")] pub similar_p10: f64, - #[serde(default = "default_206")] + #[serde(default = "default_208")] pub similar_p25: f64, - #[serde(default = "default_207")] + #[serde(default = "default_209")] pub similar_p50: f64, - #[serde(default = "default_208")] + #[serde(default = "default_210")] pub similar_p75: f64, - #[serde(default = "default_209")] + #[serde(default = "default_211")] pub distractor_p50: f64, - #[serde(default = "default_210")] + #[serde(default = "default_212")] pub distractor_p90: f64, - #[serde(default = "default_211")] + #[serde(default = "default_213")] pub similar_pairs_n: Integer, - #[serde(default = "default_212")] + #[serde(default = "default_214")] pub distractor_pairs_n: Integer, } @@ -6389,40 +6393,40 @@ pub enum CodeAskOutputSource { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeAskOutput { - #[serde(default = "default_213")] + #[serde(default = "default_215")] pub answer: String, - #[serde(default = "default_214")] + #[serde(default = "default_216")] pub partial: bool, - #[serde(default = "default_215")] + #[serde(default = "default_217")] pub partial_reason: String, - #[serde(default = "default_216")] + #[serde(default = "default_218")] pub note: String, - #[serde(default = "default_217")] + #[serde(default = "default_219")] pub coverage: CodeAskOutputCoverage, - #[serde(default = "default_218")] + #[serde(default = "default_220")] pub citations: Vec>, pub source: CodeAskOutputSource, - #[serde(default = "default_219")] + #[serde(default = "default_221")] pub cache_similarity: f64, - #[serde(default = "default_220")] + #[serde(default = "default_222")] pub cache: String, - #[serde(default = "default_221")] + #[serde(default = "default_223")] pub cache_saved_ms: Integer, - #[serde(default = "default_222")] + #[serde(default = "default_224")] pub cache_saved_usd: f64, - #[serde(default = "default_223")] + #[serde(default = "default_225")] pub abstain: bool, - #[serde(default = "default_224")] + #[serde(default = "default_226")] pub abstain_reason: String, - #[serde(default = "default_225")] + #[serde(default = "default_227")] pub retrieval_confidence: f64, - #[serde(default = "default_226")] + #[serde(default = "default_228")] pub tokens_returned: Integer, - #[serde(default = "default_227")] + #[serde(default = "default_229")] pub context_tokens: Integer, - #[serde(default = "default_228")] + #[serde(default = "default_230")] pub trace_run_id: String, - #[serde(default = "default_229")] + #[serde(default = "default_231")] pub as_of: std::collections::HashMap, } @@ -6552,37 +6556,37 @@ impl CodeAskInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeBackportGapOutput { - #[serde(default = "default_230")] + #[serde(default = "default_232")] pub skipped_branches: Vec>, - #[serde(default = "default_231")] + #[serde(default = "default_233")] pub verdict: String, - #[serde(default = "default_232")] + #[serde(default = "default_234")] pub causes: Vec, - #[serde(default = "default_233")] + #[serde(default = "default_235")] pub fix: std::collections::HashMap, - #[serde(default = "default_234")] + #[serde(default = "default_236")] pub issue: std::collections::HashMap, - #[serde(default = "default_235")] + #[serde(default = "default_237")] pub fixes: Vec>, - #[serde(default = "default_236")] + #[serde(default = "default_238")] pub symbols: Vec, - #[serde(default = "default_237")] + #[serde(default = "default_239")] pub files: Vec, - #[serde(default = "default_238")] + #[serde(default = "default_240")] pub branches: Vec>, - #[serde(default = "default_239")] + #[serde(default = "default_241")] pub summary: std::collections::HashMap>, - #[serde(default = "default_240")] + #[serde(default = "default_242")] pub fix_candidate: Option>, - #[serde(default = "default_241")] + #[serde(default = "default_243")] pub tracker_namespace: String, - #[serde(default = "default_242")] + #[serde(default = "default_244")] pub tracker_unavailable: bool, - #[serde(default = "default_243")] + #[serde(default = "default_245")] pub ms: Integer, - #[serde(default = "default_244")] + #[serde(default = "default_246")] pub stage_ms: std::collections::HashMap, - #[serde(default = "default_245")] + #[serde(default = "default_247")] pub trace_run_id: String, } @@ -6733,32 +6737,32 @@ impl CodeBackportGapInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeBackportGapsOutput { - #[serde(default = "default_246")] + #[serde(default = "default_248")] pub skipped_branches: Vec>, - #[serde(default = "default_247")] + #[serde(default = "default_249")] pub branch: String, - #[serde(default = "default_248")] + #[serde(default = "default_250")] pub branch_namespace: String, - #[serde(default = "default_249")] + #[serde(default = "default_251")] pub branches: Vec, - #[serde(default = "default_250")] + #[serde(default = "default_252")] pub rows: Vec>, - #[serde(default = "default_251")] + #[serde(default = "default_253")] pub counts: std::collections::HashMap, - #[serde(default = "default_252")] + #[serde(default = "default_254")] pub counts_by_branch: std::collections::HashMap>, - #[serde(default = "default_253")] + #[serde(default = "default_255")] pub fixes: Integer, - #[serde(default = "default_254")] + #[serde(default = "default_256")] pub wanted_only: bool, - #[serde(default = "default_255")] + #[serde(default = "default_257")] pub since: String, - #[serde(default = "default_256")] + #[serde(default = "default_258")] pub computed: std::collections::HashMap, - #[serde(default = "default_257")] + #[serde(default = "default_259")] pub stale: bool, - #[serde(default = "default_258")] + #[serde(default = "default_260")] pub ms: Integer, } @@ -6887,75 +6891,75 @@ impl CodeBackportGapsInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeBisectCandidatesOutput { - #[serde(default = "default_259")] + #[serde(default = "default_261")] pub verdict: String, - #[serde(default = "default_260")] + #[serde(default = "default_262")] pub candidates_from: String, - #[serde(default = "default_261")] + #[serde(default = "default_263")] pub causes: Vec, - #[serde(default = "default_262")] + #[serde(default = "default_264")] pub epistemic: String, - #[serde(default = "default_263")] + #[serde(default = "default_265")] pub candidates: Vec>, - #[serde(default = "default_264")] + #[serde(default = "default_266")] pub marks: std::collections::HashMap, - #[serde(default = "default_265")] + #[serde(default = "default_267")] pub named_by_graph: Vec, - #[serde(default = "default_266")] + #[serde(default = "default_268")] pub fix_blame: std::collections::HashMap, - #[serde(default = "default_267")] + #[serde(default = "default_269")] pub fusion: std::collections::HashMap, - #[serde(default = "default_268")] + #[serde(default = "default_270")] pub patterns: Vec, - #[serde(default = "default_269")] + #[serde(default = "default_271")] pub pattern_weights: std::collections::HashMap, - #[serde(default = "default_270")] + #[serde(default = "default_272")] pub scope: String, - #[serde(default = "default_271")] + #[serde(default = "default_273")] pub widened_by: Vec, - #[serde(default = "default_272")] + #[serde(default = "default_274")] pub dupcheck_fix: std::collections::HashMap, - #[serde(default = "default_273")] + #[serde(default = "default_275")] pub component: String, - #[serde(default = "default_274")] + #[serde(default = "default_276")] pub component_dirs: Vec, - #[serde(default = "default_275")] + #[serde(default = "default_277")] pub dropped_after_report: Integer, - #[serde(default = "default_276")] + #[serde(default = "default_278")] pub versions_searched: Vec, - #[serde(default = "default_277")] + #[serde(default = "default_279")] pub bad_version: String, - #[serde(default = "default_278")] + #[serde(default = "default_280")] pub good_version: String, - #[serde(default = "default_279")] + #[serde(default = "default_281")] pub window: String, - #[serde(default = "default_280")] + #[serde(default = "default_282")] pub hub_paths_dropped: Vec, - #[serde(default = "default_281")] + #[serde(default = "default_283")] pub resolved: Vec>, - #[serde(default = "default_282")] + #[serde(default = "default_284")] pub paths: Vec, - #[serde(default = "default_283")] + #[serde(default = "default_285")] pub frames: Vec, - #[serde(default = "default_284")] + #[serde(default = "default_286")] pub issue: std::collections::HashMap, - #[serde(default = "default_285")] + #[serde(default = "default_287")] pub introduced_commit: String, - #[serde(default = "default_286")] + #[serde(default = "default_288")] pub fix_candidate: Option>, - #[serde(default = "default_287")] + #[serde(default = "default_289")] pub tracker_namespace: String, - #[serde(default = "default_288")] + #[serde(default = "default_290")] pub tracker_unavailable: bool, - #[serde(default = "default_289")] + #[serde(default = "default_291")] pub trace_run_id: String, - #[serde(default = "default_290")] + #[serde(default = "default_292")] pub partial: bool, - #[serde(default = "default_291")] + #[serde(default = "default_293")] pub partial_reason: String, - #[serde(default = "default_292")] + #[serde(default = "default_294")] pub before: String, - #[serde(default = "default_293")] + #[serde(default = "default_295")] pub after: String, } @@ -7251,43 +7255,43 @@ pub enum CodeBlameRangeOutputStage { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeBlameRangeOutput { - #[serde(default = "default_294")] + #[serde(default = "default_296")] pub verdict: String, - #[serde(default = "default_295")] + #[serde(default = "default_297")] pub causes: Vec, - #[serde(default = "default_296")] + #[serde(default = "default_298")] pub epistemic: String, - #[serde(default = "default_297")] + #[serde(default = "default_299")] pub stage: CodeBlameRangeOutputStage, - #[serde(default = "default_298")] + #[serde(default = "default_300")] pub note: String, - #[serde(default = "default_299")] + #[serde(default = "default_301")] pub path: String, - #[serde(default = "default_300")] + #[serde(default = "default_302")] pub path_indexed: bool, - #[serde(default = "default_301")] + #[serde(default = "default_303")] pub range: std::collections::HashMap, - #[serde(default = "default_302")] + #[serde(default = "default_304")] pub window: std::collections::HashMap, - #[serde(default = "default_303")] + #[serde(default = "default_305")] pub candidates: Vec>, - #[serde(default = "default_304")] + #[serde(default = "default_306")] pub last_touched: Vec>, - #[serde(default = "default_305")] + #[serde(default = "default_307")] pub symbol: std::collections::HashMap, - #[serde(default = "default_306")] + #[serde(default = "default_308")] pub latest_pr: Integer, - #[serde(default = "default_307")] + #[serde(default = "default_309")] pub lines: std::collections::HashMap, - #[serde(default = "default_308")] + #[serde(default = "default_310")] pub legs: std::collections::HashMap, - #[serde(default = "default_309")] + #[serde(default = "default_311")] pub first_release_basis: String, - #[serde(default = "default_310")] + #[serde(default = "default_312")] pub tracker_namespace: String, - #[serde(default = "default_311")] + #[serde(default = "default_313")] pub tracker_unavailable: bool, - #[serde(default = "default_312")] + #[serde(default = "default_314")] pub trace_run_id: String, } @@ -7572,9 +7576,9 @@ pub struct CodeEdgeWire { pub line: Integer, pub tier: String, pub confidence: f64, - #[serde(default = "default_315")] + #[serde(default = "default_317")] pub via_override: String, - #[serde(default = "default_316")] + #[serde(default = "default_318")] pub via: String, } @@ -7583,14 +7587,14 @@ pub struct CodeEdgeWire { pub struct CodeCandidateSiteWire { pub path: String, pub line: Integer, - #[serde(default = "default_339")] + #[serde(default = "default_341")] pub caller: String, - #[serde(default = "default_340")] + #[serde(default = "default_342")] pub callee_text: String, pub reason: String, pub confidence: f64, pub disposition: String, - #[serde(default = "default_341")] + #[serde(default = "default_343")] pub candidates: Integer, } @@ -7607,68 +7611,68 @@ pub struct CodeCandidateGroupWire { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeCandidateSitesWire { - #[serde(default = "default_333")] + #[serde(default = "default_335")] pub epistemic: String, - #[serde(default = "default_334")] + #[serde(default = "default_336")] pub total: Integer, - #[serde(default = "default_335")] + #[serde(default = "default_337")] pub returned: Integer, - #[serde(default = "default_336")] + #[serde(default = "default_338")] pub truncated: bool, - #[serde(default = "default_337")] + #[serde(default = "default_339")] pub read_capped: bool, - #[serde(default = "default_338")] + #[serde(default = "default_340")] pub by_reason: std::collections::HashMap, - #[serde(default = "default_342")] + #[serde(default = "default_344")] pub groups: Vec, - #[serde(default = "default_343")] + #[serde(default = "default_345")] pub note: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeCallersOutput { - #[serde(default = "default_313")] + #[serde(default = "default_315")] pub lessons: Vec>, - #[serde(default = "default_314")] + #[serde(default = "default_316")] pub lessons_left_out: Integer, pub edges: Vec, pub seed_symbols: Vec, - #[serde(default = "default_317")] + #[serde(default = "default_319")] pub overlay: bool, - #[serde(default = "default_318")] + #[serde(default = "default_320")] pub overlay_head_sha: String, - #[serde(default = "default_319")] + #[serde(default = "default_321")] pub overlay_added: Integer, - #[serde(default = "default_320")] + #[serde(default = "default_322")] pub overlay_note: String, - #[serde(default = "default_321")] + #[serde(default = "default_323")] pub resolved_by: String, - #[serde(default = "default_322")] + #[serde(default = "default_324")] pub ambiguous: bool, - #[serde(default = "default_323")] + #[serde(default = "default_325")] pub candidates: Vec, - #[serde(default = "default_324")] + #[serde(default = "default_326")] pub dispatch_seeds: Vec>, - #[serde(default = "default_325")] + #[serde(default = "default_327")] pub note: String, - #[serde(default = "default_326")] + #[serde(default = "default_328")] pub truncated: bool, - #[serde(default = "default_327")] + #[serde(default = "default_329")] pub counts_floor: bool, - #[serde(default = "default_328")] + #[serde(default = "default_330")] pub unresolved_calls: Integer, - #[serde(default = "default_329")] + #[serde(default = "default_331")] pub ambiguous_calls: Integer, - #[serde(default = "default_330")] + #[serde(default = "default_332")] pub epistemic: String, - #[serde(default = "default_331")] + #[serde(default = "default_333")] pub causes: Vec, - #[serde(default = "default_332")] + #[serde(default = "default_334")] pub by_hop_counts: std::collections::HashMap, - #[serde(default = "default_344")] + #[serde(default = "default_346")] pub candidate_sites: Option, - #[serde(default = "default_345")] + #[serde(default = "default_347")] pub trace_run_id: String, } @@ -8196,18 +8200,18 @@ pub enum CodeContextPackOutputSource { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeContextPackOutput { - #[serde(default = "default_346")] + #[serde(default = "default_348")] pub lessons: Vec>, - #[serde(default = "default_347")] + #[serde(default = "default_349")] pub lessons_left_out: Integer, pub context: String, pub tokens_used: Integer, pub source: CodeContextPackOutputSource, - #[serde(default = "default_348")] + #[serde(default = "default_350")] pub truncated: bool, - #[serde(default = "default_349")] + #[serde(default = "default_351")] pub merge_commit_sha: String, - #[serde(default = "default_350")] + #[serde(default = "default_352")] pub trace_run_id: String, } @@ -8381,17 +8385,17 @@ impl CodeContextPackInput { #[non_exhaustive] pub struct CodeContextPackRow { pub pr_number: Integer, - #[serde(default = "default_351")] + #[serde(default = "default_353")] pub merge_commit_sha: String, - #[serde(default = "default_352")] + #[serde(default = "default_354")] pub pack_tokens: Integer, - #[serde(default = "default_353")] + #[serde(default = "default_355")] pub created_at: String, - #[serde(default = "default_354")] + #[serde(default = "default_356")] pub title: String, - #[serde(default = "default_355")] + #[serde(default = "default_357")] pub author: String, - #[serde(default = "default_356")] + #[serde(default = "default_358")] pub merged_at: String, } @@ -8399,7 +8403,7 @@ pub struct CodeContextPackRow { #[non_exhaustive] pub struct CodeContextPacksOutput { pub rows: Vec, - #[serde(default = "default_357")] + #[serde(default = "default_359")] pub total: Integer, } @@ -8517,41 +8521,41 @@ impl CodeContextPacksInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeConventionsOutput { - #[serde(default = "default_358")] + #[serde(default = "default_360")] pub pr_number: Integer, - #[serde(default = "default_359")] + #[serde(default = "default_361")] pub source: String, - #[serde(default = "default_360")] + #[serde(default = "default_362")] pub title: String, - #[serde(default = "default_361")] + #[serde(default = "default_363")] pub labels: Vec, - #[serde(default = "default_362")] + #[serde(default = "default_364")] pub category: String, - #[serde(default = "default_363")] + #[serde(default = "default_365")] pub category_source: String, - #[serde(default = "default_364")] + #[serde(default = "default_366")] pub merged_at: String, - #[serde(default = "default_365")] + #[serde(default = "default_367")] pub merge_commit_sha: String, - #[serde(default = "default_366")] + #[serde(default = "default_368")] pub head_sha: String, - #[serde(default = "default_367")] + #[serde(default = "default_369")] pub files_total: Integer, - #[serde(default = "default_368")] + #[serde(default = "default_370")] pub files_in_diff: Integer, - #[serde(default = "default_369")] + #[serde(default = "default_371")] pub diff_bytes: Integer, - #[serde(default = "default_370")] + #[serde(default = "default_372")] pub diff_truncated: bool, - #[serde(default = "default_371")] + #[serde(default = "default_373")] pub rules: Vec>, - #[serde(default = "default_372")] + #[serde(default = "default_374")] pub summary: std::collections::HashMap, - #[serde(default = "default_373")] + #[serde(default = "default_375")] pub control: std::collections::HashMap, - #[serde(default = "default_374")] + #[serde(default = "default_376")] pub notes: Vec, - #[serde(default = "default_375")] + #[serde(default = "default_377")] pub trace_run_id: String, } @@ -8692,29 +8696,29 @@ impl CodeConventionsInput { #[non_exhaustive] pub struct CodeLanguageCoverage { pub lang: String, - #[serde(default = "default_377")] + #[serde(default = "default_379")] pub files: Integer, - #[serde(default = "default_378")] + #[serde(default = "default_380")] pub files_errored: Integer, - #[serde(default = "default_379")] + #[serde(default = "default_381")] pub files_first_at: String, - #[serde(default = "default_380")] + #[serde(default = "default_382")] pub files_last_at: String, - #[serde(default = "default_381")] + #[serde(default = "default_383")] pub chunks: Integer, - #[serde(default = "default_382")] + #[serde(default = "default_384")] pub chunks_embedded: Integer, - #[serde(default = "default_383")] + #[serde(default = "default_385")] pub chunks_described: Integer, - #[serde(default = "default_384")] + #[serde(default = "default_386")] pub chunks_last_at: String, - #[serde(default = "default_385")] + #[serde(default = "default_387")] pub symbols_treesitter: Integer, - #[serde(default = "default_386")] + #[serde(default = "default_388")] pub symbols_treesitter_last_at: String, - #[serde(default = "default_387")] + #[serde(default = "default_389")] pub symbols_scip: Integer, - #[serde(default = "default_388")] + #[serde(default = "default_390")] pub symbols_scip_last_at: String, } @@ -8722,32 +8726,32 @@ pub struct CodeLanguageCoverage { #[non_exhaustive] pub struct CodeTierCoverage { pub tier: String, - #[serde(default = "default_389")] + #[serde(default = "default_391")] pub edges: Integer, - #[serde(default = "default_390")] + #[serde(default = "default_392")] pub edges_last_at: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeCoverageGaps { - #[serde(default = "default_391")] + #[serde(default = "default_393")] pub functions_scanned: Integer, - #[serde(default = "default_392")] + #[serde(default = "default_394")] pub functions_uncalled: Integer, - #[serde(default = "default_393")] + #[serde(default = "default_395")] pub uncalled_share: f64, - #[serde(default = "default_394")] + #[serde(default = "default_396")] pub source_files: Integer, - #[serde(default = "default_395")] + #[serde(default = "default_397")] pub source_files_untested: Integer, - #[serde(default = "default_396")] + #[serde(default = "default_398")] pub untested_share: f64, - #[serde(default = "default_397")] + #[serde(default = "default_399")] pub code_files: Integer, - #[serde(default = "default_398")] + #[serde(default = "default_400")] pub code_files_no_symbols: Integer, - #[serde(default = "default_399")] + #[serde(default = "default_401")] pub no_symbols_share: f64, } @@ -8756,25 +8760,25 @@ pub struct CodeCoverageGaps { pub struct CodeCoverageOutput { pub org: String, pub namespace: String, - #[serde(default = "default_376")] + #[serde(default = "default_378")] pub as_of_commit: String, pub languages: Vec, pub tiers: Vec, - #[serde(default = "default_400")] + #[serde(default = "default_402")] pub gaps: Option, - #[serde(default = "default_401")] + #[serde(default = "default_403")] pub pr_history_from: String, - #[serde(default = "default_402")] + #[serde(default = "default_404")] pub pr_history_to: String, - #[serde(default = "default_403")] + #[serde(default = "default_405")] pub pr_history_last_fetch_at: String, - #[serde(default = "default_404")] + #[serde(default = "default_406")] pub pr_history_enabled: bool, - #[serde(default = "default_405")] + #[serde(default = "default_407")] pub pr_history_auth: String, - #[serde(default = "default_406")] + #[serde(default = "default_408")] pub context_packs_last_at: String, - #[serde(default = "default_407")] + #[serde(default = "default_409")] pub summaries_last_at: String, } @@ -8944,44 +8948,44 @@ impl CodeCoverageUnwatchInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeCommitTierCoverage { - #[serde(default = "default_414")] + #[serde(default = "default_416")] pub producer: String, - #[serde(default = "default_415")] + #[serde(default = "default_417")] pub label: String, - #[serde(default = "default_416")] + #[serde(default = "default_418")] pub watermark_key: String, - #[serde(default = "default_417")] + #[serde(default = "default_419")] pub watermark: String, - #[serde(default = "default_418")] + #[serde(default = "default_420")] pub covered: Option, - #[serde(default = "default_419")] + #[serde(default = "default_421")] pub commits_since: Integer, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeCommitCoverage { - #[serde(default = "default_411")] + #[serde(default = "default_413")] pub commit: String, - #[serde(default = "default_412")] + #[serde(default = "default_414")] pub in_mirror: bool, - #[serde(default = "default_413")] + #[serde(default = "default_415")] pub fast: Option, - #[serde(default = "default_420")] + #[serde(default = "default_422")] pub tiers: Vec, - #[serde(default = "default_421")] + #[serde(default = "default_423")] pub ready: bool, - #[serde(default = "default_422")] + #[serde(default = "default_424")] pub waiting_on: Vec, - #[serde(default = "default_423")] + #[serde(default = "default_425")] pub commits_since: Integer, - #[serde(default = "default_424")] + #[serde(default = "default_426")] pub paths_changed_since: Vec, - #[serde(default = "default_425")] + #[serde(default = "default_427")] pub paths_changed_count: Integer, - #[serde(default = "default_426")] + #[serde(default = "default_428")] pub paths_truncated: bool, - #[serde(default = "default_427")] + #[serde(default = "default_429")] pub paths_changed_overlap: Vec, } @@ -8992,14 +8996,14 @@ pub struct CodeCoverageWatchOutput { pub namespace: String, pub commit: String, pub inbox: String, - #[serde(default = "default_408")] + #[serde(default = "default_410")] pub ready: bool, - #[serde(default = "default_409")] + #[serde(default = "default_411")] pub emitted: bool, - #[serde(default = "default_410")] + #[serde(default = "default_412")] pub delivered_at: Option, pub event_id: String, - #[serde(default = "default_428")] + #[serde(default = "default_430")] pub commit_coverage: Option, } @@ -9083,31 +9087,31 @@ impl CodeCoverageWatchInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeCoverageClaimOutput { - #[serde(default = "default_429")] + #[serde(default = "default_431")] pub subject: String, - #[serde(default = "default_430")] + #[serde(default = "default_432")] pub subject_kind: String, - #[serde(default = "default_431")] + #[serde(default = "default_433")] pub verdict: String, - #[serde(default = "default_432")] + #[serde(default = "default_434")] pub tests: Vec>, - #[serde(default = "default_433")] + #[serde(default = "default_435")] pub tests_total: Integer, - #[serde(default = "default_434")] + #[serde(default = "default_436")] pub src_paths: Vec, - #[serde(default = "default_435")] + #[serde(default = "default_437")] pub epistemic: String, - #[serde(default = "default_436")] + #[serde(default = "default_438")] pub strongest_tier: String, - #[serde(default = "default_437")] + #[serde(default = "default_439")] pub search_terms: std::collections::HashMap, - #[serde(default = "default_438")] + #[serde(default = "default_440")] pub resolved_by: String, - #[serde(default = "default_439")] + #[serde(default = "default_441")] pub control: std::collections::HashMap, - #[serde(default = "default_440")] + #[serde(default = "default_442")] pub measured: std::collections::HashMap, - #[serde(default = "default_441")] + #[serde(default = "default_443")] pub trace_run_id: String, } @@ -9236,62 +9240,62 @@ impl CodeCoverageClaimInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeUnit { - #[serde(default = "default_442")] + #[serde(default = "default_444")] pub unit_id: String, pub path: String, - #[serde(default = "default_443")] + #[serde(default = "default_445")] pub start_line: Integer, - #[serde(default = "default_444")] + #[serde(default = "default_446")] pub end_line: Integer, - #[serde(default = "default_445")] + #[serde(default = "default_447")] pub symbol: String, - #[serde(default = "default_446")] + #[serde(default = "default_448")] pub kind: String, - #[serde(default = "default_447")] + #[serde(default = "default_449")] pub signature: String, - #[serde(default = "default_448")] + #[serde(default = "default_450")] pub body: String, - #[serde(default = "default_449")] + #[serde(default = "default_451")] pub elided: bool, - #[serde(default = "default_450")] + #[serde(default = "default_452")] pub body_hash: String, - #[serde(default = "default_451")] + #[serde(default = "default_453")] pub description: String, - #[serde(default = "default_452")] + #[serde(default = "default_454")] pub tier: String, - #[serde(default = "default_453")] + #[serde(default = "default_455")] pub score: f64, - #[serde(default = "default_454")] + #[serde(default = "default_456")] pub recent_prs: Vec>, - #[serde(default = "default_455")] + #[serde(default = "default_457")] pub examples: Vec>, - #[serde(default = "default_456")] + #[serde(default = "default_458")] pub lessons: Vec>, - #[serde(default = "default_457")] + #[serde(default = "default_459")] pub lessons_unread: bool, - #[serde(default = "default_458")] + #[serde(default = "default_460")] pub churn: Integer, - #[serde(default = "default_459")] + #[serde(default = "default_461")] pub amp: Integer, - #[serde(default = "default_460")] + #[serde(default = "default_462")] pub tested: bool, - #[serde(default = "default_461")] + #[serde(default = "default_463")] pub callees: Vec>, - #[serde(default = "default_462")] + #[serde(default = "default_464")] pub granularity: String, - #[serde(default = "default_463")] + #[serde(default = "default_465")] pub next: String, - #[serde(default = "default_464")] + #[serde(default = "default_466")] pub outline: Vec>, - #[serde(default = "default_465")] + #[serde(default = "default_467")] pub fan_in: Integer, - #[serde(default = "default_466")] + #[serde(default = "default_468")] pub via: String, - #[serde(default = "default_467")] + #[serde(default = "default_469")] pub lexical_rank: Integer, - #[serde(default = "default_468")] + #[serde(default = "default_470")] pub vector_rank: Integer, - #[serde(default = "default_469")] + #[serde(default = "default_471")] pub namespace: String, } @@ -9338,19 +9342,19 @@ pub enum CodeEditContextTargetStatus { pub struct CodeEditContextTarget { pub name: String, pub status: CodeEditContextTargetStatus, - #[serde(default = "default_487")] + #[serde(default = "default_489")] pub definition_indices: Vec, - #[serde(default = "default_488")] + #[serde(default = "default_490")] pub candidates: Vec>, - #[serde(default = "default_489")] + #[serde(default = "default_491")] pub resolved_by: String, - #[serde(default = "default_490")] + #[serde(default = "default_492")] pub presence: Vec>, - #[serde(default = "default_491")] + #[serde(default = "default_493")] pub hierarchy: std::collections::HashMap>>, - #[serde(default = "default_492")] + #[serde(default = "default_494")] pub documented_in: Vec>, - #[serde(default = "default_493")] + #[serde(default = "default_495")] pub trace_run_id: String, } @@ -9378,43 +9382,43 @@ pub struct CodeEditReadSource { #[non_exhaustive] pub struct CodeSymbolOutput { pub definitions: Vec, - #[serde(default = "default_470")] + #[serde(default = "default_472")] pub lessons_left_out: Integer, - #[serde(default = "default_471")] + #[serde(default = "default_473")] pub ambiguous: bool, - #[serde(default = "default_472")] + #[serde(default = "default_474")] pub hierarchy: std::collections::HashMap>>, - #[serde(default = "default_473")] + #[serde(default = "default_475")] pub candidates: Vec>, - #[serde(default = "default_474")] + #[serde(default = "default_476")] pub tokens_returned: Integer, - #[serde(default = "default_475")] + #[serde(default = "default_477")] pub trace_run_id: String, - #[serde(default = "default_476")] + #[serde(default = "default_478")] pub uses: CodeSymbolOutputUses, - #[serde(default = "default_477")] + #[serde(default = "default_479")] pub uses_truncated: bool, - #[serde(default = "default_478")] + #[serde(default = "default_480")] pub uses_tokens: Integer, - #[serde(default = "default_479")] + #[serde(default = "default_481")] pub picked_by: String, - #[serde(default = "default_480")] + #[serde(default = "default_482")] pub resolved_by: String, - #[serde(default = "default_481")] + #[serde(default = "default_483")] pub documented_in: Vec>, - #[serde(default = "default_482")] + #[serde(default = "default_484")] pub neighbours: Vec>, - #[serde(default = "default_483")] + #[serde(default = "default_485")] pub anchors: Integer, - #[serde(default = "default_484")] + #[serde(default = "default_486")] pub neighbour_tokens: Integer, - #[serde(default = "default_485")] + #[serde(default = "default_487")] pub presence: Vec>, - #[serde(default = "default_486")] + #[serde(default = "default_488")] pub summary: std::collections::HashMap>, - #[serde(default = "default_494")] + #[serde(default = "default_496")] pub edit_targets: Vec, - #[serde(default = "default_495")] + #[serde(default = "default_497")] pub read_sources: Option>, } @@ -9568,30 +9572,30 @@ impl CodeEditContextInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeEnclosingOutput { - #[serde(default = "default_496")] + #[serde(default = "default_498")] pub lessons: Vec>, - #[serde(default = "default_497")] + #[serde(default = "default_499")] pub lessons_left_out: Integer, pub results: Vec>, pub resolved: Integer, pub paths_indexed: Integer, pub paths_total: Integer, pub took_ms: Integer, - #[serde(default = "default_498")] + #[serde(default = "default_500")] pub as_of: std::collections::HashMap, - #[serde(default = "default_499")] + #[serde(default = "default_501")] pub bodies_returned: Integer, - #[serde(default = "default_500")] + #[serde(default = "default_502")] pub bodies_elided: Integer, - #[serde(default = "default_501")] + #[serde(default = "default_503")] pub tokens_returned: Integer, - #[serde(default = "default_502")] + #[serde(default = "default_504")] pub neighbours: Vec>, - #[serde(default = "default_503")] + #[serde(default = "default_505")] pub anchors: Integer, - #[serde(default = "default_504")] + #[serde(default = "default_506")] pub anchors_capped: bool, - #[serde(default = "default_505")] + #[serde(default = "default_507")] pub neighbour_tokens: Integer, } @@ -9747,7 +9751,7 @@ impl CodeEnclosingInput { #[non_exhaustive] pub struct CodeExamplesOutput { pub examples: Vec>, - #[serde(default = "default_506")] + #[serde(default = "default_508")] pub trace_run_id: String, } @@ -9865,19 +9869,19 @@ impl CodeExamplesInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeFilesOutput { - #[serde(default = "default_507")] + #[serde(default = "default_509")] pub files: Vec>, - #[serde(default = "default_508")] + #[serde(default = "default_510")] pub total: Integer, - #[serde(default = "default_509")] + #[serde(default = "default_511")] pub truncated: bool, - #[serde(default = "default_510")] + #[serde(default = "default_512")] pub as_of: std::collections::HashMap, - #[serde(default = "default_511")] + #[serde(default = "default_513")] pub not_covered: bool, - #[serde(default = "default_512")] + #[serde(default = "default_514")] pub note: String, - #[serde(default = "default_513")] + #[serde(default = "default_515")] pub trace_run_id: String, } @@ -10006,51 +10010,51 @@ impl CodeFilesInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeFirstBuildOutput { - #[serde(default = "default_514")] + #[serde(default = "default_516")] pub verdict: String, - #[serde(default = "default_515")] + #[serde(default = "default_517")] pub causes: Vec, - #[serde(default = "default_516")] + #[serde(default = "default_518")] pub epistemic: String, - #[serde(default = "default_517")] + #[serde(default = "default_519")] pub sha: String, - #[serde(default = "default_518")] + #[serde(default = "default_520")] pub pr_number: Integer, - #[serde(default = "default_519")] + #[serde(default = "default_521")] pub merged_at: String, - #[serde(default = "default_520")] + #[serde(default = "default_522")] pub commit_time: String, - #[serde(default = "default_521")] + #[serde(default = "default_523")] pub ledger_known: bool, - #[serde(default = "default_522")] + #[serde(default = "default_524")] pub mirror_known: bool, - #[serde(default = "default_523")] + #[serde(default = "default_525")] pub first_build: std::collections::HashMap, - #[serde(default = "default_524")] + #[serde(default = "default_526")] pub lag_hours: Option, - #[serde(default = "default_525")] + #[serde(default = "default_527")] pub later_builds: Integer, - #[serde(default = "default_526")] + #[serde(default = "default_528")] pub window_hours: Integer, - #[serde(default = "default_527")] + #[serde(default = "default_529")] pub candidates_checked: Integer, - #[serde(default = "default_528")] + #[serde(default = "default_530")] pub candidates_total: Integer, - #[serde(default = "default_529")] + #[serde(default = "default_531")] pub own_builds: Vec>, - #[serde(default = "default_530")] + #[serde(default = "default_532")] pub containing_branches: Vec, - #[serde(default = "default_531")] + #[serde(default = "default_533")] pub containing_namespaces: Vec, - #[serde(default = "default_532")] + #[serde(default = "default_534")] pub nearest_namespace: String, - #[serde(default = "default_533")] + #[serde(default = "default_535")] pub note: String, - #[serde(default = "default_534")] + #[serde(default = "default_536")] pub tracker_namespace: String, - #[serde(default = "default_535")] + #[serde(default = "default_537")] pub tracker_unavailable: bool, - #[serde(default = "default_536")] + #[serde(default = "default_538")] pub trace_run_id: String, } @@ -10169,19 +10173,19 @@ pub struct GrepDependency { pub struct RelatedGrepEvidence { pub pattern: String, pub matches: Vec>, - #[serde(default = "default_539")] + #[serde(default = "default_541")] pub contexts: Vec>, - #[serde(default = "default_540")] + #[serde(default = "default_542")] pub contexts_partial: bool, - #[serde(default = "default_541")] + #[serde(default = "default_543")] pub definitions: Vec>, - #[serde(default = "default_542")] + #[serde(default = "default_544")] pub definitions_partial: bool, - #[serde(default = "default_543")] + #[serde(default = "default_545")] pub definitions_note: String, - #[serde(default = "default_544")] + #[serde(default = "default_546")] pub truncated: bool, - #[serde(default = "default_545")] + #[serde(default = "default_547")] pub dependencies: Vec, } @@ -10197,69 +10201,69 @@ pub enum CodeGrepOutputFallback { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeGrepOutput { - #[serde(default = "default_537")] + #[serde(default = "default_539")] pub lessons: Vec>, - #[serde(default = "default_538")] + #[serde(default = "default_540")] pub lessons_left_out: Integer, pub matches: Vec>, - #[serde(default = "default_546")] + #[serde(default = "default_548")] pub related: Option, - #[serde(default = "default_547")] + #[serde(default = "default_549")] pub contexts: Vec>, - #[serde(default = "default_548")] + #[serde(default = "default_550")] pub contexts_partial: bool, - #[serde(default = "default_549")] + #[serde(default = "default_551")] pub definitions: Vec>, - #[serde(default = "default_550")] + #[serde(default = "default_552")] pub definitions_partial: bool, - #[serde(default = "default_551")] + #[serde(default = "default_553")] pub definitions_note: String, - #[serde(default = "default_552")] + #[serde(default = "default_554")] pub next_cursor: String, - #[serde(default = "default_553")] + #[serde(default = "default_555")] pub has_more: bool, - #[serde(default = "default_554")] + #[serde(default = "default_556")] pub files: Vec>, - #[serde(default = "default_555")] + #[serde(default = "default_557")] pub files_total: Integer, pub chunks_matched: Integer, - #[serde(default = "default_556")] + #[serde(default = "default_558")] pub truncated: bool, - #[serde(default = "default_557")] + #[serde(default = "default_559")] pub coverage_floor: bool, - #[serde(default = "default_558")] + #[serde(default = "default_560")] pub as_of: std::collections::HashMap, - #[serde(default = "default_559")] + #[serde(default = "default_561")] pub not_covered: bool, - #[serde(default = "default_560")] + #[serde(default = "default_562")] pub neighbours: Vec>, - #[serde(default = "default_561")] + #[serde(default = "default_563")] pub anchors: Integer, - #[serde(default = "default_562")] + #[serde(default = "default_564")] pub anchors_capped: bool, - #[serde(default = "default_563")] + #[serde(default = "default_565")] pub neighbour_tokens: Integer, - #[serde(default = "default_564")] + #[serde(default = "default_566")] pub note: String, - #[serde(default = "default_565")] + #[serde(default = "default_567")] pub verdict: String, - #[serde(default = "default_566")] + #[serde(default = "default_568")] pub template: String, - #[serde(default = "default_567")] + #[serde(default = "default_569")] pub error_code: String, - #[serde(default = "default_568")] + #[serde(default = "default_570")] pub coverage: f64, - #[serde(default = "default_569")] + #[serde(default = "default_571")] pub presence: Vec>, - #[serde(default = "default_570")] + #[serde(default = "default_572")] pub summary: std::collections::HashMap>, - #[serde(default = "default_571")] + #[serde(default = "default_573")] pub trace_run_id: String, - #[serde(default = "default_572")] + #[serde(default = "default_574")] pub partial: bool, - #[serde(default = "default_573")] + #[serde(default = "default_575")] pub partial_reason: String, - #[serde(default = "default_574")] + #[serde(default = "default_576")] pub fallback: CodeGrepOutputFallback, } @@ -10651,9 +10655,9 @@ impl CodeGrepInput { pub struct CodeHistoryOutput { pub prs: Vec>, pub paths: Vec, - #[serde(default = "default_575")] + #[serde(default = "default_577")] pub items: Vec>, - #[serde(default = "default_576")] + #[serde(default = "default_578")] pub trace_run_id: String, } @@ -10804,52 +10808,52 @@ impl CodeHistoryInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeImpactOutput { - #[serde(default = "default_577")] + #[serde(default = "default_579")] pub lessons: Vec>, - #[serde(default = "default_578")] + #[serde(default = "default_580")] pub lessons_left_out: Integer, pub impacted_symbols: Vec>, pub impacted_tests: Vec>, pub co_change_files: Vec>, - #[serde(default = "default_579")] + #[serde(default = "default_581")] pub blast_radius_score: f64, - #[serde(default = "default_580")] + #[serde(default = "default_582")] pub touched_symbols: Vec>, - #[serde(default = "default_581")] + #[serde(default = "default_583")] pub co_change_missing: Vec>, - #[serde(default = "default_582")] + #[serde(default = "default_584")] pub owners: Vec>, - #[serde(default = "default_583")] + #[serde(default = "default_585")] pub reverts: Vec>, - #[serde(default = "default_584")] + #[serde(default = "default_586")] pub counts_floor: bool, - #[serde(default = "default_585")] + #[serde(default = "default_587")] pub unresolved_calls: Integer, - #[serde(default = "default_586")] + #[serde(default = "default_588")] pub ambiguous_calls: Integer, - #[serde(default = "default_587")] + #[serde(default = "default_589")] pub epistemic: String, - #[serde(default = "default_588")] + #[serde(default = "default_590")] pub causes: Vec, - #[serde(default = "default_589")] + #[serde(default = "default_591")] pub by_hop_counts: std::collections::HashMap, - #[serde(default = "default_590")] + #[serde(default = "default_592")] pub truncated: bool, - #[serde(default = "default_591")] + #[serde(default = "default_593")] pub resolved_by: String, - #[serde(default = "default_592")] + #[serde(default = "default_594")] pub verdict: String, - #[serde(default = "default_593")] + #[serde(default = "default_595")] pub paths_seen: Vec>, - #[serde(default = "default_594")] + #[serde(default = "default_596")] pub overlay: bool, - #[serde(default = "default_595")] + #[serde(default = "default_597")] pub overlay_head_sha: String, - #[serde(default = "default_596")] + #[serde(default = "default_598")] pub overlay_added: Integer, - #[serde(default = "default_597")] + #[serde(default = "default_599")] pub overlay_note: String, - #[serde(default = "default_598")] + #[serde(default = "default_600")] pub trace_run_id: String, } @@ -11117,12 +11121,12 @@ impl CodeImpactInput { #[non_exhaustive] pub struct CodeIndexErrorRow { pub path: String, - #[serde(default = "default_599")] + #[serde(default = "default_601")] pub lang: String, pub error: String, - #[serde(default = "default_600")] + #[serde(default = "default_602")] pub indexed_commit: String, - #[serde(default = "default_601")] + #[serde(default = "default_603")] pub at: String, } @@ -11130,7 +11134,7 @@ pub struct CodeIndexErrorRow { #[non_exhaustive] pub struct CodeIndexErrorsOutput { pub rows: Vec, - #[serde(default = "default_602")] + #[serde(default = "default_604")] pub total: Integer, } @@ -11230,17 +11234,17 @@ pub struct CodeCompilerTier { pub tool: String, pub label: String, pub watermark_key: String, - #[serde(default = "default_612")] + #[serde(default = "default_614")] pub commit: String, - #[serde(default = "default_613")] + #[serde(default = "default_615")] pub lag: Integer, - #[serde(default = "default_614")] + #[serde(default = "default_616")] pub updated_at: String, - #[serde(default = "default_615")] + #[serde(default = "default_617")] pub primary: bool, - #[serde(default = "default_616")] + #[serde(default = "default_618")] pub workers: Vec, - #[serde(default = "default_617")] + #[serde(default = "default_619")] pub note: String, } @@ -11248,42 +11252,42 @@ pub struct CodeCompilerTier { #[non_exhaustive] pub struct CodeTierHealth { pub tier: String, - #[serde(default = "default_619")] + #[serde(default = "default_621")] pub state: String, - #[serde(default = "default_620")] + #[serde(default = "default_622")] pub kind: String, - #[serde(default = "default_621")] + #[serde(default = "default_623")] pub error: String, - #[serde(default = "default_622")] + #[serde(default = "default_624")] pub fix: String, - #[serde(default = "default_623")] + #[serde(default = "default_625")] pub failing_since: String, - #[serde(default = "default_624")] + #[serde(default = "default_626")] pub last_failed_at: String, - #[serde(default = "default_625")] + #[serde(default = "default_627")] pub failed_passes: Integer, - #[serde(default = "default_626")] + #[serde(default = "default_628")] pub last_ok_at: String, - #[serde(default = "default_627")] + #[serde(default = "default_629")] pub lag_commits: Integer, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeWorkerStatus { - #[serde(default = "default_643")] + #[serde(default = "default_645")] pub enabled: bool, - #[serde(default = "default_644")] + #[serde(default = "default_646")] pub interval_seconds: Integer, - #[serde(default = "default_645")] + #[serde(default = "default_647")] pub last_run_at: String, - #[serde(default = "default_646")] + #[serde(default = "default_648")] pub last_duration_ms: Integer, - #[serde(default = "default_647")] + #[serde(default = "default_649")] pub consecutive_failures: Integer, - #[serde(default = "default_648")] + #[serde(default = "default_650")] pub total_runs: Integer, - #[serde(default = "default_649")] + #[serde(default = "default_651")] pub last_error: String, } @@ -11292,84 +11296,84 @@ pub struct CodeWorkerStatus { pub struct CodeIndexStatusOutput { pub repo: String, pub branch: String, - #[serde(default = "default_603")] + #[serde(default = "default_605")] pub org: String, pub namespace: String, - #[serde(default = "default_604")] + #[serde(default = "default_606")] pub provider: String, - #[serde(default = "default_605")] + #[serde(default = "default_607")] pub profile: String, - #[serde(default = "default_606")] + #[serde(default = "default_608")] pub compiler_candidates: Vec, - #[serde(default = "default_607")] + #[serde(default = "default_609")] pub quality_warnings: Vec, - #[serde(default = "default_608")] + #[serde(default = "default_610")] pub git_head: String, - #[serde(default = "default_609")] + #[serde(default = "default_611")] pub scip_commit: String, - #[serde(default = "default_610")] + #[serde(default = "default_612")] pub scip_commit_py: String, - #[serde(default = "default_611")] + #[serde(default = "default_613")] pub scip_producer: String, - #[serde(default = "default_618")] + #[serde(default = "default_620")] pub compiler_tiers: Vec, - #[serde(default = "default_628")] + #[serde(default = "default_630")] pub tier_health: Vec, - #[serde(default = "default_629")] + #[serde(default = "default_631")] pub pr_cursor: String, - #[serde(default = "default_630")] + #[serde(default = "default_632")] pub commit_coverage: Option, - #[serde(default = "default_631")] + #[serde(default = "default_633")] pub clone_head: String, - #[serde(default = "default_632")] + #[serde(default = "default_634")] pub clone_fetched_at: String, - #[serde(default = "default_633")] + #[serde(default = "default_635")] pub fetch_overdue: bool, - #[serde(default = "default_634")] + #[serde(default = "default_636")] pub fast_tier_lag: Integer, - #[serde(default = "default_635")] + #[serde(default = "default_637")] pub scip_lag: Integer, - #[serde(default = "default_636")] + #[serde(default = "default_638")] pub scip_py_lag: Integer, - #[serde(default = "default_637")] + #[serde(default = "default_639")] pub last_refresh_at: String, - #[serde(default = "default_638")] + #[serde(default = "default_640")] pub last_refresh_detail: String, - #[serde(default = "default_639")] + #[serde(default = "default_641")] pub org_readable: bool, - #[serde(default = "default_640")] + #[serde(default = "default_642")] pub path_prefixes: Vec, - #[serde(default = "default_641")] + #[serde(default = "default_643")] pub counts: std::collections::HashMap, - #[serde(default = "default_642")] + #[serde(default = "default_644")] pub state: std::collections::HashMap>, - #[serde(default = "default_650")] + #[serde(default = "default_652")] pub workers: std::collections::HashMap, - #[serde(default = "default_651")] + #[serde(default = "default_653")] pub build_commit: String, - #[serde(default = "default_652")] + #[serde(default = "default_654")] pub ops: Vec, - #[serde(default = "default_653")] + #[serde(default = "default_655")] pub request_fields: std::collections::HashMap>, - #[serde(default = "default_654")] + #[serde(default = "default_656")] pub op_maturity: std::collections::HashMap, - #[serde(default = "default_655")] + #[serde(default = "default_657")] pub op_reach: std::collections::HashMap>, - #[serde(default = "default_656")] + #[serde(default = "default_658")] pub op_toolsets: std::collections::HashMap>, - #[serde(default = "default_657")] + #[serde(default = "default_659")] pub symbol_stats_rows: Integer, - #[serde(default = "default_658")] + #[serde(default = "default_660")] pub symbol_stats_at: String, - #[serde(default = "default_659")] + #[serde(default = "default_661")] pub unit_risk_rows: Integer, - #[serde(default = "default_660")] + #[serde(default = "default_662")] pub unit_risk_at: String, - #[serde(default = "default_661")] + #[serde(default = "default_663")] pub chunks_total: Integer, - #[serde(default = "default_662")] + #[serde(default = "default_664")] pub chunks_embedded: Integer, - #[serde(default = "default_663")] + #[serde(default = "default_665")] pub embedding_coverage: f64, } @@ -11493,9 +11497,9 @@ impl CodeIndexStatusInput { pub struct CodeMapOutput { pub map: String, pub tokens_used: Integer, - #[serde(default = "default_664")] + #[serde(default = "default_666")] pub commit_sha: String, - #[serde(default = "default_665")] + #[serde(default = "default_667")] pub trace_run_id: String, } @@ -11766,32 +11770,32 @@ impl CodeOutcomeInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeOutlineOutput { - #[serde(default = "default_666")] + #[serde(default = "default_668")] pub lessons: Vec>, - #[serde(default = "default_667")] + #[serde(default = "default_669")] pub lessons_left_out: Integer, pub path: String, pub entries: Vec>, pub total: Integer, pub returned: Integer, pub elided: Integer, - #[serde(default = "default_668")] + #[serde(default = "default_670")] pub next: String, - #[serde(default = "default_669")] + #[serde(default = "default_671")] pub indexed: bool, - #[serde(default = "default_670")] + #[serde(default = "default_672")] pub verdict: String, - #[serde(default = "default_671")] + #[serde(default = "default_673")] pub tokens_returned: Integer, - #[serde(default = "default_672")] + #[serde(default = "default_674")] pub took_ms: Integer, - #[serde(default = "default_673")] + #[serde(default = "default_675")] pub head: String, - #[serde(default = "default_674")] + #[serde(default = "default_676")] pub head_truncated: bool, - #[serde(default = "default_675")] + #[serde(default = "default_677")] pub as_of: std::collections::HashMap, - #[serde(default = "default_676")] + #[serde(default = "default_678")] pub trace_run_id: String, } @@ -11943,19 +11947,19 @@ pub enum CodePathGuardsOutputEpistemic { #[non_exhaustive] pub struct CodePathGuardsOutput { pub verdict: CodePathGuardsOutputVerdict, - #[serde(default = "default_677")] + #[serde(default = "default_679")] pub causes: Vec, - #[serde(default = "default_678")] + #[serde(default = "default_680")] pub epistemic: CodePathGuardsOutputEpistemic, - #[serde(default = "default_679")] + #[serde(default = "default_681")] pub explanation: String, - #[serde(default = "default_680")] + #[serde(default = "default_682")] pub hops: Vec>, - #[serde(default = "default_681")] + #[serde(default = "default_683")] pub named_at: Vec, - #[serde(default = "default_682")] + #[serde(default = "default_684")] pub visited_symbols: Integer, - #[serde(default = "default_683")] + #[serde(default = "default_685")] pub trace_run_id: String, } @@ -12061,21 +12065,21 @@ impl CodePathGuardsInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodePrCheckOutput { - #[serde(default = "default_684")] + #[serde(default = "default_686")] pub verdict: String, - #[serde(default = "default_685")] + #[serde(default = "default_687")] pub items: Vec>, - #[serde(default = "default_686")] + #[serde(default = "default_688")] pub undecided: bool, - #[serde(default = "default_687")] + #[serde(default = "default_689")] pub epistemic: String, - #[serde(default = "default_688")] + #[serde(default = "default_690")] pub thresholds: std::collections::HashMap, - #[serde(default = "default_689")] + #[serde(default = "default_691")] pub legs: std::collections::HashMap, - #[serde(default = "default_690")] + #[serde(default = "default_692")] pub draft: std::collections::HashMap, - #[serde(default = "default_691")] + #[serde(default = "default_693")] pub trace_run_id: String, } @@ -12264,22 +12268,22 @@ pub struct CodeReadRange { pub start_line: Integer, pub end_line: Integer, pub status: CodeReadRangeStatus, - #[serde(default = "default_694")] + #[serde(default = "default_696")] pub indexed_commit: String, - #[serde(default = "default_695")] + #[serde(default = "default_697")] pub windows: Vec, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeReadOutput { - #[serde(default = "default_692")] + #[serde(default = "default_694")] pub lessons: Vec>, - #[serde(default = "default_693")] + #[serde(default = "default_695")] pub lessons_left_out: Integer, pub results: Vec, pub as_of: std::collections::HashMap, - #[serde(default = "default_696")] + #[serde(default = "default_698")] pub trace_run_id: String, } @@ -12522,15 +12526,15 @@ impl CodeReadInput { #[non_exhaustive] pub struct CodeRecentCommitRow { pub commit: String, - #[serde(default = "default_697")] + #[serde(default = "default_699")] pub subject: String, - #[serde(default = "default_698")] + #[serde(default = "default_700")] pub committed_at: String, - #[serde(default = "default_699")] + #[serde(default = "default_701")] pub ingested_at: String, - #[serde(default = "default_700")] + #[serde(default = "default_702")] pub files: Integer, - #[serde(default = "default_701")] + #[serde(default = "default_703")] pub pr_number: Integer, } @@ -12633,11 +12637,11 @@ impl CodeRecentCommitsInput { #[non_exhaustive] pub struct CodeRefreshOutput { pub triggered: bool, - #[serde(default = "default_702")] + #[serde(default = "default_704")] pub already_running: bool, - #[serde(default = "default_703")] + #[serde(default = "default_705")] pub head_before: String, - #[serde(default = "default_704")] + #[serde(default = "default_706")] pub head_after: String, } @@ -12840,22 +12844,22 @@ pub struct CodeRepoAddOutput { pub org: String, pub namespace: String, pub repo: String, - #[serde(default = "default_705")] + #[serde(default = "default_707")] pub remote: String, - #[serde(default = "default_706")] + #[serde(default = "default_708")] pub provider: String, pub branch: String, pub join_policy: String, pub classification: String, - #[serde(default = "default_707")] + #[serde(default = "default_709")] pub index_stage: String, - #[serde(default = "default_708")] + #[serde(default = "default_710")] pub my_role: String, - #[serde(default = "default_709")] + #[serde(default = "default_711")] pub remote_head: String, - #[serde(default = "default_710")] + #[serde(default = "default_712")] pub also: Vec>, - #[serde(default = "default_711")] + #[serde(default = "default_713")] pub skipped: Vec>, } @@ -13083,29 +13087,29 @@ impl CodeRepoAddBranchInput { pub struct CodeRepoRemoteBranchesOutput { pub org: String, pub repo: String, - #[serde(default = "default_712")] + #[serde(default = "default_714")] pub remote: String, - #[serde(default = "default_713")] + #[serde(default = "default_715")] pub provider: String, - #[serde(default = "default_714")] + #[serde(default = "default_716")] pub warnings: Vec, - #[serde(default = "default_715")] + #[serde(default = "default_717")] pub default_branch: String, - #[serde(default = "default_716")] + #[serde(default = "default_718")] pub branches: Vec>, - #[serde(default = "default_717")] + #[serde(default = "default_719")] pub suggested: Vec, - #[serde(default = "default_718")] + #[serde(default = "default_720")] pub indexed: Vec>, - #[serde(default = "default_719")] + #[serde(default = "default_721")] pub cap: Integer, - #[serde(default = "default_720")] + #[serde(default = "default_722")] pub total: Integer, - #[serde(default = "default_721")] + #[serde(default = "default_723")] pub matched: Integer, - #[serde(default = "default_722")] + #[serde(default = "default_724")] pub truncated: bool, - #[serde(default = "default_723")] + #[serde(default = "default_725")] pub query: String, } @@ -13196,11 +13200,11 @@ pub struct CodeRepoRemoveOutput { pub registry_deactivated: bool, pub directory_deactivated: bool, pub purged_tables: Integer, - #[serde(default = "default_724")] + #[serde(default = "default_726")] pub erasure_id: String, - #[serde(default = "default_725")] + #[serde(default = "default_727")] pub mirror_removed: bool, - #[serde(default = "default_726")] + #[serde(default = "default_728")] pub sources_deactivated: Vec, } @@ -13334,14 +13338,14 @@ impl CodeRepoSetAccessInput { pub struct CodeRepoSetSourceOutput { pub org: String, pub namespace: String, - #[serde(default = "default_727")] + #[serde(default = "default_729")] pub tracker_namespaces: Vec, - #[serde(default = "default_728")] + #[serde(default = "default_730")] pub previous_tracker_namespaces: Vec, pub effective_within_s: Integer, - #[serde(default = "default_729")] + #[serde(default = "default_731")] pub not_covering: Vec, - #[serde(default = "default_730")] + #[serde(default = "default_732")] pub warning: String, } @@ -13750,43 +13754,43 @@ pub enum CodeReviewBriefOutputLedger { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeReviewBriefOutput { - #[serde(default = "default_731")] + #[serde(default = "default_733")] pub pr_number: Integer, - #[serde(default = "default_732")] + #[serde(default = "default_734")] pub merge_sha: String, - #[serde(default = "default_733")] + #[serde(default = "default_735")] pub source: CodeReviewBriefOutputSource, - #[serde(default = "default_734")] + #[serde(default = "default_736")] pub ledger: CodeReviewBriefOutputLedger, - #[serde(default = "default_735")] + #[serde(default = "default_737")] pub stored: bool, - #[serde(default = "default_736")] + #[serde(default = "default_738")] pub provenance: std::collections::HashMap, - #[serde(default = "default_737")] + #[serde(default = "default_739")] pub overlay: bool, - #[serde(default = "default_738")] + #[serde(default = "default_740")] pub overlay_head_sha: String, - #[serde(default = "default_739")] + #[serde(default = "default_741")] pub overlay_added: Integer, - #[serde(default = "default_740")] + #[serde(default = "default_742")] pub overlay_note: String, - #[serde(default = "default_741")] + #[serde(default = "default_743")] pub tier: String, - #[serde(default = "default_742")] + #[serde(default = "default_744")] pub built_at: String, - #[serde(default = "default_743")] + #[serde(default = "default_745")] pub indexed_commit: String, - #[serde(default = "default_744")] + #[serde(default = "default_746")] pub build_ms: Integer, - #[serde(default = "default_745")] + #[serde(default = "default_747")] pub tokens_used: Integer, - #[serde(default = "default_746")] + #[serde(default = "default_748")] pub token_budget: Integer, - #[serde(default = "default_747")] + #[serde(default = "default_749")] pub decisions: std::collections::HashMap, - #[serde(default = "default_748")] + #[serde(default = "default_750")] pub sections: std::collections::HashMap>, - #[serde(default = "default_749")] + #[serde(default = "default_751")] pub trace_run_id: String, } @@ -14171,11 +14175,11 @@ pub struct CodeScipStatusOutput { pub status: String, pub parts_received: Integer, pub total_parts: Integer, - #[serde(default = "default_750")] + #[serde(default = "default_752")] pub error: String, - #[serde(default = "default_751")] + #[serde(default = "default_753")] pub commit_sha: String, - #[serde(default = "default_752")] + #[serde(default = "default_754")] pub applied_at: String, } @@ -14321,61 +14325,61 @@ pub enum CodeSearchOutputEpistemic { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeSearchOutput { - #[serde(default = "default_753")] + #[serde(default = "default_755")] pub lessons: Vec>, - #[serde(default = "default_754")] + #[serde(default = "default_756")] pub lessons_left_out: Integer, pub results: Vec, pub route: String, - #[serde(default = "default_755")] + #[serde(default = "default_757")] pub next_cursor: String, - #[serde(default = "default_756")] + #[serde(default = "default_758")] pub has_more: bool, - #[serde(default = "default_757")] + #[serde(default = "default_759")] pub history: std::collections::HashMap, - #[serde(default = "default_758")] + #[serde(default = "default_760")] pub abstain: bool, - #[serde(default = "default_759")] + #[serde(default = "default_761")] pub abstain_code: CodeSearchOutputAbstainCode, - #[serde(default = "default_760")] + #[serde(default = "default_762")] pub abstain_reason: String, - #[serde(default = "default_761")] + #[serde(default = "default_763")] pub retrieval_risk: CodeSearchOutputRetrievalRisk, - #[serde(default = "default_762")] + #[serde(default = "default_764")] pub retrieval_confidence: f64, - #[serde(default = "default_763")] + #[serde(default = "default_765")] pub route_agreement: f64, - #[serde(default = "default_764")] + #[serde(default = "default_766")] pub calibration_explanation: String, - #[serde(default = "default_765")] + #[serde(default = "default_767")] pub tokens_returned: Integer, - #[serde(default = "default_766")] + #[serde(default = "default_768")] pub constrained: bool, - #[serde(default = "default_767")] + #[serde(default = "default_769")] pub matched_files: Integer, - #[serde(default = "default_768")] + #[serde(default = "default_770")] pub as_of: std::collections::HashMap, - #[serde(default = "default_769")] + #[serde(default = "default_771")] pub score_explanation: String, - #[serde(default = "default_770")] + #[serde(default = "default_772")] pub retrieval_work: std::collections::HashMap, - #[serde(default = "default_771")] + #[serde(default = "default_773")] pub trace_run_id: String, - #[serde(default = "default_772")] + #[serde(default = "default_774")] pub top_similarity: f64, - #[serde(default = "default_773")] + #[serde(default = "default_775")] pub tracked: std::collections::HashMap, - #[serde(default = "default_774")] + #[serde(default = "default_776")] pub fanout: std::collections::HashMap, - #[serde(default = "default_775")] + #[serde(default = "default_777")] pub note: String, - #[serde(default = "default_776")] + #[serde(default = "default_778")] pub legs_timed_out: Vec, - #[serde(default = "default_777")] + #[serde(default = "default_779")] pub epistemic: CodeSearchOutputEpistemic, - #[serde(default = "default_778")] + #[serde(default = "default_780")] pub partial: bool, - #[serde(default = "default_779")] + #[serde(default = "default_781")] pub partial_reason: String, } @@ -14880,23 +14884,23 @@ impl CodeSearchInput { #[non_exhaustive] pub struct CodeSettingFactsOutput { pub name: String, - #[serde(default = "default_780")] + #[serde(default = "default_782")] pub verdict: String, - #[serde(default = "default_781")] + #[serde(default = "default_783")] pub causes: Vec, - #[serde(default = "default_782")] + #[serde(default = "default_784")] pub declaration: std::collections::HashMap, - #[serde(default = "default_783")] + #[serde(default = "default_785")] pub tier: String, - #[serde(default = "default_784")] + #[serde(default = "default_786")] pub history: Vec>, - #[serde(default = "default_785")] + #[serde(default = "default_787")] pub randomized_in_ci: std::collections::HashMap, - #[serde(default = "default_786")] + #[serde(default = "default_788")] pub tests_total: Integer, - #[serde(default = "default_787")] + #[serde(default = "default_789")] pub control: std::collections::HashMap, - #[serde(default = "default_788")] + #[serde(default = "default_790")] pub trace_run_id: String, } @@ -15318,31 +15322,31 @@ impl CodeSymbolInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeSymbolHistoryOutput { - #[serde(default = "default_789")] + #[serde(default = "default_791")] pub verdict: String, - #[serde(default = "default_790")] + #[serde(default = "default_792")] pub causes: Vec, - #[serde(default = "default_791")] + #[serde(default = "default_793")] pub epistemic: String, - #[serde(default = "default_792")] + #[serde(default = "default_794")] pub symbol: std::collections::HashMap, - #[serde(default = "default_793")] + #[serde(default = "default_795")] pub ambiguous: bool, - #[serde(default = "default_794")] + #[serde(default = "default_796")] pub candidates: Vec, - #[serde(default = "default_795")] + #[serde(default = "default_797")] pub prs: Vec>, - #[serde(default = "default_796")] + #[serde(default = "default_798")] pub review_comments: Vec>, - #[serde(default = "default_797")] + #[serde(default = "default_799")] pub open_issues_naming: Vec>, - #[serde(default = "default_798")] + #[serde(default = "default_800")] pub summary: std::collections::HashMap, - #[serde(default = "default_799")] + #[serde(default = "default_801")] pub tracker_namespace: String, - #[serde(default = "default_800")] + #[serde(default = "default_802")] pub tracker_unavailable: bool, - #[serde(default = "default_801")] + #[serde(default = "default_803")] pub trace_run_id: String, } @@ -15460,33 +15464,33 @@ impl CodeSymbolHistoryInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeTestGateOutput { - #[serde(default = "default_802")] + #[serde(default = "default_804")] pub tests: Vec>, - #[serde(default = "default_803")] + #[serde(default = "default_805")] pub untested: Vec>, - #[serde(default = "default_804")] + #[serde(default = "default_806")] pub changed_files: Vec, - #[serde(default = "default_805")] + #[serde(default = "default_807")] pub touched_symbols: Vec>, - #[serde(default = "default_806")] + #[serde(default = "default_808")] pub obligations: bool, - #[serde(default = "default_807")] + #[serde(default = "default_809")] pub tests_total: Integer, - #[serde(default = "default_808")] + #[serde(default = "default_810")] pub untested_total: Integer, - #[serde(default = "default_809")] + #[serde(default = "default_811")] pub tests_capped: bool, - #[serde(default = "default_810")] + #[serde(default = "default_812")] pub untested_capped: bool, - #[serde(default = "default_811")] + #[serde(default = "default_813")] pub counts_floor: bool, - #[serde(default = "default_812")] + #[serde(default = "default_814")] pub epistemic: String, - #[serde(default = "default_813")] + #[serde(default = "default_815")] pub causes: Vec, - #[serde(default = "default_814")] + #[serde(default = "default_816")] pub by_hop_counts: std::collections::HashMap, - #[serde(default = "default_815")] + #[serde(default = "default_817")] pub trace_run_id: String, } @@ -15615,21 +15619,21 @@ impl CodeTestGateInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeTestHomeOutput { - #[serde(default = "default_816")] + #[serde(default = "default_818")] pub verdict: String, - #[serde(default = "default_817")] + #[serde(default = "default_819")] pub home: String, - #[serde(default = "default_818")] + #[serde(default = "default_820")] pub candidates: Vec>, - #[serde(default = "default_819")] + #[serde(default = "default_821")] pub parts: Vec, - #[serde(default = "default_820")] + #[serde(default = "default_822")] pub src_paths: Vec, - #[serde(default = "default_821")] + #[serde(default = "default_823")] pub next_free_stateless_number: Integer, - #[serde(default = "default_822")] + #[serde(default = "default_824")] pub control: std::collections::HashMap, - #[serde(default = "default_823")] + #[serde(default = "default_825")] pub trace_run_id: String, } @@ -15769,27 +15773,27 @@ impl CodeTestHomeInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CodeTestsForOutput { - #[serde(default = "default_824")] + #[serde(default = "default_826")] pub tests: Vec>, - #[serde(default = "default_825")] + #[serde(default = "default_827")] pub total: Integer, - #[serde(default = "default_826")] + #[serde(default = "default_828")] pub truncated: bool, - #[serde(default = "default_827")] + #[serde(default = "default_829")] pub facets: Vec>, - #[serde(default = "default_828")] + #[serde(default = "default_830")] pub verdict: String, - #[serde(default = "default_829")] + #[serde(default = "default_831")] pub abstain: bool, - #[serde(default = "default_830")] + #[serde(default = "default_832")] pub uncovered_kinds: Vec, - #[serde(default = "default_831")] + #[serde(default = "default_833")] pub as_of: std::collections::HashMap, - #[serde(default = "default_832")] + #[serde(default = "default_834")] pub tokens_returned: Integer, - #[serde(default = "default_833")] + #[serde(default = "default_835")] pub took_ms: Integer, - #[serde(default = "default_834")] + #[serde(default = "default_836")] pub trace_run_id: String, } @@ -15895,9 +15899,9 @@ impl CodeTestsForInput { pub struct CodeTraceOutput { pub frames: Vec>, pub definitions: Vec, - #[serde(default = "default_835")] + #[serde(default = "default_837")] pub tokens_returned: Integer, - #[serde(default = "default_836")] + #[serde(default = "default_838")] pub trace_run_id: String, } @@ -16013,16 +16017,16 @@ pub enum CodeVerifyOutputVerdict { #[non_exhaustive] pub struct CodeVerifyOutput { pub verdict: CodeVerifyOutputVerdict, - #[serde(default = "default_837")] + #[serde(default = "default_839")] pub reason: String, pub explanation: String, - #[serde(default = "default_838")] + #[serde(default = "default_840")] pub evidence: Vec>, - #[serde(default = "default_839")] + #[serde(default = "default_841")] pub floors: std::collections::HashMap, - #[serde(default = "default_840")] + #[serde(default = "default_842")] pub index_verdict: String, - #[serde(default = "default_841")] + #[serde(default = "default_843")] pub trace_run_id: String, } @@ -16144,29 +16148,29 @@ impl CodeVerifyInput { #[non_exhaustive] pub struct CodeVerifyCitationsOutput { pub verdict: String, - #[serde(default = "default_842")] + #[serde(default = "default_844")] pub counts: std::collections::HashMap, - #[serde(default = "default_843")] + #[serde(default = "default_845")] pub citations: Vec>, - #[serde(default = "default_844")] + #[serde(default = "default_846")] pub skipped: Vec>, - #[serde(default = "default_845")] + #[serde(default = "default_847")] pub truncated: bool, - #[serde(default = "default_846")] + #[serde(default = "default_848")] pub epistemic: std::collections::HashMap, - #[serde(default = "default_847")] + #[serde(default = "default_849")] pub at_commit: std::collections::HashMap, - #[serde(default = "default_848")] + #[serde(default = "default_850")] pub pr_diff: std::collections::HashMap, - #[serde(default = "default_849")] + #[serde(default = "default_851")] pub namespaces: Vec, - #[serde(default = "default_850")] + #[serde(default = "default_852")] pub took_ms: Integer, - #[serde(default = "default_851")] + #[serde(default = "default_853")] pub as_of: std::collections::HashMap, - #[serde(default = "default_852")] + #[serde(default = "default_854")] pub note: String, - #[serde(default = "default_853")] + #[serde(default = "default_855")] pub trace_run_id: String, } @@ -16339,7 +16343,7 @@ pub struct CollectionCreateOutput { pub namespace: String, pub parent: String, pub created: bool, - #[serde(default = "default_854")] + #[serde(default = "default_856")] pub title: String, } @@ -16437,9 +16441,9 @@ impl CollectionCreateInput { pub struct CollectionDeleteOutput { pub namespace: String, pub deleted: bool, - #[serde(default = "default_855")] + #[serde(default = "default_857")] pub erasure_id: String, - #[serde(default = "default_856")] + #[serde(default = "default_858")] pub erasure_status: String, } @@ -16481,11 +16485,11 @@ pub struct CollectionEntry { pub parent: String, pub personal: bool, pub role: String, - #[serde(default = "default_857")] + #[serde(default = "default_859")] pub description: String, - #[serde(default = "default_858")] + #[serde(default = "default_860")] pub title: String, - #[serde(default = "default_859")] + #[serde(default = "default_861")] pub document_count: Option, } @@ -16493,7 +16497,7 @@ pub struct CollectionEntry { #[non_exhaustive] pub struct CollectionListOutput { pub collections: Vec, - #[serde(default = "default_860")] + #[serde(default = "default_862")] pub next_cursor: Option, } @@ -16835,11 +16839,11 @@ pub struct ConflictRow { #[non_exhaustive] pub struct ConflictsListOutput { pub rows: Vec, - #[serde(default = "default_861")] + #[serde(default = "default_863")] pub next_before_version: Option, - #[serde(default = "default_862")] + #[serde(default = "default_864")] pub total: Option, - #[serde(default = "default_863")] + #[serde(default = "default_865")] pub keys: Option>, } @@ -16991,7 +16995,7 @@ pub struct ConflictRevisionSuggestion { pub target_local_id: Integer, pub peer_local_ids: Vec, pub rationale: String, - #[serde(default = "default_865")] + #[serde(default = "default_867")] pub apply_operation: String, } @@ -16999,11 +17003,11 @@ pub struct ConflictRevisionSuggestion { #[non_exhaustive] pub struct ConflictsProposeRevisionOutput { pub found: bool, - #[serde(default = "default_864")] - pub memories: Vec, #[serde(default = "default_866")] + pub memories: Vec, + #[serde(default = "default_868")] pub suggestions: Vec, - #[serde(default = "default_867")] + #[serde(default = "default_869")] pub note: String, } @@ -17083,9 +17087,9 @@ pub struct ConflictsResolveOutput { pub resolved: bool, pub decision: ConflictsResolveOutputDecision, pub affected_memory_ids: Vec, - #[serde(default = "default_868")] + #[serde(default = "default_870")] pub resolved_at: Option, - #[serde(default = "default_869")] + #[serde(default = "default_871")] pub total: Option, } @@ -17242,9 +17246,9 @@ pub enum ConnectionEntryKind { pub struct ConnectionEntry { pub kind: ConnectionEntryKind, pub connected: bool, - #[serde(default = "default_870")] + #[serde(default = "default_872")] pub account_email: Option, - #[serde(default = "default_871")] + #[serde(default = "default_873")] pub scopes: Vec, pub connect_url: String, } @@ -17419,23 +17423,23 @@ impl ConsolidationsListInput { pub struct ContextFetchOutput { pub found: bool, pub blob_key: String, - #[serde(default = "default_872")] + #[serde(default = "default_874")] pub content: String, - #[serde(default = "default_873")] + #[serde(default = "default_875")] pub content_type: String, - #[serde(default = "default_874")] + #[serde(default = "default_876")] pub summary: String, - #[serde(default = "default_875")] + #[serde(default = "default_877")] pub total_chars: Integer, - #[serde(default = "default_876")] + #[serde(default = "default_878")] pub total_lines: Integer, - #[serde(default = "default_877")] + #[serde(default = "default_879")] pub offset: Integer, - #[serde(default = "default_878")] + #[serde(default = "default_880")] pub next_offset: Integer, - #[serde(default = "default_879")] + #[serde(default = "default_881")] pub matched_lines: Integer, - #[serde(default = "default_880")] + #[serde(default = "default_882")] pub expires_at: Option, } @@ -17729,9 +17733,9 @@ pub enum ConversationAppendOutputReason { pub struct ConversationAppendOutput { pub msg_id: String, pub ts: String, - #[serde(default = "default_881")] + #[serde(default = "default_883")] pub stored: bool, - #[serde(default = "default_882")] + #[serde(default = "default_884")] pub reason: ConversationAppendOutputReason, } @@ -17880,13 +17884,13 @@ impl ConversationAppendInput { pub struct ConversationCompactOutput { pub compacted: bool, pub messages_summarized: Integer, - #[serde(default = "default_883")] + #[serde(default = "default_885")] pub summary_msg_id: String, - #[serde(default = "default_884")] + #[serde(default = "default_886")] pub tokens_in: Integer, - #[serde(default = "default_885")] + #[serde(default = "default_887")] pub tokens_out: Integer, - #[serde(default = "default_886")] + #[serde(default = "default_888")] pub reason: String, } @@ -18150,7 +18154,7 @@ pub enum ConversationEntryRole { #[non_exhaustive] pub struct ConversationEntry { pub msg_id: String, - #[serde(default = "default_895")] + #[serde(default = "default_897")] pub agent: String, pub role: ConversationEntryRole, pub content: String, @@ -18167,25 +18171,25 @@ pub struct ConversationEntry { pub struct ConversationGetOutput { pub found: bool, pub thread_id: String, - #[serde(default = "default_887")] + #[serde(default = "default_889")] pub title: String, - #[serde(default = "default_888")] + #[serde(default = "default_890")] pub metadata: std::collections::HashMap, - #[serde(default = "default_889")] + #[serde(default = "default_891")] pub run_id: String, - #[serde(default = "default_890")] + #[serde(default = "default_892")] pub user_id: String, - #[serde(default = "default_891")] + #[serde(default = "default_893")] pub agent: String, - #[serde(default = "default_892")] + #[serde(default = "default_894")] pub created_at: Option, - #[serde(default = "default_893")] + #[serde(default = "default_895")] pub updated_at: Option, - #[serde(default = "default_894")] - pub msg_count: Integer, #[serde(default = "default_896")] + pub msg_count: Integer, + #[serde(default = "default_898")] pub messages: Vec, - #[serde(default = "default_897")] + #[serde(default = "default_899")] pub next_cursor: Option, } @@ -18299,7 +18303,7 @@ impl ConversationGetInput { #[non_exhaustive] pub struct ConversationListOutput { pub rows: Vec, - #[serde(default = "default_898")] + #[serde(default = "default_900")] pub next_cursor: Option, } @@ -18445,7 +18449,7 @@ pub struct SavedMessageHit { #[non_exhaustive] pub struct ConversationListSavedMessagesOutput { pub rows: Vec, - #[serde(default = "default_899")] + #[serde(default = "default_901")] pub next_cursor: Option, } @@ -18585,7 +18589,7 @@ pub struct ConversationSaveMessageOutput { pub conversation_id: String, pub message_id: String, pub indexed: bool, - #[serde(default = "default_900")] + #[serde(default = "default_902")] pub reason: ConversationSaveMessageOutputReason, pub ts: String, } @@ -18758,7 +18762,7 @@ pub struct ConversationHit { pub role: ConversationHitRole, pub content_excerpt: String, pub ts: String, - #[serde(default = "default_901")] + #[serde(default = "default_903")] pub namespace: String, } @@ -18766,7 +18770,7 @@ pub struct ConversationHit { #[non_exhaustive] pub struct ConversationSearchOutput { pub hits: Vec, - #[serde(default = "default_902")] + #[serde(default = "default_904")] pub namespaces_skipped: Vec, } @@ -19299,7 +19303,7 @@ pub struct ConversationUnsaveMessageOutput { pub conversation_id: String, pub message_id: String, pub found: bool, - #[serde(default = "default_903")] + #[serde(default = "default_905")] pub removed: bool, pub ts: String, } @@ -19372,7 +19376,7 @@ impl ConversationUnsaveMessageInput { pub struct ConversationUpdateOutput { pub updated: bool, pub thread_id: String, - #[serde(default = "default_904")] + #[serde(default = "default_906")] pub updated_at: Option, } @@ -19477,17 +19481,17 @@ impl ConversationUpdateInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CostAgentSummaryRow { - #[serde(default = "default_905")] + #[serde(default = "default_907")] pub namespace: Option, - #[serde(default = "default_906")] + #[serde(default = "default_908")] pub agent: Option, - #[serde(default = "default_907")] + #[serde(default = "default_909")] pub day: Option, - #[serde(default = "default_908")] + #[serde(default = "default_910")] pub model: Option, - #[serde(default = "default_909")] + #[serde(default = "default_911")] pub consumer: Option, - #[serde(default = "default_910")] + #[serde(default = "default_912")] pub session_id: Option, pub turns: Integer, pub sessions: Integer, @@ -19636,18 +19640,18 @@ pub enum BudgetStatusOutputCapSource { #[non_exhaustive] pub struct BudgetStatusOutput { pub namespace: String, - #[serde(default = "default_911")] + #[serde(default = "default_913")] pub user_id: Option, #[serde(deserialize_with = "required_nullable")] pub spent_24h_usd: Option, pub cap_usd: f64, pub cap_source: BudgetStatusOutputCapSource, pub over_cap: bool, - #[serde(default = "default_912")] + #[serde(default = "default_914")] pub namespace_over_cap: Option, - #[serde(default = "default_913")] + #[serde(default = "default_915")] pub pct_of_cap: Option, - #[serde(default = "default_914")] + #[serde(default = "default_916")] pub namespaces_with_spend: Integer, } @@ -19720,11 +19724,11 @@ impl BudgetStatusInput { pub struct CostRecordTurnsOutput { pub recorded: Integer, pub priced: Integer, - #[serde(default = "default_915")] + #[serde(default = "default_917")] pub unpriced_models: Vec, - #[serde(default = "default_916")] + #[serde(default = "default_918")] pub cost_usd: f64, - #[serde(default = "default_917")] + #[serde(default = "default_919")] pub turns_dated_ahead: Integer, } @@ -19895,25 +19899,25 @@ impl CostRecordTurnsInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct CostSummaryRow { - #[serde(default = "default_918")] + #[serde(default = "default_920")] pub namespace: Option, - #[serde(default = "default_919")] + #[serde(default = "default_921")] pub agent: Option, - #[serde(default = "default_920")] + #[serde(default = "default_922")] pub day: Option, - #[serde(default = "default_921")] + #[serde(default = "default_923")] pub operation: Option, - #[serde(default = "default_922")] + #[serde(default = "default_924")] pub memory_key: Option, - #[serde(default = "default_923")] + #[serde(default = "default_925")] pub user_id: Option, - #[serde(default = "default_924")] + #[serde(default = "default_926")] pub model: Option, - #[serde(default = "default_925")] + #[serde(default = "default_927")] pub traffic_class: Option, - #[serde(default = "default_926")] + #[serde(default = "default_928")] pub instance_label: Option, - #[serde(default = "default_927")] + #[serde(default = "default_929")] pub build_commit: Option, pub ops: Integer, pub errors: Integer, @@ -19923,9 +19927,9 @@ pub struct CostSummaryRow { pub latency_p50_ms: f64, pub latency_p95_ms: f64, pub latency_p99_ms: f64, - #[serde(default = "default_928")] + #[serde(default = "default_930")] pub cache_hits: Integer, - #[serde(default = "default_929")] + #[serde(default = "default_931")] pub cache_saved_usd: f64, } @@ -19936,9 +19940,9 @@ pub struct CostSummaryOutput { pub total_ops: Integer, pub total_errors: Integer, pub total_cost_usd: f64, - #[serde(default = "default_930")] + #[serde(default = "default_932")] pub cache_hits: Integer, - #[serde(default = "default_931")] + #[serde(default = "default_933")] pub cache_saved_usd: f64, } @@ -20125,31 +20129,31 @@ pub enum DecisionRowStage { #[non_exhaustive] pub struct DecisionRow { pub memory_key: String, - #[serde(default = "default_932")] + #[serde(default = "default_934")] pub category: String, - #[serde(default = "default_933")] + #[serde(default = "default_935")] pub scenario: String, - #[serde(default = "default_934")] + #[serde(default = "default_936")] pub reasoning: String, - #[serde(default = "default_935")] + #[serde(default = "default_937")] pub outcome: String, - #[serde(default = "default_936")] + #[serde(default = "default_938")] pub alternatives: Vec, - #[serde(default = "default_937")] + #[serde(default = "default_939")] pub confidence: Option, - #[serde(default = "default_938")] + #[serde(default = "default_940")] pub decision_maker: String, - #[serde(default = "default_939")] + #[serde(default = "default_941")] pub run_id: String, - #[serde(default = "default_940")] + #[serde(default = "default_942")] pub realized_outcome: String, - #[serde(default = "default_941")] + #[serde(default = "default_943")] pub success: Option, - #[serde(default = "default_942")] + #[serde(default = "default_944")] pub made_at: String, - #[serde(default = "default_943")] + #[serde(default = "default_945")] pub stage: DecisionRowStage, - #[serde(default = "default_944")] + #[serde(default = "default_946")] pub similarity: f64, } @@ -20161,7 +20165,7 @@ pub struct ChainNodeRow { pub relation: String, pub direction: String, pub via: String, - #[serde(default = "default_946")] + #[serde(default = "default_948")] pub decision: Option, } @@ -20169,7 +20173,7 @@ pub struct ChainNodeRow { #[non_exhaustive] pub struct DecisionChainOutput { pub seed: String, - #[serde(default = "default_945")] + #[serde(default = "default_947")] pub seed_decision: Option, pub nodes: Vec, } @@ -20254,7 +20258,7 @@ impl DecisionChainInput { pub struct DecisionOutcomeOutput { pub memory_key: String, pub updated: bool, - #[serde(default = "default_947")] + #[serde(default = "default_949")] pub memories_credited: Integer, } @@ -20332,7 +20336,7 @@ impl DecisionOutcomeInput { #[non_exhaustive] pub struct DecisionPrecedentsOutput { pub precedents: Vec, - #[serde(default = "default_948")] + #[serde(default = "default_950")] pub embedding_model: String, } @@ -20427,11 +20431,11 @@ impl DecisionPrecedentsInput { pub struct DecisionRecordOutput { pub memory_key: String, pub record_id: String, - #[serde(default = "default_949")] + #[serde(default = "default_951")] pub superseded_prior: bool, - #[serde(default = "default_950")] + #[serde(default = "default_952")] pub edges_written: Integer, - #[serde(default = "default_951")] + #[serde(default = "default_953")] pub next: String, } @@ -20707,7 +20711,7 @@ pub enum ErasureExportOutputScopeType { pub struct ErasureExportSection { pub rows: Vec>, pub count: Integer, - #[serde(default = "default_952")] + #[serde(default = "default_954")] pub truncated: bool, } @@ -20820,17 +20824,17 @@ pub struct ErasureListRow { pub requester: String, pub status: ErasureListRowStatus, pub requested_at: String, - #[serde(default = "default_953")] + #[serde(default = "default_955")] pub completed_at: Option, - #[serde(default = "default_954")] + #[serde(default = "default_956")] pub failure_reason: String, - #[serde(default = "default_955")] + #[serde(default = "default_957")] pub steps_completed_count: Integer, - #[serde(default = "default_956")] + #[serde(default = "default_958")] pub reversals_count: Integer, - #[serde(default = "default_957")] + #[serde(default = "default_959")] pub residue_count: Integer, - #[serde(default = "default_958")] + #[serde(default = "default_960")] pub verified_at: Option, } @@ -20927,7 +20931,7 @@ pub enum ErasureRequestOutputStatus { pub struct ErasureStepResult { pub step: String, pub rows_affected: Integer, - #[serde(default = "default_959")] + #[serde(default = "default_961")] pub notes: String, } @@ -20938,21 +20942,21 @@ pub struct ErasureRequestOutput { pub status: ErasureRequestOutputStatus, pub steps: Vec, pub requested_at: String, - #[serde(default = "default_960")] + #[serde(default = "default_962")] pub completed_at: Option, - #[serde(default = "default_961")] + #[serde(default = "default_963")] pub residue_count: Integer, - #[serde(default = "default_962")] + #[serde(default = "default_964")] pub residue: std::collections::HashMap, - #[serde(default = "default_963")] + #[serde(default = "default_965")] pub verified_at: Option, - #[serde(default = "default_964")] + #[serde(default = "default_966")] pub census: Option>, - #[serde(default = "default_965")] + #[serde(default = "default_967")] pub purge: bool, - #[serde(default = "default_966")] + #[serde(default = "default_968")] pub failure_reason: String, - #[serde(default = "default_967")] + #[serde(default = "default_969")] pub steps_completed: Vec, } @@ -21064,33 +21068,33 @@ pub enum ErasureStatusOutputStatus { pub struct ErasureStatusOutput { pub found: bool, pub erasure_id: String, - #[serde(default = "default_968")] + #[serde(default = "default_970")] pub org: Option, - #[serde(default = "default_969")] + #[serde(default = "default_971")] pub scope_type: Option, - #[serde(default = "default_970")] + #[serde(default = "default_972")] pub scope_value: Option, - #[serde(default = "default_971")] + #[serde(default = "default_973")] pub requester: Option, - #[serde(default = "default_972")] + #[serde(default = "default_974")] pub status: Option, - #[serde(default = "default_973")] + #[serde(default = "default_975")] pub current_step: Option, - #[serde(default = "default_974")] + #[serde(default = "default_976")] pub requested_at: Option, - #[serde(default = "default_975")] + #[serde(default = "default_977")] pub completed_at: Option, - #[serde(default = "default_976")] + #[serde(default = "default_978")] pub failure_reason: Option, - #[serde(default = "default_977")] + #[serde(default = "default_979")] pub residue_count: Integer, - #[serde(default = "default_978")] + #[serde(default = "default_980")] pub residue: std::collections::HashMap, - #[serde(default = "default_979")] + #[serde(default = "default_981")] pub verified_at: Option, - #[serde(default = "default_980")] + #[serde(default = "default_982")] pub census: Option>, - #[serde(default = "default_981")] + #[serde(default = "default_983")] pub purge: bool, } @@ -21127,9 +21131,9 @@ pub enum ExtractionPolicyOutputScope { #[non_exhaustive] pub struct NamespacePolicy { pub namespace: String, - #[serde(default = "default_987")] + #[serde(default = "default_989")] pub updated_by: String, - #[serde(default = "default_988")] + #[serde(default = "default_990")] pub updated_at: Option, } @@ -21138,17 +21142,17 @@ pub struct NamespacePolicy { pub struct ExtractionPolicyOutput { pub org: String, pub scope: ExtractionPolicyOutputScope, - #[serde(default = "default_982")] + #[serde(default = "default_984")] pub namespace: String, - #[serde(default = "default_983")] + #[serde(default = "default_985")] pub policy: String, - #[serde(default = "default_984")] + #[serde(default = "default_986")] pub updated_by: String, - #[serde(default = "default_985")] + #[serde(default = "default_987")] pub updated_at: Option, - #[serde(default = "default_986")] + #[serde(default = "default_988")] pub effective: String, - #[serde(default = "default_989")] + #[serde(default = "default_991")] pub namespace_policies: Vec, } @@ -21382,13 +21386,13 @@ pub struct FactRow { pub object: String, pub co_occur: Integer, pub last_seen: String, - #[serde(default = "default_990")] + #[serde(default = "default_992")] pub provenance: String, - #[serde(default = "default_991")] + #[serde(default = "default_993")] pub source_keys: Vec, - #[serde(default = "default_992")] + #[serde(default = "default_994")] pub sources: Vec, - #[serde(default = "default_993")] + #[serde(default = "default_995")] pub stale: bool, } @@ -21396,7 +21400,7 @@ pub struct FactRow { #[non_exhaustive] pub struct FactsListOutput { pub rows: Vec, - #[serde(default = "default_994")] + #[serde(default = "default_996")] pub truncated: bool, } @@ -21615,14 +21619,14 @@ impl FactsListInput { pub struct PathEdge { pub entity_a: String, pub entity_b: String, - #[serde(default = "default_995")] + #[serde(default = "default_997")] pub relation: String, - #[serde(default = "default_996")] + #[serde(default = "default_998")] pub direction: String, pub co_occur: Integer, - #[serde(default = "default_997")] + #[serde(default = "default_999")] pub valid_from: Option, - #[serde(default = "default_998")] + #[serde(default = "default_1000")] pub valid_to: Option, } @@ -21853,23 +21857,23 @@ pub struct TraversalNode { pub hop: Integer, pub cumulative_weight: f64, pub via_co_occur: Integer, - #[serde(default = "default_1000")] + #[serde(default = "default_1002")] pub hub: bool, - #[serde(default = "default_1001")] + #[serde(default = "default_1003")] pub degree: Integer, - #[serde(default = "default_1002")] + #[serde(default = "default_1004")] pub via_relation: String, - #[serde(default = "default_1003")] + #[serde(default = "default_1005")] pub via_direction: String, - #[serde(default = "default_1004")] + #[serde(default = "default_1006")] pub via_provenance: String, - #[serde(default = "default_1005")] + #[serde(default = "default_1007")] pub valid_from: String, - #[serde(default = "default_1006")] + #[serde(default = "default_1008")] pub valid_to: String, - #[serde(default = "default_1007")] + #[serde(default = "default_1009")] pub community_id: Option, - #[serde(default = "default_1008")] + #[serde(default = "default_1010")] pub path: Vec, } @@ -21877,12 +21881,12 @@ pub struct TraversalNode { #[non_exhaustive] pub struct FactsTraverseOutput { pub seed: String, - #[serde(default = "default_999")] + #[serde(default = "default_1001")] pub seed_community_id: Option, pub nodes: Vec, - #[serde(default = "default_1009")] + #[serde(default = "default_1011")] pub truncated: bool, - #[serde(default = "default_1010")] + #[serde(default = "default_1012")] pub hubs: Vec, } @@ -22091,7 +22095,7 @@ pub struct GrantsApproveOutput { pub subject: String, pub namespace: String, pub decision: GrantsApproveOutputDecision, - #[serde(default = "default_1011")] + #[serde(default = "default_1013")] pub role: Option, pub decided_at: String, } @@ -22370,9 +22374,9 @@ pub struct GrantEntry { #[non_exhaustive] pub struct GrantsListOutput { pub rows: Vec, - #[serde(default = "default_1012")] + #[serde(default = "default_1014")] pub next_cursor: Option, - #[serde(default = "default_1013")] + #[serde(default = "default_1015")] pub truncated: bool, } @@ -22488,12 +22492,12 @@ pub enum PendingForMeEntryRequestedRole { #[non_exhaustive] pub struct PendingForMeEntry { pub namespace: String, - #[serde(default = "default_1014")] + #[serde(default = "default_1016")] pub kind: String, pub subject: String, pub current_role: PendingForMeEntryCurrentRole, pub requested_role: PendingForMeEntryRequestedRole, - #[serde(default = "default_1015")] + #[serde(default = "default_1017")] pub pending_since: Option, } @@ -22552,7 +22556,7 @@ impl GrantsPendingForMeInput { #[non_exhaustive] pub struct GrantsRevokeOutput { pub revoked: bool, - #[serde(default = "default_1016")] + #[serde(default = "default_1018")] pub revoked_at: Option, } @@ -22682,7 +22686,7 @@ impl GrantsShareAgentInput { #[non_exhaustive] pub struct GrantsUnshareAgentOutput { pub revoked: bool, - #[serde(default = "default_1017")] + #[serde(default = "default_1019")] pub revoked_at: Option, } @@ -22742,7 +22746,7 @@ pub enum HelpGetOutputAudience { pub struct HelpOutlineEntry { pub section: String, pub anchor: String, - #[serde(default = "default_1025")] + #[serde(default = "default_1027")] pub heading: String, } @@ -22752,21 +22756,21 @@ pub struct HelpGetOutput { pub available: bool, pub found: bool, pub path: String, - #[serde(default = "default_1018")] + #[serde(default = "default_1020")] pub title: String, - #[serde(default = "default_1019")] + #[serde(default = "default_1021")] pub section: String, - #[serde(default = "default_1020")] + #[serde(default = "default_1022")] pub anchor: String, - #[serde(default = "default_1021")] + #[serde(default = "default_1023")] pub audience: HelpGetOutputAudience, - #[serde(default = "default_1022")] + #[serde(default = "default_1024")] pub text: String, - #[serde(default = "default_1023")] + #[serde(default = "default_1025")] pub truncated: bool, - #[serde(default = "default_1024")] - pub next_offset: Integer, #[serde(default = "default_1026")] + pub next_offset: Integer, + #[serde(default = "default_1028")] pub sections: Vec, } @@ -22911,21 +22915,21 @@ pub struct InboxPayload { pub inbox: String, pub owner_agent: String, pub owner_namespace: String, - #[serde(default = "default_1027")] + #[serde(default = "default_1029")] pub description: String, - #[serde(default = "default_1028")] + #[serde(default = "default_1030")] pub posters: Vec, - #[serde(default = "default_1029")] + #[serde(default = "default_1031")] pub accept_disclosure: Vec, pub default_lease_seconds: Integer, pub max_attempts: Integer, pub max_defers: Integer, pub triage_escalate_after_seconds: Integer, - #[serde(default = "default_1030")] + #[serde(default = "default_1032")] pub webhook_url: String, - #[serde(default = "default_1031")] + #[serde(default = "default_1033")] pub created_by: String, - #[serde(default = "default_1032")] + #[serde(default = "default_1034")] pub owner_subject: String, pub created_at: String, pub updated_at: String, @@ -23035,9 +23039,9 @@ pub struct PolicyPayload { pub poster: String, pub kind: String, pub mode: PolicyPayloadMode, - #[serde(default = "default_1033")] + #[serde(default = "default_1035")] pub require_evidence: Vec, - #[serde(default = "default_1034")] + #[serde(default = "default_1036")] pub set_by: String, pub set_at: String, pub version: Integer, @@ -23107,7 +23111,7 @@ impl InboxPolicyListInput { pub struct InboxPolicySetOutput { #[serde(deserialize_with = "required_nullable")] pub policy: Option, - #[serde(default = "default_1035")] + #[serde(default = "default_1037")] pub removed: bool, } @@ -23236,15 +23240,15 @@ pub struct Principal { pub subject: String, pub label: String, pub kind: PrincipalKind, - #[serde(default = "default_1036")] + #[serde(default = "default_1038")] pub namespaces: Vec, - #[serde(default = "default_1037")] + #[serde(default = "default_1039")] pub roles: Vec, - #[serde(default = "default_1038")] + #[serde(default = "default_1040")] pub last_seen: Option, - #[serde(default = "default_1039")] + #[serde(default = "default_1041")] pub can_already_post: bool, - #[serde(default = "default_1040")] + #[serde(default = "default_1042")] pub listed: bool, } @@ -23606,15 +23610,15 @@ pub struct AnalysisColumn { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct InsightsQueryOutput { - #[serde(default = "default_1041")] + #[serde(default = "default_1043")] pub columns: Vec, - #[serde(default = "default_1042")] + #[serde(default = "default_1044")] pub rows: Vec>, - #[serde(default = "default_1043")] + #[serde(default = "default_1045")] pub row_count: Integer, - #[serde(default = "default_1044")] + #[serde(default = "default_1046")] pub truncated: bool, - #[serde(default = "default_1045")] + #[serde(default = "default_1047")] pub sql_digest: String, } @@ -23913,32 +23917,32 @@ pub struct DatasetOut { pub dataset_id: String, pub source_uri: String, pub name: String, - #[serde(default = "default_1046")] + #[serde(default = "default_1048")] pub sheet: String, - #[serde(default = "default_1047")] + #[serde(default = "default_1049")] pub row_start: Integer, - #[serde(default = "default_1048")] + #[serde(default = "default_1050")] pub row_end: Integer, pub revision: Integer, pub snapshot_id: String, pub schema_state: String, pub columns: Vec, - #[serde(default = "default_1049")] + #[serde(default = "default_1051")] pub clarifications: Vec, pub row_count: Integer, - #[serde(default = "default_1050")] + #[serde(default = "default_1052")] pub rejected_rows: Integer, - #[serde(default = "default_1051")] + #[serde(default = "default_1053")] pub rejected: Vec, - #[serde(default = "default_1052")] + #[serde(default = "default_1054")] pub complete: bool, - #[serde(default = "default_1053")] + #[serde(default = "default_1055")] pub approved_by: String, - #[serde(default = "default_1054")] + #[serde(default = "default_1056")] pub approved_at: Option, - #[serde(default = "default_1055")] + #[serde(default = "default_1057")] pub created_at: Option, - #[serde(default = "default_1056")] + #[serde(default = "default_1058")] pub rows: Vec>, } @@ -23946,9 +23950,9 @@ pub struct DatasetOut { #[non_exhaustive] pub struct KnowledgeDatasetApproveOutput { pub found: bool, - #[serde(default = "default_1057")] + #[serde(default = "default_1059")] pub dataset: Option, - #[serde(default = "default_1058")] + #[serde(default = "default_1060")] pub retyped: bool, } @@ -24042,9 +24046,9 @@ impl KnowledgeDatasetApproveInput { #[non_exhaustive] pub struct KnowledgeDatasetGetOutput { pub found: bool, - #[serde(default = "default_1059")] + #[serde(default = "default_1061")] pub revision: Integer, - #[serde(default = "default_1060")] + #[serde(default = "default_1062")] pub datasets: Vec, } @@ -24117,7 +24121,7 @@ impl KnowledgeDatasetGetInput { pub struct KnowledgeDocCluster { pub content_sha256: String, pub doc_count: Integer, - #[serde(default = "default_1061")] + #[serde(default = "default_1063")] pub docs: Vec>, } @@ -24127,16 +24131,16 @@ pub struct KnowledgeChunkCluster { pub content_sha256: String, pub chunk_count: Integer, pub uri_count: Integer, - #[serde(default = "default_1063")] + #[serde(default = "default_1065")] pub samples: Vec>, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct KnowledgeDedupListOutput { - #[serde(default = "default_1062")] - pub doc_clusters: Vec, #[serde(default = "default_1064")] + pub doc_clusters: Vec, + #[serde(default = "default_1066")] pub chunk_clusters: Vec, } @@ -24213,7 +24217,7 @@ pub struct KnowledgeDedupResolveOutput { pub canonical_uri: String, pub duplicate_uri: String, pub decision: String, - #[serde(default = "default_1065")] + #[serde(default = "default_1067")] pub superseded_uri: String, } @@ -24332,24 +24336,24 @@ impl KnowledgeDeleteInput { #[non_exhaustive] pub struct KnowledgeFormat { pub format: String, - #[serde(default = "default_1066")] + #[serde(default = "default_1068")] pub extensions: Vec, - #[serde(default = "default_1067")] + #[serde(default = "default_1069")] pub media_types: Vec, - #[serde(default = "default_1068")] + #[serde(default = "default_1070")] pub available: Option, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct KnowledgeFormatsOutput { - #[serde(default = "default_1069")] + #[serde(default = "default_1071")] pub formats: Vec, - #[serde(default = "default_1070")] + #[serde(default = "default_1072")] pub max_upload_bytes: Integer, - #[serde(default = "default_1071")] + #[serde(default = "default_1073")] pub refused_extensions: Vec, - #[serde(default = "default_1072")] + #[serde(default = "default_1074")] pub default_format: String, } @@ -24451,7 +24455,7 @@ impl KnowledgeGapsDraftInput { pub struct KnowledgeGap { pub gap_id: String, pub head: String, - #[serde(default = "default_1073")] + #[serde(default = "default_1075")] pub samples: Vec, pub askers: Integer, pub asks: Integer, @@ -24461,13 +24465,13 @@ pub struct KnowledgeGap { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct KnowledgeGapsListOutput { - #[serde(default = "default_1074")] + #[serde(default = "default_1076")] pub gaps: Vec, - #[serde(default = "default_1075")] + #[serde(default = "default_1077")] pub built_at: Option, - #[serde(default = "default_1076")] + #[serde(default = "default_1078")] pub capturing: Option, - #[serde(default = "default_1077")] + #[serde(default = "default_1079")] pub enabled: bool, } @@ -24533,7 +24537,7 @@ pub struct KnowledgeIngestOutput { pub ingestion_id: String, pub state: String, pub source_uri: String, - #[serde(default = "default_1078")] + #[serde(default = "default_1080")] pub namespace: String, } @@ -24752,9 +24756,9 @@ impl KnowledgeIngestInput { #[non_exhaustive] pub struct KnowledgeIngestCancelOutput { pub found: bool, - #[serde(default = "default_1079")] + #[serde(default = "default_1081")] pub state: String, - #[serde(default = "default_1080")] + #[serde(default = "default_1082")] pub cancelled: bool, } @@ -24805,39 +24809,39 @@ impl KnowledgeIngestCancelInput { pub struct KnowledgeIngestStatusOutput { pub found: bool, pub ingestion_id: String, - #[serde(default = "default_1081")] + #[serde(default = "default_1083")] pub source_uri: String, - #[serde(default = "default_1082")] + #[serde(default = "default_1084")] pub state: String, - #[serde(default = "default_1083")] + #[serde(default = "default_1085")] pub stage: String, - #[serde(default = "default_1084")] + #[serde(default = "default_1086")] pub attempts: Integer, - #[serde(default = "default_1085")] + #[serde(default = "default_1087")] pub error_code: String, - #[serde(default = "default_1086")] + #[serde(default = "default_1088")] pub error_message: String, - #[serde(default = "default_1087")] + #[serde(default = "default_1089")] pub format: String, - #[serde(default = "default_1088")] + #[serde(default = "default_1090")] pub coverage: Option>, - #[serde(default = "default_1089")] + #[serde(default = "default_1091")] pub warnings: Vec, - #[serde(default = "default_1090")] + #[serde(default = "default_1092")] pub chunks: Integer, - #[serde(default = "default_1091")] + #[serde(default = "default_1093")] pub revision: Integer, - #[serde(default = "default_1092")] + #[serde(default = "default_1094")] pub expected_revision: Option, - #[serde(default = "default_1093")] + #[serde(default = "default_1095")] pub filename: String, - #[serde(default = "default_1094")] + #[serde(default = "default_1096")] pub retrieval: String, - #[serde(default = "default_1095")] + #[serde(default = "default_1097")] pub cancel_requested: bool, - #[serde(default = "default_1096")] + #[serde(default = "default_1098")] pub created_at: Option, - #[serde(default = "default_1097")] + #[serde(default = "default_1099")] pub updated_at: Option, } @@ -24894,21 +24898,21 @@ pub struct DocumentCount { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct DocumentTotals { - #[serde(default = "default_1098")] + #[serde(default = "default_1100")] pub live: Option, - #[serde(default = "default_1099")] + #[serde(default = "default_1101")] pub deleted: Option, - #[serde(default = "default_1100")] + #[serde(default = "default_1102")] pub newest_ingested_at: Option, - #[serde(default = "default_1101")] + #[serde(default = "default_1103")] pub by_format: Vec, - #[serde(default = "default_1102")] + #[serde(default = "default_1104")] pub by_source_scheme: Vec, - #[serde(default = "default_1103")] + #[serde(default = "default_1105")] pub earlier_revisions: Option, - #[serde(default = "default_1104")] + #[serde(default = "default_1106")] pub unnumbered: Option, - #[serde(default = "default_1105")] + #[serde(default = "default_1107")] pub retired_versions: Option, } @@ -24923,15 +24927,15 @@ pub struct ChunkModelCount { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct ChunkTotals { - #[serde(default = "default_1106")] + #[serde(default = "default_1108")] pub embedder_model: String, - #[serde(default = "default_1107")] + #[serde(default = "default_1109")] pub live: Option, - #[serde(default = "default_1108")] + #[serde(default = "default_1110")] pub searchable: Option, - #[serde(default = "default_1109")] + #[serde(default = "default_1111")] pub unembedded: Option, - #[serde(default = "default_1110")] + #[serde(default = "default_1112")] pub by_model: Vec, } @@ -24956,9 +24960,9 @@ pub struct DocumentDecisions { #[non_exhaustive] pub struct DecisionTotals { pub definition: String, - #[serde(default = "default_1111")] + #[serde(default = "default_1113")] pub refs: Vec, - #[serde(default = "default_1112")] + #[serde(default = "default_1114")] pub all_documents: Option, } @@ -24973,7 +24977,7 @@ pub struct DocumentChunks { pub min_chars: Integer, pub median_chars: Integer, pub max_chars: Integer, - #[serde(default = "default_1115")] + #[serde(default = "default_1117")] pub models: Vec, } @@ -25023,11 +25027,11 @@ pub struct IngestJob { pub failure_class: IngestJobFailureClass, pub queued_at: String, pub updated_at: String, - #[serde(default = "default_1120")] + #[serde(default = "default_1122")] pub ended_at: Option, - #[serde(default = "default_1121")] + #[serde(default = "default_1123")] pub next_attempt_at: Option, - #[serde(default = "default_1122")] + #[serde(default = "default_1124")] pub stalled: bool, } @@ -25037,11 +25041,11 @@ pub struct SourceJobs { pub source_uri: String, pub jobs: Integer, pub open_jobs: Integer, - #[serde(default = "default_1119")] + #[serde(default = "default_1121")] pub open_ingestion_id: String, pub latest: IngestJob, pub current: IngestJob, - #[serde(default = "default_1123")] + #[serde(default = "default_1125")] pub replaced: bool, } @@ -25054,18 +25058,18 @@ pub struct InspectDocument { pub source_scheme: String, pub version: Integer, pub revision: Integer, - #[serde(default = "default_1113")] + #[serde(default = "default_1115")] pub ingestion_id: String, pub ingested_at: String, - #[serde(default = "default_1114")] - pub retired_versions: Option, #[serde(default = "default_1116")] + pub retired_versions: Option, + #[serde(default = "default_1118")] pub chunks: Option, - #[serde(default = "default_1117")] + #[serde(default = "default_1119")] pub decisions: Option, - #[serde(default = "default_1118")] + #[serde(default = "default_1120")] pub extraction: Option, - #[serde(default = "default_1124")] + #[serde(default = "default_1126")] pub jobs: Option, } @@ -25110,40 +25114,40 @@ pub struct DocumentFinding { pub kind: DocumentFindingKind, pub rule_version: Integer, pub source_op: String, - #[serde(default = "default_1127")] + #[serde(default = "default_1129")] pub window_seconds: Option, - #[serde(default = "default_1128")] + #[serde(default = "default_1130")] pub population: Option, pub sample_limit: Integer, pub samples_complete: bool, - #[serde(default = "default_1129")] + #[serde(default = "default_1131")] pub evidence: Vec, - #[serde(default = "default_1130")] + #[serde(default = "default_1132")] pub exceptions: String, - #[serde(default = "default_1131")] + #[serde(default = "default_1133")] pub uncertainty: String, pub code: String, pub severity: DocumentFindingSeverity, pub count: Integer, pub share: f64, - #[serde(default = "default_1132")] + #[serde(default = "default_1134")] pub samples: Vec, - #[serde(default = "default_1133")] + #[serde(default = "default_1135")] pub ingested: Integer, - #[serde(default = "default_1134")] + #[serde(default = "default_1136")] pub ingested_samples: Vec, pub detail: String, pub remedy: String, - #[serde(default = "default_1135")] + #[serde(default = "default_1137")] pub refs: Vec, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct ReportCoverage { - #[serde(default = "default_1137")] + #[serde(default = "default_1139")] pub rules_run: Vec, - #[serde(default = "default_1138")] + #[serde(default = "default_1140")] pub rules_skipped: Vec, pub complete: bool, } @@ -25151,43 +25155,43 @@ pub struct ReportCoverage { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct IngestionTotals { - #[serde(default = "default_1139")] + #[serde(default = "default_1141")] pub sources: Option, - #[serde(default = "default_1140")] + #[serde(default = "default_1142")] pub without_document: Option, - #[serde(default = "default_1141")] + #[serde(default = "default_1143")] pub replaced: Option, - #[serde(default = "default_1142")] + #[serde(default = "default_1144")] pub pending: Option, - #[serde(default = "default_1143")] + #[serde(default = "default_1145")] pub processing: Option, - #[serde(default = "default_1144")] + #[serde(default = "default_1146")] pub stalled: Option, - #[serde(default = "default_1145")] + #[serde(default = "default_1147")] pub ready: Option, - #[serde(default = "default_1146")] + #[serde(default = "default_1148")] pub partial: Option, - #[serde(default = "default_1147")] + #[serde(default = "default_1149")] pub failed: Option, - #[serde(default = "default_1148")] + #[serde(default = "default_1150")] pub cancelled: Option, - #[serde(default = "default_1149")] + #[serde(default = "default_1151")] pub oldest_open_queued_at: Option, pub worker_enabled: bool, - #[serde(default = "default_1150")] + #[serde(default = "default_1152")] pub extractor_configured: Option, - #[serde(default = "default_1151")] + #[serde(default = "default_1153")] pub without_document_listed: Vec, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct ExtractionTotals { - #[serde(default = "default_1152")] + #[serde(default = "default_1154")] pub documents: Option, - #[serde(default = "default_1153")] + #[serde(default = "default_1155")] pub incomplete: Option, - #[serde(default = "default_1154")] + #[serde(default = "default_1156")] pub lost: Vec, } @@ -25217,31 +25221,31 @@ pub struct IngestFinding { pub kind: IngestFindingKind, pub rule_version: Integer, pub source_op: String, - #[serde(default = "default_1155")] + #[serde(default = "default_1157")] pub window_seconds: Option, - #[serde(default = "default_1156")] + #[serde(default = "default_1158")] pub population: Option, pub sample_limit: Integer, pub samples_complete: bool, - #[serde(default = "default_1157")] + #[serde(default = "default_1159")] pub evidence: Vec, - #[serde(default = "default_1158")] + #[serde(default = "default_1160")] pub exceptions: String, - #[serde(default = "default_1159")] + #[serde(default = "default_1161")] pub uncertainty: String, pub code: String, pub severity: IngestFindingSeverity, pub count: Integer, pub share: f64, - #[serde(default = "default_1160")] + #[serde(default = "default_1162")] pub samples: Vec, - #[serde(default = "default_1161")] + #[serde(default = "default_1163")] pub ingestion_ids: Vec, - #[serde(default = "default_1162")] + #[serde(default = "default_1164")] pub without_document: Integer, pub detail: String, pub remedy: String, - #[serde(default = "default_1163")] + #[serde(default = "default_1165")] pub refs: Vec, } @@ -25268,20 +25272,20 @@ pub struct KnowledgeInspectOutput { pub documents: DocumentTotals, pub chunks: ChunkTotals, pub decisions: DecisionTotals, - #[serde(default = "default_1125")] + #[serde(default = "default_1127")] pub listed: Vec, - #[serde(default = "default_1126")] + #[serde(default = "default_1128")] pub listed_complete: bool, - #[serde(default = "default_1136")] + #[serde(default = "default_1138")] pub findings: Vec, pub coverage: ReportCoverage, pub ingestions: IngestionTotals, pub extraction: ExtractionTotals, - #[serde(default = "default_1164")] + #[serde(default = "default_1166")] pub ingest_findings: Vec, - #[serde(default = "default_1165")] + #[serde(default = "default_1167")] pub memory_findings: Vec, - #[serde(default = "default_1166")] + #[serde(default = "default_1168")] pub skipped: Vec, } @@ -25428,7 +25432,7 @@ pub struct KnowledgeListEntry { #[non_exhaustive] pub struct KnowledgeListOutput { pub rows: Vec, - #[serde(default = "default_1167")] + #[serde(default = "default_1169")] pub next_cursor: Option, } @@ -25594,9 +25598,9 @@ pub enum KnowledgeMoveResultReason { #[non_exhaustive] pub struct KnowledgeMoveResult { pub source_uri: String, - #[serde(default = "default_1169")] + #[serde(default = "default_1171")] pub moved: bool, - #[serde(default = "default_1170")] + #[serde(default = "default_1172")] pub reason: KnowledgeMoveResultReason, } @@ -25604,9 +25608,9 @@ pub struct KnowledgeMoveResult { #[non_exhaustive] pub struct KnowledgeMoveOutput { pub found: bool, - #[serde(default = "default_1168")] + #[serde(default = "default_1170")] pub to_namespace: String, - #[serde(default = "default_1171")] + #[serde(default = "default_1173")] pub results: Vec, } @@ -25672,17 +25676,17 @@ pub struct OutlineEntry { pub struct KnowledgeOutlineOutput { pub found: bool, pub source_uri: String, - #[serde(default = "default_1172")] + #[serde(default = "default_1174")] pub title: String, - #[serde(default = "default_1173")] + #[serde(default = "default_1175")] pub structured: bool, - #[serde(default = "default_1174")] + #[serde(default = "default_1176")] pub chunk_count: Integer, - #[serde(default = "default_1175")] + #[serde(default = "default_1177")] pub sections: Vec, - #[serde(default = "default_1176")] + #[serde(default = "default_1178")] pub section_content: Option, - #[serde(default = "default_1177")] + #[serde(default = "default_1179")] pub section_chunk_idxs: Vec, } @@ -25789,12 +25793,12 @@ pub struct QueryReceipt { pub struct KnowledgeQueryOutput { pub columns: Vec, pub rows: Vec>, - #[serde(default = "default_1178")] + #[serde(default = "default_1180")] pub row_ids: Vec>, - #[serde(default = "default_1179")] + #[serde(default = "default_1181")] pub truncated: bool, pub complete: bool, - #[serde(default = "default_1180")] + #[serde(default = "default_1182")] pub incomplete: Vec, pub receipt: QueryReceipt, } @@ -26467,9 +26471,9 @@ pub struct QueryHistoryListOutputQueryHistorySource { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct QueryHistoryListOutput { - #[serde(default = "default_1181")] + #[serde(default = "default_1183")] pub enabled: bool, - #[serde(default = "default_1182")] + #[serde(default = "default_1184")] pub sources: Vec, } @@ -26600,7 +26604,7 @@ impl QueryHistoryRemoveInput { #[non_exhaustive] pub struct KnowledgeReadsOutput { pub window_days: Integer, - #[serde(default = "default_1183")] + #[serde(default = "default_1185")] pub reads: Vec>, } @@ -26703,15 +26707,15 @@ pub enum KnowledgeRestoreOutputOriginal { #[non_exhaustive] pub struct KnowledgeRestoreOutput { pub restored: bool, - #[serde(default = "default_1184")] + #[serde(default = "default_1186")] pub reason: KnowledgeRestoreOutputReason, - #[serde(default = "default_1185")] + #[serde(default = "default_1187")] pub doc_id: String, - #[serde(default = "default_1186")] + #[serde(default = "default_1188")] pub revision: Option, - #[serde(default = "default_1187")] + #[serde(default = "default_1189")] pub chunks_restored: Integer, - #[serde(default = "default_1188")] + #[serde(default = "default_1190")] pub original: KnowledgeRestoreOutputOriginal, } @@ -26775,15 +26779,15 @@ impl KnowledgeRestoreInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct KnowledgeSourceProbe { - #[serde(default = "default_1192")] + #[serde(default = "default_1194")] pub documents: Integer, - #[serde(default = "default_1193")] + #[serde(default = "default_1195")] pub more: bool, - #[serde(default = "default_1194")] + #[serde(default = "default_1196")] pub sample: Vec, - #[serde(default = "default_1195")] + #[serde(default = "default_1197")] pub checked: Integer, - #[serde(default = "default_1196")] + #[serde(default = "default_1198")] pub sampled: bool, } @@ -26793,15 +26797,15 @@ pub struct KnowledgeSourceAddOutput { pub name: String, pub kind: String, pub namespace: String, - #[serde(default = "default_1189")] + #[serde(default = "default_1191")] pub items: Vec>, - #[serde(default = "default_1190")] + #[serde(default = "default_1192")] pub include: Vec, - #[serde(default = "default_1191")] + #[serde(default = "default_1193")] pub config: std::collections::HashMap, - #[serde(default = "default_1197")] + #[serde(default = "default_1199")] pub probe: KnowledgeSourceProbe, - #[serde(default = "default_1198")] + #[serde(default = "default_1200")] pub dry_run: bool, } @@ -26958,21 +26962,21 @@ impl KnowledgeSourceAddInput { #[non_exhaustive] pub struct KnowledgeSourceCheckOutput { pub name: String, - #[serde(default = "default_1199")] + #[serde(default = "default_1201")] pub reachable: bool, - #[serde(default = "default_1200")] + #[serde(default = "default_1202")] pub documents: Integer, - #[serde(default = "default_1201")] + #[serde(default = "default_1203")] pub more: bool, - #[serde(default = "default_1202")] + #[serde(default = "default_1204")] pub sample: Vec, - #[serde(default = "default_1203")] + #[serde(default = "default_1205")] pub checked: Integer, - #[serde(default = "default_1204")] + #[serde(default = "default_1206")] pub sampled: bool, - #[serde(default = "default_1205")] + #[serde(default = "default_1207")] pub summary: String, - #[serde(default = "default_1206")] + #[serde(default = "default_1208")] pub checked_at: String, } @@ -27021,37 +27025,37 @@ impl KnowledgeSourceCheckInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct KnowledgeSourceSync { - #[serde(default = "default_1215")] + #[serde(default = "default_1217")] pub requested_at: String, - #[serde(default = "default_1216")] + #[serde(default = "default_1218")] pub last_synced_at: String, - #[serde(default = "default_1217")] + #[serde(default = "default_1219")] pub status: String, - #[serde(default = "default_1218")] + #[serde(default = "default_1220")] pub documents_seen: Integer, - #[serde(default = "default_1219")] + #[serde(default = "default_1221")] pub changed: Integer, - #[serde(default = "default_1220")] + #[serde(default = "default_1222")] pub removed: Integer, - #[serde(default = "default_1221")] + #[serde(default = "default_1223")] pub unconverted: Integer, - #[serde(default = "default_1222")] + #[serde(default = "default_1224")] pub unconverted_reasons: std::collections::HashMap, - #[serde(default = "default_1223")] + #[serde(default = "default_1225")] pub skipped: Integer, - #[serde(default = "default_1224")] + #[serde(default = "default_1226")] pub error: String, - #[serde(default = "default_1225")] + #[serde(default = "default_1227")] pub pending_extract: Integer, - #[serde(default = "default_1226")] + #[serde(default = "default_1228")] pub last_extracted_at: String, - #[serde(default = "default_1227")] + #[serde(default = "default_1229")] pub extracted: Integer, - #[serde(default = "default_1228")] + #[serde(default = "default_1230")] pub flagged_pinned: Integer, - #[serde(default = "default_1229")] + #[serde(default = "default_1231")] pub unextracted: Integer, - #[serde(default = "default_1230")] + #[serde(default = "default_1232")] pub extract_error: String, } @@ -27059,11 +27063,11 @@ pub struct KnowledgeSourceSync { #[non_exhaustive] pub struct KnowledgeSourceDocument { pub source_uri: String, - #[serde(default = "default_1232")] + #[serde(default = "default_1234")] pub title: String, - #[serde(default = "default_1233")] + #[serde(default = "default_1235")] pub source_revision: String, - #[serde(default = "default_1234")] + #[serde(default = "default_1236")] pub ingested_at: String, } @@ -27072,25 +27076,25 @@ pub struct KnowledgeSourceDocument { pub struct KnowledgeSourceInspectOutput { pub name: String, pub kind: String, - #[serde(default = "default_1207")] + #[serde(default = "default_1209")] pub credential_mode: String, - #[serde(default = "default_1208")] + #[serde(default = "default_1210")] pub access: String, - #[serde(default = "default_1209")] + #[serde(default = "default_1211")] pub owner_subject: String, - #[serde(default = "default_1210")] + #[serde(default = "default_1212")] pub items: Vec>, - #[serde(default = "default_1211")] + #[serde(default = "default_1213")] pub include: Vec, - #[serde(default = "default_1212")] + #[serde(default = "default_1214")] pub config: std::collections::HashMap, - #[serde(default = "default_1213")] + #[serde(default = "default_1215")] pub created_by: String, - #[serde(default = "default_1214")] + #[serde(default = "default_1216")] pub created_at: String, - #[serde(default = "default_1231")] + #[serde(default = "default_1233")] pub sync: KnowledgeSourceSync, - #[serde(default = "default_1235")] + #[serde(default = "default_1237")] pub documents: Vec, } @@ -27143,34 +27147,34 @@ impl KnowledgeSourceInspectInput { pub struct KnowledgeSourceEntry { pub name: String, pub kind: String, - #[serde(default = "default_1236")] + #[serde(default = "default_1238")] pub credential_mode: String, - #[serde(default = "default_1237")] + #[serde(default = "default_1239")] pub access: String, - #[serde(default = "default_1238")] + #[serde(default = "default_1240")] pub owner_subject: String, - #[serde(default = "default_1239")] + #[serde(default = "default_1241")] pub items: Vec>, - #[serde(default = "default_1240")] + #[serde(default = "default_1242")] pub include: Vec, - #[serde(default = "default_1241")] + #[serde(default = "default_1243")] pub config: std::collections::HashMap, - #[serde(default = "default_1242")] + #[serde(default = "default_1244")] pub created_by: String, - #[serde(default = "default_1243")] + #[serde(default = "default_1245")] pub created_at: String, - #[serde(default = "default_1244")] + #[serde(default = "default_1246")] pub sync: KnowledgeSourceSync, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct KnowledgeSourceListOutput { - #[serde(default = "default_1245")] + #[serde(default = "default_1247")] pub sources: Vec, - #[serde(default = "default_1246")] + #[serde(default = "default_1248")] pub enabled: bool, - #[serde(default = "default_1247")] + #[serde(default = "default_1249")] pub accepts_sources: bool, } @@ -27223,18 +27227,18 @@ impl KnowledgeSourceListInput { #[non_exhaustive] pub struct KnowledgeSourceParsedLink { pub link: String, - #[serde(default = "default_1248")] + #[serde(default = "default_1250")] pub kind: String, - #[serde(default = "default_1249")] + #[serde(default = "default_1251")] pub item: std::collections::HashMap, - #[serde(default = "default_1250")] + #[serde(default = "default_1252")] pub unreadable: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct KnowledgeSourceParseLinksOutput { - #[serde(default = "default_1251")] + #[serde(default = "default_1253")] pub links: Vec, } @@ -27285,25 +27289,25 @@ impl KnowledgeSourceParseLinksInput { #[derive(Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct PushStatusOutput { - #[serde(default = "default_1252")] + #[serde(default = "default_1254")] pub enabled: bool, - #[serde(default = "default_1253")] + #[serde(default = "default_1255")] pub status: String, - #[serde(default = "default_1254")] + #[serde(default = "default_1256")] pub provider: String, - #[serde(default = "default_1255")] + #[serde(default = "default_1257")] pub generation: String, - #[serde(default = "default_1256")] + #[serde(default = "default_1258")] pub callback_url: String, - #[serde(default = "default_1257")] + #[serde(default = "default_1259")] pub provider_id: String, - #[serde(default = "default_1258")] + #[serde(default = "default_1260")] pub challenge_fingerprint: String, - #[serde(default = "default_1259")] + #[serde(default = "default_1261")] pub verification_token: String, - #[serde(default = "default_1260")] + #[serde(default = "default_1262")] pub channels: Integer, - #[serde(default = "default_1261")] + #[serde(default = "default_1263")] pub expires_at: f64, } impl std::fmt::Debug for PushStatusOutput { @@ -27548,7 +27552,7 @@ impl PushStatusInput { #[non_exhaustive] pub struct KnowledgeSourceRemoveOutput { pub name: String, - #[serde(default = "default_1262")] + #[serde(default = "default_1264")] pub documents_pending: Integer, } @@ -27611,9 +27615,9 @@ impl KnowledgeSourceRemoveInput { #[non_exhaustive] pub struct KnowledgeSourceRotateOutput { pub name: String, - #[serde(default = "default_1263")] + #[serde(default = "default_1265")] pub probe: KnowledgeSourceProbe, - #[serde(default = "default_1264")] + #[serde(default = "default_1266")] pub rotated_at: String, } @@ -27665,7 +27669,7 @@ impl KnowledgeSourceRotateInput { #[non_exhaustive] pub struct KnowledgeSourceSyncNowOutput { pub name: String, - #[serde(default = "default_1265")] + #[serde(default = "default_1267")] pub enabled: bool, } @@ -27728,17 +27732,17 @@ impl KnowledgeSourceSyncNowInput { #[non_exhaustive] pub struct KnowledgeSourceUpdateOutput { pub name: String, - #[serde(default = "default_1266")] + #[serde(default = "default_1268")] pub items: Vec>, - #[serde(default = "default_1267")] + #[serde(default = "default_1269")] pub include: Vec, - #[serde(default = "default_1268")] + #[serde(default = "default_1270")] pub config: std::collections::HashMap, - #[serde(default = "default_1269")] + #[serde(default = "default_1271")] pub added: Vec>, - #[serde(default = "default_1270")] + #[serde(default = "default_1272")] pub removed: Vec>, - #[serde(default = "default_1271")] + #[serde(default = "default_1273")] pub probe: KnowledgeSourceProbe, } @@ -27854,9 +27858,9 @@ impl KnowledgeSourceUpdateInput { pub struct CitedChunk { pub source_uri: String, pub chunk_idx: Integer, - #[serde(default = "default_1273")] + #[serde(default = "default_1275")] pub revision: Integer, - #[serde(default = "default_1274")] + #[serde(default = "default_1276")] pub locator: Option>, } @@ -27865,12 +27869,12 @@ pub struct CitedChunk { pub struct SynthesizeCalculation { pub columns: Vec, pub rows: Vec>, - #[serde(default = "default_1281")] + #[serde(default = "default_1283")] pub row_ids: Vec>, - #[serde(default = "default_1282")] + #[serde(default = "default_1284")] pub truncated: bool, pub complete: bool, - #[serde(default = "default_1283")] + #[serde(default = "default_1285")] pub incomplete: Vec, pub receipt: QueryReceipt, pub citation: String, @@ -27884,23 +27888,23 @@ pub struct KnowledgeSynthesizeOutput { pub chunks_read: Integer, pub documents: Integer, pub reduce_rounds: Integer, - #[serde(default = "default_1272")] + #[serde(default = "default_1274")] pub citations: Vec, - #[serde(default = "default_1275")] + #[serde(default = "default_1277")] pub cited_chunks: Vec, - #[serde(default = "default_1276")] + #[serde(default = "default_1278")] pub unsupported_citations: Vec, - #[serde(default = "default_1277")] + #[serde(default = "default_1279")] pub truncated: bool, - #[serde(default = "default_1278")] + #[serde(default = "default_1280")] pub abstain: bool, - #[serde(default = "default_1279")] + #[serde(default = "default_1281")] pub abstain_reason: String, - #[serde(default = "default_1280")] + #[serde(default = "default_1282")] pub clarification: String, - #[serde(default = "default_1284")] + #[serde(default = "default_1286")] pub calculations: Vec, - #[serde(default = "default_1285")] + #[serde(default = "default_1287")] pub model: String, } @@ -28016,13 +28020,13 @@ impl KnowledgeSynthesizeInput { #[non_exhaustive] pub struct KnowledgeUpdateMetadataOutput { pub updated: bool, - #[serde(default = "default_1286")] + #[serde(default = "default_1288")] pub title: String, - #[serde(default = "default_1287")] + #[serde(default = "default_1289")] pub description: String, - #[serde(default = "default_1288")] + #[serde(default = "default_1290")] pub tags: Vec, - #[serde(default = "default_1289")] + #[serde(default = "default_1291")] pub chunks_reindexed: Integer, } @@ -28134,13 +28138,13 @@ pub struct KnowledgeUpsertOutput { pub chunks_superseded: Integer, pub embedding_model: String, pub embedding_dim: Integer, - #[serde(default = "default_1290")] + #[serde(default = "default_1292")] pub duplicate_of_uri: String, - #[serde(default = "default_1291")] + #[serde(default = "default_1293")] pub duplicate_chunk_count: Integer, - #[serde(default = "default_1292")] + #[serde(default = "default_1294")] pub namespace: String, - #[serde(default = "default_1293")] + #[serde(default = "default_1295")] pub source_uri: String, } @@ -28325,26 +28329,26 @@ pub struct LearningEntry { pub memory_type: String, pub proposed_value: Value, pub supporter_count: Integer, - #[serde(default = "default_1294")] + #[serde(default = "default_1296")] pub supporter_sessions: Integer, - #[serde(default = "default_1295")] + #[serde(default = "default_1297")] pub supporter_writers: Integer, pub confidence_avg: f64, pub supporters: Vec, pub rationale: String, - #[serde(default = "default_1296")] + #[serde(default = "default_1298")] pub source_kind: String, - #[serde(default = "default_1297")] + #[serde(default = "default_1299")] pub source_resource_id: String, - #[serde(default = "default_1298")] + #[serde(default = "default_1300")] pub agent: String, pub status: LearningEntryStatus, pub proposed_at: String, - #[serde(default = "default_1299")] + #[serde(default = "default_1301")] pub decided_at: Option, - #[serde(default = "default_1300")] + #[serde(default = "default_1302")] pub decided_by: String, - #[serde(default = "default_1301")] + #[serde(default = "default_1303")] pub decision_reason: String, } @@ -28547,11 +28551,11 @@ pub enum LearningsReviewOutputNewStatus { pub struct LearningsReviewOutput { pub candidate_id: String, pub new_status: LearningsReviewOutputNewStatus, - #[serde(default = "default_1302")] + #[serde(default = "default_1304")] pub promoted_to_shared: bool, - #[serde(default = "default_1303")] + #[serde(default = "default_1305")] pub promoted_to_knowledge: bool, - #[serde(default = "default_1304")] + #[serde(default = "default_1306")] pub knowledge_source_uri: String, pub decided_at: String, } @@ -28755,7 +28759,7 @@ impl MemoryAgentsListInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct AggregateRow { - #[serde(default = "default_1305")] + #[serde(default = "default_1307")] pub group: std::collections::HashMap, pub metric: f64, } @@ -28763,9 +28767,9 @@ pub struct AggregateRow { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryAggregateOutput { - #[serde(default = "default_1306")] + #[serde(default = "default_1308")] pub rows: Vec, - #[serde(default = "default_1307")] + #[serde(default = "default_1309")] pub sql_executed: String, } @@ -28933,15 +28937,15 @@ impl MemoryAggregateInput { pub struct BulkSetResult { pub memory_key: String, pub version: Integer, - #[serde(default = "default_1308")] + #[serde(default = "default_1310")] pub memory_id: String, - #[serde(default = "default_1309")] + #[serde(default = "default_1311")] pub conflict_verdict: String, - #[serde(default = "default_1310")] + #[serde(default = "default_1312")] pub peers: Vec, - #[serde(default = "default_1311")] + #[serde(default = "default_1313")] pub next: String, - #[serde(default = "default_1312")] + #[serde(default = "default_1314")] pub pinned_blocker_id: String, } @@ -28949,29 +28953,29 @@ pub struct BulkSetResult { #[non_exhaustive] pub struct MemoryBulkSetOutput { pub written: Vec, - #[serde(default = "default_1313")] + #[serde(default = "default_1315")] pub skipped_pinned: Vec, - #[serde(default = "default_1314")] + #[serde(default = "default_1316")] pub skipped_locked: Vec, - #[serde(default = "default_1315")] + #[serde(default = "default_1317")] pub skipped_blacklisted: Vec, - #[serde(default = "default_1316")] + #[serde(default = "default_1318")] pub merged: Vec, - #[serde(default = "default_1317")] + #[serde(default = "default_1319")] pub value_updates_linked: Integer, - #[serde(default = "default_1318")] + #[serde(default = "default_1320")] pub rejected_pinned: Vec, - #[serde(default = "default_1319")] + #[serde(default = "default_1321")] pub duplicates: Vec, - #[serde(default = "default_1320")] + #[serde(default = "default_1322")] pub conflicted: Vec, - #[serde(default = "default_1321")] + #[serde(default = "default_1323")] pub unchecked: Integer, - #[serde(default = "default_1322")] + #[serde(default = "default_1324")] pub retyped: Vec, - #[serde(default = "default_1323")] + #[serde(default = "default_1325")] pub identity_duplicates: std::collections::HashMap, - #[serde(default = "default_1324")] + #[serde(default = "default_1326")] pub stage_ms: std::collections::HashMap, } @@ -29121,18 +29125,18 @@ pub enum ApplyRowStatus { #[non_exhaustive] pub struct ApplyRow { pub memory_key: String, - #[serde(default = "default_1332")] + #[serde(default = "default_1334")] pub memory_id: String, - #[serde(default = "default_1333")] + #[serde(default = "default_1335")] pub agent: String, - #[serde(default = "default_1334")] + #[serde(default = "default_1336")] pub user_id: String, - #[serde(default = "default_1335")] + #[serde(default = "default_1337")] pub session_id: String, pub status: ApplyRowStatus, - #[serde(default = "default_1336")] + #[serde(default = "default_1338")] pub version: Option, - #[serde(default = "default_1337")] + #[serde(default = "default_1339")] pub detail: String, } @@ -29142,21 +29146,21 @@ pub struct MemoryApplyOutput { pub action: String, pub dry_run: bool, pub target: String, - #[serde(default = "default_1325")] + #[serde(default = "default_1327")] pub matched: Integer, - #[serde(default = "default_1326")] + #[serde(default = "default_1328")] pub applied: Integer, - #[serde(default = "default_1327")] + #[serde(default = "default_1329")] pub would_apply: Integer, - #[serde(default = "default_1328")] + #[serde(default = "default_1330")] pub refused: Integer, - #[serde(default = "default_1329")] + #[serde(default = "default_1331")] pub noop: Integer, - #[serde(default = "default_1330")] + #[serde(default = "default_1332")] pub failed: Integer, - #[serde(default = "default_1331")] + #[serde(default = "default_1333")] pub truncated: bool, - #[serde(default = "default_1338")] + #[serde(default = "default_1340")] pub rows: Vec, } @@ -29890,137 +29894,137 @@ pub enum MemoryAskOutputDeepFirst { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryAskOutput { - #[serde(default = "default_1339")] + #[serde(default = "default_1341")] pub answer: String, - #[serde(default = "default_1340")] + #[serde(default = "default_1342")] pub source: MemoryAskOutputSource, - #[serde(default = "default_1341")] + #[serde(default = "default_1343")] pub abstain: bool, - #[serde(default = "default_1342")] + #[serde(default = "default_1344")] pub abstain_reason: String, - #[serde(default = "default_1343")] + #[serde(default = "default_1345")] pub memory_keys: Vec, - #[serde(default = "default_1344")] + #[serde(default = "default_1346")] pub results: Vec, - #[serde(default = "default_1345")] + #[serde(default = "default_1347")] pub cited_sessions: Vec, - #[serde(default = "default_1346")] + #[serde(default = "default_1348")] pub next: String, - #[serde(default = "default_1347")] + #[serde(default = "default_1349")] pub synth_model: String, - #[serde(default = "default_1348")] + #[serde(default = "default_1350")] pub route_tier: MemoryAskOutputRouteTier, - #[serde(default = "default_1349")] + #[serde(default = "default_1351")] pub route_reason: String, - #[serde(default = "default_1350")] + #[serde(default = "default_1352")] pub llm_cache_hits: Integer, - #[serde(default = "default_1351")] + #[serde(default = "default_1353")] pub llm_cache_misses: Integer, - #[serde(default = "default_1352")] + #[serde(default = "default_1354")] pub llm_cache: bool, - #[serde(default = "default_1353")] + #[serde(default = "default_1355")] pub llm_cache_saved_usd: f64, - #[serde(default = "default_1354")] + #[serde(default = "default_1356")] pub temporal_consistency: Option, - #[serde(default = "default_1355")] + #[serde(default = "default_1357")] pub citation_concentration: Option, - #[serde(default = "default_1356")] + #[serde(default = "default_1358")] pub escalated: bool, - #[serde(default = "default_1357")] + #[serde(default = "default_1359")] pub gate_mode: String, - #[serde(default = "default_1358")] + #[serde(default = "default_1360")] pub gate_kept: Integer, - #[serde(default = "default_1359")] + #[serde(default = "default_1361")] pub gate_dropped: Integer, - #[serde(default = "default_1360")] + #[serde(default = "default_1362")] pub pending_extraction: Integer, - #[serde(default = "default_1361")] + #[serde(default = "default_1363")] pub pending_evidence: Integer, - #[serde(default = "default_1362")] + #[serde(default = "default_1364")] pub retrieval_query: String, - #[serde(default = "default_1363")] + #[serde(default = "default_1365")] pub facets: Vec, - #[serde(default = "default_1364")] + #[serde(default = "default_1366")] pub facet_memories_added: Integer, - #[serde(default = "default_1365")] + #[serde(default = "default_1367")] pub consistency: MemoryAskOutputConsistency, - #[serde(default = "default_1366")] + #[serde(default = "default_1368")] pub consistency_score: f64, - #[serde(default = "default_1367")] + #[serde(default = "default_1369")] pub consistency_note: String, - #[serde(default = "default_1368")] + #[serde(default = "default_1370")] pub identifier_chase_hops: Integer, - #[serde(default = "default_1369")] + #[serde(default = "default_1371")] pub identifier_chase_added: Integer, - #[serde(default = "default_1370")] + #[serde(default = "default_1372")] pub premise_conflict: String, - #[serde(default = "default_1371")] + #[serde(default = "default_1373")] pub premise_note: String, - #[serde(default = "default_1372")] + #[serde(default = "default_1374")] pub premise_verdict: String, - #[serde(default = "default_1373")] + #[serde(default = "default_1375")] pub attribution_note: String, - #[serde(default = "default_1374")] + #[serde(default = "default_1376")] pub depth: MemoryAskOutputDepth, - #[serde(default = "default_1375")] + #[serde(default = "default_1377")] pub deep_fired: bool, - #[serde(default = "default_1376")] + #[serde(default = "default_1378")] pub decomposed: Vec, - #[serde(default = "default_1377")] + #[serde(default = "default_1379")] pub decomposed_parts: Integer, - #[serde(default = "default_1378")] + #[serde(default = "default_1380")] pub superseded_dropped: Integer, - #[serde(default = "default_1379")] + #[serde(default = "default_1381")] pub stale_sentences_masked: Integer, - #[serde(default = "default_1380")] + #[serde(default = "default_1382")] pub entity_followed: Vec, - #[serde(default = "default_1381")] + #[serde(default = "default_1383")] pub when_evidence_turns: Integer, - #[serde(default = "default_1382")] + #[serde(default = "default_1384")] pub decompose_failed: Integer, - #[serde(default = "default_1383")] + #[serde(default = "default_1385")] pub pool_k: Integer, - #[serde(default = "default_1384")] + #[serde(default = "default_1386")] pub grounding: MemoryAskOutputGrounding, - #[serde(default = "default_1385")] + #[serde(default = "default_1387")] pub deep_reason: String, - #[serde(default = "default_1386")] + #[serde(default = "default_1388")] pub deep_keys: Vec, - #[serde(default = "default_1387")] + #[serde(default = "default_1389")] pub deep_chars: Integer, - #[serde(default = "default_1388")] + #[serde(default = "default_1390")] pub code_hits: Integer, - #[serde(default = "default_1389")] + #[serde(default = "default_1391")] pub pool_facts: Integer, - #[serde(default = "default_1390")] + #[serde(default = "default_1392")] pub pool_chunks: Integer, - #[serde(default = "default_1391")] + #[serde(default = "default_1393")] pub prompt_blocks: std::collections::HashMap, - #[serde(default = "default_1392")] + #[serde(default = "default_1394")] pub deep_selector: MemoryAskOutputDeepSelector, - #[serde(default = "default_1393")] + #[serde(default = "default_1395")] pub deep_first: MemoryAskOutputDeepFirst, - #[serde(default = "default_1394")] + #[serde(default = "default_1396")] pub synth_calls: Integer, - #[serde(default = "default_1395")] + #[serde(default = "default_1397")] pub synth_input_tokens: Integer, - #[serde(default = "default_1396")] + #[serde(default = "default_1398")] pub synth_cached_input_tokens: Integer, - #[serde(default = "default_1397")] + #[serde(default = "default_1399")] pub synth_cache_write_tokens: Integer, - #[serde(default = "default_1398")] + #[serde(default = "default_1400")] pub synth_cost_usd: f64, - #[serde(default = "default_1399")] + #[serde(default = "default_1401")] pub context_tokens_est: Integer, - #[serde(default = "default_1400")] + #[serde(default = "default_1402")] pub context_trimmed: Integer, - #[serde(default = "default_1401")] + #[serde(default = "default_1403")] pub summary_hits: Integer, - #[serde(default = "default_1402")] + #[serde(default = "default_1404")] pub knowledge_hits: Integer, - #[serde(default = "default_1403")] + #[serde(default = "default_1405")] pub timeline_rows: Integer, - #[serde(default = "default_1404")] + #[serde(default = "default_1406")] pub count_recomputed: bool, } @@ -30975,36 +30979,36 @@ pub struct MemoryAutoRetirement { pub reason: String, pub memory_id: String, pub memory_key: String, - #[serde(default = "default_1405")] + #[serde(default = "default_1407")] pub agent: String, - #[serde(default = "default_1406")] + #[serde(default = "default_1408")] pub user_id: String, - #[serde(default = "default_1407")] + #[serde(default = "default_1409")] pub session_id: String, - #[serde(default = "default_1408")] + #[serde(default = "default_1410")] pub superseded_by: String, - #[serde(default = "default_1409")] + #[serde(default = "default_1411")] pub superseded_by_key: String, - #[serde(default = "default_1410")] + #[serde(default = "default_1412")] pub label: String, - #[serde(default = "default_1411")] + #[serde(default = "default_1413")] pub unconfirmed: bool, - #[serde(default = "default_1412")] + #[serde(default = "default_1414")] pub judge_verdict: String, - #[serde(default = "default_1413")] + #[serde(default = "default_1415")] pub judge_confidence: Option, - #[serde(default = "default_1414")] + #[serde(default = "default_1416")] pub judge_model: String, - #[serde(default = "default_1415")] + #[serde(default = "default_1417")] pub judge_prompt_version: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryAutoRetirementsOutput { - #[serde(default = "default_1416")] + #[serde(default = "default_1418")] pub rows: Vec, - #[serde(default = "default_1417")] + #[serde(default = "default_1419")] pub next_cursor: Option, } @@ -31098,9 +31102,9 @@ impl MemoryAutoRetirementsInput { #[non_exhaustive] pub struct BacklinkVersion { pub version: Integer, - #[serde(default = "default_1419")] + #[serde(default = "default_1421")] pub status: String, - #[serde(default = "default_1420")] + #[serde(default = "default_1422")] pub created_at: String, } @@ -31108,7 +31112,7 @@ pub struct BacklinkVersion { #[non_exhaustive] pub struct BacklinkDigest { pub session_id: String, - #[serde(default = "default_1422")] + #[serde(default = "default_1424")] pub date: String, } @@ -31116,9 +31120,9 @@ pub struct BacklinkDigest { #[non_exhaustive] pub struct BacklinkEdge { pub memory_key: String, - #[serde(default = "default_1424")] + #[serde(default = "default_1426")] pub relation: String, - #[serde(default = "default_1425")] + #[serde(default = "default_1427")] pub created_at: String, } @@ -31126,7 +31130,7 @@ pub struct BacklinkEdge { #[non_exhaustive] pub struct BacklinkRelated { pub memory_key: String, - #[serde(default = "default_1429")] + #[serde(default = "default_1431")] pub shared_entities: Vec, } @@ -31134,19 +31138,19 @@ pub struct BacklinkRelated { #[non_exhaustive] pub struct MemoryBacklinksOutput { pub memory_key: String, - #[serde(default = "default_1418")] + #[serde(default = "default_1420")] pub found: bool, - #[serde(default = "default_1421")] - pub versions: Vec, #[serde(default = "default_1423")] + pub versions: Vec, + #[serde(default = "default_1425")] pub digests: Vec, - #[serde(default = "default_1426")] + #[serde(default = "default_1428")] pub links_in: Vec, - #[serde(default = "default_1427")] + #[serde(default = "default_1429")] pub links_out: Vec, - #[serde(default = "default_1428")] - pub evidence_count: Integer, #[serde(default = "default_1430")] + pub evidence_count: Integer, + #[serde(default = "default_1432")] pub related: Vec, } @@ -31251,36 +31255,36 @@ impl MemoryBacklinksInput { #[non_exhaustive] pub struct BriefEvidence { pub memory_key: String, - #[serde(default = "default_1435")] + #[serde(default = "default_1437")] pub source: String, - #[serde(default = "default_1436")] + #[serde(default = "default_1438")] pub source_class: String, - #[serde(default = "default_1437")] + #[serde(default = "default_1439")] pub verified: bool, - #[serde(default = "default_1438")] + #[serde(default = "default_1440")] pub when: String, - #[serde(default = "default_1439")] + #[serde(default = "default_1441")] pub session_id: String, - #[serde(default = "default_1440")] + #[serde(default = "default_1442")] pub excerpt: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryBriefOutput { - #[serde(default = "default_1431")] + #[serde(default = "default_1433")] pub query: String, - #[serde(default = "default_1432")] + #[serde(default = "default_1434")] pub answer: String, - #[serde(default = "default_1433")] + #[serde(default = "default_1435")] pub abstained: bool, - #[serde(default = "default_1434")] + #[serde(default = "default_1436")] pub grounding: String, - #[serde(default = "default_1441")] + #[serde(default = "default_1443")] pub evidence: Vec, - #[serde(default = "default_1442")] + #[serde(default = "default_1444")] pub unknowns: Vec, - #[serde(default = "default_1443")] + #[serde(default = "default_1445")] pub next_reads: Vec, } @@ -31694,9 +31698,9 @@ pub struct MemoryBulkGetOutputMemoryGetOutput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryBulkGetOutput { - #[serde(default = "default_1444")] + #[serde(default = "default_1446")] pub results: std::collections::HashMap, - #[serde(default = "default_1445")] + #[serde(default = "default_1447")] pub missing: Vec, } @@ -32209,7 +32213,7 @@ pub struct MemoryClearOutput { pub cleared_at: String, pub rows_affected: std::collections::HashMap, pub total: Integer, - #[serde(default = "default_1446")] + #[serde(default = "default_1448")] pub locked_skipped: Integer, } @@ -32297,21 +32301,21 @@ pub struct MemoryConsolidateResult { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryConsolidateOutput { - #[serde(default = "default_1447")] + #[serde(default = "default_1449")] pub consolidated: Vec, - #[serde(default = "default_1448")] + #[serde(default = "default_1450")] pub examined: Integer, - #[serde(default = "default_1449")] + #[serde(default = "default_1451")] pub clusters_found: Integer, - #[serde(default = "default_1450")] + #[serde(default = "default_1452")] pub clusters_failed: Integer, - #[serde(default = "default_1451")] + #[serde(default = "default_1453")] pub clusters_refused_lossy: Integer, - #[serde(default = "default_1452")] + #[serde(default = "default_1454")] pub skipped_in_flight: Integer, - #[serde(default = "default_1453")] + #[serde(default = "default_1455")] pub tokens_in: Integer, - #[serde(default = "default_1454")] + #[serde(default = "default_1456")] pub tokens_out: Integer, } @@ -32452,7 +32456,7 @@ impl MemoryConsolidateInput { #[non_exhaustive] pub struct MemoryCopyToOutput { pub copied: bool, - #[serde(default = "default_1455")] + #[serde(default = "default_1457")] pub target_memory_id: String, pub target_namespace: String, pub target_key: String, @@ -32563,11 +32567,11 @@ impl MemoryCopyToInput { #[non_exhaustive] pub struct MemoryCrossPromoteOutput { pub promoted: bool, - #[serde(default = "default_1456")] + #[serde(default = "default_1458")] pub target_memory_id: String, pub target_namespace: String, pub target_key: String, - #[serde(default = "default_1457")] + #[serde(default = "default_1459")] pub cross_promoted_from_memory_id: String, } @@ -32650,23 +32654,23 @@ pub struct DedupCollapsePair { #[non_exhaustive] pub struct MemoryDedupCollapseOutput { pub namespace: String, - #[serde(default = "default_1458")] + #[serde(default = "default_1460")] pub prefix: String, - #[serde(default = "default_1459")] + #[serde(default = "default_1461")] pub dry_run: bool, - #[serde(default = "default_1460")] + #[serde(default = "default_1462")] pub pairs: Integer, - #[serde(default = "default_1461")] + #[serde(default = "default_1463")] pub canonical_live: Integer, - #[serde(default = "default_1462")] + #[serde(default = "default_1464")] pub orphans: Integer, - #[serde(default = "default_1463")] + #[serde(default = "default_1465")] pub mirror_stale: Integer, - #[serde(default = "default_1464")] + #[serde(default = "default_1466")] pub restamped: Integer, - #[serde(default = "default_1465")] + #[serde(default = "default_1467")] pub truncated: bool, - #[serde(default = "default_1466")] + #[serde(default = "default_1468")] pub sample: Vec, } @@ -32765,7 +32769,7 @@ pub struct DedupDuplicate { pub memory_id: String, pub memory_key: String, pub agent: String, - #[serde(default = "default_1469")] + #[serde(default = "default_1471")] pub created_at: Option, } @@ -32773,12 +32777,12 @@ pub struct DedupDuplicate { #[non_exhaustive] pub struct DedupCluster { pub canonical_id: String, - #[serde(default = "default_1467")] + #[serde(default = "default_1469")] pub canonical_key: String, - #[serde(default = "default_1468")] + #[serde(default = "default_1470")] pub canonical_agent: String, pub dup_count: Integer, - #[serde(default = "default_1470")] + #[serde(default = "default_1472")] pub duplicates: Vec, } @@ -32850,11 +32854,11 @@ pub struct MemoryDedupResolveOutput { pub canonical_key: String, pub duplicate_key: String, pub decision: String, - #[serde(default = "default_1471")] + #[serde(default = "default_1473")] pub canonical_tombstoned: bool, - #[serde(default = "default_1472")] + #[serde(default = "default_1474")] pub duplicate_tombstoned: bool, - #[serde(default = "default_1473")] + #[serde(default = "default_1475")] pub ignored_args: Vec, } @@ -32992,17 +32996,17 @@ pub struct LostName { pub struct DefinitionEntry { pub memory_key: String, pub promoted_at: String, - #[serde(default = "default_1474")] + #[serde(default = "default_1476")] pub capped: bool, - #[serde(default = "default_1475")] + #[serde(default = "default_1477")] pub term: Option, - #[serde(default = "default_1476")] + #[serde(default = "default_1478")] pub aliases: Vec, - #[serde(default = "default_1477")] + #[serde(default = "default_1479")] pub verdict: Option, - #[serde(default = "default_1478")] + #[serde(default = "default_1480")] pub lapse_reason: Option, - #[serde(default = "default_1479")] + #[serde(default = "default_1481")] pub lost: Vec, } @@ -33063,15 +33067,15 @@ impl MemoryDefinitionsListInput { #[non_exhaustive] pub struct MemoryDeleteVersionOutput { pub tombstoned: bool, - #[serde(default = "default_1480")] + #[serde(default = "default_1482")] pub version: Integer, - #[serde(default = "default_1481")] + #[serde(default = "default_1483")] pub found: bool, - #[serde(default = "default_1482")] + #[serde(default = "default_1484")] pub reason: String, - #[serde(default = "default_1483")] + #[serde(default = "default_1485")] pub dependents_tombstoned: Integer, - #[serde(default = "default_1484")] + #[serde(default = "default_1486")] pub dependents_downgraded: Integer, } @@ -33198,21 +33202,21 @@ pub struct DemonstrationRow { pub struct MemoryDemonstrateOutput { pub query: String, pub demonstrations: Vec, - #[serde(default = "default_1485")] + #[serde(default = "default_1487")] pub votes: std::collections::HashMap, - #[serde(default = "default_1486")] + #[serde(default = "default_1488")] pub predicted_label: String, - #[serde(default = "default_1487")] + #[serde(default = "default_1489")] pub margin: f64, - #[serde(default = "default_1488")] + #[serde(default = "default_1490")] pub abstain: bool, - #[serde(default = "default_1489")] + #[serde(default = "default_1491")] pub abstain_reason: String, - #[serde(default = "default_1490")] + #[serde(default = "default_1492")] pub few_shot_block: String, - #[serde(default = "default_1491")] + #[serde(default = "default_1493")] pub examined: Integer, - #[serde(default = "default_1492")] + #[serde(default = "default_1494")] pub labelled: Integer, } @@ -33352,7 +33356,7 @@ impl MemoryDemonstrateInput { pub struct MemoryDemoteOutput { pub demoted: bool, pub was_reversible: bool, - #[serde(default = "default_1493")] + #[serde(default = "default_1495")] pub tombstoned_at: Option, } @@ -33414,15 +33418,15 @@ impl MemoryDemoteInput { pub struct DigestRow { pub session_id: String, pub summary_text: String, - #[serde(default = "default_1494")] + #[serde(default = "default_1496")] pub key_facts: Vec, - #[serde(default = "default_1495")] + #[serde(default = "default_1497")] pub derived_from: Vec, - #[serde(default = "default_1496")] + #[serde(default = "default_1498")] pub valid_at: Option, - #[serde(default = "default_1497")] + #[serde(default = "default_1499")] pub created_at: Option, - #[serde(default = "default_1498")] + #[serde(default = "default_1500")] pub version: Integer, } @@ -33430,7 +33434,7 @@ pub struct DigestRow { #[non_exhaustive] pub struct MemoryDigestsOutput { pub rows: Vec, - #[serde(default = "default_1499")] + #[serde(default = "default_1501")] pub truncated: bool, } @@ -33555,17 +33559,17 @@ pub struct MemoryEvidenceItem { pub evidence_id: String, pub support_type: String, pub scope: MemoryEvidenceItemScope, - #[serde(default = "default_1503")] + #[serde(default = "default_1505")] pub role: String, - #[serde(default = "default_1504")] + #[serde(default = "default_1506")] pub observed_at: Option, - #[serde(default = "default_1505")] + #[serde(default = "default_1507")] pub content: String, - #[serde(default = "default_1506")] + #[serde(default = "default_1508")] pub char_start: Integer, - #[serde(default = "default_1507")] + #[serde(default = "default_1509")] pub char_end: Integer, - #[serde(default = "default_1508")] + #[serde(default = "default_1510")] pub span: String, } @@ -33573,23 +33577,23 @@ pub struct MemoryEvidenceItem { #[non_exhaustive] pub struct MemoryEvidenceOutput { pub found: bool, - #[serde(default = "default_1500")] + #[serde(default = "default_1502")] pub memory_key: String, - #[serde(default = "default_1501")] + #[serde(default = "default_1503")] pub memory_id: String, - #[serde(default = "default_1502")] + #[serde(default = "default_1504")] pub value: String, - #[serde(default = "default_1509")] + #[serde(default = "default_1511")] pub items: Vec, - #[serde(default = "default_1510")] + #[serde(default = "default_1512")] pub truncated: bool, - #[serde(default = "default_1511")] + #[serde(default = "default_1513")] pub cited: Integer, - #[serde(default = "default_1512")] + #[serde(default = "default_1514")] pub lexical: Integer, - #[serde(default = "default_1513")] + #[serde(default = "default_1515")] pub window: Integer, - #[serde(default = "default_1514")] + #[serde(default = "default_1516")] pub derived: Integer, } @@ -33694,26 +33698,26 @@ impl MemoryEvidenceInput { #[non_exhaustive] pub struct EvidenceChunk { pub session_id: String, - #[serde(default = "default_1515")] + #[serde(default = "default_1517")] pub chunk_index: Integer, pub content: String, - #[serde(default = "default_1516")] + #[serde(default = "default_1518")] pub content_sha256: String, - #[serde(default = "default_1517")] + #[serde(default = "default_1519")] pub agent: String, - #[serde(default = "default_1518")] + #[serde(default = "default_1520")] pub user_id: String, - #[serde(default = "default_1519")] + #[serde(default = "default_1521")] pub parent_memory_key: String, - #[serde(default = "default_1520")] + #[serde(default = "default_1522")] pub memory_keys: Vec, - #[serde(default = "default_1521")] + #[serde(default = "default_1523")] pub line_start: Integer, - #[serde(default = "default_1522")] + #[serde(default = "default_1524")] pub line_end: Integer, - #[serde(default = "default_1523")] + #[serde(default = "default_1525")] pub created_at: String, - #[serde(default = "default_1524")] + #[serde(default = "default_1526")] pub source_url: String, } @@ -33722,17 +33726,17 @@ pub struct EvidenceChunk { pub struct EvidenceDigest { pub session_id: String, pub summary_text: String, - #[serde(default = "default_1526")] + #[serde(default = "default_1528")] pub agent: String, - #[serde(default = "default_1527")] + #[serde(default = "default_1529")] pub user_id: String, - #[serde(default = "default_1528")] + #[serde(default = "default_1530")] pub key_facts: Vec, - #[serde(default = "default_1529")] + #[serde(default = "default_1531")] pub derived_from: Vec, - #[serde(default = "default_1530")] + #[serde(default = "default_1532")] pub valid_at: String, - #[serde(default = "default_1531")] + #[serde(default = "default_1533")] pub created_at: String, } @@ -33742,28 +33746,28 @@ pub struct EvidenceEdge { pub from_key: String, pub to_key: String, pub relation: String, - #[serde(default = "default_1533")] + #[serde(default = "default_1535")] pub confidence: f64, - #[serde(default = "default_1534")] + #[serde(default = "default_1536")] pub explanation: String, - #[serde(default = "default_1535")] + #[serde(default = "default_1537")] pub created_at: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryExportEvidenceOutput { - #[serde(default = "default_1525")] + #[serde(default = "default_1527")] pub chunks: Vec, - #[serde(default = "default_1532")] + #[serde(default = "default_1534")] pub digests: Vec, - #[serde(default = "default_1536")] + #[serde(default = "default_1538")] pub edges: Vec, - #[serde(default = "default_1537")] + #[serde(default = "default_1539")] pub has_more: bool, - #[serde(default = "default_1538")] + #[serde(default = "default_1540")] pub next_cursor: String, - #[serde(default = "default_1539")] + #[serde(default = "default_1541")] pub held_high: Integer, } @@ -33956,15 +33960,15 @@ impl ExposureSummaryInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryExtractionRetryMineOutput { - #[serde(default = "default_1540")] + #[serde(default = "default_1542")] pub requeued: Vec, - #[serde(default = "default_1541")] + #[serde(default = "default_1543")] pub not_failed: Vec, - #[serde(default = "default_1542")] + #[serde(default = "default_1544")] pub model_calls_off: Vec, - #[serde(default = "default_1543")] + #[serde(default = "default_1545")] pub expired: Vec, - #[serde(default = "default_1544")] + #[serde(default = "default_1546")] pub unknown: Vec, } @@ -34025,20 +34029,20 @@ pub struct ExtractionQueueRow { pub content_chars: Integer, pub written: Integer, pub last_error: String, - #[serde(default = "default_1545")] + #[serde(default = "default_1547")] pub enqueued_at: Option, - #[serde(default = "default_1546")] + #[serde(default = "default_1548")] pub updated_at: Option, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryExtractionStatusOutput { - #[serde(default = "default_1547")] + #[serde(default = "default_1549")] pub batches: Vec, - #[serde(default = "default_1548")] + #[serde(default = "default_1550")] pub pending: Integer, - #[serde(default = "default_1549")] + #[serde(default = "default_1551")] pub failed: Integer, } @@ -34186,13 +34190,13 @@ impl MemoryExtractionStatusInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryExtractionStatusMineOutput { - #[serde(default = "default_1550")] + #[serde(default = "default_1552")] pub batches: Vec, - #[serde(default = "default_1551")] + #[serde(default = "default_1553")] pub unknown: Vec, - #[serde(default = "default_1552")] + #[serde(default = "default_1554")] pub pending: Integer, - #[serde(default = "default_1553")] + #[serde(default = "default_1555")] pub failed: Integer, } @@ -34313,39 +34317,39 @@ pub struct MemoryForFileHit { pub memory_key: String, pub memory_type: String, pub value: String, - #[serde(default = "default_1554")] + #[serde(default = "default_1556")] pub value_truncated: bool, - #[serde(default = "default_1555")] + #[serde(default = "default_1557")] pub tags: Vec, - #[serde(default = "default_1556")] + #[serde(default = "default_1558")] pub confidence: f64, - #[serde(default = "default_1557")] + #[serde(default = "default_1559")] pub pinned: bool, - #[serde(default = "default_1558")] + #[serde(default = "default_1560")] pub status: String, - #[serde(default = "default_1559")] + #[serde(default = "default_1561")] pub agent: String, - #[serde(default = "default_1560")] + #[serde(default = "default_1562")] pub updated_at: Option, - #[serde(default = "default_1561")] + #[serde(default = "default_1563")] pub namespace: String, - #[serde(default = "default_1562")] + #[serde(default = "default_1564")] pub actor: String, - #[serde(default = "default_1563")] + #[serde(default = "default_1565")] pub supersedes_key: String, - #[serde(default = "default_1564")] + #[serde(default = "default_1566")] pub supersedes: String, - #[serde(default = "default_1565")] + #[serde(default = "default_1567")] pub supersedes_kind: MemoryForFileHitSupersedesKind, - #[serde(default = "default_1566")] + #[serde(default = "default_1568")] pub matched_files: Vec, - #[serde(default = "default_1567")] + #[serde(default = "default_1569")] pub source_resource_id: String, - #[serde(default = "default_1568")] + #[serde(default = "default_1570")] pub verification: MemoryForFileHitVerification, - #[serde(default = "default_1569")] + #[serde(default = "default_1571")] pub code_state: MemoryForFileHitCodeState, - #[serde(default = "default_1570")] + #[serde(default = "default_1572")] pub code_moved: Vec, } @@ -34355,11 +34359,11 @@ pub struct MemoryForFileOutput { pub path: String, pub total: Integer, pub hits: Vec, - #[serde(default = "default_1571")] + #[serde(default = "default_1573")] pub rendered: String, - #[serde(default = "default_1572")] + #[serde(default = "default_1574")] pub tokens_estimate: Integer, - #[serde(default = "default_1573")] + #[serde(default = "default_1575")] pub truncated: bool, } @@ -34467,61 +34471,61 @@ impl MemoryForFileInput { #[non_exhaustive] pub struct MemoryGetByIdOutput { pub found: bool, - #[serde(default = "default_1574")] + #[serde(default = "default_1576")] pub memory_id: String, - #[serde(default = "default_1575")] + #[serde(default = "default_1577")] pub namespace: String, - #[serde(default = "default_1576")] + #[serde(default = "default_1578")] pub agent: String, - #[serde(default = "default_1577")] + #[serde(default = "default_1579")] pub user_id: String, - #[serde(default = "default_1578")] + #[serde(default = "default_1580")] pub session_id: String, - #[serde(default = "default_1579")] + #[serde(default = "default_1581")] pub memory_key: String, - #[serde(default = "default_1580")] + #[serde(default = "default_1582")] pub memory_type: Option, - #[serde(default = "default_1581")] + #[serde(default = "default_1583")] pub value: Value, - #[serde(default = "default_1582")] + #[serde(default = "default_1584")] pub confidence: Option, - #[serde(default = "default_1583")] + #[serde(default = "default_1585")] pub version: Option, - #[serde(default = "default_1584")] + #[serde(default = "default_1586")] pub created_at: Option, - #[serde(default = "default_1585")] + #[serde(default = "default_1587")] pub expires_at: Option, - #[serde(default = "default_1586")] + #[serde(default = "default_1588")] pub valid_at: Option, - #[serde(default = "default_1587")] + #[serde(default = "default_1589")] pub valid_to: Option, - #[serde(default = "default_1588")] + #[serde(default = "default_1590")] pub pinned: bool, - #[serde(default = "default_1589")] + #[serde(default = "default_1591")] pub content_sha256: String, - #[serde(default = "default_1590")] + #[serde(default = "default_1592")] pub verified_by: String, - #[serde(default = "default_1591")] + #[serde(default = "default_1593")] pub verified_at: Option, - #[serde(default = "default_1592")] + #[serde(default = "default_1594")] pub verification: String, - #[serde(default = "default_1593")] + #[serde(default = "default_1595")] pub sensitivity: String, - #[serde(default = "default_1594")] + #[serde(default = "default_1596")] pub actor: String, - #[serde(default = "default_1595")] + #[serde(default = "default_1597")] pub source_class: String, - #[serde(default = "default_1596")] + #[serde(default = "default_1598")] pub lock_mode: String, - #[serde(default = "default_1597")] + #[serde(default = "default_1599")] pub lock_reason: String, - #[serde(default = "default_1598")] + #[serde(default = "default_1600")] pub lock_until: Option, - #[serde(default = "default_1599")] + #[serde(default = "default_1601")] pub locked_by: String, - #[serde(default = "default_1600")] + #[serde(default = "default_1602")] pub on_expire: String, - #[serde(default = "default_1601")] + #[serde(default = "default_1603")] pub expire_reason: String, } @@ -34597,41 +34601,41 @@ pub struct MemoryHealthTopRow { pub memory_type: String, pub recall_count: Integer, pub used_count: Integer, - #[serde(default = "default_1604")] + #[serde(default = "default_1606")] pub harm_count: Integer, - #[serde(default = "default_1605")] + #[serde(default = "default_1607")] pub last_recalled_at: Option, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryHealthStaleness { - #[serde(default = "default_1607")] + #[serde(default = "default_1609")] pub by_age: std::collections::HashMap, - #[serde(default = "default_1608")] + #[serde(default = "default_1610")] pub with_validity_end: Integer, - #[serde(default = "default_1609")] + #[serde(default = "default_1611")] pub with_validity_end_share: f64, - #[serde(default = "default_1610")] + #[serde(default = "default_1612")] pub with_expiry: Integer, - #[serde(default = "default_1611")] + #[serde(default = "default_1613")] pub expiring_7d: Integer, - #[serde(default = "default_1612")] + #[serde(default = "default_1614")] pub pinned: Integer, - #[serde(default = "default_1613")] + #[serde(default = "default_1615")] pub days_since_reinforced_p50: Integer, - #[serde(default = "default_1614")] + #[serde(default = "default_1616")] pub days_since_reinforced_p90: Integer, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryHealthFootprint { - #[serde(default = "default_1616")] + #[serde(default = "default_1618")] pub value_chars: Integer, - #[serde(default = "default_1617")] + #[serde(default = "default_1619")] pub value_tokens_est: Integer, - #[serde(default = "default_1618")] + #[serde(default = "default_1620")] pub tokens_per_row_est: f64, } @@ -34641,19 +34645,19 @@ pub struct MemoryHealthOutput { pub live: Integer, pub recalled_ever: Integer, pub used_ever: Integer, - #[serde(default = "default_1602")] + #[serde(default = "default_1604")] pub harmed_ever: Integer, pub silent: Integer, pub silent_older: Integer, pub silent_share: f64, pub silent_after_days: Integer, - #[serde(default = "default_1603")] + #[serde(default = "default_1605")] pub by_type: Vec, - #[serde(default = "default_1606")] + #[serde(default = "default_1608")] pub top_recalled: Vec, - #[serde(default = "default_1615")] + #[serde(default = "default_1617")] pub staleness: MemoryHealthStaleness, - #[serde(default = "default_1619")] + #[serde(default = "default_1621")] pub footprint: MemoryHealthFootprint, } @@ -34773,51 +34777,51 @@ impl MemoryHealthInput { pub struct MemoryHistoryRow { pub memory_id: String, pub version: Integer, - #[serde(default = "default_1620")] + #[serde(default = "default_1622")] pub version_text: String, - #[serde(default = "default_1621")] + #[serde(default = "default_1623")] pub value: Value, pub confidence: f64, - #[serde(default = "default_1622")] + #[serde(default = "default_1624")] pub source_trace: String, - #[serde(default = "default_1623")] + #[serde(default = "default_1625")] pub pinned: bool, pub created_at: String, - #[serde(default = "default_1624")] + #[serde(default = "default_1626")] pub expires_at: Option, - #[serde(default = "default_1625")] + #[serde(default = "default_1627")] pub tombstoned_at: Option, - #[serde(default = "default_1626")] + #[serde(default = "default_1628")] pub redacted_at: Option, - #[serde(default = "default_1627")] + #[serde(default = "default_1629")] pub redaction_reason: String, - #[serde(default = "default_1628")] + #[serde(default = "default_1630")] pub content_sha256: String, - #[serde(default = "default_1629")] + #[serde(default = "default_1631")] pub actor: String, - #[serde(default = "default_1630")] + #[serde(default = "default_1632")] pub source_class: String, - #[serde(default = "default_1631")] + #[serde(default = "default_1633")] pub agent: String, - #[serde(default = "default_1632")] + #[serde(default = "default_1634")] pub written_at: Option, - #[serde(default = "default_1633")] + #[serde(default = "default_1635")] pub status: String, - #[serde(default = "default_1634")] + #[serde(default = "default_1636")] pub conflict_with: Vec, - #[serde(default = "default_1635")] + #[serde(default = "default_1637")] pub tags: Vec, - #[serde(default = "default_1636")] + #[serde(default = "default_1638")] pub verified_at: Option, - #[serde(default = "default_1637")] + #[serde(default = "default_1639")] pub verified_by: String, - #[serde(default = "default_1638")] + #[serde(default = "default_1640")] pub verified_sha256: String, - #[serde(default = "default_1639")] + #[serde(default = "default_1641")] pub lock_mode: String, - #[serde(default = "default_1640")] + #[serde(default = "default_1642")] pub lock_reason: String, - #[serde(default = "default_1641")] + #[serde(default = "default_1643")] pub lock_until: Option, } @@ -34927,13 +34931,13 @@ impl MemoryHistoryInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryImportTotals { - #[serde(default = "default_1642")] + #[serde(default = "default_1644")] pub written: Integer, - #[serde(default = "default_1643")] + #[serde(default = "default_1645")] pub held: Integer, - #[serde(default = "default_1644")] + #[serde(default = "default_1646")] pub skipped: Integer, - #[serde(default = "default_1645")] + #[serde(default = "default_1647")] pub refused: Integer, } @@ -35016,11 +35020,11 @@ pub struct MemoryImportResult { pub index: Integer, pub key: String, pub outcome: MemoryImportResultOutcome, - #[serde(default = "default_1646")] + #[serde(default = "default_1648")] pub reason: MemoryImportResultReason, - #[serde(default = "default_1647")] + #[serde(default = "default_1649")] pub held_by: String, - #[serde(default = "default_1648")] + #[serde(default = "default_1650")] pub note: MemoryImportResultNote, } @@ -35029,7 +35033,7 @@ pub struct MemoryImportResult { pub struct MemoryImportOutput { pub totals: MemoryImportTotals, pub results: Vec, - #[serde(default = "default_1649")] + #[serde(default = "default_1651")] pub dry_run: bool, } @@ -35222,9 +35226,9 @@ pub struct MemoryImportCuratedRow { pub section_heading: String, pub bytes_written: Integer, pub verdict: String, - #[serde(default = "default_1650")] + #[serde(default = "default_1652")] pub rejection_reason: String, - #[serde(default = "default_1651")] + #[serde(default = "default_1653")] pub pinned_blocker_id: Option, } @@ -35316,21 +35320,21 @@ impl MemoryImportCuratedInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryImportEvidenceOutput { - #[serde(default = "default_1652")] + #[serde(default = "default_1654")] pub chunks_written: Integer, - #[serde(default = "default_1653")] + #[serde(default = "default_1655")] pub links_written: Integer, - #[serde(default = "default_1654")] + #[serde(default = "default_1656")] pub digests_written: Integer, - #[serde(default = "default_1655")] + #[serde(default = "default_1657")] pub embedding_model: String, - #[serde(default = "default_1656")] + #[serde(default = "default_1658")] pub embedding_dim: Integer, - #[serde(default = "default_1657")] + #[serde(default = "default_1659")] pub edited: Vec, - #[serde(default = "default_1658")] + #[serde(default = "default_1660")] pub skipped: Integer, - #[serde(default = "default_1659")] + #[serde(default = "default_1661")] pub unchecked: Integer, } @@ -35667,7 +35671,7 @@ pub struct InspectRow { pub memory_key: String, pub memory_id: String, pub version: Integer, - #[serde(default = "default_1669")] + #[serde(default = "default_1671")] pub content_sha256: String, pub memory_type: String, pub status: String, @@ -35678,9 +35682,9 @@ pub struct InspectRow { pub actor: String, pub updated_at: String, pub sensitivity: String, - #[serde(default = "default_1670")] + #[serde(default = "default_1672")] pub versions: Integer, - #[serde(default = "default_1671")] + #[serde(default = "default_1673")] pub excerpt: String, } @@ -35688,27 +35692,27 @@ pub struct InspectRow { #[non_exhaustive] pub struct InspectView { pub definition: String, - #[serde(default = "default_1660")] + #[serde(default = "default_1662")] pub refs: Vec, - #[serde(default = "default_1661")] + #[serde(default = "default_1663")] pub live_rows: Integer, - #[serde(default = "default_1662")] + #[serde(default = "default_1664")] pub by_type: Vec, - #[serde(default = "default_1663")] + #[serde(default = "default_1665")] pub by_status: Vec, - #[serde(default = "default_1664")] + #[serde(default = "default_1666")] pub by_source_class: Vec, - #[serde(default = "default_1665")] + #[serde(default = "default_1667")] pub top_tags: Vec, - #[serde(default = "default_1666")] + #[serde(default = "default_1668")] pub categories: Vec, - #[serde(default = "default_1667")] + #[serde(default = "default_1669")] pub first_updated_at: Option, - #[serde(default = "default_1668")] + #[serde(default = "default_1670")] pub last_updated_at: Option, - #[serde(default = "default_1672")] + #[serde(default = "default_1674")] pub newest: Vec, - #[serde(default = "default_1673")] + #[serde(default = "default_1675")] pub complete: bool, } @@ -35724,32 +35728,32 @@ pub struct InspectCall { #[non_exhaustive] pub struct InspectActivity { pub window_seconds: Integer, - #[serde(default = "default_1674")] + #[serde(default = "default_1676")] pub calls: Vec, - #[serde(default = "default_1675")] + #[serde(default = "default_1677")] pub first_at: Option, - #[serde(default = "default_1676")] + #[serde(default = "default_1678")] pub last_at: Option, - #[serde(default = "default_1677")] + #[serde(default = "default_1679")] pub gap: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct InspectSettings { - #[serde(default = "default_1678")] + #[serde(default = "default_1680")] pub guide_revision: Integer, - #[serde(default = "default_1679")] + #[serde(default = "default_1681")] pub guide_summary: String, - #[serde(default = "default_1680")] + #[serde(default = "default_1682")] pub categories_registered: Integer, - #[serde(default = "default_1681")] + #[serde(default = "default_1683")] pub extraction_policy: Option, - #[serde(default = "default_1682")] + #[serde(default = "default_1684")] pub extraction_policy_unavailable: String, - #[serde(default = "default_1683")] + #[serde(default = "default_1685")] pub extraction_instructions: String, - #[serde(default = "default_1684")] + #[serde(default = "default_1686")] pub extraction_instructions_refs: Vec, } @@ -35765,7 +35769,7 @@ pub struct MemoryInspectOutput { pub others: InspectView, pub activity: InspectActivity, pub settings: InspectSettings, - #[serde(default = "default_1685")] + #[serde(default = "default_1687")] pub skipped: Vec, } @@ -35859,7 +35863,7 @@ pub struct MemoryKeyRef { #[non_exhaustive] pub struct MemoryKeysOutput { pub keys: Vec, - #[serde(default = "default_1686")] + #[serde(default = "default_1688")] pub truncated: bool, } @@ -35962,9 +35966,9 @@ pub struct LineageCandidate { pub decided_at: String, pub decided_by: String, pub match_confidence: LineageCandidateMatchConfidence, - #[serde(default = "default_1695")] + #[serde(default = "default_1697")] pub seeded_from_thread_id: String, - #[serde(default = "default_1696")] + #[serde(default = "default_1698")] pub seeded_from_msg_id: String, } @@ -35982,25 +35986,25 @@ pub struct LineageAuditEvent { pub struct MemoryLineageOutput { pub found: bool, pub memory_key: String, - #[serde(default = "default_1687")] + #[serde(default = "default_1689")] pub promotion_event: String, - #[serde(default = "default_1688")] + #[serde(default = "default_1690")] pub promoted_by: String, - #[serde(default = "default_1689")] + #[serde(default = "default_1691")] pub promoted_at: Option, - #[serde(default = "default_1690")] + #[serde(default = "default_1692")] pub rationale: String, - #[serde(default = "default_1691")] + #[serde(default = "default_1693")] pub source_trace: String, - #[serde(default = "default_1692")] + #[serde(default = "default_1694")] pub source_resource_id: String, - #[serde(default = "default_1693")] + #[serde(default = "default_1695")] pub mechanism: MemoryLineageOutputMechanism, - #[serde(default = "default_1694")] + #[serde(default = "default_1696")] pub supporters: Vec, - #[serde(default = "default_1697")] + #[serde(default = "default_1699")] pub candidate: Option, - #[serde(default = "default_1698")] + #[serde(default = "default_1700")] pub audit_chain: Vec, } @@ -36129,11 +36133,11 @@ pub struct MemoryLinkOutput { pub from_key: String, pub to_key: String, pub relation: String, - #[serde(default = "default_1699")] + #[serde(default = "default_1701")] pub confidence: f64, - #[serde(default = "default_1700")] + #[serde(default = "default_1702")] pub conflict_opened: bool, - #[serde(default = "default_1701")] + #[serde(default = "default_1703")] pub relation_defaulted: bool, } @@ -36447,17 +36451,17 @@ pub struct MemoryListEntry { pub struct MemoryListOutput { pub entries: Vec, pub truncated: bool, - #[serde(default = "default_1702")] + #[serde(default = "default_1704")] pub total: Integer, - #[serde(default = "default_1703")] + #[serde(default = "default_1705")] pub today: Integer, - #[serde(default = "default_1704")] + #[serde(default = "default_1706")] pub namespace_version: String, - #[serde(default = "default_1705")] + #[serde(default = "default_1707")] pub unchanged: bool, - #[serde(default = "default_1706")] + #[serde(default = "default_1708")] pub hidden: Integer, - #[serde(default = "default_1707")] + #[serde(default = "default_1709")] pub hidden_hint: String, } @@ -36843,19 +36847,19 @@ impl MemoryListInput { #[non_exhaustive] pub struct MemoryLockOutput { pub locked: bool, - #[serde(default = "default_1708")] + #[serde(default = "default_1710")] pub reason: String, - #[serde(default = "default_1709")] + #[serde(default = "default_1711")] pub memory_id: String, - #[serde(default = "default_1710")] + #[serde(default = "default_1712")] pub version: Option, - #[serde(default = "default_1711")] + #[serde(default = "default_1713")] pub lock_mode: String, - #[serde(default = "default_1712")] + #[serde(default = "default_1714")] pub lock_until: Option, - #[serde(default = "default_1713")] + #[serde(default = "default_1715")] pub locked_by: String, - #[serde(default = "default_1714")] + #[serde(default = "default_1716")] pub previous_mode: String, } @@ -37014,21 +37018,21 @@ pub struct MemoryMoveOutput { pub from_key: String, pub to_key: String, pub redirected: bool, - #[serde(default = "default_1715")] + #[serde(default = "default_1717")] pub memory_id: String, - #[serde(default = "default_1716")] + #[serde(default = "default_1718")] pub version: Integer, - #[serde(default = "default_1717")] + #[serde(default = "default_1719")] pub content_sha256: String, - #[serde(default = "default_1718")] + #[serde(default = "default_1720")] pub advisories: Vec, - #[serde(default = "default_1719")] + #[serde(default = "default_1721")] pub dry_run: bool, - #[serde(default = "default_1720")] + #[serde(default = "default_1722")] pub memory_type: String, - #[serde(default = "default_1721")] + #[serde(default = "default_1723")] pub value_preview: String, - #[serde(default = "default_1722")] + #[serde(default = "default_1724")] pub sensitivity: String, } @@ -37240,7 +37244,7 @@ impl MemoryMoveInput { pub struct MemoryOutcomeOutput { pub recorded: bool, pub evidence_count_after: Integer, - #[serde(default = "default_1723")] + #[serde(default = "default_1725")] pub quarantined: bool, } @@ -37483,13 +37487,13 @@ impl MemoryOutcomeRunInput { #[non_exhaustive] pub struct OutlineSession { pub session_id: String, - #[serde(default = "default_1725")] + #[serde(default = "default_1727")] pub date: String, - #[serde(default = "default_1726")] + #[serde(default = "default_1728")] pub headline: String, - #[serde(default = "default_1727")] + #[serde(default = "default_1729")] pub key_facts: Integer, - #[serde(default = "default_1728")] + #[serde(default = "default_1730")] pub rows: Integer, } @@ -37497,7 +37501,7 @@ pub struct OutlineSession { #[non_exhaustive] pub struct OutlineHub { pub entity: String, - #[serde(default = "default_1731")] + #[serde(default = "default_1733")] pub degree: Integer, } @@ -37505,28 +37509,28 @@ pub struct OutlineHub { #[non_exhaustive] pub struct OutlineCommunity { pub community_id: Integer, - #[serde(default = "default_1733")] + #[serde(default = "default_1735")] pub label: String, - #[serde(default = "default_1734")] + #[serde(default = "default_1736")] pub size: Integer, - #[serde(default = "default_1735")] + #[serde(default = "default_1737")] pub computed_at: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryOutlineOutput { - #[serde(default = "default_1724")] + #[serde(default = "default_1726")] pub rows_by_type: std::collections::HashMap, - #[serde(default = "default_1729")] + #[serde(default = "default_1731")] pub sessions: Vec, - #[serde(default = "default_1730")] - pub sessions_total: Integer, #[serde(default = "default_1732")] + pub sessions_total: Integer, + #[serde(default = "default_1734")] pub hubs: Vec, - #[serde(default = "default_1736")] + #[serde(default = "default_1738")] pub communities: Vec, - #[serde(default = "default_1737")] + #[serde(default = "default_1739")] pub profile_chars: Integer, } @@ -37678,7 +37682,7 @@ pub struct OwnerUsageRow { pub recalls: Integer, pub used: Integer, pub harm: Integer, - #[serde(default = "default_1738")] + #[serde(default = "default_1740")] pub last_recalled: Option, } @@ -38165,7 +38169,7 @@ pub struct MemoryPromoteOutput { pub shared_memory_key: String, pub promotion_event: String, pub reversible_until: String, - #[serde(default = "default_1739")] + #[serde(default = "default_1741")] pub ignored_args: Vec, } @@ -38334,18 +38338,18 @@ impl MemoryPromoteInput { pub struct MemoryProposalDecision { pub memory_key: String, pub decided: bool, - #[serde(default = "default_1741")] + #[serde(default = "default_1743")] pub status: String, - #[serde(default = "default_1742")] + #[serde(default = "default_1744")] pub reason: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryProposalDecideOutput { - #[serde(default = "default_1740")] + #[serde(default = "default_1742")] pub decided: Integer, - #[serde(default = "default_1743")] + #[serde(default = "default_1745")] pub results: Vec, } @@ -38446,33 +38450,33 @@ pub enum MemoryProposalReady { pub struct MemoryProposal { pub memory_key: String, pub memory_id: String, - #[serde(default = "default_1744")] + #[serde(default = "default_1746")] pub content_sha256: String, - #[serde(default = "default_1745")] + #[serde(default = "default_1747")] pub agent: String, - #[serde(default = "default_1746")] + #[serde(default = "default_1748")] pub memory_type: String, - #[serde(default = "default_1747")] + #[serde(default = "default_1749")] pub value_preview: String, - #[serde(default = "default_1748")] + #[serde(default = "default_1750")] pub sensitivity: String, - #[serde(default = "default_1749")] + #[serde(default = "default_1751")] pub tags: Vec, - #[serde(default = "default_1750")] + #[serde(default = "default_1752")] pub created_at: String, - #[serde(default = "default_1751")] + #[serde(default = "default_1753")] pub graded_passes: Integer, - #[serde(default = "default_1752")] + #[serde(default = "default_1754")] pub graded_fails: Integer, - #[serde(default = "default_1753")] + #[serde(default = "default_1755")] pub last_graded_at: String, - #[serde(default = "default_1754")] + #[serde(default = "default_1756")] pub used_count: Integer, - #[serde(default = "default_1755")] + #[serde(default = "default_1757")] pub harm_count: Integer, - #[serde(default = "default_1756")] + #[serde(default = "default_1758")] pub ready: MemoryProposalReady, - #[serde(default = "default_1757")] + #[serde(default = "default_1759")] pub conflict_with: Vec, } @@ -38488,24 +38492,24 @@ pub enum ProposalPolicyMode { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct ProposalPolicy { - #[serde(default = "default_1760")] + #[serde(default = "default_1762")] pub mode: ProposalPolicyMode, - #[serde(default = "default_1761")] + #[serde(default = "default_1763")] pub min_passes: Integer, - #[serde(default = "default_1762")] + #[serde(default = "default_1764")] pub max_fails: Integer, - #[serde(default = "default_1763")] + #[serde(default = "default_1765")] pub reject_after_fails: Integer, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryProposalsOutput { - #[serde(default = "default_1758")] + #[serde(default = "default_1760")] pub proposals: Vec, - #[serde(default = "default_1759")] + #[serde(default = "default_1761")] pub total: Integer, - #[serde(default = "default_1764")] + #[serde(default = "default_1766")] pub policy: ProposalPolicy, } @@ -38612,19 +38616,19 @@ impl MemoryProposalsInput { pub struct MemoryProvenanceLink { pub direction: String, pub memory_key: String, - #[serde(default = "default_1778")] + #[serde(default = "default_1780")] pub relation: String, - #[serde(default = "default_1779")] + #[serde(default = "default_1781")] pub label: String, - #[serde(default = "default_1780")] + #[serde(default = "default_1782")] pub explanation: String, - #[serde(default = "default_1781")] + #[serde(default = "default_1783")] pub evidence: Vec, - #[serde(default = "default_1782")] + #[serde(default = "default_1784")] pub confidence: f64, - #[serde(default = "default_1783")] + #[serde(default = "default_1785")] pub author: String, - #[serde(default = "default_1784")] + #[serde(default = "default_1786")] pub run_id: String, } @@ -38632,33 +38636,33 @@ pub struct MemoryProvenanceLink { #[non_exhaustive] pub struct MemoryProvenanceOutput { pub found: bool, - #[serde(default = "default_1765")] + #[serde(default = "default_1767")] pub source_trace: String, - #[serde(default = "default_1766")] + #[serde(default = "default_1768")] pub source_kind: String, - #[serde(default = "default_1767")] + #[serde(default = "default_1769")] pub actor: String, - #[serde(default = "default_1768")] + #[serde(default = "default_1770")] pub source_class: String, - #[serde(default = "default_1769")] + #[serde(default = "default_1771")] pub source_label: String, - #[serde(default = "default_1770")] + #[serde(default = "default_1772")] pub thread_id: String, - #[serde(default = "default_1771")] + #[serde(default = "default_1773")] pub thread_exists: bool, - #[serde(default = "default_1772")] + #[serde(default = "default_1774")] pub thread_title: String, - #[serde(default = "default_1773")] + #[serde(default = "default_1775")] pub agent: String, - #[serde(default = "default_1774")] + #[serde(default = "default_1776")] pub session_id: String, - #[serde(default = "default_1775")] + #[serde(default = "default_1777")] pub run_id: String, - #[serde(default = "default_1776")] + #[serde(default = "default_1778")] pub written_at: String, - #[serde(default = "default_1777")] + #[serde(default = "default_1779")] pub source_resource_id: String, - #[serde(default = "default_1785")] + #[serde(default = "default_1787")] pub links: Vec, } @@ -38753,17 +38757,17 @@ impl MemoryProvenanceInput { pub struct RecallTurn { pub evidence_id: String, pub session_id: String, - #[serde(default = "default_1786")] + #[serde(default = "default_1788")] pub role: String, - #[serde(default = "default_1787")] + #[serde(default = "default_1789")] pub actor: String, - #[serde(default = "default_1788")] + #[serde(default = "default_1790")] pub observed_at: String, - #[serde(default = "default_1789")] + #[serde(default = "default_1791")] pub content: String, - #[serde(default = "default_1790")] + #[serde(default = "default_1792")] pub truncated: bool, - #[serde(default = "default_1791")] + #[serde(default = "default_1793")] pub matched_tokens: Integer, } @@ -38780,21 +38784,21 @@ pub enum MemoryRecallOutputOrder { #[non_exhaustive] pub struct MemoryRecallOutput { pub turns: Vec, - #[serde(default = "default_1792")] + #[serde(default = "default_1794")] pub total_matched: Integer, - #[serde(default = "default_1793")] + #[serde(default = "default_1795")] pub returned: Integer, - #[serde(default = "default_1794")] + #[serde(default = "default_1796")] pub has_more: bool, - #[serde(default = "default_1795")] + #[serde(default = "default_1797")] pub next_cursor: String, - #[serde(default = "default_1796")] + #[serde(default = "default_1798")] pub next_offset: Integer, - #[serde(default = "default_1797")] + #[serde(default = "default_1799")] pub order: MemoryRecallOutputOrder, - #[serde(default = "default_1798")] + #[serde(default = "default_1800")] pub query_tokens: Vec, - #[serde(default = "default_1799")] + #[serde(default = "default_1801")] pub tokens_returned: Integer, } @@ -39076,19 +39080,19 @@ pub struct MemoryRecordConflictRow { pub schema_name: String, pub memory_key: String, pub field_name: String, - #[serde(default = "default_1800")] + #[serde(default = "default_1802")] pub prior_value: Value, - #[serde(default = "default_1801")] + #[serde(default = "default_1803")] pub incoming_value: Value, pub prior_record_id: String, pub incoming_record_id: String, - #[serde(default = "default_1802")] + #[serde(default = "default_1804")] pub prior_memory_id: String, - #[serde(default = "default_1803")] + #[serde(default = "default_1805")] pub incoming_memory_id: String, - #[serde(default = "default_1804")] + #[serde(default = "default_1806")] pub detected_at: Option, - #[serde(default = "default_1805")] + #[serde(default = "default_1807")] pub resolved_at: Option, } @@ -39096,7 +39100,7 @@ pub struct MemoryRecordConflictRow { #[non_exhaustive] pub struct MemoryRecordConflictsOutput { pub rows: Vec, - #[serde(default = "default_1806")] + #[serde(default = "default_1808")] pub truncated: bool, } @@ -39206,19 +39210,19 @@ pub enum MemoryRecordRowStatus { #[non_exhaustive] pub struct MemoryRecordRow { pub record_id: String, - #[serde(default = "default_1807")] + #[serde(default = "default_1809")] pub memory_key: String, - #[serde(default = "default_1808")] + #[serde(default = "default_1810")] pub memory_id: String, - #[serde(default = "default_1809")] + #[serde(default = "default_1811")] pub record: std::collections::HashMap, - #[serde(default = "default_1810")] + #[serde(default = "default_1812")] pub field_states: std::collections::HashMap, - #[serde(default = "default_1811")] + #[serde(default = "default_1813")] pub status: MemoryRecordRowStatus, - #[serde(default = "default_1812")] + #[serde(default = "default_1814")] pub valid_at: Option, - #[serde(default = "default_1813")] + #[serde(default = "default_1815")] pub valid_to: Option, } @@ -39285,7 +39289,7 @@ impl MemoryRecordHistoryInput { #[non_exhaustive] pub struct MemoryRecordQueryOutput { pub rows: Vec, - #[serde(default = "default_1814")] + #[serde(default = "default_1816")] pub truncated: bool, } @@ -39509,15 +39513,15 @@ pub enum MemoryRecordWriteOutputKeySource { pub struct MemoryRecordWriteOutput { pub record_id: String, pub field_count: Integer, - #[serde(default = "default_1815")] + #[serde(default = "default_1817")] pub memory_key: String, - #[serde(default = "default_1816")] + #[serde(default = "default_1818")] pub key_source: MemoryRecordWriteOutputKeySource, - #[serde(default = "default_1817")] + #[serde(default = "default_1819")] pub fold: std::collections::HashMap, - #[serde(default = "default_1818")] + #[serde(default = "default_1820")] pub superseded_record_id: String, - #[serde(default = "default_1819")] + #[serde(default = "default_1821")] pub conflicts: Integer, } @@ -39760,13 +39764,13 @@ impl MemoryRecordWriteInput { #[non_exhaustive] pub struct MemoryRedactOutput { pub redacted: bool, - #[serde(default = "default_1820")] + #[serde(default = "default_1822")] pub refused_head: bool, - #[serde(default = "default_1821")] + #[serde(default = "default_1823")] pub redacted_at: Option, - #[serde(default = "default_1822")] + #[serde(default = "default_1824")] pub cache_rows_deleted: Integer, - #[serde(default = "default_1823")] + #[serde(default = "default_1825")] pub precedent_rows_deleted: Integer, } @@ -39926,7 +39930,7 @@ impl MemoryReindexInput { #[non_exhaustive] pub struct MemoryRejectOutput { pub rejected: bool, - #[serde(default = "default_1824")] + #[serde(default = "default_1826")] pub rejected_at: Option, } @@ -40042,7 +40046,7 @@ pub struct MemoryRelatedHit { pub struct MemoryRelatedOutput { pub results: Vec, pub source_entities: Vec, - #[serde(default = "default_1825")] + #[serde(default = "default_1827")] pub reason: String, } @@ -40157,13 +40161,13 @@ impl MemoryRelatedInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryResolveOrphanDuplicatesOutput { - #[serde(default = "default_1826")] + #[serde(default = "default_1828")] pub candidates: Integer, - #[serde(default = "default_1827")] + #[serde(default = "default_1829")] pub reactivated: Integer, - #[serde(default = "default_1828")] + #[serde(default = "default_1830")] pub dry_run: bool, - #[serde(default = "default_1829")] + #[serde(default = "default_1831")] pub memory_ids: Vec, } @@ -40240,15 +40244,15 @@ impl MemoryResolveOrphanDuplicatesInput { #[non_exhaustive] pub struct MemoryRestoreOutput { pub restored: bool, - #[serde(default = "default_1830")] + #[serde(default = "default_1832")] pub memory_id: Option, - #[serde(default = "default_1831")] + #[serde(default = "default_1833")] pub version: Option, - #[serde(default = "default_1832")] + #[serde(default = "default_1834")] pub expired: bool, - #[serde(default = "default_1833")] + #[serde(default = "default_1835")] pub redacted: bool, - #[serde(default = "default_1834")] + #[serde(default = "default_1836")] pub from_status: String, } @@ -40368,13 +40372,13 @@ pub struct SearchTraceHit { pub content_excerpt: String, pub distance: f64, pub similarity: f64, - #[serde(default = "default_1835")] + #[serde(default = "default_1837")] pub entity_boost: f64, pub rank_score: f64, pub rank: Integer, - #[serde(default = "default_1836")] + #[serde(default = "default_1838")] pub source: String, - #[serde(default = "default_1837")] + #[serde(default = "default_1839")] pub parent_memory_key: String, } @@ -40384,11 +40388,11 @@ pub struct MemorySearchTraceOutput { pub results: Vec, pub embedding_model: String, pub entity_filter: Vec, - #[serde(default = "default_1838")] + #[serde(default = "default_1840")] pub query_spellings: std::collections::HashMap, - #[serde(default = "default_1839")] + #[serde(default = "default_1841")] pub query_spellings_skipped: bool, - #[serde(default = "default_1840")] + #[serde(default = "default_1842")] pub stale_dropped: Integer, } @@ -41569,7 +41573,7 @@ pub struct SearchTraceLogRow { pub embedding_model: String, pub latency_ms: Integer, pub run_id: String, - #[serde(default = "default_1841")] + #[serde(default = "default_1843")] pub operation: String, } @@ -41678,71 +41682,71 @@ pub struct RefusedFact { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemorySetFromMessagesOutput { - #[serde(default = "default_1842")] + #[serde(default = "default_1844")] pub written: Vec, - #[serde(default = "default_1843")] + #[serde(default = "default_1845")] pub refused: Vec, - #[serde(default = "default_1844")] + #[serde(default = "default_1846")] pub tokens_in: Integer, - #[serde(default = "default_1845")] + #[serde(default = "default_1847")] pub tokens_out: Integer, - #[serde(default = "default_1846")] + #[serde(default = "default_1848")] pub llm_provider: String, - #[serde(default = "default_1847")] + #[serde(default = "default_1849")] pub llm_model: String, - #[serde(default = "default_1848")] + #[serde(default = "default_1850")] pub segments: Integer, - #[serde(default = "default_1849")] + #[serde(default = "default_1851")] pub foresight: Integer, - #[serde(default = "default_1850")] + #[serde(default = "default_1852")] pub forgotten: Integer, - #[serde(default = "default_1851")] + #[serde(default = "default_1853")] pub forgotten_keys: Vec, - #[serde(default = "default_1852")] + #[serde(default = "default_1854")] pub forget_requests: Integer, - #[serde(default = "default_1853")] + #[serde(default = "default_1855")] pub about_other: Integer, - #[serde(default = "default_1854")] + #[serde(default = "default_1856")] pub premise_facts: Integer, - #[serde(default = "default_1855")] + #[serde(default = "default_1857")] pub learning_candidates: Integer, - #[serde(default = "default_1856")] + #[serde(default = "default_1858")] pub ignored_args: Vec, - #[serde(default = "default_1857")] + #[serde(default = "default_1859")] pub segmenter: String, - #[serde(default = "default_1858")] + #[serde(default = "default_1860")] pub cached_tokens_in: Integer, - #[serde(default = "default_1859")] + #[serde(default = "default_1861")] pub ontology_warnings: Vec, - #[serde(default = "default_1860")] + #[serde(default = "default_1862")] pub evidence_ids: Vec, - #[serde(default = "default_1861")] + #[serde(default = "default_1863")] pub belief_source_links: Integer, - #[serde(default = "default_1862")] + #[serde(default = "default_1864")] pub pipeline_errors: Vec, - #[serde(default = "default_1863")] + #[serde(default = "default_1865")] pub value_updates_linked: Integer, - #[serde(default = "default_1864")] + #[serde(default = "default_1866")] pub stubbed_fields: Vec, - #[serde(default = "default_1865")] + #[serde(default = "default_1867")] pub degraded: Vec, - #[serde(default = "default_1866")] + #[serde(default = "default_1868")] pub deferred: bool, - #[serde(default = "default_1867")] + #[serde(default = "default_1869")] pub queue_id: String, - #[serde(default = "default_1868")] + #[serde(default = "default_1870")] pub deferred_by: String, - #[serde(default = "default_1869")] + #[serde(default = "default_1871")] pub stage_ms: std::collections::HashMap, - #[serde(default = "default_1870")] + #[serde(default = "default_1872")] pub observation_date_source: String, - #[serde(default = "default_1871")] + #[serde(default = "default_1873")] pub under_operator_policy: bool, - #[serde(default = "default_1872")] + #[serde(default = "default_1874")] pub extract_prompt_keys: Vec, - #[serde(default = "default_1873")] + #[serde(default = "default_1875")] pub llm_cache_hits: Integer, - #[serde(default = "default_1874")] + #[serde(default = "default_1876")] pub llm_cache_misses: Integer, } @@ -42156,22 +42160,22 @@ pub enum StackEntrySection { #[non_exhaustive] pub struct StackEntry { pub section: StackEntrySection, - #[serde(default = "default_1875")] + #[serde(default = "default_1877")] pub memory_key: String, - #[serde(default = "default_1876")] + #[serde(default = "default_1878")] pub memory_type: String, - #[serde(default = "default_1877")] + #[serde(default = "default_1879")] pub value: String, pub tokens: Integer, - #[serde(default = "default_1878")] + #[serde(default = "default_1880")] pub pinned: bool, - #[serde(default = "default_1879")] + #[serde(default = "default_1881")] pub recall_count: Integer, - #[serde(default = "default_1880")] + #[serde(default = "default_1882")] pub last_recalled_at: Option, - #[serde(default = "default_1881")] + #[serde(default = "default_1883")] pub actor: String, - #[serde(default = "default_1882")] + #[serde(default = "default_1884")] pub namespace: String, } @@ -42356,14 +42360,14 @@ impl MemoryStackInput { pub struct MemoryStatus { pub memory_id: String, pub status: String, - #[serde(default = "default_1883")] + #[serde(default = "default_1885")] pub superseded_by: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemoryStatusesOutput { - #[serde(default = "default_1884")] + #[serde(default = "default_1886")] pub rows: Vec, } @@ -42412,23 +42416,23 @@ impl MemoryStatusesInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MemorySweepExpiredOutput { - #[serde(default = "default_1885")] + #[serde(default = "default_1887")] pub scanned: Integer, - #[serde(default = "default_1886")] + #[serde(default = "default_1888")] pub tombstoned: Integer, - #[serde(default = "default_1887")] + #[serde(default = "default_1889")] pub demoted: Integer, - #[serde(default = "default_1888")] + #[serde(default = "default_1890")] pub anonymized: Integer, - #[serde(default = "default_1889")] + #[serde(default = "default_1891")] pub locked_skipped: Integer, - #[serde(default = "default_1890")] + #[serde(default = "default_1892")] pub moved_skipped: Integer, - #[serde(default = "default_1891")] + #[serde(default = "default_1893")] pub dry_run: bool, - #[serde(default = "default_1892")] + #[serde(default = "default_1894")] pub sample: Vec>, - #[serde(default = "default_1893")] + #[serde(default = "default_1895")] pub failures: Vec, } @@ -42505,10 +42509,10 @@ pub struct MemoryTimelineEntry { pub memory_key: String, pub memory_type: String, pub content_excerpt: String, - #[serde(default = "default_1894")] + #[serde(default = "default_1896")] pub valid_at: Option, pub created_at: String, - #[serde(default = "default_1895")] + #[serde(default = "default_1897")] pub namespace: String, } @@ -42516,7 +42520,7 @@ pub struct MemoryTimelineEntry { #[non_exhaustive] pub struct MemoryTimelineOutput { pub events: Vec, - #[serde(default = "default_1896")] + #[serde(default = "default_1898")] pub total_matching: Integer, } @@ -42708,9 +42712,9 @@ impl MemoryTimelineInput { pub struct MemoryTouchResult { pub memory_key: String, pub touched: bool, - #[serde(default = "default_1899")] + #[serde(default = "default_1901")] pub version: Option, - #[serde(default = "default_1900")] + #[serde(default = "default_1902")] pub expires_at: Option, } @@ -42718,13 +42722,13 @@ pub struct MemoryTouchResult { #[non_exhaustive] pub struct MemoryTouchOutput { pub touched: bool, - #[serde(default = "default_1897")] + #[serde(default = "default_1899")] pub version: Option, - #[serde(default = "default_1898")] + #[serde(default = "default_1900")] pub expires_at: Option, - #[serde(default = "default_1901")] + #[serde(default = "default_1903")] pub results: Vec, - #[serde(default = "default_1902")] + #[serde(default = "default_1904")] pub touched_count: Integer, } @@ -42904,15 +42908,15 @@ impl MemoryTouchInput { #[non_exhaustive] pub struct MemoryUnlockOutput { pub unlocked: bool, - #[serde(default = "default_1903")] + #[serde(default = "default_1905")] pub reason: String, - #[serde(default = "default_1904")] + #[serde(default = "default_1906")] pub memory_id: String, - #[serde(default = "default_1905")] + #[serde(default = "default_1907")] pub version: Option, - #[serde(default = "default_1906")] + #[serde(default = "default_1908")] pub previous_mode: String, - #[serde(default = "default_1907")] + #[serde(default = "default_1909")] pub unlocked_by: String, } @@ -43017,11 +43021,11 @@ impl MemoryUnlockInput { #[non_exhaustive] pub struct MemoryUnpinOutput { pub unpinned: bool, - #[serde(default = "default_1908")] + #[serde(default = "default_1910")] pub reason: String, - #[serde(default = "default_1909")] + #[serde(default = "default_1911")] pub memory_id: String, - #[serde(default = "default_1910")] + #[serde(default = "default_1912")] pub version: Option, } @@ -43115,15 +43119,15 @@ impl MemoryUnpinInput { #[non_exhaustive] pub struct MemoryUpdateCandidate { pub memory_id: String, - #[serde(default = "default_1916")] + #[serde(default = "default_1918")] pub agent: String, - #[serde(default = "default_1917")] + #[serde(default = "default_1919")] pub user_id: String, - #[serde(default = "default_1918")] + #[serde(default = "default_1920")] pub session_id: String, - #[serde(default = "default_1919")] + #[serde(default = "default_1921")] pub version: Integer, - #[serde(default = "default_1920")] + #[serde(default = "default_1922")] pub status: String, } @@ -43131,23 +43135,23 @@ pub struct MemoryUpdateCandidate { #[non_exhaustive] pub struct MemoryUpdateOutput { pub updated: bool, - #[serde(default = "default_1911")] + #[serde(default = "default_1913")] pub memory_id: String, - #[serde(default = "default_1912")] + #[serde(default = "default_1914")] pub memory_key: String, - #[serde(default = "default_1913")] + #[serde(default = "default_1915")] pub new_version: Integer, - #[serde(default = "default_1914")] + #[serde(default = "default_1916")] pub content_sha256: String, - #[serde(default = "default_1915")] + #[serde(default = "default_1917")] pub reason: String, - #[serde(default = "default_1921")] + #[serde(default = "default_1923")] pub candidates: Vec, - #[serde(default = "default_1922")] + #[serde(default = "default_1924")] pub conflict_verdict: String, - #[serde(default = "default_1923")] + #[serde(default = "default_1925")] pub conflict_peers: Integer, - #[serde(default = "default_1924")] + #[serde(default = "default_1926")] pub duplicate_of: String, } @@ -43356,15 +43360,15 @@ impl MemoryUpdateInput { #[non_exhaustive] pub struct MemoryUpdateByIdOutput { pub updated: bool, - #[serde(default = "default_1925")] + #[serde(default = "default_1927")] pub new_version: Integer, - #[serde(default = "default_1926")] + #[serde(default = "default_1928")] pub content_sha256: String, - #[serde(default = "default_1927")] + #[serde(default = "default_1929")] pub conflict_verdict: String, - #[serde(default = "default_1928")] + #[serde(default = "default_1930")] pub conflict_peers: Integer, - #[serde(default = "default_1929")] + #[serde(default = "default_1931")] pub duplicate_of: String, } @@ -43492,23 +43496,23 @@ impl MemoryUpdateByIdInput { #[non_exhaustive] pub struct MemoryVerifyOutput { pub found: bool, - #[serde(default = "default_1930")] + #[serde(default = "default_1932")] pub changed: bool, - #[serde(default = "default_1931")] + #[serde(default = "default_1933")] pub memory_id: String, - #[serde(default = "default_1932")] + #[serde(default = "default_1934")] pub memory_key: String, - #[serde(default = "default_1933")] + #[serde(default = "default_1935")] pub namespace: String, - #[serde(default = "default_1934")] + #[serde(default = "default_1936")] pub verified_by: String, - #[serde(default = "default_1935")] + #[serde(default = "default_1937")] pub verified_at: Option, - #[serde(default = "default_1936")] + #[serde(default = "default_1938")] pub verification: String, - #[serde(default = "default_1937")] + #[serde(default = "default_1939")] pub version: Integer, - #[serde(default = "default_1938")] + #[serde(default = "default_1940")] pub content_sha256: String, } @@ -43713,13 +43717,13 @@ pub struct SchemaFieldOutput { #[serde(rename = "type")] pub r#type: String, pub required: bool, - #[serde(default = "default_1941")] + #[serde(default = "default_1943")] pub identity: bool, - #[serde(default = "default_1942")] + #[serde(default = "default_1944")] pub enum_values: Vec, - #[serde(default = "default_1943")] + #[serde(default = "default_1945")] pub constraints: std::collections::HashMap, - #[serde(default = "default_1944")] + #[serde(default = "default_1946")] pub description: String, } @@ -43728,11 +43732,11 @@ pub struct SchemaFieldOutput { pub struct MemorySchemaSummary { pub schema_id: String, pub name: String, - #[serde(default = "default_1939")] + #[serde(default = "default_1941")] pub description: String, - #[serde(default = "default_1940")] + #[serde(default = "default_1942")] pub status: String, - #[serde(default = "default_1945")] + #[serde(default = "default_1947")] pub fields: Vec, } @@ -44147,13 +44151,13 @@ impl MemorySchemaRegisterInput { #[non_exhaustive] pub struct MentorPlane { pub plane: String, - #[serde(default = "default_1947")] + #[serde(default = "default_1949")] pub calls: Integer, - #[serde(default = "default_1948")] + #[serde(default = "default_1950")] pub available: Option, - #[serde(default = "default_1949")] + #[serde(default = "default_1951")] pub when: String, - #[serde(default = "default_1950")] + #[serde(default = "default_1952")] pub mentored: bool, } @@ -44163,11 +44167,11 @@ pub struct MentorHint { pub code: String, pub severity: String, pub text: String, - #[serde(default = "default_1952")] + #[serde(default = "default_1954")] pub ops: Vec, - #[serde(default = "default_1953")] + #[serde(default = "default_1955")] pub evidence: std::collections::HashMap, - #[serde(default = "default_1954")] + #[serde(default = "default_1956")] pub plane: Option, } @@ -44175,9 +44179,9 @@ pub struct MentorHint { #[non_exhaustive] pub struct MentorAdoption { pub code: String, - #[serde(default = "default_1956")] + #[serde(default = "default_1958")] pub shown_sessions: Integer, - #[serde(default = "default_1957")] + #[serde(default = "default_1959")] pub followed_sessions: Integer, } @@ -44213,7 +44217,7 @@ pub enum UsageRungSource { #[non_exhaustive] pub struct UsageRung { pub rung: UsageRungRung, - #[serde(default = "default_1959")] + #[serde(default = "default_1961")] pub count: Option, pub source: UsageRungSource, pub meaning: String, @@ -44228,27 +44232,27 @@ pub struct MentorBriefOutput { pub window_seconds: Integer, pub computed_at: String, pub sessions: Integer, - #[serde(default = "default_1946")] + #[serde(default = "default_1948")] pub usage: std::collections::HashMap, - #[serde(default = "default_1951")] + #[serde(default = "default_1953")] pub planes: Vec, - #[serde(default = "default_1955")] + #[serde(default = "default_1957")] pub hints: Vec, - #[serde(default = "default_1958")] - pub adoption: Vec, #[serde(default = "default_1960")] + pub adoption: Vec, + #[serde(default = "default_1962")] pub usage_evidence: Vec, - #[serde(default = "default_1961")] + #[serde(default = "default_1963")] pub ledger_from: Option, - #[serde(default = "default_1962")] + #[serde(default = "default_1964")] pub ledger_retention_days: Option, - #[serde(default = "default_1963")] + #[serde(default = "default_1965")] pub agents: Vec, - #[serde(default = "default_1964")] + #[serde(default = "default_1966")] pub agent_defaulted: bool, - #[serde(default = "default_1965")] + #[serde(default = "default_1967")] pub skipped: Vec, - #[serde(default = "default_1966")] + #[serde(default = "default_1968")] pub healthy: bool, } @@ -44397,33 +44401,33 @@ impl MentorGuideInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct NamespaceAuditSummary { - #[serde(default = "default_1967")] + #[serde(default = "default_1969")] pub live_rows: Integer, - #[serde(default = "default_1968")] + #[serde(default = "default_1970")] pub live_bytes: Integer, - #[serde(default = "default_1969")] + #[serde(default = "default_1971")] pub excerpt_bytes: Integer, - #[serde(default = "default_1970")] + #[serde(default = "default_1972")] pub version_rows: Integer, - #[serde(default = "default_1971")] + #[serde(default = "default_1973")] pub version_bytes: Integer, - #[serde(default = "default_1972")] + #[serde(default = "default_1974")] pub unembedded_rows: Integer, - #[serde(default = "default_1973")] + #[serde(default = "default_1975")] pub gets: Integer, - #[serde(default = "default_1974")] + #[serde(default = "default_1976")] pub searches: Integer, - #[serde(default = "default_1975")] + #[serde(default = "default_1977")] pub sets: Integer, - #[serde(default = "default_1976")] + #[serde(default = "default_1978")] pub get_search_ratio: f64, - #[serde(default = "default_1977")] + #[serde(default = "default_1979")] pub inspector_calls: Integer, - #[serde(default = "default_1978")] + #[serde(default = "default_1980")] pub typed_gets: Integer, - #[serde(default = "default_1979")] + #[serde(default = "default_1981")] pub written_in_window: Integer, - #[serde(default = "default_1980")] + #[serde(default = "default_1982")] pub ledger_calls: Integer, } @@ -44455,25 +44459,25 @@ pub struct NamespaceAuditFinding { pub kind: NamespaceAuditFindingKind, pub rule_version: Integer, pub source_op: String, - #[serde(default = "default_1981")] + #[serde(default = "default_1983")] pub window_seconds: Option, - #[serde(default = "default_1982")] + #[serde(default = "default_1984")] pub population: Option, pub sample_limit: Integer, pub samples_complete: bool, - #[serde(default = "default_1983")] + #[serde(default = "default_1985")] pub evidence: Vec, - #[serde(default = "default_1984")] + #[serde(default = "default_1986")] pub exceptions: String, - #[serde(default = "default_1985")] + #[serde(default = "default_1987")] pub uncertainty: String, pub code: String, pub severity: NamespaceAuditFindingSeverity, pub count: Integer, pub share: f64, - #[serde(default = "default_1986")] + #[serde(default = "default_1988")] pub bytes: Integer, - #[serde(default = "default_1987")] + #[serde(default = "default_1989")] pub samples: Vec>, pub detail: String, pub remedy: String, @@ -44488,7 +44492,7 @@ pub struct NamespaceAuditOutput { pub window_seconds: Integer, pub summary: NamespaceAuditSummary, pub findings: Vec, - #[serde(default = "default_1988")] + #[serde(default = "default_1990")] pub skipped: Vec, pub coverage: ReportCoverage, pub healthy: bool, @@ -44579,29 +44583,29 @@ pub enum BrowseEntryMyStatus { #[non_exhaustive] pub struct BrowseEntry { pub namespace: String, - #[serde(default = "default_1989")] + #[serde(default = "default_1991")] pub kind: String, pub description: String, pub owner_email: String, pub member_count: Integer, - #[serde(default = "default_1990")] + #[serde(default = "default_1992")] pub requires_approval: bool, pub created_at: String, - #[serde(default = "default_1991")] + #[serde(default = "default_1993")] pub join_policy: String, - #[serde(default = "default_1992")] + #[serde(default = "default_1994")] pub visibility: String, - #[serde(default = "default_1993")] + #[serde(default = "default_1995")] pub my_status: BrowseEntryMyStatus, - #[serde(default = "default_1994")] + #[serde(default = "default_1996")] pub my_role: String, - #[serde(default = "default_1995")] + #[serde(default = "default_1997")] pub repo: String, - #[serde(default = "default_1996")] + #[serde(default = "default_1998")] pub branch: String, - #[serde(default = "default_1997")] + #[serde(default = "default_1999")] pub guide_revision: Integer, - #[serde(default = "default_1998")] + #[serde(default = "default_2000")] pub guide_summary: String, } @@ -44705,9 +44709,9 @@ pub enum NamespaceCancelRequestOutputClearedRole { pub struct NamespaceCancelRequestOutput { pub cancelled: bool, pub namespace: String, - #[serde(default = "default_1999")] + #[serde(default = "default_2001")] pub cleared_role: Option, - #[serde(default = "default_2000")] + #[serde(default = "default_2002")] pub cancelled_at: Option, } @@ -44779,7 +44783,7 @@ pub struct NamespaceDeleteOutput { pub deleted: bool, pub namespace: String, pub updated_at: String, - #[serde(default = "default_2001")] + #[serde(default = "default_2003")] pub sources_retired: Vec, } @@ -44848,67 +44852,67 @@ pub enum NamespaceGetOutputClassification { pub struct NamespaceGetOutput { pub found: bool, pub namespace: String, - #[serde(default = "default_2002")] + #[serde(default = "default_2004")] pub kind: Option, - #[serde(default = "default_2003")] + #[serde(default = "default_2005")] pub owner_email: Option, - #[serde(default = "default_2004")] + #[serde(default = "default_2006")] pub description: Option, - #[serde(default = "default_2005")] + #[serde(default = "default_2007")] pub tags: Option>, - #[serde(default = "default_2006")] + #[serde(default = "default_2008")] pub active: Option, - #[serde(default = "default_2007")] + #[serde(default = "default_2009")] pub conversation_logging_enabled: Option, - #[serde(default = "default_2008")] + #[serde(default = "default_2010")] pub capture_generation_io: Option, - #[serde(default = "default_2009")] + #[serde(default = "default_2011")] pub coverage_sweep: Option, - #[serde(default = "default_2010")] + #[serde(default = "default_2012")] pub consolidation_enabled: Option, - #[serde(default = "default_2011")] + #[serde(default = "default_2013")] pub daily_cost_cap_usd: Option, - #[serde(default = "default_2012")] + #[serde(default = "default_2014")] pub daily_user_cost_cap_usd: Option, - #[serde(default = "default_2013")] + #[serde(default = "default_2015")] pub budget_alert_inbox: Option, - #[serde(default = "default_2014")] + #[serde(default = "default_2016")] pub conflict_threshold: Option, - #[serde(default = "default_2015")] + #[serde(default = "default_2017")] pub retention_days: Option, - #[serde(default = "default_2016")] + #[serde(default = "default_2018")] pub warm_days: Option, - #[serde(default = "default_2017")] + #[serde(default = "default_2019")] pub visibility: Option, - #[serde(default = "default_2018")] + #[serde(default = "default_2020")] pub requires_approval: Option, - #[serde(default = "default_2019")] + #[serde(default = "default_2021")] pub join_policy: Option, - #[serde(default = "default_2020")] + #[serde(default = "default_2022")] pub effective_join_policy: Option, - #[serde(default = "default_2021")] + #[serde(default = "default_2023")] pub retrieval_defaults: Option>, - #[serde(default = "default_2022")] + #[serde(default = "default_2024")] pub rerank_endpoint: Option, - #[serde(default = "default_2023")] + #[serde(default = "default_2025")] pub classify_endpoint: Option, - #[serde(default = "default_2024")] + #[serde(default = "default_2026")] pub default_conflict_policy: Option, - #[serde(default = "default_2025")] + #[serde(default = "default_2027")] pub proposal_policy: Option, - #[serde(default = "default_2026")] + #[serde(default = "default_2028")] pub code_change_policy: Option, - #[serde(default = "default_2027")] + #[serde(default = "default_2029")] pub tag_registry: Option>>, - #[serde(default = "default_2028")] + #[serde(default = "default_2030")] pub classification: Option, - #[serde(default = "default_2029")] + #[serde(default = "default_2031")] pub guide_revision: Option, - #[serde(default = "default_2030")] + #[serde(default = "default_2032")] pub guide_summary: Option, - #[serde(default = "default_2031")] + #[serde(default = "default_2033")] pub created_at: Option, - #[serde(default = "default_2032")] + #[serde(default = "default_2034")] pub updated_at: Option, } @@ -44961,17 +44965,17 @@ impl NamespaceGetInput { #[non_exhaustive] pub struct NamespaceGuideGetOutput { pub found: bool, - #[serde(default = "default_2033")] + #[serde(default = "default_2035")] pub revision: Integer, - #[serde(default = "default_2034")] + #[serde(default = "default_2036")] pub content: String, - #[serde(default = "default_2035")] + #[serde(default = "default_2037")] pub summary: String, - #[serde(default = "default_2036")] + #[serde(default = "default_2038")] pub note: String, - #[serde(default = "default_2037")] + #[serde(default = "default_2039")] pub updated_by: String, - #[serde(default = "default_2038")] + #[serde(default = "default_2040")] pub updated_at: Option, } @@ -45108,17 +45112,17 @@ impl NamespaceGuideHistoryInput { #[non_exhaustive] pub struct NamespaceGuideSetOutputNamespaceGuideGetOutput { pub found: bool, - #[serde(default = "default_2040")] + #[serde(default = "default_2042")] pub revision: Integer, - #[serde(default = "default_2041")] + #[serde(default = "default_2043")] pub content: String, - #[serde(default = "default_2042")] + #[serde(default = "default_2044")] pub summary: String, - #[serde(default = "default_2043")] + #[serde(default = "default_2045")] pub note: String, - #[serde(default = "default_2044")] + #[serde(default = "default_2046")] pub updated_by: String, - #[serde(default = "default_2045")] + #[serde(default = "default_2047")] pub updated_at: Option, } @@ -45126,10 +45130,10 @@ pub struct NamespaceGuideSetOutputNamespaceGuideGetOutput { #[non_exhaustive] pub struct NamespaceGuideSetOutput { pub written: bool, - #[serde(default = "default_2039")] + #[serde(default = "default_2041")] pub conflict: bool, pub revision: Integer, - #[serde(default = "default_2046")] + #[serde(default = "default_2048")] pub current: Option, } @@ -45250,7 +45254,7 @@ pub struct InventorySection { #[serde(deserialize_with = "required_nullable")] pub latest_at: Option, pub complete: bool, - #[serde(default = "default_2047")] + #[serde(default = "default_2049")] pub reason: String, } @@ -45280,10 +45284,10 @@ pub struct InventoryPopulation { pub population: InventoryPopulationPopulation, #[serde(deserialize_with = "required_nullable")] pub total: Option, - #[serde(default = "default_2048")] + #[serde(default = "default_2050")] pub top: Vec, pub complete: bool, - #[serde(default = "default_2049")] + #[serde(default = "default_2051")] pub reason: String, } @@ -45449,11 +45453,11 @@ pub struct NamespaceJoinOutput { pub joined: bool, pub namespace: String, pub role: NamespaceJoinOutputRole, - #[serde(default = "default_2050")] + #[serde(default = "default_2052")] pub status: String, - #[serde(default = "default_2051")] + #[serde(default = "default_2053")] pub requested_role: Option, - #[serde(default = "default_2052")] + #[serde(default = "default_2054")] pub pending_admins: Vec, pub joined_at: String, } @@ -45545,7 +45549,7 @@ impl NamespaceJoinInput { pub struct NamespaceLeaveOutput { pub left: bool, pub namespace: String, - #[serde(default = "default_2053")] + #[serde(default = "default_2055")] pub left_at: Option, } @@ -45622,27 +45626,27 @@ pub enum NamespaceEntryVisibility { #[non_exhaustive] pub struct NamespaceEntry { pub namespace: String, - #[serde(default = "default_2054")] + #[serde(default = "default_2056")] pub kind: String, pub owner_email: String, pub description: String, pub tags: Vec, pub active: bool, - #[serde(default = "default_2055")] + #[serde(default = "default_2057")] pub consolidation_enabled: bool, - #[serde(default = "default_2056")] + #[serde(default = "default_2058")] pub daily_cost_cap_usd: f64, - #[serde(default = "default_2057")] + #[serde(default = "default_2059")] pub daily_user_cost_cap_usd: f64, - #[serde(default = "default_2058")] + #[serde(default = "default_2060")] pub budget_alert_inbox: String, - #[serde(default = "default_2059")] + #[serde(default = "default_2061")] pub conflict_threshold: Option, - #[serde(default = "default_2060")] + #[serde(default = "default_2062")] pub retention_days: Integer, - #[serde(default = "default_2061")] + #[serde(default = "default_2063")] pub warm_days: Integer, - #[serde(default = "default_2062")] + #[serde(default = "default_2064")] pub visibility: NamespaceEntryVisibility, pub created_at: String, pub updated_at: String, @@ -45797,27 +45801,27 @@ pub enum MineEntryVisibility { pub struct MineEntry { pub namespace: String, pub role: String, - #[serde(default = "default_2063")] + #[serde(default = "default_2065")] pub status: String, - #[serde(default = "default_2064")] + #[serde(default = "default_2066")] pub pending_role: Option, - #[serde(default = "default_2065")] + #[serde(default = "default_2067")] pub pending_since: Option, - #[serde(default = "default_2066")] + #[serde(default = "default_2068")] pub pending_admins: Vec, - #[serde(default = "default_2067")] + #[serde(default = "default_2069")] pub visibility: MineEntryVisibility, - #[serde(default = "default_2068")] + #[serde(default = "default_2070")] pub kind: String, - #[serde(default = "default_2069")] + #[serde(default = "default_2071")] pub title: String, - #[serde(default = "default_2070")] + #[serde(default = "default_2072")] pub description: String, - #[serde(default = "default_2071")] + #[serde(default = "default_2073")] pub joined_at: Option, - #[serde(default = "default_2072")] + #[serde(default = "default_2074")] pub is_new: bool, - #[serde(default = "default_2073")] + #[serde(default = "default_2075")] pub inherited: bool, } @@ -45883,7 +45887,7 @@ pub struct OntologyEntry { pub name: String, pub status: String, pub description: String, - #[serde(default = "default_2074")] + #[serde(default = "default_2076")] pub cardinality: String, pub created_by: String, pub updated_at: String, @@ -46076,7 +46080,7 @@ pub struct NamespaceRegisterOutput { pub registered: bool, pub namespace: String, pub updated_at: String, - #[serde(default = "default_2075")] + #[serde(default = "default_2077")] pub visibility: NamespaceRegisterOutputVisibility, } @@ -47156,7 +47160,7 @@ impl NamespaceRegisterOntologyInput { #[non_exhaustive] pub struct NamespaceRestoreOutput { pub restored: bool, - #[serde(default = "default_2076")] + #[serde(default = "default_2078")] pub publication_pending: bool, pub target_namespace: String, pub snapshot_id: String, @@ -48043,15 +48047,15 @@ pub struct NamespaceRollbackOutput { pub version_at: Integer, pub reinstate: Integer, pub remove: Integer, - #[serde(default = "default_2077")] + #[serde(default = "default_2079")] pub skipped_no_head: Integer, - #[serde(default = "default_2078")] + #[serde(default = "default_2080")] pub skipped_already_gone: Integer, - #[serde(default = "default_2079")] + #[serde(default = "default_2081")] pub truncated: bool, - #[serde(default = "default_2080")] + #[serde(default = "default_2082")] pub sample: Vec>, - #[serde(default = "default_2081")] + #[serde(default = "default_2083")] pub applied_at: Option, } @@ -48230,101 +48234,101 @@ pub struct NamespaceSnapshotOutputSnapshotMemoryRow { pub confidence: f64, pub source_trace: String, pub pinned: bool, - #[serde(default = "default_2082")] + #[serde(default = "default_2084")] pub expires_at: Option, - #[serde(default = "default_2083")] + #[serde(default = "default_2085")] pub entities: Vec, - #[serde(default = "default_2084")] + #[serde(default = "default_2086")] pub version: Integer, - #[serde(default = "default_2085")] + #[serde(default = "default_2087")] pub content_sha256: String, - #[serde(default = "default_2086")] + #[serde(default = "default_2088")] pub actor: String, - #[serde(default = "default_2087")] + #[serde(default = "default_2089")] pub source_class: String, - #[serde(default = "default_2088")] + #[serde(default = "default_2090")] pub source_resource_id: String, - #[serde(default = "default_2089")] + #[serde(default = "default_2091")] pub verified_by: String, - #[serde(default = "default_2090")] + #[serde(default = "default_2092")] pub verified_at: Option, - #[serde(default = "default_2091")] + #[serde(default = "default_2093")] pub verified_sha256: String, - #[serde(default = "default_2092")] + #[serde(default = "default_2094")] pub grounding: String, - #[serde(default = "default_2093")] + #[serde(default = "default_2095")] pub evidence: String, - #[serde(default = "default_2094")] + #[serde(default = "default_2096")] pub tags: Vec, - #[serde(default = "default_2095")] + #[serde(default = "default_2097")] pub valid_at: Option, - #[serde(default = "default_2096")] + #[serde(default = "default_2098")] pub valid_to: Option, - #[serde(default = "default_2097")] + #[serde(default = "default_2099")] pub created_at: Option, - #[serde(default = "default_2098")] + #[serde(default = "default_2100")] pub updated_at: Option, - #[serde(default = "default_2099")] + #[serde(default = "default_2101")] pub value_json: String, - #[serde(default = "default_2100")] + #[serde(default = "default_2102")] pub status: NamespaceSnapshotOutputSnapshotMemoryRowStatus, - #[serde(default = "default_2101")] + #[serde(default = "default_2103")] pub requires_review: Option, - #[serde(default = "default_2102")] + #[serde(default = "default_2104")] pub conflict_with: Vec, - #[serde(default = "default_2103")] + #[serde(default = "default_2105")] pub duplicate_of: String, - #[serde(default = "default_2104")] + #[serde(default = "default_2106")] pub evidence_count: Integer, - #[serde(default = "default_2105")] + #[serde(default = "default_2107")] pub recall_count: Integer, - #[serde(default = "default_2106")] + #[serde(default = "default_2108")] pub last_recalled_at: Option, - #[serde(default = "default_2107")] + #[serde(default = "default_2109")] pub cross_promoted_from_memory_id: String, - #[serde(default = "default_2108")] + #[serde(default = "default_2110")] pub cross_promoted_from_namespace: String, - #[serde(default = "default_2109")] + #[serde(default = "default_2111")] pub superseded_by: String, - #[serde(default = "default_2110")] + #[serde(default = "default_2112")] pub rejection_reason: String, - #[serde(default = "default_2111")] + #[serde(default = "default_2113")] pub temporal_anchor: Option, - #[serde(default = "default_2112")] + #[serde(default = "default_2114")] pub temporal_confidence: f64, - #[serde(default = "default_2113")] + #[serde(default = "default_2115")] pub invalid_at: Option, - #[serde(default = "default_2114")] + #[serde(default = "default_2116")] pub char_limit: Option, - #[serde(default = "default_2115")] + #[serde(default = "default_2117")] pub reinforcement_count: Integer, - #[serde(default = "default_2116")] + #[serde(default = "default_2118")] pub last_reinforced_at: Option, - #[serde(default = "default_2117")] + #[serde(default = "default_2119")] pub mentioned_at: Option, - #[serde(default = "default_2118")] + #[serde(default = "default_2120")] pub sensitivity: String, - #[serde(default = "default_2119")] + #[serde(default = "default_2121")] pub redacted_at: Option, - #[serde(default = "default_2120")] + #[serde(default = "default_2122")] pub redaction_reason: String, - #[serde(default = "default_2121")] + #[serde(default = "default_2123")] pub lock_mode: String, - #[serde(default = "default_2122")] + #[serde(default = "default_2124")] pub lock_reason: String, - #[serde(default = "default_2123")] + #[serde(default = "default_2125")] pub lock_until: Option, - #[serde(default = "default_2124")] + #[serde(default = "default_2126")] pub locked_by: String, - #[serde(default = "default_2125")] + #[serde(default = "default_2127")] pub locked_at: Option, - #[serde(default = "default_2126")] + #[serde(default = "default_2128")] pub on_expire: String, - #[serde(default = "default_2127")] + #[serde(default = "default_2129")] pub expire_reason: String, - #[serde(default = "default_2128")] + #[serde(default = "default_2130")] pub files: Vec, - #[serde(default = "default_2129")] + #[serde(default = "default_2131")] pub concepts: Vec, } @@ -48333,11 +48337,11 @@ pub struct NamespaceSnapshotOutputSnapshotMemoryRow { pub struct NamespaceSnapshotOutputSnapshotTypeRow { pub memory_type: String, pub retention_days: Integer, - #[serde(default = "default_2130")] + #[serde(default = "default_2132")] pub dedup_threshold: Option, - #[serde(default = "default_2131")] + #[serde(default = "default_2133")] pub hot_quota: Integer, - #[serde(default = "default_2132")] + #[serde(default = "default_2134")] pub conflict_policy: String, } @@ -48552,7 +48556,7 @@ pub struct TaxonomyCommunity { pub community_id: Integer, pub label: String, pub size: Integer, - #[serde(default = "default_2133")] + #[serde(default = "default_2135")] pub top_entities: Vec, } @@ -48563,9 +48567,9 @@ pub struct NamespaceTaxonomyOutput { pub entities: Vec, pub memory_count: Integer, pub memory_types: Vec, - #[serde(default = "default_2134")] + #[serde(default = "default_2136")] pub communities: Vec, - #[serde(default = "default_2135")] + #[serde(default = "default_2137")] pub communities_computed_at: String, } @@ -48665,15 +48669,15 @@ pub enum TuneProposalTarget { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct TuneEvidence { - #[serde(default = "default_2137")] + #[serde(default = "default_2139")] pub finding_codes: Vec, - #[serde(default = "default_2138")] + #[serde(default = "default_2140")] pub supporting_count: Integer, - #[serde(default = "default_2139")] + #[serde(default = "default_2141")] pub supporting: Vec, - #[serde(default = "default_2140")] + #[serde(default = "default_2142")] pub counter_count: Option, - #[serde(default = "default_2141")] + #[serde(default = "default_2143")] pub documents: Vec, } @@ -48699,10 +48703,10 @@ pub enum TuneApplyVia { #[non_exhaustive] pub struct TuneApply { pub op: String, - #[serde(default = "default_2145")] + #[serde(default = "default_2147")] pub via: TuneApplyVia, pub args: std::collections::HashMap, - #[serde(default = "default_2146")] + #[serde(default = "default_2148")] pub args_complete: bool, pub required_role: String, pub guard: String, @@ -48721,7 +48725,7 @@ pub struct ChunkStats { pub sections: Integer, pub sections_cut: Integer, pub max_input_tokens: Integer, - #[serde(default = "default_2148")] + #[serde(default = "default_2150")] pub over_input_limit: Option, } @@ -48741,25 +48745,25 @@ pub struct TuneProposal { pub title: String, pub rationale: String, pub current: String, - #[serde(default = "default_2136")] + #[serde(default = "default_2138")] pub current_revision: Option, pub proposed: String, pub evidence: TuneEvidence, - #[serde(default = "default_2142")] + #[serde(default = "default_2144")] pub affected_agents: Vec, - #[serde(default = "default_2143")] + #[serde(default = "default_2145")] pub affected_agents_total: Option, - #[serde(default = "default_2144")] + #[serde(default = "default_2146")] pub effect: TuneProposalEffect, pub historical: String, pub apply: TuneApply, - #[serde(default = "default_2147")] - pub apply_also: Vec, #[serde(default = "default_2149")] + pub apply_also: Vec, + #[serde(default = "default_2151")] pub preview: Option, - #[serde(default = "default_2150")] + #[serde(default = "default_2152")] pub limits: String, - #[serde(default = "default_2151")] + #[serde(default = "default_2153")] pub refs: Vec, } @@ -48767,13 +48771,13 @@ pub struct TuneProposal { #[non_exhaustive] pub struct ChunkingSample { pub cap: Integer, - #[serde(default = "default_2157")] + #[serde(default = "default_2159")] pub population: Option, pub documents: Integer, pub unread: Integer, pub load_cap: Integer, pub embedder_model: String, - #[serde(default = "default_2158")] + #[serde(default = "default_2160")] pub input_token_limit: Option, pub current: ChunkStats, } @@ -48784,21 +48788,21 @@ pub struct NamespaceTuneOutput { pub org: String, pub namespace: String, pub computed_at: String, - #[serde(default = "default_2152")] + #[serde(default = "default_2154")] pub proposals: Vec, - #[serde(default = "default_2153")] + #[serde(default = "default_2155")] pub guide_revision: Option, - #[serde(default = "default_2154")] + #[serde(default = "default_2156")] pub categories_registered: Option, - #[serde(default = "default_2155")] + #[serde(default = "default_2157")] pub extraction_policy: Option, - #[serde(default = "default_2156")] + #[serde(default = "default_2158")] pub extraction_policy_unavailable: String, - #[serde(default = "default_2159")] + #[serde(default = "default_2161")] pub chunking: Option, - #[serde(default = "default_2160")] + #[serde(default = "default_2162")] pub skipped: Vec, - #[serde(default = "default_2161")] + #[serde(default = "default_2163")] pub model_used: bool, } @@ -48919,25 +48923,25 @@ pub struct NamespaceValidateFinding { pub kind: NamespaceValidateFindingKind, pub rule_version: Integer, pub source_op: String, - #[serde(default = "default_2162")] + #[serde(default = "default_2164")] pub window_seconds: Option, - #[serde(default = "default_2163")] + #[serde(default = "default_2165")] pub population: Option, pub sample_limit: Integer, pub samples_complete: bool, - #[serde(default = "default_2164")] + #[serde(default = "default_2166")] pub evidence: Vec, - #[serde(default = "default_2165")] + #[serde(default = "default_2167")] pub exceptions: String, - #[serde(default = "default_2166")] + #[serde(default = "default_2168")] pub uncertainty: String, pub check: String, pub severity: NamespaceValidateFindingSeverity, pub count: Integer, - #[serde(default = "default_2167")] + #[serde(default = "default_2169")] pub samples: Vec>, pub detail: String, - #[serde(default = "default_2168")] + #[serde(default = "default_2170")] pub totals: std::collections::HashMap, } @@ -48951,9 +48955,9 @@ pub struct NamespaceValidateOutput { pub warnings: Integer, pub infos: Integer, pub findings: Vec, - #[serde(default = "default_2169")] + #[serde(default = "default_2171")] pub skipped: Vec, - #[serde(default = "default_2170")] + #[serde(default = "default_2172")] pub keys_scoped: Integer, pub coverage: ReportCoverage, pub checked_at: String, @@ -49073,9 +49077,9 @@ impl NamespaceValidateInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct ObserveCrystallizeOutput { - #[serde(default = "default_2171")] + #[serde(default = "default_2173")] pub enqueued: Integer, - #[serde(default = "default_2172")] + #[serde(default = "default_2174")] pub session_id: String, } @@ -49172,23 +49176,23 @@ impl ObserveCrystallizeInput { #[non_exhaustive] pub struct ObserveRecordOutput { pub memory_key: String, - #[serde(default = "default_2173")] + #[serde(default = "default_2175")] pub memory_id: String, - #[serde(default = "default_2174")] + #[serde(default = "default_2176")] pub kind: String, - #[serde(default = "default_2175")] + #[serde(default = "default_2177")] pub tags: Vec, - #[serde(default = "default_2176")] + #[serde(default = "default_2178")] pub file_paths: Vec, - #[serde(default = "default_2177")] + #[serde(default = "default_2179")] pub content_sha256: String, - #[serde(default = "default_2178")] + #[serde(default = "default_2180")] pub tool_name: String, - #[serde(default = "default_2179")] + #[serde(default = "default_2181")] pub has_error: bool, - #[serde(default = "default_2180")] + #[serde(default = "default_2182")] pub narrative_chars: Integer, - #[serde(default = "default_2181")] + #[serde(default = "default_2183")] pub skipped_reason: String, } @@ -49387,26 +49391,26 @@ pub struct ProjectionFailureRow { pub failure_id: String, pub org: String, pub namespace: String, - #[serde(default = "default_2182")] + #[serde(default = "default_2184")] pub agent: String, pub projection: String, - #[serde(default = "default_2183")] + #[serde(default = "default_2185")] pub source_operation: String, - #[serde(default = "default_2184")] + #[serde(default = "default_2186")] pub source_resource_id: String, - #[serde(default = "default_2185")] + #[serde(default = "default_2187")] pub memory_keys: Vec, - #[serde(default = "default_2186")] + #[serde(default = "default_2188")] pub error_type: String, - #[serde(default = "default_2187")] + #[serde(default = "default_2189")] pub error_message: String, - #[serde(default = "default_2188")] + #[serde(default = "default_2190")] pub payload: std::collections::HashMap, - #[serde(default = "default_2189")] + #[serde(default = "default_2191")] pub status: String, - #[serde(default = "default_2190")] + #[serde(default = "default_2192")] pub created_at: Option, - #[serde(default = "default_2191")] + #[serde(default = "default_2193")] pub resolved_at: Option, } @@ -49560,22 +49564,22 @@ pub struct ProjectionFailureRetryRow { pub projection: String, pub retried: bool, pub resolved: bool, - #[serde(default = "default_2192")] + #[serde(default = "default_2194")] pub abandoned: bool, - #[serde(default = "default_2193")] + #[serde(default = "default_2195")] pub reason: String, - #[serde(default = "default_2194")] + #[serde(default = "default_2196")] pub error: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct ProjectionFailureRetryOutput { - #[serde(default = "default_2195")] + #[serde(default = "default_2197")] pub results: Vec, pub retried: Integer, pub resolved: Integer, - #[serde(default = "default_2196")] + #[serde(default = "default_2198")] pub abandoned: Integer, } @@ -49657,15 +49661,15 @@ impl ProjectionFailureRetryInput { pub struct OrgModelCallsOutput { pub org: String, pub enabled: bool, - #[serde(default = "default_2197")] + #[serde(default = "default_2199")] pub reason: String, - #[serde(default = "default_2198")] + #[serde(default = "default_2200")] pub updated_by: String, - #[serde(default = "default_2199")] + #[serde(default = "default_2201")] pub updated_at: Option, - #[serde(default = "default_2200")] + #[serde(default = "default_2202")] pub locked: bool, - #[serde(default = "default_2201")] + #[serde(default = "default_2203")] pub locked_by: String, } @@ -50004,7 +50008,7 @@ impl PolicyDecisionsInput { #[non_exhaustive] pub struct PolicyDeleteOutput { pub removed: bool, - #[serde(default = "default_2202")] + #[serde(default = "default_2204")] pub widening: bool, } @@ -50070,12 +50074,12 @@ pub struct PolicyRuleOut { pub condition: std::collections::HashMap, pub description: String, pub enabled: bool, - #[serde(default = "default_2203")] + #[serde(default = "default_2205")] pub mode: String, pub created_by: String, - #[serde(default = "default_2204")] + #[serde(default = "default_2206")] pub created_at: Option, - #[serde(default = "default_2205")] + #[serde(default = "default_2207")] pub updated_at: Option, } @@ -50147,9 +50151,9 @@ impl PolicyListInput { pub struct PolicySetOutput { pub rule: PolicyRuleOut, pub leaf_count: Integer, - #[serde(default = "default_2206")] + #[serde(default = "default_2208")] pub widening: bool, - #[serde(default = "default_2207")] + #[serde(default = "default_2209")] pub change: Vec, } @@ -50419,37 +50423,37 @@ pub struct ProcedureEvolveOutput { pub revision: Integer, pub changed: bool, pub template: bool, - #[serde(default = "default_2208")] + #[serde(default = "default_2210")] pub folded_runs: Integer, - #[serde(default = "default_2209")] + #[serde(default = "default_2211")] pub gate: ProcedureEvolveOutputGate, - #[serde(default = "default_2210")] + #[serde(default = "default_2212")] pub gate_mode: String, - #[serde(default = "default_2211")] + #[serde(default = "default_2213")] pub gate_llr: f64, - #[serde(default = "default_2212")] + #[serde(default = "default_2214")] pub gate_before: std::collections::HashMap, - #[serde(default = "default_2213")] + #[serde(default = "default_2215")] pub gate_after: std::collections::HashMap, - #[serde(default = "default_2214")] + #[serde(default = "default_2216")] pub gate_cost_before: std::collections::HashMap, - #[serde(default = "default_2215")] + #[serde(default = "default_2217")] pub gate_cost_after: std::collections::HashMap, - #[serde(default = "default_2216")] + #[serde(default = "default_2218")] pub gate_reason: String, - #[serde(default = "default_2217")] + #[serde(default = "default_2219")] pub dead_end_steps: Vec, - #[serde(default = "default_2218")] + #[serde(default = "default_2220")] pub fail_prone_steps: Vec, - #[serde(default = "default_2219")] + #[serde(default = "default_2221")] pub fail_prone_transitions: Vec, - #[serde(default = "default_2220")] + #[serde(default = "default_2222")] pub run_stats: std::collections::HashMap, - #[serde(default = "default_2221")] + #[serde(default = "default_2223")] pub strikes: Integer, - #[serde(default = "default_2222")] + #[serde(default = "default_2224")] pub quarantined: bool, - #[serde(default = "default_2223")] + #[serde(default = "default_2225")] pub retention: std::collections::HashMap, } @@ -50672,9 +50676,9 @@ pub struct ProcedureForkOutput { pub memory_key: String, pub version: Integer, pub name: String, - #[serde(default = "default_2224")] + #[serde(default = "default_2226")] pub steps: Vec, - #[serde(default = "default_2225")] + #[serde(default = "default_2227")] pub forked_from: std::collections::HashMap, } @@ -50934,32 +50938,32 @@ pub enum ProcedureLocateOutputStatus { #[non_exhaustive] pub struct ProcedureLocateOutput { pub memory_key: String, - #[serde(default = "default_2226")] + #[serde(default = "default_2228")] pub name: String, - #[serde(default = "default_2227")] + #[serde(default = "default_2229")] pub status: ProcedureLocateOutputStatus, pub matched: bool, - #[serde(default = "default_2228")] + #[serde(default = "default_2230")] pub active: Option>, - #[serde(default = "default_2229")] + #[serde(default = "default_2231")] pub hops: Vec>>, - #[serde(default = "default_2230")] + #[serde(default = "default_2232")] pub entry_nodes: Vec, - #[serde(default = "default_2231")] + #[serde(default = "default_2233")] pub dominant_next: Vec, - #[serde(default = "default_2232")] + #[serde(default = "default_2234")] pub revisits: std::collections::HashMap, - #[serde(default = "default_2233")] + #[serde(default = "default_2235")] pub looping: bool, - #[serde(default = "default_2234")] + #[serde(default = "default_2236")] pub exits: Vec, - #[serde(default = "default_2235")] + #[serde(default = "default_2237")] pub failure_notes: Vec>, - #[serde(default = "default_2236")] + #[serde(default = "default_2238")] pub rendered: String, - #[serde(default = "default_2237")] + #[serde(default = "default_2239")] pub run_stats: std::collections::HashMap, - #[serde(default = "default_2238")] + #[serde(default = "default_2240")] pub for_agent: std::collections::HashMap, } @@ -51114,43 +51118,43 @@ pub struct ProcedureMatch { pub name: String, pub situation: String, pub steps: Vec, - #[serde(default = "default_2239")] + #[serde(default = "default_2241")] pub tags: Vec, - #[serde(default = "default_2240")] + #[serde(default = "default_2242")] pub metadata: std::collections::HashMap, pub similarity: f64, pub memory_key: String, pub namespace: String, - #[serde(default = "default_2241")] + #[serde(default = "default_2243")] pub graph: Option>, - #[serde(default = "default_2242")] + #[serde(default = "default_2244")] pub template: bool, - #[serde(default = "default_2243")] + #[serde(default = "default_2245")] pub run_stats: std::collections::HashMap, - #[serde(default = "default_2244")] + #[serde(default = "default_2246")] pub status: ProcedureMatchStatus, - #[serde(default = "default_2245")] + #[serde(default = "default_2247")] pub quarantined: Option>, - #[serde(default = "default_2246")] + #[serde(default = "default_2248")] pub fail_prone_steps: Vec, - #[serde(default = "default_2247")] + #[serde(default = "default_2249")] pub revision: Integer, - #[serde(default = "default_2248")] + #[serde(default = "default_2250")] pub rejected_revisions: Vec>, - #[serde(default = "default_2249")] + #[serde(default = "default_2251")] pub tool_overlap: f64, - #[serde(default = "default_2250")] + #[serde(default = "default_2252")] pub score: f64, - #[serde(default = "default_2251")] + #[serde(default = "default_2253")] pub utility: f64, - #[serde(default = "default_2252")] + #[serde(default = "default_2254")] pub goal_similarity: Option, - #[serde(default = "default_2253")] + #[serde(default = "default_2255")] pub for_agent: std::collections::HashMap, - #[serde(default = "default_2254")] + #[serde(default = "default_2256")] pub run_stats_by_agent: std::collections::HashMap>, - #[serde(default = "default_2255")] + #[serde(default = "default_2257")] pub actor: String, } @@ -51158,11 +51162,11 @@ pub struct ProcedureMatch { #[non_exhaustive] pub struct ProcedureMatchOutput { pub matches: Vec, - #[serde(default = "default_2256")] + #[serde(default = "default_2258")] pub matched: Integer, - #[serde(default = "default_2257")] + #[serde(default = "default_2259")] pub procedure_key: String, - #[serde(default = "default_2258")] + #[serde(default = "default_2260")] pub score: f64, } @@ -51543,7 +51547,7 @@ pub struct ProcedureReviseOutput { pub revision: Integer, pub prior_revision: Integer, pub digest: String, - #[serde(default = "default_2259")] + #[serde(default = "default_2261")] pub steps: Vec, } @@ -51655,14 +51659,14 @@ pub struct ProfileActivityEntry { pub agent: String, pub last_activated_at: String, pub event_count: Integer, - #[serde(default = "default_2260")] + #[serde(default = "default_2262")] pub operations: Vec, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct ProfileActivityOutput { - #[serde(default = "default_2261")] + #[serde(default = "default_2263")] pub entries: Vec, } @@ -51770,17 +51774,17 @@ impl ProfileActivityInput { #[non_exhaustive] pub struct ProfileMutationOutput { pub version: Integer, - #[serde(default = "default_2262")] + #[serde(default = "default_2264")] pub memory_id: String, - #[serde(default = "default_2263")] + #[serde(default = "default_2265")] pub content_sha256: String, - #[serde(default = "default_2264")] + #[serde(default = "default_2266")] pub namespace: String, - #[serde(default = "default_2265")] + #[serde(default = "default_2267")] pub label: String, - #[serde(default = "default_2266")] + #[serde(default = "default_2268")] pub char_limit: Option, - #[serde(default = "default_2267")] + #[serde(default = "default_2269")] pub value_length: Integer, } @@ -51889,7 +51893,7 @@ pub struct ProfileRenderOutput { pub rendered: String, pub section_count: Integer, pub total_chars: Integer, - #[serde(default = "default_2268")] + #[serde(default = "default_2270")] pub labels: Vec, } @@ -52274,17 +52278,17 @@ pub enum ProfileStructuredOutputStatus { #[non_exhaustive] pub struct ProfileStructuredOutput { pub status: ProfileStructuredOutputStatus, - #[serde(default = "default_2269")] + #[serde(default = "default_2271")] pub profile: std::collections::HashMap, - #[serde(default = "default_2270")] + #[serde(default = "default_2272")] pub built_at: Option, - #[serde(default = "default_2271")] + #[serde(default = "default_2273")] pub memory_id: String, - #[serde(default = "default_2272")] + #[serde(default = "default_2274")] pub version: Integer, - #[serde(default = "default_2273")] + #[serde(default = "default_2275")] pub version_text: String, - #[serde(default = "default_2274")] + #[serde(default = "default_2276")] pub schema_sha256: String, } @@ -52401,13 +52405,13 @@ impl ProfileStructuredInput { #[non_exhaustive] pub struct ProfileSchemaOutput { pub found: bool, - #[serde(default = "default_2275")] + #[serde(default = "default_2277")] pub json_schema: std::collections::HashMap, - #[serde(default = "default_2276")] + #[serde(default = "default_2278")] pub schema_sha256: String, - #[serde(default = "default_2277")] + #[serde(default = "default_2279")] pub updated_by: String, - #[serde(default = "default_2278")] + #[serde(default = "default_2280")] pub updated_at: Option, } @@ -52560,10 +52564,10 @@ pub enum RunBeginOutputStatus { #[non_exhaustive] pub struct RunBeginOutput { pub run_id: String, - #[serde(default = "default_2279")] + #[serde(default = "default_2281")] pub status: RunBeginOutputStatus, pub started_at: String, - #[serde(default = "default_2280")] + #[serde(default = "default_2282")] pub next: String, } @@ -52771,29 +52775,29 @@ pub struct RunCompleteOutput { pub run_id: String, pub status: RunCompleteOutputStatus, pub duration_ms: Integer, - #[serde(default = "default_2281")] + #[serde(default = "default_2283")] pub used_applied: Integer, - #[serde(default = "default_2282")] + #[serde(default = "default_2284")] pub evidence_applied: Integer, - #[serde(default = "default_2283")] + #[serde(default = "default_2285")] pub harm_applied: Integer, - #[serde(default = "default_2284")] + #[serde(default = "default_2286")] pub memories_written: Vec, - #[serde(default = "default_2285")] + #[serde(default = "default_2287")] pub recalled: Integer, - #[serde(default = "default_2286")] + #[serde(default = "default_2288")] pub observations: Integer, - #[serde(default = "default_2287")] + #[serde(default = "default_2289")] pub procedure_runs_recorded: Integer, - #[serde(default = "default_2288")] + #[serde(default = "default_2290")] pub reflection_key: String, - #[serde(default = "default_2289")] + #[serde(default = "default_2291")] pub retain: String, - #[serde(default = "default_2290")] + #[serde(default = "default_2292")] pub retained: Integer, - #[serde(default = "default_2291")] + #[serde(default = "default_2293")] pub demoted: Integer, - #[serde(default = "default_2292")] + #[serde(default = "default_2294")] pub expiring: Integer, } @@ -53314,25 +53318,25 @@ pub enum RunGetOutputOverBudgetItem { #[non_exhaustive] pub struct RunGetOutput { pub found: bool, - #[serde(default = "default_2293")] + #[serde(default = "default_2295")] pub run: Option, - #[serde(default = "default_2294")] + #[serde(default = "default_2296")] pub recalled: Integer, - #[serde(default = "default_2295")] + #[serde(default = "default_2297")] pub recalled_keys: Vec, - #[serde(default = "default_2296")] + #[serde(default = "default_2298")] pub memories_written: Vec, - #[serde(default = "default_2297")] + #[serde(default = "default_2299")] pub observations: Integer, - #[serde(default = "default_2298")] + #[serde(default = "default_2300")] pub turns: Integer, - #[serde(default = "default_2299")] + #[serde(default = "default_2301")] pub unpriced_turns: Integer, - #[serde(default = "default_2300")] + #[serde(default = "default_2302")] pub cost_usd: f64, - #[serde(default = "default_2301")] + #[serde(default = "default_2303")] pub elapsed_seconds: Integer, - #[serde(default = "default_2302")] + #[serde(default = "default_2304")] pub over_budget: Vec, } @@ -53399,17 +53403,17 @@ pub struct RunGradeProposal { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct RunGradeOutput { - #[serde(default = "default_2303")] + #[serde(default = "default_2305")] pub graded: Integer, - #[serde(default = "default_2304")] + #[serde(default = "default_2306")] pub run_ids: Vec, - #[serde(default = "default_2305")] + #[serde(default = "default_2307")] pub skipped_active: Integer, - #[serde(default = "default_2306")] + #[serde(default = "default_2308")] pub unchanged: Integer, - #[serde(default = "default_2307")] + #[serde(default = "default_2309")] pub memories_counted: Integer, - #[serde(default = "default_2308")] + #[serde(default = "default_2310")] pub proposals_decided: Vec, } @@ -53524,7 +53528,7 @@ impl RunGradeInput { #[non_exhaustive] pub struct RunListOutput { pub runs: Vec, - #[serde(default = "default_2309")] + #[serde(default = "default_2311")] pub total: Option, } @@ -53801,39 +53805,39 @@ pub struct LiveSearchHit { pub title: String, pub url: String, pub provider: LiveSearchHitProvider, - #[serde(default = "default_2312")] + #[serde(default = "default_2314")] pub content: String, - #[serde(default = "default_2313")] + #[serde(default = "default_2315")] pub live: LiveSearchHitLive, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct LiveSearchResults { - #[serde(default = "default_2311")] + #[serde(default = "default_2313")] pub live: LiveSearchResultsLive, - #[serde(default = "default_2314")] + #[serde(default = "default_2316")] pub results: Vec, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct SearchOutput { - #[serde(default = "default_2310")] + #[serde(default = "default_2312")] pub tracker: Option>, - #[serde(default = "default_2315")] + #[serde(default = "default_2317")] pub live: Option, - #[serde(default = "default_2316")] + #[serde(default = "default_2318")] pub memory: std::collections::HashMap, - #[serde(default = "default_2317")] + #[serde(default = "default_2319")] pub knowledge: std::collections::HashMap, - #[serde(default = "default_2318")] + #[serde(default = "default_2320")] pub profile: std::collections::HashMap, - #[serde(default = "default_2319")] + #[serde(default = "default_2321")] pub conversations: std::collections::HashMap, - #[serde(default = "default_2320")] + #[serde(default = "default_2322")] pub withheld: Option>, - #[serde(default = "default_2321")] + #[serde(default = "default_2323")] pub namespaces_skipped: Vec, } @@ -54026,7 +54030,7 @@ impl SearchInput { pub struct SessionBriefDeleteOutput { pub deleted: bool, pub brief_key: String, - #[serde(default = "default_2322")] + #[serde(default = "default_2324")] pub revision: Integer, } @@ -54119,67 +54123,67 @@ impl SessionBriefDeleteInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct BriefDecision { - #[serde(default = "default_2331")] + #[serde(default = "default_2333")] pub what: String, - #[serde(default = "default_2332")] + #[serde(default = "default_2334")] pub why: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct BriefDeadEnd { - #[serde(default = "default_2334")] + #[serde(default = "default_2336")] pub tried: String, - #[serde(default = "default_2335")] + #[serde(default = "default_2337")] pub why_not: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct BriefDone { - #[serde(default = "default_2337")] + #[serde(default = "default_2339")] pub what: String, - #[serde(rename = "ref", default = "default_2338")] + #[serde(rename = "ref", default = "default_2340")] pub r#ref: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct BriefFile { - #[serde(default = "default_2342")] + #[serde(default = "default_2344")] pub path: String, - #[serde(default = "default_2343")] + #[serde(default = "default_2345")] pub role: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct BriefSections { - #[serde(default = "default_2328")] + #[serde(default = "default_2330")] pub goal: String, - #[serde(default = "default_2329")] + #[serde(default = "default_2331")] pub status: String, - #[serde(default = "default_2330")] + #[serde(default = "default_2332")] pub verification: String, - #[serde(default = "default_2333")] + #[serde(default = "default_2335")] pub decisions: Vec, - #[serde(default = "default_2336")] + #[serde(default = "default_2338")] pub dead_ends: Vec, - #[serde(default = "default_2339")] + #[serde(default = "default_2341")] pub done: Vec, - #[serde(default = "default_2340")] + #[serde(default = "default_2342")] pub open_questions: Vec, - #[serde(default = "default_2341")] + #[serde(default = "default_2343")] pub next_steps: Vec, - #[serde(default = "default_2344")] + #[serde(default = "default_2346")] pub files: Vec, - #[serde(default = "default_2345")] + #[serde(default = "default_2347")] pub constraints: Vec, - #[serde(default = "default_2346")] + #[serde(default = "default_2348")] pub pointers: Vec, - #[serde(default = "default_2347")] + #[serde(default = "default_2349")] pub client_summary: String, - #[serde(default = "default_2348")] + #[serde(default = "default_2350")] pub client_summary_at: String, } @@ -54187,45 +54191,45 @@ pub struct BriefSections { #[non_exhaustive] pub struct SessionBriefGetOutput { pub found: bool, - #[serde(default = "default_2323")] + #[serde(default = "default_2325")] pub brief_key: String, - #[serde(default = "default_2324")] + #[serde(default = "default_2326")] pub revision: Integer, - #[serde(default = "default_2325")] + #[serde(default = "default_2327")] pub snapshot_id: String, - #[serde(default = "default_2326")] + #[serde(default = "default_2328")] pub snapshot_key: String, - #[serde(default = "default_2327")] + #[serde(default = "default_2329")] pub rendered: String, - #[serde(default = "default_2349")] + #[serde(default = "default_2351")] pub sections: Option, - #[serde(default = "default_2350")] + #[serde(default = "default_2352")] pub project: String, - #[serde(default = "default_2351")] + #[serde(default = "default_2353")] pub branch: String, - #[serde(default = "default_2352")] + #[serde(default = "default_2354")] pub head_sha: String, - #[serde(default = "default_2353")] + #[serde(default = "default_2355")] pub author: String, - #[serde(default = "default_2354")] + #[serde(default = "default_2356")] pub trigger: String, - #[serde(default = "default_2355")] + #[serde(default = "default_2357")] pub actor: String, - #[serde(default = "default_2356")] + #[serde(default = "default_2358")] pub source_sessions: Vec, - #[serde(default = "default_2357")] + #[serde(default = "default_2359")] pub updated_at: Option, - #[serde(default = "default_2358")] + #[serde(default = "default_2360")] pub age_seconds: Integer, - #[serde(default = "default_2359")] + #[serde(default = "default_2361")] pub revisions: Integer, - #[serde(default = "default_2360")] + #[serde(default = "default_2362")] pub events_total: Integer, - #[serde(default = "default_2361")] + #[serde(default = "default_2363")] pub source_chars: Integer, - #[serde(default = "default_2362")] + #[serde(default = "default_2364")] pub brief_chars: Integer, - #[serde(default = "default_2363")] + #[serde(default = "default_2365")] pub deleted: bool, } @@ -54400,34 +54404,34 @@ impl SessionBriefGetInput { pub struct SessionBriefSummary { pub brief_key: String, pub revision: Integer, - #[serde(default = "default_2364")] + #[serde(default = "default_2366")] pub project: String, - #[serde(default = "default_2365")] + #[serde(default = "default_2367")] pub branch: String, - #[serde(default = "default_2366")] + #[serde(default = "default_2368")] pub agent: String, - #[serde(default = "default_2367")] + #[serde(default = "default_2369")] pub goal: String, - #[serde(default = "default_2368")] + #[serde(default = "default_2370")] pub status: String, - #[serde(default = "default_2369")] + #[serde(default = "default_2371")] pub author: String, - #[serde(default = "default_2370")] + #[serde(default = "default_2372")] pub actor: String, - #[serde(default = "default_2371")] + #[serde(default = "default_2373")] pub updated_at: Option, - #[serde(default = "default_2372")] + #[serde(default = "default_2374")] pub age_seconds: Integer, - #[serde(default = "default_2373")] + #[serde(default = "default_2375")] pub brief_chars: Integer, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct SessionBriefListOutput { - #[serde(default = "default_2374")] + #[serde(default = "default_2376")] pub briefs: Vec, - #[serde(default = "default_2375")] + #[serde(default = "default_2377")] pub rendered: String, } @@ -54567,25 +54571,25 @@ impl SessionBriefListInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct SessionBriefStats { - #[serde(default = "default_2379")] + #[serde(default = "default_2381")] pub events_in: Integer, - #[serde(default = "default_2380")] + #[serde(default = "default_2382")] pub windows: Integer, - #[serde(default = "default_2381")] + #[serde(default = "default_2383")] pub events_total: Integer, - #[serde(default = "default_2382")] + #[serde(default = "default_2384")] pub source_chars: Integer, - #[serde(default = "default_2383")] + #[serde(default = "default_2385")] pub brief_chars: Integer, - #[serde(default = "default_2384")] + #[serde(default = "default_2386")] pub compression_ratio: f64, - #[serde(default = "default_2385")] + #[serde(default = "default_2387")] pub dropped_ungrounded: Integer, - #[serde(default = "default_2386")] + #[serde(default = "default_2388")] pub tokens_in: Integer, - #[serde(default = "default_2387")] + #[serde(default = "default_2389")] pub tokens_out: Integer, - #[serde(default = "default_2388")] + #[serde(default = "default_2390")] pub llm_model: String, } @@ -54595,13 +54599,13 @@ pub struct SessionBriefSaveOutput { pub brief_key: String, pub revision: Integer, pub changed: bool, - #[serde(default = "default_2376")] + #[serde(default = "default_2378")] pub author: String, - #[serde(default = "default_2377")] + #[serde(default = "default_2379")] pub reason: String, - #[serde(default = "default_2378")] + #[serde(default = "default_2380")] pub rendered: String, - #[serde(default = "default_2389")] + #[serde(default = "default_2391")] pub stats: SessionBriefStats, } @@ -55346,39 +55350,39 @@ pub struct TaskPayload { pub priority: Integer, pub disclosure: TaskPayloadDisclosure, pub status: TaskPayloadStatus, - #[serde(default = "default_2390")] + #[serde(default = "default_2392")] pub reason: String, - #[serde(default = "default_2391")] + #[serde(default = "default_2393")] pub blocked_on: String, - #[serde(default = "default_2392")] + #[serde(default = "default_2394")] pub not_before: Option, - #[serde(default = "default_2393")] + #[serde(default = "default_2395")] pub resume_at: Option, - #[serde(default = "default_2394")] + #[serde(default = "default_2396")] pub deadline: Option, - #[serde(default = "default_2395")] + #[serde(default = "default_2397")] pub defer_count: Integer, pub title: String, - #[serde(default = "default_2396")] + #[serde(default = "default_2398")] pub brief: std::collections::HashMap, pub from_agent: String, - #[serde(default = "default_2397")] + #[serde(default = "default_2399")] pub from_subject: String, - #[serde(default = "default_2398")] + #[serde(default = "default_2400")] pub origin: String, - #[serde(default = "default_2399")] + #[serde(default = "default_2401")] pub parent_task_id: Option, - #[serde(default = "default_2400")] + #[serde(default = "default_2402")] pub owner: String, - #[serde(default = "default_2401")] + #[serde(default = "default_2403")] pub attempt: Integer, - #[serde(default = "default_2402")] + #[serde(default = "default_2404")] pub fence: Integer, - #[serde(default = "default_2403")] + #[serde(default = "default_2405")] pub lease_until: Option, - #[serde(default = "default_2404")] + #[serde(default = "default_2406")] pub outcome: std::collections::HashMap, - #[serde(default = "default_2405")] + #[serde(default = "default_2407")] pub last_actor: String, pub created_at: String, pub updated_at: String, @@ -55389,7 +55393,7 @@ pub struct TaskPayload { #[non_exhaustive] pub struct TaskOutput { pub task: TaskPayload, - #[serde(default = "default_2406")] + #[serde(default = "default_2408")] pub seq: Integer, } @@ -55790,10 +55794,10 @@ impl TaskCompleteInput { pub struct InboxCount { pub inbox: String, pub status: String, - #[serde(default = "default_2407")] + #[serde(default = "default_2409")] pub blocked_on: String, pub n: Integer, - #[serde(default = "default_2408")] + #[serde(default = "default_2410")] pub oldest: Option, } @@ -55880,7 +55884,7 @@ pub struct TaskCreateOutput { pub task: TaskPayload, pub created: bool, pub seq: Integer, - #[serde(default = "default_2409")] + #[serde(default = "default_2411")] pub next: String, } @@ -56219,7 +56223,7 @@ impl TaskFailInput { #[non_exhaustive] pub struct TaskGetOutput { pub found: bool, - #[serde(default = "default_2410")] + #[serde(default = "default_2412")] pub task: Option, } @@ -56353,23 +56357,23 @@ pub struct TaskEventPayload { pub task_id: String, pub inbox: String, pub event: String, - #[serde(default = "default_2411")] + #[serde(default = "default_2413")] pub from_status: String, - #[serde(default = "default_2412")] + #[serde(default = "default_2414")] pub to_status: String, - #[serde(default = "default_2413")] + #[serde(default = "default_2415")] pub actor: String, - #[serde(default = "default_2414")] + #[serde(default = "default_2416")] pub agent: String, - #[serde(default = "default_2415")] + #[serde(default = "default_2417")] pub fence: Integer, - #[serde(default = "default_2416")] + #[serde(default = "default_2418")] pub version: Integer, - #[serde(default = "default_2417")] + #[serde(default = "default_2419")] pub reason: String, - #[serde(default = "default_2418")] + #[serde(default = "default_2420")] pub patch: std::collections::HashMap, - #[serde(default = "default_2419")] + #[serde(default = "default_2421")] pub note: String, pub ts: String, } @@ -56709,7 +56713,7 @@ pub struct TaskPullOutput { pub tasks: Vec, pub waited_ms: Integer, pub backend: String, - #[serde(default = "default_2420")] + #[serde(default = "default_2422")] pub note: String, } @@ -57105,7 +57109,7 @@ impl TaskUnblockInput { pub struct TaskUpdateOutput { pub task: TaskPayload, pub seq: Integer, - #[serde(default = "default_2421")] + #[serde(default = "default_2423")] pub conflict: bool, } @@ -57468,19 +57472,19 @@ impl TaskReasonInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct TrackerAnswerOutput { - #[serde(default = "default_2422")] + #[serde(default = "default_2424")] pub intent: String, - #[serde(default = "default_2423")] + #[serde(default = "default_2425")] pub anchors: std::collections::HashMap, - #[serde(default = "default_2424")] + #[serde(default = "default_2426")] pub sections: Vec>, - #[serde(default = "default_2425")] + #[serde(default = "default_2427")] pub searched: Vec, - #[serde(default = "default_2426")] + #[serde(default = "default_2428")] pub lines: Vec, - #[serde(default = "default_2427")] + #[serde(default = "default_2429")] pub restricted: bool, - #[serde(default = "default_2428")] + #[serde(default = "default_2430")] pub verdict: String, } @@ -57576,17 +57580,17 @@ impl TrackerAnswerInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct TrackerBindingOutput { - #[serde(default = "default_2429")] + #[serde(default = "default_2431")] pub tracker_namespace: String, - #[serde(default = "default_2430")] + #[serde(default = "default_2432")] pub tracker_namespaces: Vec, - #[serde(default = "default_2431")] + #[serde(default = "default_2433")] pub restricted: bool, - #[serde(default = "default_2432")] + #[serde(default = "default_2434")] pub kind: String, - #[serde(default = "default_2433")] + #[serde(default = "default_2435")] pub authorized: bool, - #[serde(default = "default_2434")] + #[serde(default = "default_2436")] pub templates: Vec, } @@ -57639,13 +57643,13 @@ impl TrackerBindingInput { #[non_exhaustive] pub struct TrackerComponentOutput { pub component: String, - #[serde(default = "default_2435")] + #[serde(default = "default_2437")] pub risk: std::collections::HashMap, - #[serde(default = "default_2436")] + #[serde(default = "default_2438")] pub open_issues: Vec>, - #[serde(default = "default_2437")] + #[serde(default = "default_2439")] pub known: bool, - #[serde(default = "default_2438")] + #[serde(default = "default_2440")] pub tracker_unavailable: bool, } @@ -57706,9 +57710,9 @@ impl TrackerComponentInput { #[non_exhaustive] pub struct TrackerContractOutput { pub database: String, - #[serde(default = "default_2439")] + #[serde(default = "default_2441")] pub tables: Vec>, - #[serde(default = "default_2440")] + #[serde(default = "default_2442")] pub templates: std::collections::HashMap, } @@ -57761,66 +57765,66 @@ impl TrackerContractInput { #[non_exhaustive] pub struct TrackerLegStatus { pub name: String, - #[serde(default = "default_2451")] + #[serde(default = "default_2453")] pub status: String, - #[serde(default = "default_2452")] + #[serde(default = "default_2454")] pub reason: String, - #[serde(default = "default_2453")] + #[serde(default = "default_2455")] pub message: String, - #[serde(default = "default_2454")] + #[serde(default = "default_2456")] pub retried: bool, - #[serde(default = "default_2455")] + #[serde(default = "default_2457")] pub ms: Integer, - #[serde(default = "default_2456")] + #[serde(default = "default_2458")] pub cause: String, - #[serde(default = "default_2457")] + #[serde(default = "default_2459")] pub namespace: String, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct TrackerDuplicateCheckOutput { - #[serde(default = "default_2441")] + #[serde(default = "default_2443")] pub verdict: String, - #[serde(default = "default_2442")] + #[serde(default = "default_2444")] pub items: Vec>, - #[serde(default = "default_2443")] + #[serde(default = "default_2445")] pub undecided: bool, - #[serde(default = "default_2444")] + #[serde(default = "default_2446")] pub epistemic: String, - #[serde(default = "default_2445")] + #[serde(default = "default_2447")] pub thresholds: std::collections::HashMap, - #[serde(default = "default_2446")] + #[serde(default = "default_2448")] pub judge: std::collections::HashMap, - #[serde(default = "default_2447")] + #[serde(default = "default_2449")] pub fit_at: String, - #[serde(default = "default_2448")] + #[serde(default = "default_2450")] pub fit: std::collections::HashMap, - #[serde(default = "default_2449")] + #[serde(default = "default_2451")] pub query: std::collections::HashMap, - #[serde(default = "default_2450")] + #[serde(default = "default_2452")] pub legs: std::collections::HashMap, - #[serde(default = "default_2458")] + #[serde(default = "default_2460")] pub leg_status: Vec, - #[serde(default = "default_2459")] + #[serde(default = "default_2461")] pub tracker_unavailable: bool, - #[serde(default = "default_2460")] + #[serde(default = "default_2462")] pub namespaces: Vec, - #[serde(default = "default_2461")] + #[serde(default = "default_2463")] pub by_namespace: std::collections::HashMap>, - #[serde(default = "default_2462")] + #[serde(default = "default_2464")] pub closest: Vec>, - #[serde(default = "default_2463")] + #[serde(default = "default_2465")] pub needs: Vec>, - #[serde(default = "default_2464")] + #[serde(default = "default_2466")] pub closest_note: String, - #[serde(default = "default_2465")] + #[serde(default = "default_2467")] pub nearest: Vec>, - #[serde(default = "default_2466")] + #[serde(default = "default_2468")] pub rerank: std::collections::HashMap, - #[serde(default = "default_2467")] + #[serde(default = "default_2469")] pub answer: String, - #[serde(default = "default_2468")] + #[serde(default = "default_2470")] pub related_prs: Vec>, } @@ -58027,17 +58031,17 @@ impl TrackerDuplicateCheckInput { #[non_exhaustive] pub struct TrackerFlakyOutput { pub test_name: String, - #[serde(default = "default_2469")] + #[serde(default = "default_2471")] pub known_flaky: bool, - #[serde(default = "default_2470")] + #[serde(default = "default_2472")] pub open_issues: Integer, - #[serde(default = "default_2471")] + #[serde(default = "default_2473")] pub issues: Vec>, - #[serde(default = "default_2472")] + #[serde(default = "default_2474")] pub verdict: String, - #[serde(default = "default_2473")] + #[serde(default = "default_2475")] pub tracker_unavailable: bool, - #[serde(default = "default_2474")] + #[serde(default = "default_2476")] pub signal: Option>, } @@ -58120,9 +58124,9 @@ impl TrackerFlakyInput { #[non_exhaustive] pub struct TrackerItemOutput { pub items: Vec>, - #[serde(default = "default_2475")] + #[serde(default = "default_2477")] pub unknown: Vec, - #[serde(default = "default_2476")] + #[serde(default = "default_2478")] pub tracker_unavailable: bool, } @@ -58171,19 +58175,19 @@ impl TrackerItemInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct TrackerLinksOutput { - #[serde(default = "default_2477")] + #[serde(default = "default_2479")] pub subject: std::collections::HashMap, - #[serde(default = "default_2478")] + #[serde(default = "default_2480")] pub verdict: String, - #[serde(default = "default_2479")] + #[serde(default = "default_2481")] pub items: Vec>, - #[serde(default = "default_2480")] + #[serde(default = "default_2482")] pub epistemic: String, - #[serde(default = "default_2481")] + #[serde(default = "default_2483")] pub record: std::collections::HashMap, - #[serde(default = "default_2482")] + #[serde(default = "default_2484")] pub computed_at: String, - #[serde(default = "default_2483")] + #[serde(default = "default_2485")] pub tracker_unavailable: bool, } @@ -58281,11 +58285,11 @@ impl TrackerLinksInput { pub struct TrackerReleaseOutput { pub version: String, pub blockers: Vec>, - #[serde(default = "default_2484")] + #[serde(default = "default_2486")] pub active_blockers: Integer, - #[serde(default = "default_2485")] + #[serde(default = "default_2487")] pub health: std::collections::HashMap, - #[serde(default = "default_2486")] + #[serde(default = "default_2488")] pub tracker_unavailable: bool, } @@ -58334,17 +58338,17 @@ impl TrackerReleaseInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct TrackerSimilarOutput { - #[serde(default = "default_2487")] + #[serde(default = "default_2489")] pub items: Vec>, - #[serde(default = "default_2488")] + #[serde(default = "default_2490")] pub query: std::collections::HashMap, - #[serde(default = "default_2489")] + #[serde(default = "default_2491")] pub legs: std::collections::HashMap, - #[serde(default = "default_2490")] + #[serde(default = "default_2492")] pub epistemic: String, - #[serde(default = "default_2491")] + #[serde(default = "default_2493")] pub tracker_unavailable: bool, - #[serde(default = "default_2492")] + #[serde(default = "default_2494")] pub namespaces: Vec, } @@ -58465,19 +58469,19 @@ pub struct TrackerSourceAddOutput { pub name: String, pub host: String, pub database: String, - #[serde(default = "default_2493")] + #[serde(default = "default_2495")] pub namespaces: Vec>, - #[serde(default = "default_2494")] + #[serde(default = "default_2496")] pub contract: std::collections::HashMap, - #[serde(default = "default_2495")] + #[serde(default = "default_2497")] pub roles: Vec, - #[serde(default = "default_2496")] + #[serde(default = "default_2498")] pub my_role: String, - #[serde(default = "default_2497")] + #[serde(default = "default_2499")] pub dry_run: bool, - #[serde(default = "default_2498")] + #[serde(default = "default_2500")] pub written: bool, - #[serde(default = "default_2499")] + #[serde(default = "default_2501")] pub view_templates: std::collections::HashMap, } @@ -58640,13 +58644,13 @@ impl TrackerSourceAddInput { #[non_exhaustive] pub struct TrackerSourceCheckOutput { pub name: String, - #[serde(default = "default_2500")] + #[serde(default = "default_2502")] pub database: String, - #[serde(default = "default_2501")] + #[serde(default = "default_2503")] pub reachable: bool, - #[serde(default = "default_2502")] + #[serde(default = "default_2504")] pub contract: std::collections::HashMap, - #[serde(default = "default_2503")] + #[serde(default = "default_2505")] pub view_templates: std::collections::HashMap, } @@ -58686,11 +58690,11 @@ impl TrackerSourceCheckInput { pub struct TrackerSourceInspectOutput { pub host: String, pub database: String, - #[serde(default = "default_2504")] + #[serde(default = "default_2506")] pub tables: Vec>, - #[serde(default = "default_2505")] + #[serde(default = "default_2507")] pub roles: Vec, - #[serde(default = "default_2506")] + #[serde(default = "default_2508")] pub proposal: std::collections::HashMap, } @@ -58819,9 +58823,9 @@ impl TrackerSourceInspectInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct TrackerSourceListOutput { - #[serde(default = "default_2507")] + #[serde(default = "default_2509")] pub sources: Vec>, - #[serde(default = "default_2508")] + #[serde(default = "default_2510")] pub self_service: bool, } @@ -58874,9 +58878,9 @@ impl TrackerSourceListInput { #[non_exhaustive] pub struct TrackerSourceRemoveOutput { pub name: String, - #[serde(default = "default_2509")] + #[serde(default = "default_2511")] pub deactivated: bool, - #[serde(default = "default_2510")] + #[serde(default = "default_2512")] pub namespaces_retired: Vec, } @@ -58917,9 +58921,9 @@ impl TrackerSourceRemoveInput { #[non_exhaustive] pub struct TrackerSourceRotateOutput { pub name: String, - #[serde(default = "default_2511")] + #[serde(default = "default_2513")] pub contract: std::collections::HashMap, - #[serde(default = "default_2512")] + #[serde(default = "default_2514")] pub rotated_at: String, } @@ -58966,11 +58970,11 @@ impl TrackerSourceRotateInput { #[non_exhaustive] pub struct TrackerSourceSetMappingOutput { pub name: String, - #[serde(default = "default_2513")] + #[serde(default = "default_2515")] pub contract: std::collections::HashMap, - #[serde(default = "default_2514")] + #[serde(default = "default_2516")] pub dry_run: bool, - #[serde(default = "default_2515")] + #[serde(default = "default_2517")] pub written: bool, } @@ -59037,45 +59041,45 @@ impl TrackerSourceSetMappingInput { #[non_exhaustive] pub struct TrackerTestSignalOutput { pub test_name: String, - #[serde(default = "default_2516")] + #[serde(default = "default_2518")] pub verdict: String, - #[serde(default = "default_2517")] + #[serde(default = "default_2519")] pub why: Vec, - #[serde(default = "default_2518")] + #[serde(default = "default_2520")] pub lower_bound: f64, - #[serde(default = "default_2519")] + #[serde(default = "default_2521")] pub window_days: Integer, - #[serde(default = "default_2520")] + #[serde(default = "default_2522")] pub since: String, - #[serde(default = "default_2521")] + #[serde(default = "default_2523")] pub features: std::collections::HashMap, - #[serde(default = "default_2522")] + #[serde(default = "default_2524")] pub infra: std::collections::HashMap, - #[serde(default = "default_2523")] + #[serde(default = "default_2525")] pub churn: std::collections::HashMap, - #[serde(default = "default_2524")] + #[serde(default = "default_2526")] pub thresholds: std::collections::HashMap, - #[serde(default = "default_2525")] + #[serde(default = "default_2527")] pub source: String, - #[serde(default = "default_2526")] + #[serde(default = "default_2528")] pub timings_ms: std::collections::HashMap, - #[serde(default = "default_2527")] + #[serde(default = "default_2529")] pub tracker_unavailable: bool, - #[serde(default = "default_2528")] + #[serde(default = "default_2530")] pub rollup: std::collections::HashMap, - #[serde(default = "default_2529")] + #[serde(default = "default_2531")] pub streak: std::collections::HashMap, - #[serde(default = "default_2530")] + #[serde(default = "default_2532")] pub smells: std::collections::HashMap, - #[serde(default = "default_2531")] + #[serde(default = "default_2533")] pub prior: std::collections::HashMap, - #[serde(default = "default_2532")] + #[serde(default = "default_2534")] pub unavailable_reason: String, - #[serde(default = "default_2533")] + #[serde(default = "default_2535")] pub candidates: Vec>, - #[serde(default = "default_2534")] + #[serde(default = "default_2536")] pub candidate_matches: Integer, - #[serde(default = "default_2535")] + #[serde(default = "default_2537")] pub resolved_from: String, } @@ -59179,9 +59183,9 @@ impl TrackerTestSignalInput { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct UiVitalsOutput { - #[serde(default = "default_2536")] + #[serde(default = "default_2538")] pub recorded: bool, - #[serde(default = "default_2537")] + #[serde(default = "default_2539")] pub route: String, } @@ -59365,7 +59369,7 @@ pub struct WebhookDelivery { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct WebhookDeliveriesOutput { - #[serde(default = "default_2538")] + #[serde(default = "default_2540")] pub deliveries: Vec, } @@ -59487,14 +59491,14 @@ pub struct WebhookInfo { pub secret_ref: String, pub events: Vec, pub created_at: String, - #[serde(default = "default_2539")] + #[serde(default = "default_2541")] pub secret_present: bool, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct WebhookListOutput { - #[serde(default = "default_2540")] + #[serde(default = "default_2542")] pub webhooks: Vec, } @@ -59676,7 +59680,7 @@ pub struct WorkingMemoryMutationOutput { pub version: Integer, pub char_limit: Integer, pub value_length: Integer, - #[serde(default = "default_2541")] + #[serde(default = "default_2543")] pub fill_ratio: f64, } @@ -59900,15 +59904,15 @@ impl WorkingMemoryDeleteInput { pub struct WorkingMemoryGetOutput { pub found: bool, pub block_key: String, - #[serde(default = "default_2542")] + #[serde(default = "default_2544")] pub content: String, - #[serde(default = "default_2543")] + #[serde(default = "default_2545")] pub char_limit: Integer, - #[serde(default = "default_2544")] + #[serde(default = "default_2546")] pub version: Integer, - #[serde(default = "default_2545")] + #[serde(default = "default_2547")] pub updated_at: Option, - #[serde(default = "default_2546")] + #[serde(default = "default_2548")] pub fill_ratio: f64, } @@ -60019,7 +60023,7 @@ pub struct WorkingMemoryBlock { pub content: String, pub char_limit: Integer, pub version: Integer, - #[serde(default = "default_2547")] + #[serde(default = "default_2549")] pub updated_at: Option, } @@ -60027,7 +60031,7 @@ pub struct WorkingMemoryBlock { #[non_exhaustive] pub struct WorkingMemoryRenderOutput { pub rendered: String, - #[serde(default = "default_2548")] + #[serde(default = "default_2550")] pub blocks: Vec, pub block_count: Integer, pub total_chars: Integer, @@ -60667,98 +60671,98 @@ fn default_89() -> String { fn default_90() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_91() -> Vec { +fn default_91() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_92() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_92() -> bool { +fn default_93() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_93() -> String { - serde_json::from_str("\"\"").expect("schema default") -} fn default_94() -> String { serde_json::from_str("\"\"").expect("schema default") } fn default_95() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_96() -> bool { - serde_json::from_str("false").expect("schema default") -} -fn default_97() -> String { +fn default_96() -> String { serde_json::from_str("\"\"").expect("schema default") } +fn default_97() -> bool { + serde_json::from_str("false").expect("schema default") +} fn default_98() -> String { serde_json::from_str("\"\"").expect("schema default") } fn default_99() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_100() -> bool { +fn default_100() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_101() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_101() -> Vec { +fn default_102() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_102() -> std::collections::HashMap { +fn default_103() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_103() -> Option { +fn default_104() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_104() -> String { +fn default_105() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_105() -> String { +fn default_106() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_106() -> Integer { +fn default_107() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_108() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_107() -> Integer { +fn default_109() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_108() -> Integer { +fn default_110() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_109() -> Vec { +fn default_111() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_110() -> Vec { +fn default_112() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_111() -> u64 { +fn default_113() -> u64 { serde_json::from_str("0").expect("schema default") } -fn default_112() -> Integer { +fn default_114() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_113() -> String { +fn default_115() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_114() -> Integer { +fn default_116() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_115() -> f64 { +fn default_117() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_116() -> String { +fn default_118() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_117() -> String { +fn default_119() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_118() -> Integer { - serde_json::from_str("0").expect("schema default") -} -fn default_119() -> Option { - serde_json::from_str("null").expect("schema default") -} fn default_120() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_121() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_121() -> Option { + serde_json::from_str("null").expect("schema default") } fn default_122() -> Integer { serde_json::from_str("0").expect("schema default") @@ -60772,72 +60776,72 @@ fn default_124() -> Integer { fn default_125() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_126() -> bool { +fn default_126() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_127() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_128() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_127() -> String { +fn default_129() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_128() -> String { +fn default_130() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_129() -> Vec { +fn default_131() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_130() -> String { +fn default_132() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_131() -> String { +fn default_133() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_132() -> f64 { +fn default_134() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_133() -> String { +fn default_135() -> String { serde_json::from_str("\"abstain\"").expect("schema default") } -fn default_134() -> String { +fn default_136() -> String { serde_json::from_str("\"off\"").expect("schema default") } -fn default_135() -> f64 { +fn default_137() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_136() -> String { +fn default_138() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_137() -> Integer { +fn default_139() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_138() -> bool { +fn default_140() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_139() -> Integer { +fn default_141() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_140() -> String { +fn default_142() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_141() -> std::collections::HashMap { +fn default_143() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_142() -> std::collections::HashMap { +fn default_144() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_143() -> u64 { +fn default_145() -> u64 { serde_json::from_str("0").expect("schema default") } -fn default_144() -> Option> { +fn default_146() -> Option> { serde_json::from_str("null").expect("schema default") } -fn default_145() -> bool { +fn default_147() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_146() -> String { - serde_json::from_str("\"\"").expect("schema default") -} -fn default_147() -> String { - serde_json::from_str("\"\"").expect("schema default") -} fn default_148() -> String { serde_json::from_str("\"\"").expect("schema default") } @@ -60853,14 +60857,14 @@ fn default_151() -> String { fn default_152() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_153() -> Vec { - serde_json::from_str("[]").expect("schema default") +fn default_153() -> String { + serde_json::from_str("\"\"").expect("schema default") } fn default_154() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_155() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_155() -> Vec { + serde_json::from_str("[]").expect("schema default") } fn default_156() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -60871,150 +60875,150 @@ fn default_157() -> String { fn default_158() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_159() -> Option { +fn default_159() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_160() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_161() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_160() -> f64 { +fn default_162() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_161() -> Vec { +fn default_163() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_162() -> String { +fn default_164() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_163() -> bool { +fn default_165() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_164() -> bool { +fn default_166() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_165() -> Vec { +fn default_167() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_166() -> Integer { +fn default_168() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_167() -> String { +fn default_169() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_168() -> String { +fn default_170() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_169() -> Vec { +fn default_171() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_170() -> Vec { +fn default_172() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_171() -> Vec { +fn default_173() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_172() -> Vec { +fn default_174() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_173() -> String { +fn default_175() -> String { serde_json::from_str("\"consumer\"").expect("schema default") } -fn default_174() -> String { +fn default_176() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_175() -> std::collections::HashMap { +fn default_177() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_176() -> String { +fn default_178() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_177() -> std::collections::HashMap> { +fn default_179() -> std::collections::HashMap> { serde_json::from_str("{}").expect("schema default") } -fn default_178() -> Option { +fn default_180() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_179() -> Option { +fn default_181() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_180() -> Option { +fn default_182() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_181() -> bool { +fn default_183() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_182() -> Integer { +fn default_184() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_183() -> Integer { +fn default_185() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_184() -> f64 { +fn default_186() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_185() -> Option { +fn default_187() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_186() -> bool { +fn default_188() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_187() -> String { +fn default_189() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_188() -> String { +fn default_190() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_189() -> String { +fn default_191() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_190() -> bool { +fn default_192() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_191() -> String { +fn default_193() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_192() -> String { +fn default_194() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_193() -> String { +fn default_195() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_194() -> Vec { +fn default_196() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_195() -> String { +fn default_197() -> String { serde_json::from_str("\"unchecked\"").expect("schema default") } -fn default_196() -> Vec { +fn default_198() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_197() -> Option { +fn default_199() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_198() -> Integer { +fn default_200() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_199() -> bool { +fn default_201() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_200() -> String { +fn default_202() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_201() -> Option { +fn default_203() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_202() -> Option { +fn default_204() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_203() -> String { +fn default_205() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_204() -> String { +fn default_206() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_205() -> f64 { - serde_json::from_str("0.0").expect("schema default") -} -fn default_206() -> f64 { - serde_json::from_str("0.0").expect("schema default") -} fn default_207() -> f64 { serde_json::from_str("0.0").expect("schema default") } @@ -61027,239 +61031,239 @@ fn default_209() -> f64 { fn default_210() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_211() -> Integer { +fn default_211() -> f64 { + serde_json::from_str("0.0").expect("schema default") +} +fn default_212() -> f64 { + serde_json::from_str("0.0").expect("schema default") +} +fn default_213() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_212() -> Integer { +fn default_214() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_213() -> String { +fn default_215() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_214() -> bool { +fn default_216() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_215() -> String { +fn default_217() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_216() -> String { +fn default_218() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_217() -> CodeAskOutputCoverage { +fn default_219() -> CodeAskOutputCoverage { serde_json::from_str("\"\"").expect("schema default") } -fn default_218() -> Vec> { +fn default_220() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_219() -> f64 { +fn default_221() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_220() -> String { +fn default_222() -> String { serde_json::from_str("\"miss\"").expect("schema default") } -fn default_221() -> Integer { +fn default_223() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_222() -> f64 { +fn default_224() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_223() -> bool { +fn default_225() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_224() -> String { +fn default_226() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_225() -> f64 { +fn default_227() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_226() -> Integer { +fn default_228() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_227() -> Integer { +fn default_229() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_228() -> String { +fn default_230() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_229() -> std::collections::HashMap { +fn default_231() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_230() -> Vec> { +fn default_232() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_231() -> String { +fn default_233() -> String { serde_json::from_str("\"unknown\"").expect("schema default") } -fn default_232() -> Vec { +fn default_234() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_233() -> std::collections::HashMap { +fn default_235() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_234() -> std::collections::HashMap { +fn default_236() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_235() -> Vec> { +fn default_237() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_236() -> Vec { +fn default_238() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_237() -> Vec { +fn default_239() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_238() -> Vec> { +fn default_240() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_239() -> std::collections::HashMap> { +fn default_241() -> std::collections::HashMap> { serde_json::from_str("{}").expect("schema default") } -fn default_240() -> Option> { +fn default_242() -> Option> { serde_json::from_str("null").expect("schema default") } -fn default_241() -> String { +fn default_243() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_242() -> bool { +fn default_244() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_243() -> Integer { +fn default_245() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_244() -> std::collections::HashMap { +fn default_246() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_245() -> String { +fn default_247() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_246() -> Vec> { +fn default_248() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_247() -> String { +fn default_249() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_248() -> String { +fn default_250() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_249() -> Vec { +fn default_251() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_250() -> Vec> { +fn default_252() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_251() -> std::collections::HashMap { +fn default_253() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_252() -> std::collections::HashMap> { +fn default_254() -> std::collections::HashMap> { serde_json::from_str("{}").expect("schema default") } -fn default_253() -> Integer { +fn default_255() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_254() -> bool { +fn default_256() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_255() -> String { +fn default_257() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_256() -> std::collections::HashMap { +fn default_258() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_257() -> bool { +fn default_259() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_258() -> Integer { +fn default_260() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_259() -> String { +fn default_261() -> String { serde_json::from_str("\"unknown\"").expect("schema default") } -fn default_260() -> String { +fn default_262() -> String { serde_json::from_str("\"tracker\"").expect("schema default") } -fn default_261() -> Vec { +fn default_263() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_262() -> String { +fn default_264() -> String { serde_json::from_str("\"lower_bound\"").expect("schema default") } -fn default_263() -> Vec> { +fn default_265() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_264() -> std::collections::HashMap { +fn default_266() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_265() -> Vec { +fn default_267() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_266() -> std::collections::HashMap { +fn default_268() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_267() -> std::collections::HashMap { +fn default_269() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_268() -> Vec { +fn default_270() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_269() -> std::collections::HashMap { +fn default_271() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_270() -> String { +fn default_272() -> String { serde_json::from_str("\"file\"").expect("schema default") } -fn default_271() -> Vec { +fn default_273() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_272() -> std::collections::HashMap { +fn default_274() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_273() -> String { +fn default_275() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_274() -> Vec { +fn default_276() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_275() -> Integer { +fn default_277() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_276() -> Vec { +fn default_278() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_277() -> String { +fn default_279() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_278() -> String { +fn default_280() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_279() -> String { +fn default_281() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_280() -> Vec { +fn default_282() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_281() -> Vec> { +fn default_283() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_282() -> Vec { +fn default_284() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_283() -> Vec { +fn default_285() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_284() -> std::collections::HashMap { +fn default_286() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_285() -> String { - serde_json::from_str("\"\"").expect("schema default") -} -fn default_286() -> Option> { - serde_json::from_str("null").expect("schema default") -} fn default_287() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_288() -> bool { - serde_json::from_str("false").expect("schema default") +fn default_288() -> Option> { + serde_json::from_str("null").expect("schema default") } fn default_289() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -61270,284 +61274,284 @@ fn default_290() -> bool { fn default_291() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_292() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_292() -> bool { + serde_json::from_str("false").expect("schema default") } fn default_293() -> String { serde_json::from_str("\"\"").expect("schema default") } fn default_294() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_295() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_296() -> String { serde_json::from_str("\"unknown\"").expect("schema default") } -fn default_295() -> Vec { +fn default_297() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_296() -> String { +fn default_298() -> String { serde_json::from_str("\"lower_bound\"").expect("schema default") } -fn default_297() -> CodeBlameRangeOutputStage { +fn default_299() -> CodeBlameRangeOutputStage { serde_json::from_str("\"last_touched\"").expect("schema default") } -fn default_298() -> String { +fn default_300() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_299() -> String { +fn default_301() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_300() -> bool { +fn default_302() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_301() -> std::collections::HashMap { +fn default_303() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_302() -> std::collections::HashMap { +fn default_304() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_303() -> Vec> { +fn default_305() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_304() -> Vec> { +fn default_306() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_305() -> std::collections::HashMap { +fn default_307() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_306() -> Integer { +fn default_308() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_307() -> std::collections::HashMap { +fn default_309() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_308() -> std::collections::HashMap { +fn default_310() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_309() -> String { +fn default_311() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_310() -> String { +fn default_312() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_311() -> bool { +fn default_313() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_312() -> String { +fn default_314() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_313() -> Vec> { +fn default_315() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_314() -> Integer { +fn default_316() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_315() -> String { +fn default_317() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_316() -> String { +fn default_318() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_317() -> bool { +fn default_319() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_318() -> String { +fn default_320() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_319() -> Integer { +fn default_321() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_320() -> String { +fn default_322() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_321() -> String { +fn default_323() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_322() -> bool { +fn default_324() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_323() -> Vec { +fn default_325() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_324() -> Vec> { +fn default_326() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_325() -> String { +fn default_327() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_326() -> bool { +fn default_328() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_327() -> bool { +fn default_329() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_328() -> Integer { +fn default_330() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_329() -> Integer { +fn default_331() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_330() -> String { +fn default_332() -> String { serde_json::from_str("\"lower_bound\"").expect("schema default") } -fn default_331() -> Vec { +fn default_333() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_332() -> std::collections::HashMap { +fn default_334() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_333() -> String { +fn default_335() -> String { serde_json::from_str("\"lower_bound\"").expect("schema default") } -fn default_334() -> Integer { +fn default_336() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_335() -> Integer { +fn default_337() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_336() -> bool { +fn default_338() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_337() -> bool { +fn default_339() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_338() -> std::collections::HashMap { +fn default_340() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_339() -> String { +fn default_341() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_340() -> String { +fn default_342() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_341() -> Integer { +fn default_343() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_342() -> Vec { +fn default_344() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_343() -> String { +fn default_345() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_344() -> Option { +fn default_346() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_345() -> String { +fn default_347() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_346() -> Vec> { +fn default_348() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_347() -> Integer { +fn default_349() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_348() -> bool { +fn default_350() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_349() -> String { +fn default_351() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_350() -> String { +fn default_352() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_351() -> String { +fn default_353() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_352() -> Integer { +fn default_354() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_353() -> String { +fn default_355() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_354() -> String { +fn default_356() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_355() -> String { +fn default_357() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_356() -> String { +fn default_358() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_357() -> Integer { +fn default_359() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_358() -> Integer { +fn default_360() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_359() -> String { +fn default_361() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_360() -> String { +fn default_362() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_361() -> Vec { +fn default_363() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_362() -> String { +fn default_364() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_363() -> String { +fn default_365() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_364() -> String { +fn default_366() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_365() -> String { +fn default_367() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_366() -> String { +fn default_368() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_367() -> Integer { +fn default_369() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_368() -> Integer { +fn default_370() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_369() -> Integer { +fn default_371() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_370() -> bool { +fn default_372() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_371() -> Vec> { +fn default_373() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_372() -> std::collections::HashMap { +fn default_374() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_373() -> std::collections::HashMap { +fn default_375() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_374() -> Vec { +fn default_376() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_375() -> String { +fn default_377() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_376() -> String { +fn default_378() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_377() -> Integer { +fn default_379() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_378() -> Integer { +fn default_380() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_379() -> String { +fn default_381() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_380() -> String { +fn default_382() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_381() -> Integer { - serde_json::from_str("0").expect("schema default") -} -fn default_382() -> Integer { - serde_json::from_str("0").expect("schema default") -} fn default_383() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_384() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_384() -> Integer { + serde_json::from_str("0").expect("schema default") } fn default_385() -> Integer { serde_json::from_str("0").expect("schema default") @@ -61570,697 +61574,697 @@ fn default_390() -> String { fn default_391() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_392() -> Integer { +fn default_392() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_393() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_394() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_393() -> f64 { +fn default_395() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_394() -> Integer { +fn default_396() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_395() -> Integer { +fn default_397() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_396() -> f64 { +fn default_398() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_397() -> Integer { +fn default_399() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_398() -> Integer { +fn default_400() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_399() -> f64 { +fn default_401() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_400() -> Option { +fn default_402() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_401() -> String { +fn default_403() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_402() -> String { +fn default_404() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_403() -> String { +fn default_405() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_404() -> bool { +fn default_406() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_405() -> String { +fn default_407() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_406() -> String { +fn default_408() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_407() -> String { +fn default_409() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_408() -> bool { +fn default_410() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_409() -> bool { +fn default_411() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_410() -> Option { +fn default_412() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_411() -> String { +fn default_413() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_412() -> bool { +fn default_414() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_413() -> Option { +fn default_415() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_414() -> String { +fn default_416() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_415() -> String { +fn default_417() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_416() -> String { +fn default_418() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_417() -> String { +fn default_419() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_418() -> Option { +fn default_420() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_419() -> Integer { +fn default_421() -> Integer { serde_json::from_str("-1").expect("schema default") } -fn default_420() -> Vec { +fn default_422() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_421() -> bool { +fn default_423() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_422() -> Vec { +fn default_424() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_423() -> Integer { +fn default_425() -> Integer { serde_json::from_str("-1").expect("schema default") } -fn default_424() -> Vec { +fn default_426() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_425() -> Integer { +fn default_427() -> Integer { serde_json::from_str("-1").expect("schema default") } -fn default_426() -> bool { +fn default_428() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_427() -> Vec { +fn default_429() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_428() -> Option { +fn default_430() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_429() -> String { +fn default_431() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_430() -> String { +fn default_432() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_431() -> String { +fn default_433() -> String { serde_json::from_str("\"unknown\"").expect("schema default") } -fn default_432() -> Vec> { +fn default_434() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_433() -> Integer { +fn default_435() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_434() -> Vec { +fn default_436() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_435() -> String { +fn default_437() -> String { serde_json::from_str("\"lower_bound\"").expect("schema default") } -fn default_436() -> String { +fn default_438() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_437() -> std::collections::HashMap { +fn default_439() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_438() -> String { +fn default_440() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_439() -> std::collections::HashMap { +fn default_441() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_440() -> std::collections::HashMap { +fn default_442() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_441() -> String { +fn default_443() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_442() -> String { +fn default_444() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_443() -> Integer { +fn default_445() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_444() -> Integer { +fn default_446() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_445() -> String { +fn default_447() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_446() -> String { +fn default_448() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_447() -> String { +fn default_449() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_448() -> String { +fn default_450() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_449() -> bool { +fn default_451() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_450() -> String { +fn default_452() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_451() -> String { +fn default_453() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_452() -> String { +fn default_454() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_453() -> f64 { +fn default_455() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_454() -> Vec> { +fn default_456() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_455() -> Vec> { +fn default_457() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_456() -> Vec> { +fn default_458() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_457() -> bool { +fn default_459() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_458() -> Integer { +fn default_460() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_459() -> Integer { +fn default_461() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_460() -> bool { +fn default_462() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_461() -> Vec> { +fn default_463() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_462() -> String { +fn default_464() -> String { serde_json::from_str("\"unit\"").expect("schema default") } -fn default_463() -> String { +fn default_465() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_464() -> Vec> { +fn default_466() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_465() -> Integer { +fn default_467() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_466() -> String { +fn default_468() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_467() -> Integer { +fn default_469() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_468() -> Integer { +fn default_470() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_469() -> String { +fn default_471() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_470() -> Integer { +fn default_472() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_471() -> bool { +fn default_473() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_472() -> std::collections::HashMap>> +fn default_474() -> std::collections::HashMap>> { serde_json::from_str("{}").expect("schema default") } -fn default_473() -> Vec> { +fn default_475() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_474() -> Integer { +fn default_476() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_475() -> String { +fn default_477() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_476() -> CodeSymbolOutputUses { +fn default_478() -> CodeSymbolOutputUses { serde_json::from_str("[]").expect("schema default") } -fn default_477() -> bool { +fn default_479() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_478() -> Integer { +fn default_480() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_479() -> String { +fn default_481() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_480() -> String { +fn default_482() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_481() -> Vec> { +fn default_483() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_482() -> Vec> { +fn default_484() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_483() -> Integer { +fn default_485() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_484() -> Integer { +fn default_486() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_485() -> Vec> { +fn default_487() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_486() -> std::collections::HashMap> { +fn default_488() -> std::collections::HashMap> { serde_json::from_str("{}").expect("schema default") } -fn default_487() -> Vec { +fn default_489() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_488() -> Vec> { +fn default_490() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_489() -> String { +fn default_491() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_490() -> Vec> { +fn default_492() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_491() -> std::collections::HashMap>> +fn default_493() -> std::collections::HashMap>> { serde_json::from_str("{}").expect("schema default") } -fn default_492() -> Vec> { +fn default_494() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_493() -> String { +fn default_495() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_494() -> Vec { +fn default_496() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_495() -> Option> { +fn default_497() -> Option> { serde_json::from_str("null").expect("schema default") } -fn default_496() -> Vec> { +fn default_498() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_497() -> Integer { +fn default_499() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_498() -> std::collections::HashMap { +fn default_500() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_499() -> Integer { +fn default_501() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_500() -> Integer { +fn default_502() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_501() -> Integer { +fn default_503() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_502() -> Vec> { +fn default_504() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_503() -> Integer { +fn default_505() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_504() -> bool { +fn default_506() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_505() -> Integer { +fn default_507() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_506() -> String { +fn default_508() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_507() -> Vec> { +fn default_509() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_508() -> Integer { +fn default_510() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_509() -> bool { +fn default_511() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_510() -> std::collections::HashMap { +fn default_512() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_511() -> bool { +fn default_513() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_512() -> String { +fn default_514() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_513() -> String { +fn default_515() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_514() -> String { +fn default_516() -> String { serde_json::from_str("\"unknown\"").expect("schema default") } -fn default_515() -> Vec { +fn default_517() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_516() -> String { +fn default_518() -> String { serde_json::from_str("\"lower_bound\"").expect("schema default") } -fn default_517() -> String { +fn default_519() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_518() -> Integer { +fn default_520() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_519() -> String { +fn default_521() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_520() -> String { +fn default_522() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_521() -> bool { +fn default_523() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_522() -> bool { +fn default_524() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_523() -> std::collections::HashMap { +fn default_525() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_524() -> Option { +fn default_526() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_525() -> Integer { +fn default_527() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_526() -> Integer { +fn default_528() -> Integer { serde_json::from_str("72").expect("schema default") } -fn default_527() -> Integer { +fn default_529() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_528() -> Integer { +fn default_530() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_529() -> Vec> { +fn default_531() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_530() -> Vec { +fn default_532() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_531() -> Vec { +fn default_533() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_532() -> String { +fn default_534() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_533() -> String { +fn default_535() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_534() -> String { +fn default_536() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_535() -> bool { +fn default_537() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_536() -> String { +fn default_538() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_537() -> Vec> { +fn default_539() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_538() -> Integer { +fn default_540() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_539() -> Vec> { +fn default_541() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_540() -> bool { +fn default_542() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_541() -> Vec> { +fn default_543() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_542() -> bool { +fn default_544() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_543() -> String { +fn default_545() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_544() -> bool { +fn default_546() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_545() -> Vec { +fn default_547() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_546() -> Option { +fn default_548() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_547() -> Vec> { +fn default_549() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_548() -> bool { +fn default_550() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_549() -> Vec> { +fn default_551() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_550() -> bool { +fn default_552() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_551() -> String { +fn default_553() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_552() -> String { +fn default_554() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_553() -> bool { +fn default_555() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_554() -> Vec> { +fn default_556() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_555() -> Integer { +fn default_557() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_556() -> bool { +fn default_558() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_557() -> bool { +fn default_559() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_558() -> std::collections::HashMap { +fn default_560() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_559() -> bool { +fn default_561() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_560() -> Vec> { +fn default_562() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_561() -> Integer { +fn default_563() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_562() -> bool { +fn default_564() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_563() -> Integer { +fn default_565() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_564() -> String { +fn default_566() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_565() -> String { +fn default_567() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_566() -> String { +fn default_568() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_567() -> String { +fn default_569() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_568() -> f64 { +fn default_570() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_569() -> Vec> { +fn default_571() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_570() -> std::collections::HashMap> { +fn default_572() -> std::collections::HashMap> { serde_json::from_str("{}").expect("schema default") } -fn default_571() -> String { +fn default_573() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_572() -> bool { +fn default_574() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_573() -> String { +fn default_575() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_574() -> CodeGrepOutputFallback { +fn default_576() -> CodeGrepOutputFallback { serde_json::from_str("\"\"").expect("schema default") } -fn default_575() -> Vec> { +fn default_577() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_576() -> String { +fn default_578() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_577() -> Vec> { +fn default_579() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_578() -> Integer { +fn default_580() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_579() -> f64 { +fn default_581() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_580() -> Vec> { +fn default_582() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_581() -> Vec> { +fn default_583() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_582() -> Vec> { +fn default_584() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_583() -> Vec> { +fn default_585() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_584() -> bool { +fn default_586() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_585() -> Integer { +fn default_587() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_586() -> Integer { +fn default_588() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_587() -> String { +fn default_589() -> String { serde_json::from_str("\"lower_bound\"").expect("schema default") } -fn default_588() -> Vec { +fn default_590() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_589() -> std::collections::HashMap { +fn default_591() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_590() -> bool { +fn default_592() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_591() -> String { +fn default_593() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_592() -> String { +fn default_594() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_593() -> Vec> { +fn default_595() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_594() -> bool { +fn default_596() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_595() -> String { +fn default_597() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_596() -> Integer { +fn default_598() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_597() -> String { +fn default_599() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_598() -> String { +fn default_600() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_599() -> String { +fn default_601() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_600() -> String { +fn default_602() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_601() -> String { +fn default_603() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_602() -> Integer { +fn default_604() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_603() -> String { +fn default_605() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_604() -> String { +fn default_606() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_605() -> String { +fn default_607() -> String { serde_json::from_str("\"generic\"").expect("schema default") } -fn default_606() -> Vec { +fn default_608() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_607() -> Vec { +fn default_609() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_608() -> String { +fn default_610() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_609() -> String { +fn default_611() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_610() -> String { +fn default_612() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_611() -> String { +fn default_613() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_612() -> String { +fn default_614() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_613() -> Integer { +fn default_615() -> Integer { serde_json::from_str("-1").expect("schema default") } -fn default_614() -> String { +fn default_616() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_615() -> bool { +fn default_617() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_616() -> Vec { +fn default_618() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_617() -> String { +fn default_619() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_618() -> Vec { +fn default_620() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_619() -> String { - serde_json::from_str("\"ok\"").expect("schema default") -} -fn default_620() -> String { - serde_json::from_str("\"\"").expect("schema default") -} fn default_621() -> String { - serde_json::from_str("\"\"").expect("schema default") + serde_json::from_str("\"ok\"").expect("schema default") } fn default_622() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -62271,693 +62275,693 @@ fn default_623() -> String { fn default_624() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_625() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_625() -> String { + serde_json::from_str("\"\"").expect("schema default") } fn default_626() -> String { serde_json::from_str("\"\"").expect("schema default") } fn default_627() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_628() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_629() -> Integer { serde_json::from_str("-1").expect("schema default") } -fn default_628() -> Vec { +fn default_630() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_629() -> String { +fn default_631() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_630() -> Option { +fn default_632() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_631() -> String { +fn default_633() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_632() -> String { +fn default_634() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_633() -> bool { +fn default_635() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_634() -> Integer { +fn default_636() -> Integer { serde_json::from_str("-1").expect("schema default") } -fn default_635() -> Integer { +fn default_637() -> Integer { serde_json::from_str("-1").expect("schema default") } -fn default_636() -> Integer { +fn default_638() -> Integer { serde_json::from_str("-1").expect("schema default") } -fn default_637() -> String { +fn default_639() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_638() -> String { +fn default_640() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_639() -> bool { +fn default_641() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_640() -> Vec { +fn default_642() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_641() -> std::collections::HashMap { +fn default_643() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_642() -> std::collections::HashMap> { +fn default_644() -> std::collections::HashMap> { serde_json::from_str("{}").expect("schema default") } -fn default_643() -> bool { +fn default_645() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_644() -> Integer { +fn default_646() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_645() -> String { +fn default_647() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_646() -> Integer { +fn default_648() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_647() -> Integer { +fn default_649() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_648() -> Integer { +fn default_650() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_649() -> String { +fn default_651() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_650() -> std::collections::HashMap { +fn default_652() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_651() -> String { +fn default_653() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_652() -> Vec { +fn default_654() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_653() -> std::collections::HashMap> { +fn default_655() -> std::collections::HashMap> { serde_json::from_str("{}").expect("schema default") } -fn default_654() -> std::collections::HashMap { +fn default_656() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_655() -> std::collections::HashMap> { +fn default_657() -> std::collections::HashMap> { serde_json::from_str("{}").expect("schema default") } -fn default_656() -> std::collections::HashMap> { +fn default_658() -> std::collections::HashMap> { serde_json::from_str("{}").expect("schema default") } -fn default_657() -> Integer { +fn default_659() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_658() -> String { +fn default_660() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_659() -> Integer { +fn default_661() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_660() -> String { +fn default_662() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_661() -> Integer { +fn default_663() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_662() -> Integer { +fn default_664() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_663() -> f64 { +fn default_665() -> f64 { serde_json::from_str("1.0").expect("schema default") } -fn default_664() -> String { +fn default_666() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_665() -> String { +fn default_667() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_666() -> Vec> { +fn default_668() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_667() -> Integer { +fn default_669() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_668() -> String { +fn default_670() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_669() -> bool { +fn default_671() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_670() -> String { +fn default_672() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_671() -> Integer { +fn default_673() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_672() -> Integer { +fn default_674() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_673() -> String { +fn default_675() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_674() -> bool { +fn default_676() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_675() -> std::collections::HashMap { +fn default_677() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_676() -> String { +fn default_678() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_677() -> Vec { +fn default_679() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_678() -> CodePathGuardsOutputEpistemic { +fn default_680() -> CodePathGuardsOutputEpistemic { serde_json::from_str("\"lower_bound\"").expect("schema default") } -fn default_679() -> String { +fn default_681() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_680() -> Vec> { +fn default_682() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_681() -> Vec { +fn default_683() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_682() -> Integer { +fn default_684() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_683() -> String { +fn default_685() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_684() -> String { +fn default_686() -> String { serde_json::from_str("\"none\"").expect("schema default") } -fn default_685() -> Vec> { +fn default_687() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_686() -> bool { +fn default_688() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_687() -> String { +fn default_689() -> String { serde_json::from_str("\"heuristic\"").expect("schema default") } -fn default_688() -> std::collections::HashMap { +fn default_690() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_689() -> std::collections::HashMap { +fn default_691() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_690() -> std::collections::HashMap { +fn default_692() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_691() -> String { +fn default_693() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_692() -> Vec> { +fn default_694() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_693() -> Integer { +fn default_695() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_694() -> String { +fn default_696() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_695() -> Vec { +fn default_697() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_696() -> String { +fn default_698() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_697() -> String { +fn default_699() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_698() -> String { +fn default_700() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_699() -> String { +fn default_701() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_700() -> Integer { +fn default_702() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_701() -> Integer { +fn default_703() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_702() -> bool { +fn default_704() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_703() -> String { +fn default_705() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_704() -> String { +fn default_706() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_705() -> String { +fn default_707() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_706() -> String { +fn default_708() -> String { serde_json::from_str("\"git\"").expect("schema default") } -fn default_707() -> String { +fn default_709() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_708() -> String { +fn default_710() -> String { serde_json::from_str("\"admin\"").expect("schema default") } -fn default_709() -> String { +fn default_711() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_710() -> Vec> { +fn default_712() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_711() -> Vec> { +fn default_713() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_712() -> String { +fn default_714() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_713() -> String { +fn default_715() -> String { serde_json::from_str("\"git\"").expect("schema default") } -fn default_714() -> Vec { +fn default_716() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_715() -> String { +fn default_717() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_716() -> Vec> { +fn default_718() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_717() -> Vec { +fn default_719() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_718() -> Vec> { +fn default_720() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_719() -> Integer { +fn default_721() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_720() -> Integer { +fn default_722() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_721() -> Integer { +fn default_723() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_722() -> bool { +fn default_724() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_723() -> String { +fn default_725() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_724() -> String { +fn default_726() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_725() -> bool { +fn default_727() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_726() -> Vec { +fn default_728() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_727() -> Vec { +fn default_729() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_728() -> Vec { +fn default_730() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_729() -> Vec { +fn default_731() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_730() -> String { +fn default_732() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_731() -> Integer { +fn default_733() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_732() -> String { +fn default_734() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_733() -> CodeReviewBriefOutputSource { +fn default_735() -> CodeReviewBriefOutputSource { serde_json::from_str("\"missing\"").expect("schema default") } -fn default_734() -> CodeReviewBriefOutputLedger { +fn default_736() -> CodeReviewBriefOutputLedger { serde_json::from_str("\"\"").expect("schema default") } -fn default_735() -> bool { +fn default_737() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_736() -> std::collections::HashMap { +fn default_738() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_737() -> bool { +fn default_739() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_738() -> String { +fn default_740() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_739() -> Integer { +fn default_741() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_740() -> String { +fn default_742() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_741() -> String { +fn default_743() -> String { serde_json::from_str("\"standard\"").expect("schema default") } -fn default_742() -> String { +fn default_744() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_743() -> String { +fn default_745() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_744() -> Integer { +fn default_746() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_745() -> Integer { +fn default_747() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_746() -> Integer { +fn default_748() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_747() -> std::collections::HashMap { +fn default_749() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_748() -> std::collections::HashMap> { +fn default_750() -> std::collections::HashMap> { serde_json::from_str("{}").expect("schema default") } -fn default_749() -> String { +fn default_751() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_750() -> String { +fn default_752() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_751() -> String { +fn default_753() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_752() -> String { +fn default_754() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_753() -> Vec> { +fn default_755() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_754() -> Integer { +fn default_756() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_755() -> String { +fn default_757() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_756() -> bool { +fn default_758() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_757() -> std::collections::HashMap { +fn default_759() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_758() -> bool { +fn default_760() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_759() -> CodeSearchOutputAbstainCode { +fn default_761() -> CodeSearchOutputAbstainCode { serde_json::from_str("\"\"").expect("schema default") } -fn default_760() -> String { +fn default_762() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_761() -> CodeSearchOutputRetrievalRisk { +fn default_763() -> CodeSearchOutputRetrievalRisk { serde_json::from_str("\"low\"").expect("schema default") } -fn default_762() -> f64 { +fn default_764() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_763() -> f64 { +fn default_765() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_764() -> String { +fn default_766() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_765() -> Integer { +fn default_767() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_766() -> bool { +fn default_768() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_767() -> Integer { +fn default_769() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_768() -> std::collections::HashMap { +fn default_770() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_769() -> String { +fn default_771() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_770() -> std::collections::HashMap { +fn default_772() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_771() -> String { +fn default_773() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_772() -> f64 { +fn default_774() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_773() -> std::collections::HashMap { +fn default_775() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_774() -> std::collections::HashMap { +fn default_776() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_775() -> String { +fn default_777() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_776() -> Vec { +fn default_778() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_777() -> CodeSearchOutputEpistemic { +fn default_779() -> CodeSearchOutputEpistemic { serde_json::from_str("\"\"").expect("schema default") } -fn default_778() -> bool { +fn default_780() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_779() -> String { +fn default_781() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_780() -> String { +fn default_782() -> String { serde_json::from_str("\"unknown\"").expect("schema default") } -fn default_781() -> Vec { +fn default_783() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_782() -> std::collections::HashMap { +fn default_784() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_783() -> String { +fn default_785() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_784() -> Vec> { +fn default_786() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_785() -> std::collections::HashMap { +fn default_787() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_786() -> Integer { +fn default_788() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_787() -> std::collections::HashMap { +fn default_789() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_788() -> String { +fn default_790() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_789() -> String { +fn default_791() -> String { serde_json::from_str("\"unknown\"").expect("schema default") } -fn default_790() -> Vec { +fn default_792() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_791() -> String { +fn default_793() -> String { serde_json::from_str("\"lower_bound\"").expect("schema default") } -fn default_792() -> std::collections::HashMap { +fn default_794() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_793() -> bool { +fn default_795() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_794() -> Vec { +fn default_796() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_795() -> Vec> { +fn default_797() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_796() -> Vec> { +fn default_798() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_797() -> Vec> { +fn default_799() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_798() -> std::collections::HashMap { +fn default_800() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_799() -> String { +fn default_801() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_800() -> bool { +fn default_802() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_801() -> String { +fn default_803() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_802() -> Vec> { +fn default_804() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_803() -> Vec> { +fn default_805() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_804() -> Vec { +fn default_806() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_805() -> Vec> { +fn default_807() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_806() -> bool { +fn default_808() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_807() -> Integer { +fn default_809() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_808() -> Integer { +fn default_810() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_809() -> bool { +fn default_811() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_810() -> bool { +fn default_812() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_811() -> bool { +fn default_813() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_812() -> String { +fn default_814() -> String { serde_json::from_str("\"lower_bound\"").expect("schema default") } -fn default_813() -> Vec { +fn default_815() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_814() -> std::collections::HashMap { +fn default_816() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_815() -> String { +fn default_817() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_816() -> String { +fn default_818() -> String { serde_json::from_str("\"unknown\"").expect("schema default") } -fn default_817() -> String { +fn default_819() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_818() -> Vec> { +fn default_820() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_819() -> Vec { +fn default_821() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_820() -> Vec { +fn default_822() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_821() -> Integer { +fn default_823() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_822() -> std::collections::HashMap { +fn default_824() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_823() -> String { +fn default_825() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_824() -> Vec> { +fn default_826() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_825() -> Integer { +fn default_827() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_826() -> bool { +fn default_828() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_827() -> Vec> { +fn default_829() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_828() -> String { +fn default_830() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_829() -> bool { +fn default_831() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_830() -> Vec { +fn default_832() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_831() -> std::collections::HashMap { +fn default_833() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_832() -> Integer { +fn default_834() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_833() -> Integer { +fn default_835() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_834() -> String { +fn default_836() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_835() -> Integer { +fn default_837() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_836() -> String { +fn default_838() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_837() -> String { +fn default_839() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_838() -> Vec> { +fn default_840() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_839() -> std::collections::HashMap { +fn default_841() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_840() -> String { +fn default_842() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_841() -> String { +fn default_843() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_842() -> std::collections::HashMap { +fn default_844() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_843() -> Vec> { +fn default_845() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_844() -> Vec> { +fn default_846() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_845() -> bool { +fn default_847() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_846() -> std::collections::HashMap { +fn default_848() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_847() -> std::collections::HashMap { +fn default_849() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_848() -> std::collections::HashMap { +fn default_850() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_849() -> Vec { +fn default_851() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_850() -> Integer { +fn default_852() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_851() -> std::collections::HashMap { +fn default_853() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_852() -> String { - serde_json::from_str("\"\"").expect("schema default") -} -fn default_853() -> String { - serde_json::from_str("\"\"").expect("schema default") -} fn default_854() -> String { serde_json::from_str("\"\"").expect("schema default") } @@ -62973,147 +62977,147 @@ fn default_857() -> String { fn default_858() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_859() -> Option { +fn default_859() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_860() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_861() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_860() -> Option { +fn default_862() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_861() -> Option { +fn default_863() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_862() -> Option { +fn default_864() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_863() -> Option> { +fn default_865() -> Option> { serde_json::from_str("null").expect("schema default") } -fn default_864() -> Vec { +fn default_866() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_865() -> String { +fn default_867() -> String { serde_json::from_str("\"conflicts.resolve\"").expect("schema default") } -fn default_866() -> Vec { +fn default_868() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_867() -> String { +fn default_869() -> String { serde_json::from_str("\"No changes were applied.\"").expect("schema default") } -fn default_868() -> Option { +fn default_870() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_869() -> Option { +fn default_871() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_870() -> Option { +fn default_872() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_871() -> Vec { +fn default_873() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_872() -> String { +fn default_874() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_873() -> String { +fn default_875() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_874() -> String { +fn default_876() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_875() -> Integer { +fn default_877() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_876() -> Integer { +fn default_878() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_877() -> Integer { +fn default_879() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_878() -> Integer { +fn default_880() -> Integer { serde_json::from_str("-1").expect("schema default") } -fn default_879() -> Integer { +fn default_881() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_880() -> Option { +fn default_882() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_881() -> bool { +fn default_883() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_882() -> ConversationAppendOutputReason { +fn default_884() -> ConversationAppendOutputReason { serde_json::from_str("\"\"").expect("schema default") } -fn default_883() -> String { +fn default_885() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_884() -> Integer { +fn default_886() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_885() -> Integer { +fn default_887() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_886() -> String { +fn default_888() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_887() -> String { +fn default_889() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_888() -> std::collections::HashMap { +fn default_890() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_889() -> String { +fn default_891() -> String { serde_json::from_str("\"-\"").expect("schema default") } -fn default_890() -> String { +fn default_892() -> String { serde_json::from_str("\"-\"").expect("schema default") } -fn default_891() -> String { +fn default_893() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_892() -> Option { +fn default_894() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_893() -> Option { +fn default_895() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_894() -> Integer { +fn default_896() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_895() -> String { +fn default_897() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_896() -> Vec { +fn default_898() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_897() -> Option { +fn default_899() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_898() -> Option { +fn default_900() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_899() -> Option { +fn default_901() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_900() -> ConversationSaveMessageOutputReason { +fn default_902() -> ConversationSaveMessageOutputReason { serde_json::from_str("\"\"").expect("schema default") } -fn default_901() -> String { +fn default_903() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_902() -> Vec { +fn default_904() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_903() -> bool { +fn default_905() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_904() -> Option { - serde_json::from_str("null").expect("schema default") -} -fn default_905() -> Option { - serde_json::from_str("null").expect("schema default") -} fn default_906() -> Option { serde_json::from_str("null").expect("schema default") } @@ -63132,30 +63136,30 @@ fn default_910() -> Option { fn default_911() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_912() -> Option { +fn default_912() -> Option { + serde_json::from_str("null").expect("schema default") +} +fn default_913() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_913() -> Option { +fn default_914() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_914() -> Integer { +fn default_915() -> Option { + serde_json::from_str("null").expect("schema default") +} +fn default_916() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_915() -> Vec { +fn default_917() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_916() -> f64 { +fn default_918() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_917() -> Integer { +fn default_919() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_918() -> Option { - serde_json::from_str("null").expect("schema default") -} -fn default_919() -> Option { - serde_json::from_str("null").expect("schema default") -} fn default_920() -> Option { serde_json::from_str("null").expect("schema default") } @@ -63180,11 +63184,11 @@ fn default_926() -> Option { fn default_927() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_928() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_928() -> Option { + serde_json::from_str("null").expect("schema default") } -fn default_929() -> f64 { - serde_json::from_str("0.0").expect("schema default") +fn default_929() -> Option { + serde_json::from_str("null").expect("schema default") } fn default_930() -> Integer { serde_json::from_str("0").expect("schema default") @@ -63192,11 +63196,11 @@ fn default_930() -> Integer { fn default_931() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_932() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_932() -> Integer { + serde_json::from_str("0").expect("schema default") } -fn default_933() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_933() -> f64 { + serde_json::from_str("0.0").expect("schema default") } fn default_934() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -63204,621 +63208,621 @@ fn default_934() -> String { fn default_935() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_936() -> Vec { +fn default_936() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_937() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_938() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_937() -> Option { +fn default_939() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_938() -> String { +fn default_940() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_939() -> String { +fn default_941() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_940() -> String { +fn default_942() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_941() -> Option { +fn default_943() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_942() -> String { +fn default_944() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_943() -> DecisionRowStage { +fn default_945() -> DecisionRowStage { serde_json::from_str("\"decided\"").expect("schema default") } -fn default_944() -> f64 { +fn default_946() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_945() -> Option { +fn default_947() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_946() -> Option { +fn default_948() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_947() -> Integer { +fn default_949() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_948() -> String { +fn default_950() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_949() -> bool { +fn default_951() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_950() -> Integer { +fn default_952() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_951() -> String { +fn default_953() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_952() -> bool { +fn default_954() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_953() -> Option { +fn default_955() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_954() -> String { +fn default_956() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_955() -> Integer { +fn default_957() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_956() -> Integer { +fn default_958() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_957() -> Integer { +fn default_959() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_958() -> Option { +fn default_960() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_959() -> String { +fn default_961() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_960() -> Option { +fn default_962() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_961() -> Integer { +fn default_963() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_962() -> std::collections::HashMap { +fn default_964() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_963() -> Option { +fn default_965() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_964() -> Option> { +fn default_966() -> Option> { serde_json::from_str("null").expect("schema default") } -fn default_965() -> bool { +fn default_967() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_966() -> String { +fn default_968() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_967() -> Vec { +fn default_969() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_968() -> Option { +fn default_970() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_969() -> Option { +fn default_971() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_970() -> Option { +fn default_972() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_971() -> Option { +fn default_973() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_972() -> Option { +fn default_974() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_973() -> Option { +fn default_975() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_974() -> Option { +fn default_976() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_975() -> Option { +fn default_977() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_976() -> Option { +fn default_978() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_977() -> Integer { +fn default_979() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_978() -> std::collections::HashMap { +fn default_980() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_979() -> Option { +fn default_981() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_980() -> Option> { +fn default_982() -> Option> { serde_json::from_str("null").expect("schema default") } -fn default_981() -> bool { +fn default_983() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_982() -> String { +fn default_984() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_983() -> String { +fn default_985() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_984() -> String { +fn default_986() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_985() -> Option { +fn default_987() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_986() -> String { +fn default_988() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_987() -> String { +fn default_989() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_988() -> Option { +fn default_990() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_989() -> Vec { +fn default_991() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_990() -> String { +fn default_992() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_991() -> Vec { +fn default_993() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_992() -> Vec { +fn default_994() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_993() -> bool { +fn default_995() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_994() -> bool { +fn default_996() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_995() -> String { +fn default_997() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_996() -> String { +fn default_998() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_997() -> Option { +fn default_999() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_998() -> Option { +fn default_1000() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_999() -> Option { +fn default_1001() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1000() -> bool { +fn default_1002() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1001() -> Integer { +fn default_1003() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1002() -> String { +fn default_1004() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1003() -> String { +fn default_1005() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1004() -> String { +fn default_1006() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1005() -> String { +fn default_1007() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1006() -> String { +fn default_1008() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1007() -> Option { +fn default_1009() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1008() -> Vec { +fn default_1010() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1009() -> bool { +fn default_1011() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1010() -> Vec { +fn default_1012() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1011() -> Option { +fn default_1013() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1012() -> Option { +fn default_1014() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1013() -> bool { +fn default_1015() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1014() -> String { +fn default_1016() -> String { serde_json::from_str("\"memory\"").expect("schema default") } -fn default_1015() -> Option { +fn default_1017() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1016() -> Option { +fn default_1018() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1017() -> Option { +fn default_1019() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1018() -> String { +fn default_1020() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1019() -> String { +fn default_1021() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1020() -> String { +fn default_1022() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1021() -> HelpGetOutputAudience { +fn default_1023() -> HelpGetOutputAudience { serde_json::from_str("\"user\"").expect("schema default") } -fn default_1022() -> String { +fn default_1024() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1023() -> bool { +fn default_1025() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1024() -> Integer { +fn default_1026() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1025() -> String { +fn default_1027() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1026() -> Vec { +fn default_1028() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1027() -> String { +fn default_1029() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1028() -> Vec { +fn default_1030() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1029() -> Vec { +fn default_1031() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1030() -> String { +fn default_1032() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1031() -> String { +fn default_1033() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1032() -> String { +fn default_1034() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1033() -> Vec { +fn default_1035() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1034() -> String { +fn default_1036() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1035() -> bool { +fn default_1037() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1036() -> Vec { +fn default_1038() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1037() -> Vec { +fn default_1039() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1038() -> Option { +fn default_1040() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1039() -> bool { +fn default_1041() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1040() -> bool { +fn default_1042() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1041() -> Vec { +fn default_1043() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1042() -> Vec> { +fn default_1044() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1043() -> Integer { +fn default_1045() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1044() -> bool { +fn default_1046() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1045() -> String { +fn default_1047() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1046() -> String { +fn default_1048() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1047() -> Integer { +fn default_1049() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1048() -> Integer { +fn default_1050() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1049() -> Vec { +fn default_1051() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1050() -> Integer { +fn default_1052() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1051() -> Vec { +fn default_1053() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1052() -> bool { +fn default_1054() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_1053() -> String { +fn default_1055() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1054() -> Option { +fn default_1056() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1055() -> Option { +fn default_1057() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1056() -> Vec> { +fn default_1058() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1057() -> Option { +fn default_1059() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1058() -> bool { +fn default_1060() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1059() -> Integer { +fn default_1061() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1060() -> Vec { +fn default_1062() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1061() -> Vec> { +fn default_1063() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1062() -> Vec { +fn default_1064() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1063() -> Vec> { +fn default_1065() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1064() -> Vec { +fn default_1066() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1065() -> String { +fn default_1067() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1066() -> Vec { +fn default_1068() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1067() -> Vec { +fn default_1069() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1068() -> Option { +fn default_1070() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1069() -> Vec { +fn default_1071() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1070() -> Integer { +fn default_1072() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1071() -> Vec { +fn default_1073() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1072() -> String { +fn default_1074() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1073() -> Vec { +fn default_1075() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1074() -> Vec { +fn default_1076() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1075() -> Option { +fn default_1077() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1076() -> Option { +fn default_1078() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1077() -> bool { +fn default_1079() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1078() -> String { +fn default_1080() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1079() -> String { +fn default_1081() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1080() -> bool { +fn default_1082() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1081() -> String { +fn default_1083() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1082() -> String { +fn default_1084() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1083() -> String { +fn default_1085() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1084() -> Integer { +fn default_1086() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1085() -> String { +fn default_1087() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1086() -> String { +fn default_1088() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1087() -> String { +fn default_1089() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1088() -> Option> { +fn default_1090() -> Option> { serde_json::from_str("null").expect("schema default") } -fn default_1089() -> Vec { +fn default_1091() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1090() -> Integer { +fn default_1092() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1091() -> Integer { +fn default_1093() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1092() -> Option { +fn default_1094() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1093() -> String { +fn default_1095() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1094() -> String { +fn default_1096() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1095() -> bool { +fn default_1097() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1096() -> Option { +fn default_1098() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1097() -> Option { +fn default_1099() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1098() -> Option { +fn default_1100() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1099() -> Option { +fn default_1101() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1100() -> Option { +fn default_1102() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1101() -> Vec { +fn default_1103() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1102() -> Vec { +fn default_1104() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1103() -> Option { +fn default_1105() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1104() -> Option { +fn default_1106() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1105() -> Option { +fn default_1107() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1106() -> String { +fn default_1108() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1107() -> Option { +fn default_1109() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1108() -> Option { +fn default_1110() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1109() -> Option { +fn default_1111() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1110() -> Vec { +fn default_1112() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1111() -> Vec { +fn default_1113() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1112() -> Option { +fn default_1114() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1113() -> String { +fn default_1115() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1114() -> Option { +fn default_1116() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1115() -> Vec { +fn default_1117() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1116() -> Option { +fn default_1118() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1117() -> Option { +fn default_1119() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1118() -> Option { +fn default_1120() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1119() -> String { +fn default_1121() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1120() -> Option { +fn default_1122() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1121() -> Option { +fn default_1123() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1122() -> bool { +fn default_1124() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1123() -> bool { +fn default_1125() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1124() -> Option { +fn default_1126() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1125() -> Vec { +fn default_1127() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1126() -> bool { +fn default_1128() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1127() -> Option { +fn default_1129() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1128() -> Option { +fn default_1130() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1129() -> Vec { +fn default_1131() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1130() -> String { +fn default_1132() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1131() -> String { +fn default_1133() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1132() -> Vec { +fn default_1134() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1133() -> Integer { +fn default_1135() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1134() -> Vec { +fn default_1136() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1135() -> Vec { +fn default_1137() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1136() -> Vec { +fn default_1138() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1137() -> Vec { +fn default_1139() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1138() -> Vec { +fn default_1140() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1139() -> Option { - serde_json::from_str("null").expect("schema default") -} -fn default_1140() -> Option { - serde_json::from_str("null").expect("schema default") -} fn default_1141() -> Option { serde_json::from_str("null").expect("schema default") } @@ -63843,207 +63847,207 @@ fn default_1147() -> Option { fn default_1148() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1149() -> Option { +fn default_1149() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1150() -> Option { +fn default_1150() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1151() -> Vec { +fn default_1151() -> Option { + serde_json::from_str("null").expect("schema default") +} +fn default_1152() -> Option { + serde_json::from_str("null").expect("schema default") +} +fn default_1153() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1152() -> Option { +fn default_1154() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1153() -> Option { +fn default_1155() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1154() -> Vec { +fn default_1156() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1155() -> Option { +fn default_1157() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1156() -> Option { +fn default_1158() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1157() -> Vec { +fn default_1159() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1158() -> String { +fn default_1160() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1159() -> String { +fn default_1161() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1160() -> Vec { +fn default_1162() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1161() -> Vec { +fn default_1163() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1162() -> Integer { +fn default_1164() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1163() -> Vec { +fn default_1165() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1164() -> Vec { +fn default_1166() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1165() -> Vec { +fn default_1167() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1166() -> Vec { +fn default_1168() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1167() -> Option { +fn default_1169() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1168() -> String { +fn default_1170() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1169() -> bool { +fn default_1171() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1170() -> KnowledgeMoveResultReason { +fn default_1172() -> KnowledgeMoveResultReason { serde_json::from_str("\"\"").expect("schema default") } -fn default_1171() -> Vec { +fn default_1173() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1172() -> String { +fn default_1174() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1173() -> bool { +fn default_1175() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1174() -> Integer { +fn default_1176() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1175() -> Vec { +fn default_1177() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1176() -> Option { +fn default_1178() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1177() -> Vec { +fn default_1179() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1178() -> Vec> { +fn default_1180() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1179() -> bool { +fn default_1181() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1180() -> Vec { +fn default_1182() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1181() -> bool { +fn default_1183() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1182() -> Vec { +fn default_1184() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1183() -> Vec> { +fn default_1185() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1184() -> KnowledgeRestoreOutputReason { +fn default_1186() -> KnowledgeRestoreOutputReason { serde_json::from_str("\"\"").expect("schema default") } -fn default_1185() -> String { +fn default_1187() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1186() -> Option { +fn default_1188() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1187() -> Integer { +fn default_1189() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1188() -> KnowledgeRestoreOutputOriginal { +fn default_1190() -> KnowledgeRestoreOutputOriginal { serde_json::from_str("\"none\"").expect("schema default") } -fn default_1189() -> Vec> { +fn default_1191() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1190() -> Vec { +fn default_1192() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1191() -> std::collections::HashMap { +fn default_1193() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1192() -> Integer { +fn default_1194() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1193() -> bool { +fn default_1195() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1194() -> Vec { +fn default_1196() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1195() -> Integer { +fn default_1197() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1196() -> bool { +fn default_1198() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1197() -> KnowledgeSourceProbe { +fn default_1199() -> KnowledgeSourceProbe { serde_json::from_str( "{\"documents\":0,\"more\":false,\"sample\":[],\"checked\":0,\"sampled\":false}", ) .expect("schema default") } -fn default_1198() -> bool { +fn default_1200() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1199() -> bool { +fn default_1201() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_1200() -> Integer { +fn default_1202() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1201() -> bool { +fn default_1203() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1202() -> Vec { +fn default_1204() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1203() -> Integer { +fn default_1205() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1204() -> bool { +fn default_1206() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1205() -> String { +fn default_1207() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1206() -> String { +fn default_1208() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1207() -> String { +fn default_1209() -> String { serde_json::from_str("\"shared\"").expect("schema default") } -fn default_1208() -> String { +fn default_1210() -> String { serde_json::from_str("\"namespace\"").expect("schema default") } -fn default_1209() -> String { +fn default_1211() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1210() -> Vec> { +fn default_1212() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1211() -> Vec { +fn default_1213() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1212() -> std::collections::HashMap { +fn default_1214() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1213() -> String { - serde_json::from_str("\"\"").expect("schema default") -} -fn default_1214() -> String { - serde_json::from_str("\"\"").expect("schema default") -} fn default_1215() -> String { serde_json::from_str("\"\"").expect("schema default") } @@ -64053,11 +64057,11 @@ fn default_1216() -> String { fn default_1217() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1218() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_1218() -> String { + serde_json::from_str("\"\"").expect("schema default") } -fn default_1219() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_1219() -> String { + serde_json::from_str("\"\"").expect("schema default") } fn default_1220() -> Integer { serde_json::from_str("0").expect("schema default") @@ -64065,14 +64069,14 @@ fn default_1220() -> Integer { fn default_1221() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1222() -> std::collections::HashMap { - serde_json::from_str("{}").expect("schema default") +fn default_1222() -> Integer { + serde_json::from_str("0").expect("schema default") } fn default_1223() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1224() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_1224() -> std::collections::HashMap { + serde_json::from_str("{}").expect("schema default") } fn default_1225() -> Integer { serde_json::from_str("0").expect("schema default") @@ -64083,89 +64087,89 @@ fn default_1226() -> String { fn default_1227() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1228() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_1228() -> String { + serde_json::from_str("\"\"").expect("schema default") } fn default_1229() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1230() -> String { +fn default_1230() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_1231() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_1232() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1231() -> KnowledgeSourceSync { +fn default_1233() -> KnowledgeSourceSync { serde_json::from_str("{\"requested_at\":\"\",\"last_synced_at\":\"\",\"status\":\"\",\"documents_seen\":0,\"changed\":0,\"removed\":0,\"unconverted\":0,\"unconverted_reasons\":{},\"skipped\":0,\"error\":\"\",\"pending_extract\":0,\"last_extracted_at\":\"\",\"extracted\":0,\"flagged_pinned\":0,\"unextracted\":0,\"extract_error\":\"\"}").expect("schema default") } -fn default_1232() -> String { +fn default_1234() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1233() -> String { +fn default_1235() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1234() -> String { +fn default_1236() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1235() -> Vec { +fn default_1237() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1236() -> String { +fn default_1238() -> String { serde_json::from_str("\"shared\"").expect("schema default") } -fn default_1237() -> String { +fn default_1239() -> String { serde_json::from_str("\"namespace\"").expect("schema default") } -fn default_1238() -> String { +fn default_1240() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1239() -> Vec> { +fn default_1241() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1240() -> Vec { +fn default_1242() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1241() -> std::collections::HashMap { +fn default_1243() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1242() -> String { +fn default_1244() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1243() -> String { +fn default_1245() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1244() -> KnowledgeSourceSync { +fn default_1246() -> KnowledgeSourceSync { serde_json::from_str("{\"requested_at\":\"\",\"last_synced_at\":\"\",\"status\":\"\",\"documents_seen\":0,\"changed\":0,\"removed\":0,\"unconverted\":0,\"unconverted_reasons\":{},\"skipped\":0,\"error\":\"\",\"pending_extract\":0,\"last_extracted_at\":\"\",\"extracted\":0,\"flagged_pinned\":0,\"unextracted\":0,\"extract_error\":\"\"}").expect("schema default") } -fn default_1245() -> Vec { +fn default_1247() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1246() -> bool { +fn default_1248() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1247() -> bool { +fn default_1249() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_1248() -> String { +fn default_1250() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1249() -> std::collections::HashMap { +fn default_1251() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1250() -> String { +fn default_1252() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1251() -> Vec { +fn default_1253() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1252() -> bool { +fn default_1254() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1253() -> String { - serde_json::from_str("\"disabled\"").expect("schema default") -} -fn default_1254() -> String { - serde_json::from_str("\"\"").expect("schema default") -} fn default_1255() -> String { - serde_json::from_str("\"\"").expect("schema default") + serde_json::from_str("\"disabled\"").expect("schema default") } fn default_1256() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -64179,213 +64183,213 @@ fn default_1258() -> String { fn default_1259() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1260() -> Integer { +fn default_1260() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_1261() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_1262() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1261() -> f64 { +fn default_1263() -> f64 { serde_json::from_str("0").expect("schema default") } -fn default_1262() -> Integer { +fn default_1264() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1263() -> KnowledgeSourceProbe { +fn default_1265() -> KnowledgeSourceProbe { serde_json::from_str( "{\"documents\":0,\"more\":false,\"sample\":[],\"checked\":0,\"sampled\":false}", ) .expect("schema default") } -fn default_1264() -> String { +fn default_1266() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1265() -> bool { +fn default_1267() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1266() -> Vec> { +fn default_1268() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1267() -> Vec { +fn default_1269() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1268() -> std::collections::HashMap { +fn default_1270() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1269() -> Vec> { +fn default_1271() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1270() -> Vec> { +fn default_1272() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1271() -> KnowledgeSourceProbe { +fn default_1273() -> KnowledgeSourceProbe { serde_json::from_str( "{\"documents\":0,\"more\":false,\"sample\":[],\"checked\":0,\"sampled\":false}", ) .expect("schema default") } -fn default_1272() -> Vec { +fn default_1274() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1273() -> Integer { +fn default_1275() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1274() -> Option> { +fn default_1276() -> Option> { serde_json::from_str("null").expect("schema default") } -fn default_1275() -> Vec { +fn default_1277() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1276() -> Vec { +fn default_1278() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1277() -> bool { +fn default_1279() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1278() -> bool { +fn default_1280() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1279() -> String { +fn default_1281() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1280() -> String { +fn default_1282() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1281() -> Vec> { +fn default_1283() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1282() -> bool { +fn default_1284() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1283() -> Vec { +fn default_1285() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1284() -> Vec { +fn default_1286() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1285() -> String { +fn default_1287() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1286() -> String { +fn default_1288() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1287() -> String { +fn default_1289() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1288() -> Vec { +fn default_1290() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1289() -> Integer { +fn default_1291() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1290() -> String { +fn default_1292() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1291() -> Integer { +fn default_1293() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1292() -> String { +fn default_1294() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1293() -> String { +fn default_1295() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1294() -> Integer { +fn default_1296() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1295() -> Integer { +fn default_1297() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1296() -> String { +fn default_1298() -> String { serde_json::from_str("\"memory_supporters\"").expect("schema default") } -fn default_1297() -> String { +fn default_1299() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1298() -> String { +fn default_1300() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1299() -> Option { +fn default_1301() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1300() -> String { +fn default_1302() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1301() -> String { +fn default_1303() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1302() -> bool { +fn default_1304() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1303() -> bool { +fn default_1305() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1304() -> String { +fn default_1306() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1305() -> std::collections::HashMap { +fn default_1307() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1306() -> Vec { +fn default_1308() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1307() -> String { +fn default_1309() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1308() -> String { +fn default_1310() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1309() -> String { +fn default_1311() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1310() -> Vec { +fn default_1312() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1311() -> String { +fn default_1313() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1312() -> String { +fn default_1314() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1313() -> Vec { +fn default_1315() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1314() -> Vec { +fn default_1316() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1315() -> Vec { +fn default_1317() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1316() -> Vec { +fn default_1318() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1317() -> Integer { +fn default_1319() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1318() -> Vec { +fn default_1320() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1319() -> Vec { +fn default_1321() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1320() -> Vec { +fn default_1322() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1321() -> Integer { +fn default_1323() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1322() -> Vec { +fn default_1324() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1323() -> std::collections::HashMap { +fn default_1325() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1324() -> std::collections::HashMap { +fn default_1326() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1325() -> Integer { - serde_json::from_str("0").expect("schema default") -} -fn default_1326() -> Integer { - serde_json::from_str("0").expect("schema default") -} fn default_1327() -> Integer { serde_json::from_str("0").expect("schema default") } @@ -64398,215 +64402,215 @@ fn default_1329() -> Integer { fn default_1330() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1331() -> bool { +fn default_1331() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_1332() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_1333() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1332() -> String { +fn default_1334() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1333() -> String { +fn default_1335() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1334() -> String { +fn default_1336() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1335() -> String { +fn default_1337() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1336() -> Option { +fn default_1338() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1337() -> String { +fn default_1339() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1338() -> Vec { +fn default_1340() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1339() -> String { +fn default_1341() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1340() -> MemoryAskOutputSource { +fn default_1342() -> MemoryAskOutputSource { serde_json::from_str("\"synthesized\"").expect("schema default") } -fn default_1341() -> bool { +fn default_1343() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1342() -> String { +fn default_1344() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1343() -> Vec { +fn default_1345() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1344() -> Vec { +fn default_1346() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1345() -> Vec { +fn default_1347() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1346() -> String { +fn default_1348() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1347() -> String { +fn default_1349() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1348() -> MemoryAskOutputRouteTier { +fn default_1350() -> MemoryAskOutputRouteTier { serde_json::from_str("\"\"").expect("schema default") } -fn default_1349() -> String { +fn default_1351() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1350() -> Integer { +fn default_1352() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1351() -> Integer { +fn default_1353() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1352() -> bool { +fn default_1354() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1353() -> f64 { +fn default_1355() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_1354() -> Option { +fn default_1356() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1355() -> Option { +fn default_1357() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1356() -> bool { +fn default_1358() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1357() -> String { +fn default_1359() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1358() -> Integer { +fn default_1360() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1359() -> Integer { +fn default_1361() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1360() -> Integer { +fn default_1362() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1361() -> Integer { +fn default_1363() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1362() -> String { +fn default_1364() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1363() -> Vec { +fn default_1365() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1364() -> Integer { +fn default_1366() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1365() -> MemoryAskOutputConsistency { +fn default_1367() -> MemoryAskOutputConsistency { serde_json::from_str("\"\"").expect("schema default") } -fn default_1366() -> f64 { +fn default_1368() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_1367() -> String { +fn default_1369() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1368() -> Integer { +fn default_1370() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1369() -> Integer { +fn default_1371() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1370() -> String { +fn default_1372() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1371() -> String { +fn default_1373() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1372() -> String { +fn default_1374() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1373() -> String { +fn default_1375() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1374() -> MemoryAskOutputDepth { +fn default_1376() -> MemoryAskOutputDepth { serde_json::from_str("\"\"").expect("schema default") } -fn default_1375() -> bool { +fn default_1377() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1376() -> Vec { +fn default_1378() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1377() -> Integer { +fn default_1379() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1378() -> Integer { +fn default_1380() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1379() -> Integer { +fn default_1381() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1380() -> Vec { +fn default_1382() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1381() -> Integer { +fn default_1383() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1382() -> Integer { +fn default_1384() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1383() -> Integer { +fn default_1385() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1384() -> MemoryAskOutputGrounding { +fn default_1386() -> MemoryAskOutputGrounding { serde_json::from_str("\"\"").expect("schema default") } -fn default_1385() -> String { +fn default_1387() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1386() -> Vec { +fn default_1388() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1387() -> Integer { +fn default_1389() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1388() -> Integer { +fn default_1390() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1389() -> Integer { +fn default_1391() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1390() -> Integer { +fn default_1392() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1391() -> std::collections::HashMap { +fn default_1393() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1392() -> MemoryAskOutputDeepSelector { +fn default_1394() -> MemoryAskOutputDeepSelector { serde_json::from_str("\"\"").expect("schema default") } -fn default_1393() -> MemoryAskOutputDeepFirst { +fn default_1395() -> MemoryAskOutputDeepFirst { serde_json::from_str("\"\"").expect("schema default") } -fn default_1394() -> Integer { - serde_json::from_str("0").expect("schema default") -} -fn default_1395() -> Integer { - serde_json::from_str("0").expect("schema default") -} fn default_1396() -> Integer { serde_json::from_str("0").expect("schema default") } fn default_1397() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1398() -> f64 { - serde_json::from_str("0.0").expect("schema default") +fn default_1398() -> Integer { + serde_json::from_str("0").expect("schema default") } fn default_1399() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1400() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_1400() -> f64 { + serde_json::from_str("0.0").expect("schema default") } fn default_1401() -> Integer { serde_json::from_str("0").expect("schema default") @@ -64617,143 +64621,143 @@ fn default_1402() -> Integer { fn default_1403() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1404() -> bool { +fn default_1404() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_1405() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_1406() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1405() -> String { +fn default_1407() -> String { serde_json::from_str("\"-\"").expect("schema default") } -fn default_1406() -> String { +fn default_1408() -> String { serde_json::from_str("\"-\"").expect("schema default") } -fn default_1407() -> String { +fn default_1409() -> String { serde_json::from_str("\"-\"").expect("schema default") } -fn default_1408() -> String { +fn default_1410() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1409() -> String { +fn default_1411() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1410() -> String { +fn default_1412() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1411() -> bool { +fn default_1413() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1412() -> String { +fn default_1414() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1413() -> Option { +fn default_1415() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1414() -> String { +fn default_1416() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1415() -> String { +fn default_1417() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1416() -> Vec { +fn default_1418() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1417() -> Option { +fn default_1419() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1418() -> bool { +fn default_1420() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1419() -> String { +fn default_1421() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1420() -> String { +fn default_1422() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1421() -> Vec { +fn default_1423() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1422() -> String { +fn default_1424() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1423() -> Vec { +fn default_1425() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1424() -> String { +fn default_1426() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1425() -> String { +fn default_1427() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1426() -> Vec { +fn default_1428() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1427() -> Vec { +fn default_1429() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1428() -> Integer { +fn default_1430() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1429() -> Vec { +fn default_1431() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1430() -> Vec { +fn default_1432() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1431() -> String { +fn default_1433() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1432() -> String { +fn default_1434() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1433() -> bool { +fn default_1435() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1434() -> String { +fn default_1436() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1435() -> String { +fn default_1437() -> String { serde_json::from_str("\"fact\"").expect("schema default") } -fn default_1436() -> String { +fn default_1438() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1437() -> bool { +fn default_1439() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1438() -> String { +fn default_1440() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1439() -> String { +fn default_1441() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1440() -> String { +fn default_1442() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1441() -> Vec { - serde_json::from_str("[]").expect("schema default") -} -fn default_1442() -> Vec { +fn default_1443() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1443() -> Vec { +fn default_1444() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1444() -> std::collections::HashMap { - serde_json::from_str("{}").expect("schema default") -} fn default_1445() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1446() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_1446() -> std::collections::HashMap { + serde_json::from_str("{}").expect("schema default") } -fn default_1447() -> Vec { +fn default_1447() -> Vec { serde_json::from_str("[]").expect("schema default") } fn default_1448() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1449() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_1449() -> Vec { + serde_json::from_str("[]").expect("schema default") } fn default_1450() -> Integer { serde_json::from_str("0").expect("schema default") @@ -64770,11 +64774,11 @@ fn default_1453() -> Integer { fn default_1454() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1455() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_1455() -> Integer { + serde_json::from_str("0").expect("schema default") } -fn default_1456() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_1456() -> Integer { + serde_json::from_str("0").expect("schema default") } fn default_1457() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -64782,14 +64786,14 @@ fn default_1457() -> String { fn default_1458() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1459() -> bool { - serde_json::from_str("true").expect("schema default") +fn default_1459() -> String { + serde_json::from_str("\"\"").expect("schema default") } -fn default_1460() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_1460() -> String { + serde_json::from_str("\"\"").expect("schema default") } -fn default_1461() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_1461() -> bool { + serde_json::from_str("true").expect("schema default") } fn default_1462() -> Integer { serde_json::from_str("0").expect("schema default") @@ -64800,339 +64804,339 @@ fn default_1463() -> Integer { fn default_1464() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1465() -> bool { +fn default_1465() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_1466() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_1467() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1466() -> Vec { +fn default_1468() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1467() -> String { +fn default_1469() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1468() -> String { +fn default_1470() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1469() -> Option { +fn default_1471() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1470() -> Vec { +fn default_1472() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1471() -> bool { +fn default_1473() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1472() -> bool { +fn default_1474() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1473() -> Vec { +fn default_1475() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1474() -> bool { +fn default_1476() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1475() -> Option { +fn default_1477() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1476() -> Vec { +fn default_1478() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1477() -> Option { +fn default_1479() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1478() -> Option { +fn default_1480() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1479() -> Vec { +fn default_1481() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1480() -> Integer { +fn default_1482() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1481() -> bool { +fn default_1483() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_1482() -> String { +fn default_1484() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1483() -> Integer { +fn default_1485() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1484() -> Integer { +fn default_1486() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1485() -> std::collections::HashMap { +fn default_1487() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1486() -> String { +fn default_1488() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1487() -> f64 { +fn default_1489() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_1488() -> bool { +fn default_1490() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1489() -> String { +fn default_1491() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1490() -> String { +fn default_1492() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1491() -> Integer { +fn default_1493() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1492() -> Integer { +fn default_1494() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1493() -> Option { +fn default_1495() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1494() -> Vec { +fn default_1496() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1495() -> Vec { +fn default_1497() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1496() -> Option { +fn default_1498() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1497() -> Option { +fn default_1499() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1498() -> Integer { +fn default_1500() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1499() -> bool { +fn default_1501() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1500() -> String { +fn default_1502() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1501() -> String { +fn default_1503() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1502() -> String { +fn default_1504() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1503() -> String { +fn default_1505() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1504() -> Option { +fn default_1506() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1505() -> String { +fn default_1507() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1506() -> Integer { +fn default_1508() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1507() -> Integer { +fn default_1509() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1508() -> String { +fn default_1510() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1509() -> Vec { +fn default_1511() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1510() -> bool { +fn default_1512() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1511() -> Integer { +fn default_1513() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1512() -> Integer { +fn default_1514() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1513() -> Integer { +fn default_1515() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1514() -> Integer { +fn default_1516() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1515() -> Integer { +fn default_1517() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1516() -> String { +fn default_1518() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1517() -> String { +fn default_1519() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1518() -> String { +fn default_1520() -> String { serde_json::from_str("\"-\"").expect("schema default") } -fn default_1519() -> String { +fn default_1521() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1520() -> Vec { +fn default_1522() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1521() -> Integer { +fn default_1523() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1522() -> Integer { +fn default_1524() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1523() -> String { +fn default_1525() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1524() -> String { +fn default_1526() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1525() -> Vec { +fn default_1527() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1526() -> String { +fn default_1528() -> String { serde_json::from_str("\"-\"").expect("schema default") } -fn default_1527() -> String { +fn default_1529() -> String { serde_json::from_str("\"-\"").expect("schema default") } -fn default_1528() -> Vec { +fn default_1530() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1529() -> Vec { +fn default_1531() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1530() -> String { +fn default_1532() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1531() -> String { +fn default_1533() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1532() -> Vec { +fn default_1534() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1533() -> f64 { +fn default_1535() -> f64 { serde_json::from_str("1.0").expect("schema default") } -fn default_1534() -> String { +fn default_1536() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1535() -> String { +fn default_1537() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1536() -> Vec { +fn default_1538() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1537() -> bool { +fn default_1539() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1538() -> String { +fn default_1540() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1539() -> Integer { +fn default_1541() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1540() -> Vec { +fn default_1542() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1541() -> Vec { +fn default_1543() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1542() -> Vec { +fn default_1544() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1543() -> Vec { +fn default_1545() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1544() -> Vec { +fn default_1546() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1545() -> Option { +fn default_1547() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1546() -> Option { +fn default_1548() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1547() -> Vec { +fn default_1549() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1548() -> Integer { +fn default_1550() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1549() -> Integer { +fn default_1551() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1550() -> Vec { +fn default_1552() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1551() -> Vec { +fn default_1553() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1552() -> Integer { +fn default_1554() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1553() -> Integer { +fn default_1555() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1554() -> bool { +fn default_1556() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1555() -> Vec { +fn default_1557() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1556() -> f64 { +fn default_1558() -> f64 { serde_json::from_str("1.0").expect("schema default") } -fn default_1557() -> bool { +fn default_1559() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1558() -> String { +fn default_1560() -> String { serde_json::from_str("\"active\"").expect("schema default") } -fn default_1559() -> String { +fn default_1561() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1560() -> Option { +fn default_1562() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1561() -> String { +fn default_1563() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1562() -> String { +fn default_1564() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1563() -> String { +fn default_1565() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1564() -> String { +fn default_1566() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1565() -> MemoryForFileHitSupersedesKind { +fn default_1567() -> MemoryForFileHitSupersedesKind { serde_json::from_str("\"\"").expect("schema default") } -fn default_1566() -> Vec { +fn default_1568() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1567() -> String { +fn default_1569() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1568() -> MemoryForFileHitVerification { +fn default_1570() -> MemoryForFileHitVerification { serde_json::from_str("\"none\"").expect("schema default") } -fn default_1569() -> MemoryForFileHitCodeState { +fn default_1571() -> MemoryForFileHitCodeState { serde_json::from_str("\"\"").expect("schema default") } -fn default_1570() -> Vec { +fn default_1572() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1571() -> String { +fn default_1573() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1572() -> Integer { +fn default_1574() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1573() -> bool { +fn default_1575() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1574() -> String { - serde_json::from_str("\"\"").expect("schema default") -} -fn default_1575() -> String { - serde_json::from_str("\"\"").expect("schema default") -} fn default_1576() -> String { serde_json::from_str("\"\"").expect("schema default") } @@ -65145,22 +65149,22 @@ fn default_1578() -> String { fn default_1579() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1580() -> Option { - serde_json::from_str("null").expect("schema default") +fn default_1580() -> String { + serde_json::from_str("\"\"").expect("schema default") } -fn default_1581() -> Value { - serde_json::from_str("null").expect("schema default") +fn default_1581() -> String { + serde_json::from_str("\"\"").expect("schema default") } -fn default_1582() -> Option { +fn default_1582() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1583() -> Option { +fn default_1583() -> Value { serde_json::from_str("null").expect("schema default") } -fn default_1584() -> Option { +fn default_1584() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1585() -> Option { +fn default_1585() -> Option { serde_json::from_str("null").expect("schema default") } fn default_1586() -> Option { @@ -65169,548 +65173,548 @@ fn default_1586() -> Option { fn default_1587() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1588() -> bool { +fn default_1588() -> Option { + serde_json::from_str("null").expect("schema default") +} +fn default_1589() -> Option { + serde_json::from_str("null").expect("schema default") +} +fn default_1590() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1589() -> String { +fn default_1591() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1590() -> String { +fn default_1592() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1591() -> Option { +fn default_1593() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1592() -> String { +fn default_1594() -> String { serde_json::from_str("\"none\"").expect("schema default") } -fn default_1593() -> String { +fn default_1595() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1594() -> String { +fn default_1596() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1595() -> String { +fn default_1597() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1596() -> String { +fn default_1598() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1597() -> String { +fn default_1599() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1598() -> Option { +fn default_1600() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1599() -> String { +fn default_1601() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1600() -> String { +fn default_1602() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1601() -> String { +fn default_1603() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1602() -> Integer { +fn default_1604() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1603() -> Vec { +fn default_1605() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1604() -> Integer { +fn default_1606() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1605() -> Option { +fn default_1607() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1606() -> Vec { +fn default_1608() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1607() -> std::collections::HashMap { +fn default_1609() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1608() -> Integer { +fn default_1610() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1609() -> f64 { +fn default_1611() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_1610() -> Integer { +fn default_1612() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1611() -> Integer { +fn default_1613() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1612() -> Integer { +fn default_1614() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1613() -> Integer { +fn default_1615() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1614() -> Integer { +fn default_1616() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1615() -> MemoryHealthStaleness { +fn default_1617() -> MemoryHealthStaleness { serde_json::from_str("{\"by_age\":{},\"with_validity_end\":0,\"with_validity_end_share\":0.0,\"with_expiry\":0,\"expiring_7d\":0,\"pinned\":0,\"days_since_reinforced_p50\":0,\"days_since_reinforced_p90\":0}").expect("schema default") } -fn default_1616() -> Integer { +fn default_1618() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1617() -> Integer { +fn default_1619() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1618() -> f64 { +fn default_1620() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_1619() -> MemoryHealthFootprint { +fn default_1621() -> MemoryHealthFootprint { serde_json::from_str("{\"value_chars\":0,\"value_tokens_est\":0,\"tokens_per_row_est\":0.0}") .expect("schema default") } -fn default_1620() -> String { +fn default_1622() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1621() -> Value { +fn default_1623() -> Value { serde_json::from_str("null").expect("schema default") } -fn default_1622() -> String { +fn default_1624() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1623() -> bool { +fn default_1625() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1624() -> Option { +fn default_1626() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1625() -> Option { +fn default_1627() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1626() -> Option { +fn default_1628() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1627() -> String { +fn default_1629() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1628() -> String { +fn default_1630() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1629() -> String { +fn default_1631() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1630() -> String { +fn default_1632() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1631() -> String { +fn default_1633() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1632() -> Option { +fn default_1634() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1633() -> String { +fn default_1635() -> String { serde_json::from_str("\"active\"").expect("schema default") } -fn default_1634() -> Vec { +fn default_1636() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1635() -> Vec { +fn default_1637() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1636() -> Option { +fn default_1638() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1637() -> String { +fn default_1639() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1638() -> String { +fn default_1640() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1639() -> String { +fn default_1641() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1640() -> String { +fn default_1642() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1641() -> Option { +fn default_1643() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1642() -> Integer { +fn default_1644() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1643() -> Integer { +fn default_1645() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1644() -> Integer { +fn default_1646() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1645() -> Integer { +fn default_1647() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1646() -> MemoryImportResultReason { +fn default_1648() -> MemoryImportResultReason { serde_json::from_str("\"\"").expect("schema default") } -fn default_1647() -> String { +fn default_1649() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1648() -> MemoryImportResultNote { +fn default_1650() -> MemoryImportResultNote { serde_json::from_str("\"\"").expect("schema default") } -fn default_1649() -> bool { +fn default_1651() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1650() -> String { +fn default_1652() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1651() -> Option { +fn default_1653() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1652() -> Integer { +fn default_1654() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1653() -> Integer { +fn default_1655() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1654() -> Integer { +fn default_1656() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1655() -> String { +fn default_1657() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1656() -> Integer { +fn default_1658() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1657() -> Vec { +fn default_1659() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1658() -> Integer { +fn default_1660() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1659() -> Integer { +fn default_1661() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1660() -> Vec { +fn default_1662() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1661() -> Integer { +fn default_1663() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1662() -> Vec { +fn default_1664() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1663() -> Vec { +fn default_1665() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1664() -> Vec { +fn default_1666() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1665() -> Vec { +fn default_1667() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1666() -> Vec { +fn default_1668() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1667() -> Option { +fn default_1669() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1668() -> Option { +fn default_1670() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1669() -> String { +fn default_1671() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1670() -> Integer { +fn default_1672() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1671() -> String { +fn default_1673() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1672() -> Vec { +fn default_1674() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1673() -> bool { +fn default_1675() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_1674() -> Vec { +fn default_1676() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1675() -> Option { +fn default_1677() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1676() -> Option { +fn default_1678() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1677() -> String { +fn default_1679() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1678() -> Integer { +fn default_1680() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1679() -> String { +fn default_1681() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1680() -> Integer { +fn default_1682() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1681() -> Option { +fn default_1683() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1682() -> String { +fn default_1684() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1683() -> String { +fn default_1685() -> String { serde_json::from_str("\"Each request that extracts memories from messages may send extraction instructions; no user, agent or session setting stores them.\"").expect("schema default") } -fn default_1684() -> Vec { +fn default_1686() -> Vec { serde_json::from_str("[\"memory.set_from_messages\",\"extraction_instructions\"]") .expect("schema default") } -fn default_1685() -> Vec { +fn default_1687() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1686() -> bool { +fn default_1688() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1687() -> String { +fn default_1689() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1688() -> String { +fn default_1690() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1689() -> Option { +fn default_1691() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1690() -> String { +fn default_1692() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1691() -> String { +fn default_1693() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1692() -> String { +fn default_1694() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1693() -> MemoryLineageOutputMechanism { +fn default_1695() -> MemoryLineageOutputMechanism { serde_json::from_str("\"unknown\"").expect("schema default") } -fn default_1694() -> Vec { +fn default_1696() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1695() -> String { +fn default_1697() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1696() -> String { +fn default_1698() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1697() -> Option { +fn default_1699() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1698() -> Vec { +fn default_1700() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1699() -> f64 { +fn default_1701() -> f64 { serde_json::from_str("1.0").expect("schema default") } -fn default_1700() -> bool { +fn default_1702() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1701() -> bool { +fn default_1703() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1702() -> Integer { +fn default_1704() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1703() -> Integer { +fn default_1705() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1704() -> String { +fn default_1706() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1705() -> bool { +fn default_1707() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1706() -> Integer { +fn default_1708() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1707() -> String { +fn default_1709() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1708() -> String { +fn default_1710() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1709() -> String { +fn default_1711() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1710() -> Option { +fn default_1712() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1711() -> String { +fn default_1713() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1712() -> Option { +fn default_1714() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1713() -> String { +fn default_1715() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1714() -> String { +fn default_1716() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1715() -> String { +fn default_1717() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1716() -> Integer { +fn default_1718() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1717() -> String { +fn default_1719() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1718() -> Vec { +fn default_1720() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1719() -> bool { +fn default_1721() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1720() -> String { +fn default_1722() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1721() -> String { +fn default_1723() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1722() -> String { +fn default_1724() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1723() -> bool { +fn default_1725() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1724() -> std::collections::HashMap { +fn default_1726() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1725() -> String { +fn default_1727() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1726() -> String { +fn default_1728() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1727() -> Integer { +fn default_1729() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1728() -> Integer { +fn default_1730() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1729() -> Vec { +fn default_1731() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1730() -> Integer { +fn default_1732() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1731() -> Integer { +fn default_1733() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1732() -> Vec { +fn default_1734() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1733() -> String { +fn default_1735() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1734() -> Integer { +fn default_1736() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1735() -> String { +fn default_1737() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1736() -> Vec { +fn default_1738() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1737() -> Integer { +fn default_1739() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1738() -> Option { +fn default_1740() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1739() -> Vec { +fn default_1741() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1740() -> Integer { +fn default_1742() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1741() -> String { +fn default_1743() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1742() -> String { +fn default_1744() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1743() -> Vec { +fn default_1745() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1744() -> String { +fn default_1746() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1745() -> String { +fn default_1747() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1746() -> String { +fn default_1748() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1747() -> String { +fn default_1749() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1748() -> String { +fn default_1750() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1749() -> Vec { +fn default_1751() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1750() -> String { +fn default_1752() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1751() -> Integer { +fn default_1753() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1752() -> Integer { +fn default_1754() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1753() -> String { +fn default_1755() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1754() -> Integer { +fn default_1756() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1755() -> Integer { +fn default_1757() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1756() -> MemoryProposalReady { +fn default_1758() -> MemoryProposalReady { serde_json::from_str("\"\"").expect("schema default") } -fn default_1757() -> Vec { +fn default_1759() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1758() -> Vec { +fn default_1760() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1759() -> Integer { +fn default_1761() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1760() -> ProposalPolicyMode { +fn default_1762() -> ProposalPolicyMode { serde_json::from_str("\"manual\"").expect("schema default") } -fn default_1761() -> Integer { +fn default_1763() -> Integer { serde_json::from_str("2").expect("schema default") } -fn default_1762() -> Integer { +fn default_1764() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1763() -> Integer { +fn default_1765() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1764() -> ProposalPolicy { +fn default_1766() -> ProposalPolicy { serde_json::from_str( "{\"mode\":\"manual\",\"min_passes\":2,\"max_fails\":0,\"reject_after_fails\":0}", ) .expect("schema default") } -fn default_1765() -> String { - serde_json::from_str("\"\"").expect("schema default") -} -fn default_1766() -> String { - serde_json::from_str("\"\"").expect("schema default") -} fn default_1767() -> String { serde_json::from_str("\"\"").expect("schema default") } @@ -65723,14 +65727,14 @@ fn default_1769() -> String { fn default_1770() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1771() -> bool { - serde_json::from_str("false").expect("schema default") +fn default_1771() -> String { + serde_json::from_str("\"\"").expect("schema default") } fn default_1772() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1773() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_1773() -> bool { + serde_json::from_str("false").expect("schema default") } fn default_1774() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -65753,324 +65757,324 @@ fn default_1779() -> String { fn default_1780() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1781() -> Vec { +fn default_1781() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_1782() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_1783() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1782() -> f64 { +fn default_1784() -> f64 { serde_json::from_str("1.0").expect("schema default") } -fn default_1783() -> String { +fn default_1785() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1784() -> String { +fn default_1786() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1785() -> Vec { +fn default_1787() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1786() -> String { +fn default_1788() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1787() -> String { +fn default_1789() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1788() -> String { +fn default_1790() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1789() -> String { +fn default_1791() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1790() -> bool { +fn default_1792() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1791() -> Integer { +fn default_1793() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1792() -> Integer { +fn default_1794() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1793() -> Integer { +fn default_1795() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1794() -> bool { +fn default_1796() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1795() -> String { +fn default_1797() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1796() -> Integer { +fn default_1798() -> Integer { serde_json::from_str("-1").expect("schema default") } -fn default_1797() -> MemoryRecallOutputOrder { +fn default_1799() -> MemoryRecallOutputOrder { serde_json::from_str("\"recent\"").expect("schema default") } -fn default_1798() -> Vec { +fn default_1800() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1799() -> Integer { +fn default_1801() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1800() -> Value { +fn default_1802() -> Value { serde_json::from_str("null").expect("schema default") } -fn default_1801() -> Value { +fn default_1803() -> Value { serde_json::from_str("null").expect("schema default") } -fn default_1802() -> String { +fn default_1804() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1803() -> String { +fn default_1805() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1804() -> Option { +fn default_1806() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1805() -> Option { +fn default_1807() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1806() -> bool { +fn default_1808() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1807() -> String { +fn default_1809() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1808() -> String { +fn default_1810() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1809() -> std::collections::HashMap { +fn default_1811() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1810() -> std::collections::HashMap { +fn default_1812() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1811() -> MemoryRecordRowStatus { +fn default_1813() -> MemoryRecordRowStatus { serde_json::from_str("\"active\"").expect("schema default") } -fn default_1812() -> Option { +fn default_1814() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1813() -> Option { +fn default_1815() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1814() -> bool { +fn default_1816() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1815() -> String { +fn default_1817() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1816() -> MemoryRecordWriteOutputKeySource { +fn default_1818() -> MemoryRecordWriteOutputKeySource { serde_json::from_str("\"anonymous\"").expect("schema default") } -fn default_1817() -> std::collections::HashMap { +fn default_1819() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1818() -> String { +fn default_1820() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1819() -> Integer { +fn default_1821() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1820() -> bool { +fn default_1822() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1821() -> Option { +fn default_1823() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1822() -> Integer { +fn default_1824() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1823() -> Integer { +fn default_1825() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1824() -> Option { +fn default_1826() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1825() -> String { +fn default_1827() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1826() -> Integer { +fn default_1828() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1827() -> Integer { +fn default_1829() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1828() -> bool { +fn default_1830() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1829() -> Vec { +fn default_1831() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1830() -> Option { +fn default_1832() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1831() -> Option { +fn default_1833() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1832() -> bool { +fn default_1834() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1833() -> bool { +fn default_1835() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1834() -> String { +fn default_1836() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1835() -> f64 { +fn default_1837() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_1836() -> String { +fn default_1838() -> String { serde_json::from_str("\"fact\"").expect("schema default") } -fn default_1837() -> String { +fn default_1839() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1838() -> std::collections::HashMap { +fn default_1840() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1839() -> bool { +fn default_1841() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1840() -> Integer { +fn default_1842() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1841() -> String { +fn default_1843() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1842() -> Vec { +fn default_1844() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1843() -> Vec { +fn default_1845() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1844() -> Integer { +fn default_1846() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1845() -> Integer { +fn default_1847() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1846() -> String { +fn default_1848() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1847() -> String { +fn default_1849() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1848() -> Integer { +fn default_1850() -> Integer { serde_json::from_str("1").expect("schema default") } -fn default_1849() -> Integer { +fn default_1851() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1850() -> Integer { +fn default_1852() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1851() -> Vec { +fn default_1853() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1852() -> Integer { +fn default_1854() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1853() -> Integer { +fn default_1855() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1854() -> Integer { +fn default_1856() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1855() -> Integer { +fn default_1857() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1856() -> Vec { +fn default_1858() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1857() -> String { +fn default_1859() -> String { serde_json::from_str("\"whole\"").expect("schema default") } -fn default_1858() -> Integer { +fn default_1860() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1859() -> Vec { +fn default_1861() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1860() -> Vec { +fn default_1862() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1861() -> Integer { +fn default_1863() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1862() -> Vec { +fn default_1864() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1863() -> Integer { +fn default_1865() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1864() -> Vec { +fn default_1866() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1865() -> Vec { +fn default_1867() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1866() -> bool { +fn default_1868() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1867() -> String { +fn default_1869() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1868() -> String { +fn default_1870() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1869() -> std::collections::HashMap { +fn default_1871() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1870() -> String { +fn default_1872() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1871() -> bool { +fn default_1873() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1872() -> Vec { +fn default_1874() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1873() -> Integer { +fn default_1875() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1874() -> Integer { +fn default_1876() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1875() -> String { +fn default_1877() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1876() -> String { +fn default_1878() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1877() -> String { +fn default_1879() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1878() -> bool { +fn default_1880() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1879() -> Integer { +fn default_1881() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1880() -> Option { +fn default_1882() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1881() -> String { +fn default_1883() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1882() -> String { +fn default_1884() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1883() -> String { +fn default_1885() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1884() -> Vec { +fn default_1886() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1885() -> Integer { - serde_json::from_str("0").expect("schema default") -} -fn default_1886() -> Integer { - serde_json::from_str("0").expect("schema default") -} fn default_1887() -> Integer { serde_json::from_str("0").expect("schema default") } @@ -66083,56 +66087,56 @@ fn default_1889() -> Integer { fn default_1890() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1891() -> bool { +fn default_1891() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_1892() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_1893() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1892() -> Vec> { +fn default_1894() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1893() -> Vec { +fn default_1895() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1894() -> Option { +fn default_1896() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1895() -> String { +fn default_1897() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1896() -> Integer { +fn default_1898() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1897() -> Option { +fn default_1899() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1898() -> Option { +fn default_1900() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1899() -> Option { +fn default_1901() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1900() -> Option { +fn default_1902() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1901() -> Vec { +fn default_1903() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1902() -> Integer { +fn default_1904() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1903() -> String { +fn default_1905() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1904() -> String { - serde_json::from_str("\"\"").expect("schema default") -} -fn default_1905() -> Option { - serde_json::from_str("null").expect("schema default") -} fn default_1906() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1907() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_1907() -> Option { + serde_json::from_str("null").expect("schema default") } fn default_1908() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -66140,23 +66144,23 @@ fn default_1908() -> String { fn default_1909() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1910() -> Option { - serde_json::from_str("null").expect("schema default") +fn default_1910() -> String { + serde_json::from_str("\"\"").expect("schema default") } fn default_1911() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1912() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_1912() -> Option { + serde_json::from_str("null").expect("schema default") } -fn default_1913() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_1913() -> String { + serde_json::from_str("\"\"").expect("schema default") } fn default_1914() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1915() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_1915() -> Integer { + serde_json::from_str("0").expect("schema default") } fn default_1916() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -66167,20 +66171,20 @@ fn default_1917() -> String { fn default_1918() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1919() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_1919() -> String { + serde_json::from_str("\"\"").expect("schema default") } fn default_1920() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1921() -> Vec { - serde_json::from_str("[]").expect("schema default") +fn default_1921() -> Integer { + serde_json::from_str("0").expect("schema default") } fn default_1922() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1923() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_1923() -> Vec { + serde_json::from_str("[]").expect("schema default") } fn default_1924() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -66191,23 +66195,23 @@ fn default_1925() -> Integer { fn default_1926() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1927() -> String { - serde_json::from_str("\"\"").expect("schema default") -} -fn default_1928() -> Integer { +fn default_1927() -> Integer { serde_json::from_str("0").expect("schema default") } +fn default_1928() -> String { + serde_json::from_str("\"\"").expect("schema default") +} fn default_1929() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1930() -> bool { - serde_json::from_str("false").expect("schema default") +fn default_1930() -> Integer { + serde_json::from_str("0").expect("schema default") } fn default_1931() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1932() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_1932() -> bool { + serde_json::from_str("false").expect("schema default") } fn default_1933() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -66215,108 +66219,108 @@ fn default_1933() -> String { fn default_1934() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1935() -> Option { - serde_json::from_str("null").expect("schema default") +fn default_1935() -> String { + serde_json::from_str("\"\"").expect("schema default") } fn default_1936() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_1937() -> Option { + serde_json::from_str("null").expect("schema default") +} +fn default_1938() -> String { serde_json::from_str("\"none\"").expect("schema default") } -fn default_1937() -> Integer { +fn default_1939() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1938() -> String { +fn default_1940() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1939() -> String { +fn default_1941() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1940() -> String { +fn default_1942() -> String { serde_json::from_str("\"active\"").expect("schema default") } -fn default_1941() -> bool { +fn default_1943() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1942() -> Vec { +fn default_1944() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1943() -> std::collections::HashMap { +fn default_1945() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1944() -> String { +fn default_1946() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1945() -> Vec { +fn default_1947() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1946() -> std::collections::HashMap { +fn default_1948() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1947() -> Integer { +fn default_1949() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1948() -> Option { +fn default_1950() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1949() -> String { +fn default_1951() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1950() -> bool { +fn default_1952() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_1951() -> Vec { +fn default_1953() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1952() -> Vec { +fn default_1954() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1953() -> std::collections::HashMap { +fn default_1955() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_1954() -> Option { +fn default_1956() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1955() -> Vec { +fn default_1957() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1956() -> Integer { +fn default_1958() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1957() -> Integer { +fn default_1959() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1958() -> Vec { +fn default_1960() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1959() -> Option { +fn default_1961() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1960() -> Vec { +fn default_1962() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1961() -> Option { +fn default_1963() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1962() -> Option { +fn default_1964() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1963() -> Vec { +fn default_1965() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1964() -> bool { +fn default_1966() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1965() -> Vec { +fn default_1967() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1966() -> bool { +fn default_1968() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_1967() -> Integer { - serde_json::from_str("0").expect("schema default") -} -fn default_1968() -> Integer { - serde_json::from_str("0").expect("schema default") -} fn default_1969() -> Integer { serde_json::from_str("0").expect("schema default") } @@ -66338,14 +66342,14 @@ fn default_1974() -> Integer { fn default_1975() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1976() -> f64 { - serde_json::from_str("0.0").expect("schema default") +fn default_1976() -> Integer { + serde_json::from_str("0").expect("schema default") } fn default_1977() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1978() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_1978() -> f64 { + serde_json::from_str("0.0").expect("schema default") } fn default_1979() -> Integer { serde_json::from_str("0").expect("schema default") @@ -66353,85 +66357,85 @@ fn default_1979() -> Integer { fn default_1980() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1981() -> Option { +fn default_1981() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_1982() -> Integer { + serde_json::from_str("0").expect("schema default") +} +fn default_1983() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1982() -> Option { +fn default_1984() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_1983() -> Vec { +fn default_1985() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1984() -> String { +fn default_1986() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1985() -> String { +fn default_1987() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1986() -> Integer { +fn default_1988() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1987() -> Vec> { +fn default_1989() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_1988() -> Vec { +fn default_1990() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_1989() -> String { +fn default_1991() -> String { serde_json::from_str("\"memory\"").expect("schema default") } -fn default_1990() -> bool { +fn default_1992() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_1991() -> String { +fn default_1993() -> String { serde_json::from_str("\"approval\"").expect("schema default") } -fn default_1992() -> String { +fn default_1994() -> String { serde_json::from_str("\"public\"").expect("schema default") } -fn default_1993() -> BrowseEntryMyStatus { +fn default_1995() -> BrowseEntryMyStatus { serde_json::from_str("\"none\"").expect("schema default") } -fn default_1994() -> String { +fn default_1996() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1995() -> String { +fn default_1997() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1996() -> String { +fn default_1998() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1997() -> Integer { +fn default_1999() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_1998() -> String { +fn default_2000() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_1999() -> Option { - serde_json::from_str("null").expect("schema default") -} -fn default_2000() -> Option { +fn default_2001() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2001() -> Vec { - serde_json::from_str("[]").expect("schema default") -} fn default_2002() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2003() -> Option { - serde_json::from_str("null").expect("schema default") +fn default_2003() -> Vec { + serde_json::from_str("[]").expect("schema default") } fn default_2004() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2005() -> Option> { +fn default_2005() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2006() -> Option { +fn default_2006() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2007() -> Option { +fn default_2007() -> Option> { serde_json::from_str("null").expect("schema default") } fn default_2008() -> Option { @@ -66443,344 +66447,344 @@ fn default_2009() -> Option { fn default_2010() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2011() -> Option { +fn default_2011() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2012() -> Option { +fn default_2012() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2013() -> Option { +fn default_2013() -> Option { serde_json::from_str("null").expect("schema default") } fn default_2014() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2015() -> Option { +fn default_2015() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2016() -> Option { +fn default_2016() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2017() -> Option { +fn default_2017() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2018() -> Option { +fn default_2018() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2019() -> Option { +fn default_2019() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2020() -> Option { +fn default_2020() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2021() -> Option> { +fn default_2021() -> Option { serde_json::from_str("null").expect("schema default") } fn default_2022() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2023() -> Option { +fn default_2023() -> Option> { serde_json::from_str("null").expect("schema default") } fn default_2024() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2025() -> Option { +fn default_2025() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2026() -> Option { +fn default_2026() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2027() -> Option>> { +fn default_2027() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2028() -> Option { +fn default_2028() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2029() -> Option { +fn default_2029() -> Option>> { serde_json::from_str("null").expect("schema default") } -fn default_2030() -> Option { +fn default_2030() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2031() -> Option { +fn default_2031() -> Option { serde_json::from_str("null").expect("schema default") } fn default_2032() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2033() -> Integer { +fn default_2033() -> Option { + serde_json::from_str("null").expect("schema default") +} +fn default_2034() -> Option { + serde_json::from_str("null").expect("schema default") +} +fn default_2035() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2034() -> String { +fn default_2036() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2035() -> String { +fn default_2037() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2036() -> String { +fn default_2038() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2037() -> String { +fn default_2039() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2038() -> Option { +fn default_2040() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2039() -> bool { +fn default_2041() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2040() -> Integer { +fn default_2042() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2041() -> String { +fn default_2043() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2042() -> String { +fn default_2044() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2043() -> String { +fn default_2045() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2044() -> String { +fn default_2046() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2045() -> Option { +fn default_2047() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2046() -> Option { +fn default_2048() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2047() -> String { +fn default_2049() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2048() -> Vec { +fn default_2050() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2049() -> String { +fn default_2051() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2050() -> String { +fn default_2052() -> String { serde_json::from_str("\"active\"").expect("schema default") } -fn default_2051() -> Option { +fn default_2053() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2052() -> Vec { +fn default_2054() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2053() -> Option { +fn default_2055() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2054() -> String { +fn default_2056() -> String { serde_json::from_str("\"memory\"").expect("schema default") } -fn default_2055() -> bool { +fn default_2057() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2056() -> f64 { +fn default_2058() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_2057() -> f64 { +fn default_2059() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_2058() -> String { +fn default_2060() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2059() -> Option { +fn default_2061() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2060() -> Integer { +fn default_2062() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2061() -> Integer { +fn default_2063() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2062() -> NamespaceEntryVisibility { +fn default_2064() -> NamespaceEntryVisibility { serde_json::from_str("\"private\"").expect("schema default") } -fn default_2063() -> String { +fn default_2065() -> String { serde_json::from_str("\"active\"").expect("schema default") } -fn default_2064() -> Option { +fn default_2066() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2065() -> Option { +fn default_2067() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2066() -> Vec { +fn default_2068() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2067() -> MineEntryVisibility { +fn default_2069() -> MineEntryVisibility { serde_json::from_str("\"private\"").expect("schema default") } -fn default_2068() -> String { +fn default_2070() -> String { serde_json::from_str("\"memory\"").expect("schema default") } -fn default_2069() -> String { +fn default_2071() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2070() -> String { +fn default_2072() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2071() -> Option { +fn default_2073() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2072() -> bool { +fn default_2074() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2073() -> bool { +fn default_2075() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2074() -> String { +fn default_2076() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2075() -> NamespaceRegisterOutputVisibility { +fn default_2077() -> NamespaceRegisterOutputVisibility { serde_json::from_str("\"private\"").expect("schema default") } -fn default_2076() -> bool { +fn default_2078() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2077() -> Integer { +fn default_2079() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2078() -> Integer { +fn default_2080() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2079() -> bool { +fn default_2081() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2080() -> Vec> { +fn default_2082() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2081() -> Option { +fn default_2083() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2082() -> Option { +fn default_2084() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2083() -> Vec { +fn default_2085() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2084() -> Integer { +fn default_2086() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2085() -> String { +fn default_2087() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2086() -> String { +fn default_2088() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2087() -> String { +fn default_2089() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2088() -> String { +fn default_2090() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2089() -> String { +fn default_2091() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2090() -> Option { +fn default_2092() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2091() -> String { +fn default_2093() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2092() -> String { +fn default_2094() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2093() -> String { +fn default_2095() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2094() -> Vec { +fn default_2096() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2095() -> Option { +fn default_2097() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2096() -> Option { +fn default_2098() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2097() -> Option { +fn default_2099() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2098() -> Option { +fn default_2100() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2099() -> String { +fn default_2101() -> String { serde_json::from_str("\"{}\"").expect("schema default") } -fn default_2100() -> NamespaceSnapshotOutputSnapshotMemoryRowStatus { +fn default_2102() -> NamespaceSnapshotOutputSnapshotMemoryRowStatus { serde_json::from_str("\"active\"").expect("schema default") } -fn default_2101() -> Option { +fn default_2103() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2102() -> Vec { +fn default_2104() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2103() -> String { +fn default_2105() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2104() -> Integer { +fn default_2106() -> Integer { serde_json::from_str("1").expect("schema default") } -fn default_2105() -> Integer { +fn default_2107() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2106() -> Option { +fn default_2108() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2107() -> String { +fn default_2109() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2108() -> String { +fn default_2110() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2109() -> String { +fn default_2111() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2110() -> String { +fn default_2112() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2111() -> Option { +fn default_2113() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2112() -> f64 { +fn default_2114() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_2113() -> Option { +fn default_2115() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2114() -> Option { +fn default_2116() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2115() -> Integer { +fn default_2117() -> Integer { serde_json::from_str("1").expect("schema default") } -fn default_2116() -> Option { - serde_json::from_str("null").expect("schema default") -} -fn default_2117() -> Option { +fn default_2118() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2118() -> String { - serde_json::from_str("\"\"").expect("schema default") -} fn default_2119() -> Option { serde_json::from_str("null").expect("schema default") } fn default_2120() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2121() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_2121() -> Option { + serde_json::from_str("null").expect("schema default") } fn default_2122() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2123() -> Option { - serde_json::from_str("null").expect("schema default") +fn default_2123() -> String { + serde_json::from_str("\"\"").expect("schema default") } fn default_2124() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -66791,605 +66795,605 @@ fn default_2125() -> Option { fn default_2126() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2127() -> String { +fn default_2127() -> Option { + serde_json::from_str("null").expect("schema default") +} +fn default_2128() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_2129() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2128() -> Vec { +fn default_2130() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2129() -> Vec { +fn default_2131() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2130() -> Option { +fn default_2132() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2131() -> Integer { +fn default_2133() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2132() -> String { +fn default_2134() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2133() -> Vec { +fn default_2135() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2134() -> Vec { +fn default_2136() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2135() -> String { +fn default_2137() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2136() -> Option { +fn default_2138() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2137() -> Vec { +fn default_2139() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2138() -> Integer { +fn default_2140() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2139() -> Vec { +fn default_2141() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2140() -> Option { +fn default_2142() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2141() -> Vec { +fn default_2143() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2142() -> Vec { +fn default_2144() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2143() -> Option { +fn default_2145() -> Option { serde_json::from_str("0").expect("schema default") } -fn default_2144() -> TuneProposalEffect { +fn default_2146() -> TuneProposalEffect { serde_json::from_str("\"future\"").expect("schema default") } -fn default_2145() -> TuneApplyVia { +fn default_2147() -> TuneApplyVia { serde_json::from_str("\"op\"").expect("schema default") } -fn default_2146() -> bool { +fn default_2148() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_2147() -> Vec { +fn default_2149() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2148() -> Option { +fn default_2150() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2149() -> Option { +fn default_2151() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2150() -> String { +fn default_2152() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2151() -> Vec { +fn default_2153() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2152() -> Vec { +fn default_2154() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2153() -> Option { +fn default_2155() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2154() -> Option { +fn default_2156() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2155() -> Option { +fn default_2157() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2156() -> String { +fn default_2158() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2157() -> Option { +fn default_2159() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2158() -> Option { +fn default_2160() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2159() -> Option { +fn default_2161() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2160() -> Vec { +fn default_2162() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2161() -> bool { +fn default_2163() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2162() -> Option { +fn default_2164() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2163() -> Option { +fn default_2165() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2164() -> Vec { +fn default_2166() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2165() -> String { +fn default_2167() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2166() -> String { +fn default_2168() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2167() -> Vec> { +fn default_2169() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2168() -> std::collections::HashMap { +fn default_2170() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2169() -> Vec { +fn default_2171() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2170() -> Integer { +fn default_2172() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2171() -> Integer { +fn default_2173() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2172() -> String { +fn default_2174() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2173() -> String { +fn default_2175() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2174() -> String { +fn default_2176() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2175() -> Vec { +fn default_2177() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2176() -> Vec { +fn default_2178() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2177() -> String { +fn default_2179() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2178() -> String { +fn default_2180() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2179() -> bool { +fn default_2181() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2180() -> Integer { +fn default_2182() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2181() -> String { +fn default_2183() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2182() -> String { +fn default_2184() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2183() -> String { +fn default_2185() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2184() -> String { +fn default_2186() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2185() -> Vec { +fn default_2187() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2186() -> String { +fn default_2188() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2187() -> String { +fn default_2189() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2188() -> std::collections::HashMap { +fn default_2190() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2189() -> String { +fn default_2191() -> String { serde_json::from_str("\"active\"").expect("schema default") } -fn default_2190() -> Option { +fn default_2192() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2191() -> Option { +fn default_2193() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2192() -> bool { +fn default_2194() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2193() -> String { +fn default_2195() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2194() -> String { +fn default_2196() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2195() -> Vec { +fn default_2197() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2196() -> Integer { +fn default_2198() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2197() -> String { +fn default_2199() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2198() -> String { +fn default_2200() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2199() -> Option { +fn default_2201() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2200() -> bool { +fn default_2202() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2201() -> String { +fn default_2203() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2202() -> bool { +fn default_2204() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2203() -> String { +fn default_2205() -> String { serde_json::from_str("\"inherit\"").expect("schema default") } -fn default_2204() -> Option { +fn default_2206() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2205() -> Option { +fn default_2207() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2206() -> bool { +fn default_2208() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2207() -> Vec { +fn default_2209() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2208() -> Integer { +fn default_2210() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2209() -> ProcedureEvolveOutputGate { +fn default_2211() -> ProcedureEvolveOutputGate { serde_json::from_str("\"none\"").expect("schema default") } -fn default_2210() -> String { +fn default_2212() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2211() -> f64 { +fn default_2213() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_2212() -> std::collections::HashMap { +fn default_2214() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2213() -> std::collections::HashMap { +fn default_2215() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2214() -> std::collections::HashMap { +fn default_2216() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2215() -> std::collections::HashMap { +fn default_2217() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2216() -> String { +fn default_2218() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2217() -> Vec { +fn default_2219() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2218() -> Vec { +fn default_2220() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2219() -> Vec { +fn default_2221() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2220() -> std::collections::HashMap { +fn default_2222() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2221() -> Integer { +fn default_2223() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2222() -> bool { +fn default_2224() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2223() -> std::collections::HashMap { +fn default_2225() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2224() -> Vec { +fn default_2226() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2225() -> std::collections::HashMap { +fn default_2227() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2226() -> String { +fn default_2228() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2227() -> ProcedureLocateOutputStatus { +fn default_2229() -> ProcedureLocateOutputStatus { serde_json::from_str("\"authored\"").expect("schema default") } -fn default_2228() -> Option> { +fn default_2230() -> Option> { serde_json::from_str("null").expect("schema default") } -fn default_2229() -> Vec>> { +fn default_2231() -> Vec>> { serde_json::from_str("[]").expect("schema default") } -fn default_2230() -> Vec { +fn default_2232() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2231() -> Vec { +fn default_2233() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2232() -> std::collections::HashMap { +fn default_2234() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2233() -> bool { +fn default_2235() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2234() -> Vec { +fn default_2236() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2235() -> Vec> { +fn default_2237() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2236() -> String { +fn default_2238() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2237() -> std::collections::HashMap { +fn default_2239() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2238() -> std::collections::HashMap { +fn default_2240() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2239() -> Vec { +fn default_2241() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2240() -> std::collections::HashMap { +fn default_2242() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2241() -> Option> { +fn default_2243() -> Option> { serde_json::from_str("null").expect("schema default") } -fn default_2242() -> bool { +fn default_2244() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2243() -> std::collections::HashMap { +fn default_2245() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2244() -> ProcedureMatchStatus { +fn default_2246() -> ProcedureMatchStatus { serde_json::from_str("\"authored\"").expect("schema default") } -fn default_2245() -> Option> { +fn default_2247() -> Option> { serde_json::from_str("null").expect("schema default") } -fn default_2246() -> Vec { +fn default_2248() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2247() -> Integer { +fn default_2249() -> Integer { serde_json::from_str("1").expect("schema default") } -fn default_2248() -> Vec> { +fn default_2250() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2249() -> f64 { +fn default_2251() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_2250() -> f64 { +fn default_2252() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_2251() -> f64 { +fn default_2253() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_2252() -> Option { +fn default_2254() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2253() -> std::collections::HashMap { +fn default_2255() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2254() -> std::collections::HashMap> { +fn default_2256() -> std::collections::HashMap> { serde_json::from_str("{}").expect("schema default") } -fn default_2255() -> String { +fn default_2257() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2256() -> Integer { +fn default_2258() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2257() -> String { +fn default_2259() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2258() -> f64 { +fn default_2260() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_2259() -> Vec { +fn default_2261() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2260() -> Vec { +fn default_2262() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2261() -> Vec { +fn default_2263() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2262() -> String { +fn default_2264() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2263() -> String { +fn default_2265() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2264() -> String { +fn default_2266() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2265() -> String { +fn default_2267() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2266() -> Option { +fn default_2268() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2267() -> Integer { +fn default_2269() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2268() -> Vec { +fn default_2270() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2269() -> std::collections::HashMap { +fn default_2271() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2270() -> Option { +fn default_2272() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2271() -> String { +fn default_2273() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2272() -> Integer { +fn default_2274() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2273() -> String { +fn default_2275() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2274() -> String { +fn default_2276() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2275() -> std::collections::HashMap { +fn default_2277() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2276() -> String { +fn default_2278() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2277() -> String { +fn default_2279() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2278() -> Option { +fn default_2280() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2279() -> RunBeginOutputStatus { +fn default_2281() -> RunBeginOutputStatus { serde_json::from_str("\"active\"").expect("schema default") } -fn default_2280() -> String { +fn default_2282() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2281() -> Integer { +fn default_2283() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2282() -> Integer { +fn default_2284() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2283() -> Integer { +fn default_2285() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2284() -> Vec { +fn default_2286() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2285() -> Integer { +fn default_2287() -> Integer { serde_json::from_str("-1").expect("schema default") } -fn default_2286() -> Integer { +fn default_2288() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2287() -> Integer { +fn default_2289() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2288() -> String { +fn default_2290() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2289() -> String { +fn default_2291() -> String { serde_json::from_str("\"keep\"").expect("schema default") } -fn default_2290() -> Integer { +fn default_2292() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2291() -> Integer { +fn default_2293() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2292() -> Integer { +fn default_2294() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2293() -> Option { +fn default_2295() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2294() -> Integer { +fn default_2296() -> Integer { serde_json::from_str("-1").expect("schema default") } -fn default_2295() -> Vec { +fn default_2297() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2296() -> Vec { +fn default_2298() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2297() -> Integer { +fn default_2299() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2298() -> Integer { +fn default_2300() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2299() -> Integer { +fn default_2301() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2300() -> f64 { +fn default_2302() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_2301() -> Integer { +fn default_2303() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2302() -> Vec { +fn default_2304() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2303() -> Integer { +fn default_2305() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2304() -> Vec { +fn default_2306() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2305() -> Integer { +fn default_2307() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2306() -> Integer { +fn default_2308() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2307() -> Integer { +fn default_2309() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2308() -> Vec { +fn default_2310() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2309() -> Option { +fn default_2311() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2310() -> Option> { +fn default_2312() -> Option> { serde_json::from_str("null").expect("schema default") } -fn default_2311() -> LiveSearchResultsLive { +fn default_2313() -> LiveSearchResultsLive { serde_json::from_str("true").expect("schema default") } -fn default_2312() -> String { +fn default_2314() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2313() -> LiveSearchHitLive { +fn default_2315() -> LiveSearchHitLive { serde_json::from_str("true").expect("schema default") } -fn default_2314() -> Vec { +fn default_2316() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2315() -> Option { +fn default_2317() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2316() -> std::collections::HashMap { +fn default_2318() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2317() -> std::collections::HashMap { +fn default_2319() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2318() -> std::collections::HashMap { +fn default_2320() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2319() -> std::collections::HashMap { +fn default_2321() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2320() -> Option> { +fn default_2322() -> Option> { serde_json::from_str("null").expect("schema default") } -fn default_2321() -> Vec { +fn default_2323() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2322() -> Integer { - serde_json::from_str("0").expect("schema default") -} -fn default_2323() -> String { - serde_json::from_str("\"\"").expect("schema default") -} fn default_2324() -> Integer { serde_json::from_str("0").expect("schema default") } fn default_2325() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2326() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_2326() -> Integer { + serde_json::from_str("0").expect("schema default") } fn default_2327() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -67409,62 +67413,62 @@ fn default_2331() -> String { fn default_2332() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2333() -> Vec { - serde_json::from_str("[]").expect("schema default") +fn default_2333() -> String { + serde_json::from_str("\"\"").expect("schema default") } fn default_2334() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2335() -> String { +fn default_2335() -> Vec { + serde_json::from_str("[]").expect("schema default") +} +fn default_2336() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_2337() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2336() -> Vec { +fn default_2338() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2337() -> String { +fn default_2339() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2338() -> String { +fn default_2340() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2339() -> Vec { +fn default_2341() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2340() -> Vec { +fn default_2342() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2341() -> Vec { +fn default_2343() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2342() -> String { +fn default_2344() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2343() -> String { +fn default_2345() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2344() -> Vec { +fn default_2346() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2345() -> Vec { +fn default_2347() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2346() -> Vec { +fn default_2348() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2347() -> String { - serde_json::from_str("\"\"").expect("schema default") -} -fn default_2348() -> String { +fn default_2349() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2349() -> Option { - serde_json::from_str("null").expect("schema default") -} fn default_2350() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2351() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_2351() -> Option { + serde_json::from_str("null").expect("schema default") } fn default_2352() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -67478,17 +67482,17 @@ fn default_2354() -> String { fn default_2355() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2356() -> Vec { - serde_json::from_str("[]").expect("schema default") +fn default_2356() -> String { + serde_json::from_str("\"\"").expect("schema default") } -fn default_2357() -> Option { - serde_json::from_str("null").expect("schema default") +fn default_2357() -> String { + serde_json::from_str("\"\"").expect("schema default") } -fn default_2358() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_2358() -> Vec { + serde_json::from_str("[]").expect("schema default") } -fn default_2359() -> Integer { - serde_json::from_str("0").expect("schema default") +fn default_2359() -> Option { + serde_json::from_str("null").expect("schema default") } fn default_2360() -> Integer { serde_json::from_str("0").expect("schema default") @@ -67499,14 +67503,14 @@ fn default_2361() -> Integer { fn default_2362() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2363() -> bool { - serde_json::from_str("false").expect("schema default") +fn default_2363() -> Integer { + serde_json::from_str("0").expect("schema default") } -fn default_2364() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_2364() -> Integer { + serde_json::from_str("0").expect("schema default") } -fn default_2365() -> String { - serde_json::from_str("\"\"").expect("schema default") +fn default_2365() -> bool { + serde_json::from_str("false").expect("schema default") } fn default_2366() -> String { serde_json::from_str("\"\"").expect("schema default") @@ -67523,537 +67527,543 @@ fn default_2369() -> String { fn default_2370() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2371() -> Option { +fn default_2371() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_2372() -> String { + serde_json::from_str("\"\"").expect("schema default") +} +fn default_2373() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2372() -> Integer { +fn default_2374() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2373() -> Integer { +fn default_2375() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2374() -> Vec { +fn default_2376() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2375() -> String { +fn default_2377() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2376() -> String { +fn default_2378() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2377() -> String { +fn default_2379() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2378() -> String { +fn default_2380() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2379() -> Integer { +fn default_2381() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2380() -> Integer { +fn default_2382() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2381() -> Integer { +fn default_2383() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2382() -> Integer { +fn default_2384() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2383() -> Integer { +fn default_2385() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2384() -> f64 { +fn default_2386() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_2385() -> Integer { +fn default_2387() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2386() -> Integer { +fn default_2388() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2387() -> Integer { +fn default_2389() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2388() -> String { +fn default_2390() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2389() -> SessionBriefStats { +fn default_2391() -> SessionBriefStats { serde_json::from_str("{\"events_in\":0,\"windows\":0,\"events_total\":0,\"source_chars\":0,\"brief_chars\":0,\"compression_ratio\":0.0,\"dropped_ungrounded\":0,\"tokens_in\":0,\"tokens_out\":0,\"llm_model\":\"\"}").expect("schema default") } -fn default_2390() -> String { +fn default_2392() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2391() -> String { +fn default_2393() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2392() -> Option { +fn default_2394() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2393() -> Option { +fn default_2395() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2394() -> Option { +fn default_2396() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2395() -> Integer { +fn default_2397() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2396() -> std::collections::HashMap { +fn default_2398() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2397() -> String { +fn default_2399() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2398() -> String { +fn default_2400() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2399() -> Option { +fn default_2401() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2400() -> String { +fn default_2402() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2401() -> Integer { +fn default_2403() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2402() -> Integer { +fn default_2404() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2403() -> Option { +fn default_2405() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2404() -> std::collections::HashMap { +fn default_2406() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2405() -> String { +fn default_2407() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2406() -> Integer { +fn default_2408() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2407() -> String { +fn default_2409() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2408() -> Option { +fn default_2410() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2409() -> String { +fn default_2411() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2410() -> Option { +fn default_2412() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2411() -> String { +fn default_2413() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2412() -> String { +fn default_2414() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2413() -> String { +fn default_2415() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2414() -> String { +fn default_2416() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2415() -> Integer { +fn default_2417() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2416() -> Integer { +fn default_2418() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2417() -> String { +fn default_2419() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2418() -> std::collections::HashMap { +fn default_2420() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2419() -> String { +fn default_2421() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2420() -> String { +fn default_2422() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2421() -> bool { +fn default_2423() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2422() -> String { +fn default_2424() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2423() -> std::collections::HashMap { +fn default_2425() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2424() -> Vec> { +fn default_2426() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2425() -> Vec { +fn default_2427() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2426() -> Vec { +fn default_2428() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2427() -> bool { +fn default_2429() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2428() -> String { +fn default_2430() -> String { serde_json::from_str("\"unknown\"").expect("schema default") } -fn default_2429() -> String { +fn default_2431() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2430() -> Vec { +fn default_2432() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2431() -> bool { +fn default_2433() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2432() -> String { +fn default_2434() -> String { serde_json::from_str("\"none\"").expect("schema default") } -fn default_2433() -> bool { +fn default_2435() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2434() -> Vec { +fn default_2436() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2435() -> std::collections::HashMap { +fn default_2437() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2436() -> Vec> { +fn default_2438() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2437() -> bool { +fn default_2439() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2438() -> bool { +fn default_2440() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2439() -> Vec> { +fn default_2441() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2440() -> std::collections::HashMap { +fn default_2442() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2441() -> String { +fn default_2443() -> String { serde_json::from_str("\"none\"").expect("schema default") } -fn default_2442() -> Vec> { +fn default_2444() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2443() -> bool { +fn default_2445() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2444() -> String { +fn default_2446() -> String { serde_json::from_str("\"calibrated\"").expect("schema default") } -fn default_2445() -> std::collections::HashMap { +fn default_2447() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2446() -> std::collections::HashMap { +fn default_2448() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2447() -> String { +fn default_2449() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2448() -> std::collections::HashMap { +fn default_2450() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2449() -> std::collections::HashMap { +fn default_2451() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2450() -> std::collections::HashMap { +fn default_2452() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2451() -> String { +fn default_2453() -> String { serde_json::from_str("\"ok\"").expect("schema default") } -fn default_2452() -> String { +fn default_2454() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2453() -> String { +fn default_2455() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2454() -> bool { +fn default_2456() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2455() -> Integer { +fn default_2457() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2456() -> String { +fn default_2458() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2457() -> String { +fn default_2459() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2458() -> Vec { +fn default_2460() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2459() -> bool { +fn default_2461() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2460() -> Vec { +fn default_2462() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2461() -> std::collections::HashMap> { +fn default_2463() -> std::collections::HashMap> { serde_json::from_str("{}").expect("schema default") } -fn default_2462() -> Vec> { +fn default_2464() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2463() -> Vec> { +fn default_2465() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2464() -> String { +fn default_2466() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2465() -> Vec> { +fn default_2467() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2466() -> std::collections::HashMap { +fn default_2468() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2467() -> String { +fn default_2469() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2468() -> Vec> { +fn default_2470() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2469() -> bool { +fn default_2471() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2470() -> Integer { +fn default_2472() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2471() -> Vec> { +fn default_2473() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2472() -> String { +fn default_2474() -> String { serde_json::from_str("\"no_flaky_signal\"").expect("schema default") } -fn default_2473() -> bool { +fn default_2475() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2474() -> Option> { +fn default_2476() -> Option> { serde_json::from_str("null").expect("schema default") } -fn default_2475() -> Vec { +fn default_2477() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2476() -> bool { +fn default_2478() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2477() -> std::collections::HashMap { +fn default_2479() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2478() -> String { +fn default_2480() -> String { serde_json::from_str("\"not_computed\"").expect("schema default") } -fn default_2479() -> Vec> { +fn default_2481() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2480() -> String { +fn default_2482() -> String { serde_json::from_str("\"candidate\"").expect("schema default") } -fn default_2481() -> std::collections::HashMap { +fn default_2483() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2482() -> String { +fn default_2484() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2483() -> bool { +fn default_2485() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2484() -> Integer { +fn default_2486() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2485() -> std::collections::HashMap { +fn default_2487() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2486() -> bool { +fn default_2488() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2487() -> Vec> { +fn default_2489() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2488() -> std::collections::HashMap { +fn default_2490() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2489() -> std::collections::HashMap { +fn default_2491() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2490() -> String { +fn default_2492() -> String { serde_json::from_str("\"lower_bound\"").expect("schema default") } -fn default_2491() -> bool { +fn default_2493() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2492() -> Vec { +fn default_2494() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2493() -> Vec> { +fn default_2495() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2494() -> std::collections::HashMap { +fn default_2496() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2495() -> Vec { +fn default_2497() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2496() -> String { +fn default_2498() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2497() -> bool { +fn default_2499() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2498() -> bool { +fn default_2500() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_2499() -> std::collections::HashMap { +fn default_2501() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2500() -> String { +fn default_2502() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2501() -> bool { +fn default_2503() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_2502() -> std::collections::HashMap { +fn default_2504() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2503() -> std::collections::HashMap { +fn default_2505() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2504() -> Vec> { +fn default_2506() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2505() -> Vec { +fn default_2507() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2506() -> std::collections::HashMap { +fn default_2508() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2507() -> Vec> { +fn default_2509() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2508() -> bool { +fn default_2510() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_2509() -> bool { +fn default_2511() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2510() -> Vec { +fn default_2512() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2511() -> std::collections::HashMap { +fn default_2513() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2512() -> String { +fn default_2514() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2513() -> std::collections::HashMap { +fn default_2515() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2514() -> bool { +fn default_2516() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2515() -> bool { +fn default_2517() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_2516() -> String { +fn default_2518() -> String { serde_json::from_str("\"no_signal\"").expect("schema default") } -fn default_2517() -> Vec { +fn default_2519() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2518() -> f64 { +fn default_2520() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_2519() -> Integer { +fn default_2521() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2520() -> String { +fn default_2522() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2521() -> std::collections::HashMap { +fn default_2523() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2522() -> std::collections::HashMap { +fn default_2524() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2523() -> std::collections::HashMap { +fn default_2525() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2524() -> std::collections::HashMap { +fn default_2526() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2525() -> String { +fn default_2527() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2526() -> std::collections::HashMap { +fn default_2528() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2527() -> bool { +fn default_2529() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2528() -> std::collections::HashMap { +fn default_2530() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2529() -> std::collections::HashMap { +fn default_2531() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2530() -> std::collections::HashMap { +fn default_2532() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2531() -> std::collections::HashMap { +fn default_2533() -> std::collections::HashMap { serde_json::from_str("{}").expect("schema default") } -fn default_2532() -> String { +fn default_2534() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2533() -> Vec> { +fn default_2535() -> Vec> { serde_json::from_str("[]").expect("schema default") } -fn default_2534() -> Integer { +fn default_2536() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2535() -> String { +fn default_2537() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2536() -> bool { +fn default_2538() -> bool { serde_json::from_str("true").expect("schema default") } -fn default_2537() -> String { +fn default_2539() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2538() -> Vec { +fn default_2540() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2539() -> bool { +fn default_2541() -> bool { serde_json::from_str("false").expect("schema default") } -fn default_2540() -> Vec { +fn default_2542() -> Vec { serde_json::from_str("[]").expect("schema default") } -fn default_2541() -> f64 { +fn default_2543() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_2542() -> String { +fn default_2544() -> String { serde_json::from_str("\"\"").expect("schema default") } -fn default_2543() -> Integer { +fn default_2545() -> Integer { serde_json::from_str("4096").expect("schema default") } -fn default_2544() -> Integer { +fn default_2546() -> Integer { serde_json::from_str("0").expect("schema default") } -fn default_2545() -> Option { +fn default_2547() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2546() -> f64 { +fn default_2548() -> f64 { serde_json::from_str("0.0").expect("schema default") } -fn default_2547() -> Option { +fn default_2549() -> Option { serde_json::from_str("null").expect("schema default") } -fn default_2548() -> Vec { +fn default_2550() -> Vec { serde_json::from_str("[]").expect("schema default") } diff --git a/sdk/rust/tests/models.rs b/sdk/rust/tests/models.rs index e526ce29f1f..ed928d8ec2c 100644 --- a/sdk/rust/tests/models.rs +++ b/sdk/rust/tests/models.rs @@ -52,6 +52,7 @@ fn omitted_response_fields_keep_wire_defaults() { assert_eq!(hit.created_at, ""); assert_eq!(hit.code_state, ""); assert_eq!(hit.code_changed_since, ""); + assert_eq!(hit.code_rev, ""); assert!(hit.code_moved.is_empty()); assert!(!hit.body_truncated); assert_eq!(hit.next, ""); @@ -204,7 +205,7 @@ fn search_preserves_chunk_parent_attribution_and_decision_signals() { "valid_at": "valid", "via_path": ["alice", "bob"], "entities": ["bob"], "user_id": "owner", "status": "superseded", "superseded_by": "successor", "superseded_at": "retired", "created_at": "created", "code_state": "changed", - "code_changed_since": "c0ffee", + "code_changed_since": "c0ffee", "code_rev": "ba5e", "code_moved": [{ "code_namespace": "code-a", "path": "src/reader.py", "symbol": "reader::load_rows", "start_line": 12, "end_line": 40, @@ -251,6 +252,7 @@ fn search_preserves_chunk_parent_attribution_and_decision_signals() { assert_eq!(hit.created_at, "created"); assert_eq!(hit.code_state, "changed"); assert_eq!(hit.code_changed_since, "c0ffee"); + assert_eq!(hit.code_rev, "ba5e"); assert_eq!(hit.code_moved.len(), 1); assert_eq!(hit.code_moved[0].symbol, "reader::load_rows"); assert_eq!(hit.code_moved[0].was_symbol, "reader::fetch_rows"); diff --git a/sdk/rust/tests/registry_contracts.rs b/sdk/rust/tests/registry_contracts.rs index 2ee376ec891..f319369e4b0 100644 --- a/sdk/rust/tests/registry_contracts.rs +++ b/sdk/rust/tests/registry_contracts.rs @@ -551,6 +551,11 @@ fn memory_search() { serde_json::from_str("{\"results\":[],\"embedding_model\":\"sample\"}").unwrap(); let encoded = serde_json::to_value(value).unwrap(); assert!(encoded.is_object()); + assert_eq!( + encoded["code_note"], + serde_json::from_str::("\"\"").unwrap(), + "memory.search:code_note" + ); assert_eq!( encoded["reader_block"], serde_json::from_str::("\"\"").unwrap(), diff --git a/sdk/typescript/src/generated/ops.ts b/sdk/typescript/src/generated/ops.ts index 547c9b0fa5a..41901ca9ddc 100644 --- a/sdk/typescript/src/generated/ops.ts +++ b/sdk/typescript/src/generated/ops.ts @@ -5172,8 +5172,9 @@ export interface MemorySearchHit { version?: number; created_at?: string; namespace?: string; - code_state?: "fresh" | "moved" | "changed" | "unresolved" | "missing" | ""; + code_state?: "fresh" | "moved" | "changed" | "unresolved" | "missing" | "unlinked" | ""; code_changed_since?: string; + code_rev?: string; code_moved?: CodeLink[]; body_truncated?: boolean; next?: string; @@ -7230,6 +7231,7 @@ export interface MemorySearchInput { export interface MemorySearchOutput { results: MemorySearchHit[]; + code_note?: string; reader_block?: string; reader_instructions?: string; bodies_returned?: number; diff --git a/server/code/api/models_common.py b/server/code/api/models_common.py index 301ab988807..c7da6633e18 100644 --- a/server/code/api/models_common.py +++ b/server/code/api/models_common.py @@ -70,10 +70,16 @@ def _drop_empty(self, handler: SerializerFunctionWrapHandler) -> dict[str, Any]: # The memories about the answer's top files, best first, capped at # `code_result_lessons_tokens`; each row {path, memory_key, namespace, excerpt, - # code_state}, with `changed_since`, `code_moved` and `supersedes_key` when they apply. + # code_state}, with `rev`, `first_written`, `changed_since`, `code_moved` and + # `supersedes_key` when set. # `code_state` is the worst state of the row's links to code in the file: `fresh`, # `moved`, or `changed`, `unresolved` or `missing` when that code differs from what the - # memory was written against; '' for a row that names the file only. `changed_since` is + # memory was written against; `unlinked` for a row with no link whose text names a + # file by its path, which the read has no comparison for; '' for a row that names the + # file only in `files`. `rev` is the first 12 characters of the commit that link was + # anchored at, `first_written` the day a row with a code state was first written, + # which a later write of its text does not move. `code_state` and `rev` describe + # the repository as indexed, not the caller's checkout. `changed_since` is # the commit that put its code in a `changed`, `unresolved` or `missing` state, when # known; `code_moved` lists its links to code in the file that is now at another path # or symbol than the memory was written against, each a code link's non-empty fields: diff --git a/server/code/api/models_outcome.py b/server/code/api/models_outcome.py index f668fc25c6f..17b3c20ce57 100644 --- a/server/code/api/models_outcome.py +++ b/server/code/api/models_outcome.py @@ -49,6 +49,10 @@ # A denial whose per-session budget spend could not be written (the counts file # cannot be kept), let through rather than deny every such call "budget_unrecorded", + # A Bash command of several parts, never refused: a refusal withholds every part + "compound_command", + # The index did not answer the lookup in full, so there was nothing to refuse with + "index_unanswered", } ) diff --git a/server/code/api/models_symbol.py b/server/code/api/models_symbol.py index 122376a4722..7ebd2d8333e 100644 --- a/server/code/api/models_symbol.py +++ b/server/code/api/models_symbol.py @@ -103,9 +103,11 @@ class CodeSymbolInput(_CodeIdentity): # `lesson_namespaces` (over MCP the caller's memory home by default) and the # repository's team namespace, each with its `code_state` (`fresh`, `moved`, or # `changed` when this branch's body differs from the one the memory was written - # against) and, when the memory was written against another path or symbol than the - # definition has now, `code_moved`: where it is (`path`, `symbol`, `start_line`, - # `end_line`) and what the memory's text still calls it (`was_path`, `was_symbol`). + # against), `rev` (the first 12 characters of the commit its link was anchored at), + # `first_written` (the day it was first written) and, when the memory was written + # against another path or symbol than the definition has now, `code_moved`: where it + # is (`path`, `symbol`, `start_line`, `end_line`) and what the memory's text still + # calls it (`was_path`, `was_symbol`). # `lessons_unread: true` when the read, or one matched member's, failed or ran # past its bound; the lessons then served may be incomplete. include_lessons: bool = True diff --git a/server/code/api/ops.py b/server/code/api/ops.py index ecffef6db5a..00e33a516ac 100644 --- a/server/code/api/ops.py +++ b/server/code/api/ops.py @@ -416,6 +416,7 @@ Operation( name="code.outline", maturity="experimental", + session_content=True, input_model=CodeOutlineInput, output_model=CodeOutlineOutput, handler=result_lessons.WithLessons(handle_code_outline, result_lessons.outline_paths), diff --git a/server/code/app/grep_source.py b/server/code/app/grep_source.py index 56acd1fb004..ab988188c10 100644 --- a/server/code/app/grep_source.py +++ b/server/code/app/grep_source.py @@ -28,9 +28,8 @@ ContextSource = dict[str, dict[str, str | None]] CompleteContexts = frozenset[tuple[str, int]] GREP_MATCH_TEXT_CHARS = 300 -# Signature and docstring lines one page adds beyond its match windows: four -# definitions at the docstring cap, about eight of typical size. -GREP_HEADER_PAGE_LINES = 48 +# A page budgets four docstrings at the excerpt cap for its added header lines. +GREP_HEADER_PAGE_LINES = 4 * DOCSTRING_MAX_LINES # A shorter run of docstring lines is shown: its mark and the window it splits cost more. _DOCSTRING_CUT_MIN_LINES = 3 diff --git a/server/code/app/index/review_brief.py b/server/code/app/index/review_brief.py index 6b86603e490..c9a439ba569 100644 --- a/server/code/app/index/review_brief.py +++ b/server/code/app/index/review_brief.py @@ -62,6 +62,7 @@ from typing import Any from server.code.domain.anchor import bare_name, mentions +from server.memory.domain import code_change logger = logging.getLogger(__name__) @@ -665,7 +666,8 @@ def rationale_section( (0 is unlimited). The verdict reads every row: check | unknown | clear | none (no row has anything to check). It is `clear` or `none` only when every changed path and every matching row was checked; otherwise `unknown`, each flag and count naming its cause - (the causes are listed under `rationale` in docs/features/code-index/history-and-prs.md).""" + (the causes are listed under `rationale` in docs/features/code-index/history-and-prs.md). + `note` says what a served row's code state was compared with (`code_change.compared`).""" added, malformed = added_text(diff) if diff is not None else (None, False) malformed = malformed and not diff_cut # a cut diff ends inside a hunk anyway unsure = added is None or diff_cut or malformed @@ -707,7 +709,14 @@ def rationale_section( if budget_tokens and estimate_tokens([*kept, r]) > budget_tokens: break kept.append(r) - out = section(SERVED, verdict=verdict, epistemic="lower_bound", causes=causes, rows=kept) + out = section( + SERVED, + verdict=verdict, + epistemic="lower_bound", + causes=causes, + rows=kept, + note=code_change.compared(r["code_state"] for r in kept), + ) out["rows_total"] = len(rows) out["truncated"] = len(kept) < len(rows) return out diff --git a/server/code/domain/definition_header.py b/server/code/domain/definition_header.py index 1711b078735..fb512de97f7 100644 --- a/server/code/domain/definition_header.py +++ b/server/code/domain/definition_header.py @@ -9,7 +9,7 @@ PYTHON_SUFFIXES = (".py", ".pyi") # Lines read from a definition's first line to find the end of its docstring. DEFINITION_HEADER_SCAN_LINES = 80 -# Docstring lines an excerpt shows; a longer docstring keeps its first and last lines. +# not a setting: The grep header page budget is derived from this excerpt size. DOCSTRING_MAX_LINES = 12 _DOCSTRING_TAIL_LINES = 3 _LAYOUT = frozenset({tokenize.NL, tokenize.COMMENT, tokenize.INDENT, tokenize.DEDENT}) diff --git a/server/code/domain/facets.py b/server/code/domain/facets.py index ee8ca7d41ab..518ab942e70 100644 --- a/server/code/domain/facets.py +++ b/server/code/domain/facets.py @@ -10,6 +10,7 @@ from __future__ import annotations import re +from collections.abc import Iterator # A path-ish token: at least one "/" separating segments, ending in a # recognized source/config extension, with an optional ":" suffix. @@ -113,6 +114,12 @@ def has_code_signal(text: str) -> bool: ) +def file_paths(text: str) -> Iterator[str]: + """The tokens of `text` that are a path with a directory and a known extension, the + line suffix dropped: the first pattern `extract_code_facets` reads, alone.""" + return (m.group(1) for m in _FILE_PATH_RE.finditer(text)) + + def _strip_line_suffix(path: str) -> str: """Drop a trailing ':' / '::' from a file path so the stored facet is the path itself (line-agnostic), matching how a diff --git a/server/memory/api/models_for_file.py b/server/memory/api/models_for_file.py index 7dbf080f756..7207742282c 100644 --- a/server/memory/api/models_for_file.py +++ b/server/memory/api/models_for_file.py @@ -97,9 +97,11 @@ class _MemoryForFileHit(BaseModel): # The row's attestation (`memory.verify`), as on memory.get; an attested row whose value # was cut and has no stored hash reads stale. verification: VerificationState = "none" - # The worst state of the row's links to code in the file ('' when it only names the - # file in `files`): `fresh`, `moved`, `changed` (that code changed since the row was - # written), `unresolved` (renamed or removed and not followed) or `missing` (gone). + # The worst state of the row's links to code in the file, compared with the + # repository's indexed head: `fresh`, `moved`, `changed` (that code changed since the + # row was written), `unresolved` (renamed or removed and not followed) or `missing` + # (gone). '' when it holds no such link; `rendered` marks its line `unlinked` when + # its text names a file by its path. code_state: CodeState | Literal[""] = "" # The row's links to code in the file that are now at another path or symbol than it # was written against, each with where the code is and what the row's text still calls @@ -117,7 +119,10 @@ class MemoryForFileOutput(BaseModel): # placed above it (two typed decisions keep their order). hits: list[_MemoryForFileHit] # Prompt-ready block: decisions and constraints whole, the other rows cut at token_budget. - # Empty when total == 0. + # A row that names code says on its line its code state, the commit its link was + # anchored at and the day it was first written, and one sentence after the header says + # what was compared: no code for an unlinked row, the repository as indexed for the + # others, never the caller's checkout. Empty when total == 0. rendered: str = "" # Size of `rendered` at 4 chars per token; 0 when it is empty. tokens_estimate: int = 0 diff --git a/server/memory/api/models_search.py b/server/memory/api/models_search.py index 588f21147dd..f6708aae4b7 100644 --- a/server/memory/api/models_search.py +++ b/server/memory/api/models_search.py @@ -3,7 +3,7 @@ from __future__ import annotations from datetime import datetime -from typing import Any, Literal +from typing import Any, Literal, Self from pydantic import ( BaseModel, @@ -11,11 +11,12 @@ SerializerFunctionWrapHandler, field_serializer, model_serializer, + model_validator, ) from server.memory.api.models_common import MemoryType, _Identity from server.memory.api.models_crud import CodeLink -from server.memory.domain.code_change import CodeState +from server.memory.domain.code_change import CodeState, compared from server.memory.domain.rerank_names import RerankName from server.memory.domain.search_types import ChunkRef from server.operations.base import MCP_HIDDEN @@ -643,13 +644,18 @@ def _omit_unrequested(self, handler: SerializerFunctionWrapHandler) -> dict[str, # arrival-order recency in memory.ask reads it. created_at: str = "" namespace: str = "" # source namespace; populated on cross-namespace search - # The hit's worst link to code ('' when it names no indexed code): `fresh`, `moved`, - # `changed` (that code changed since the memory was written: check it), `unresolved` - # (renamed or removed, and not followed: check it) or `missing`. - code_state: CodeState | Literal[""] = "" + # The hit's worst link to code, compared with the repository's indexed head: `fresh`, + # `moved`, `changed` (that code changed since the memory was written: check it), + # `unresolved` (renamed or removed, and not followed: check it) or `missing`. + # `unlinked` for a hit that shows no link and whose text names a file by its path: + # the search has no comparison with code for it. '' when it names none. + code_state: CodeState | Literal["unlinked", ""] = "" # The commit that put `code_state` at `changed`, `unresolved` or `missing`; '' for any # other state, and when no commit is known. code_changed_since: str = "" + # The commit the hit's worst link was anchored at: the repository's indexed head when + # the memory was linked or last re-anchored. '' for a hit that holds no link. + code_rev: str = "" # The hit's links that are now at another path or symbol than the memory was written # against, each with where the code is (`path`, `symbol`, `start_line`, `end_line`) and # what the text still calls it (`was_path`, `was_symbol`); empty for nearly every hit. @@ -702,10 +708,19 @@ def _omit_unset_disclosures(self, handler: SerializerFunctionWrapHandler) -> dic data.pop("reinforcement", None) return data + @model_validator(mode="after") + def _say_what_was_compared(self) -> Self: + self.code_note = compared(hit.code_state for hit in self.results) + return self + # The settled input this search ran (None for a parked page); private, never on the wire. _settled_input: MemorySearchInput | None = None # The ranked hits, best first; empty when nothing passed the noise floor. results: list[_MemorySearchHit] + # What the search compared, of the `results` this output was built with: no code + # for an `unlinked` hit, and for any other `code_state` the repository as indexed, + # not the caller's checkout. '' when no hit names code. + code_note: str = "" # render="reader" only: the results as one prompt block ("[date] [key] # (type) excerpt", ordered as memory.ask would read them) and the # synthesizer's instructions, so an external reader scores what the ask diff --git a/server/memory/app/ask/reader_render.py b/server/memory/app/ask/reader_render.py index e2bb12e32d6..444cfc54bc8 100644 --- a/server/memory/app/ask/reader_render.py +++ b/server/memory/app/ask/reader_render.py @@ -62,9 +62,11 @@ def render_reader_block(hits: list[Any], question: str = "", *, label_namespace: """One paragraph per hit: `[date] [memory_key] (type) excerpt`, in the order `memory.ask` would read them for this question (chronological for temporal questions, rank order otherwise). A hit from `label_namespace` - names it beside its type: `(decision, code-acme)`. A hit whose linked code - changed, was not found again or went says so before its excerpt, and one whose - code is now at another name or path says where (`code_change.note`).""" + names it beside its type: `(decision, code-acme)`. A hit that names code says + before its excerpt which state its code is in, the commit its link was anchored + at and the day it was written, and one whose code is now at another name or path + says where (`code_change.hit_note`). The block then opens with what was compared + (`code_change.compared`).""" if not hits: return "" from server.memory.app.ask.rendering import evidence_order @@ -81,13 +83,10 @@ def render_reader_block(hits: list[Any], question: str = "", *, label_namespace: if label_namespace and _get(h, "namespace") == label_namespace: mtype = f"{mtype}, {label_namespace}" text = str(_get(h, "content_excerpt") or "")[:_EXCERPT_CHARS] - code = code_change.note( - str(_get(h, "code_state") or ""), - str(_get(h, "code_changed_since") or ""), - _get(h, "code_moved") or [], - ) + code = code_change.hit_note(h) parts.append(f"[{_date_of(h)}] [{key}] ({mtype}){code} {text}{_restatement_note(h, keys)}") - return "\n\n".join(parts) + compared = code_change.compared(str(_get(h, "code_state") or "") for h in ordered) + return "\n\n".join([compared, *parts] if compared else parts) def _restatement_note(h: Any, keys_in_block: set[str]) -> str: diff --git a/server/memory/app/code_link_reads.py b/server/memory/app/code_link_reads.py index f6310e05678..a4efcd6fab1 100644 --- a/server/memory/app/code_link_reads.py +++ b/server/memory/app/code_link_reads.py @@ -17,6 +17,7 @@ from server.code.domain.index.repos import configured_repos from server.memory.api.models_crud import CodeLink from server.memory.domain import code_change +from server.memory.domain.files import names_file from server.memory.store import code_links as store from server.memory.store.code_links import LinkRow from server.settings import settings @@ -293,18 +294,34 @@ async def _annotation_reads( return _heads_of(input.org, idents, links, heads), seen, policies +def unlinked(hit: Any) -> bool: + """The hit was read from a memory's own row, shows no link state and its text names a + file (`files.names_file`): the read has no comparison with code to show for + it. A link it holds is pending or in a repository the caller may not read.""" + if getattr(hit, "code_state", "") or getattr(hit, "_row_identity", None) is None: + return False + row = getattr(hit, "row", None) # a listed row (the startup recall), not a search hit + text = getattr(hit, "content_excerpt", None) if row is None else row.value + return names_file(str(text or "")) + + async def annotate_hits(input: Any, hits: list[Any]) -> None: """Set each search hit's `code_state` to its worst link in a repository the caller - may read, `code_changed_since` to the commit of that state - (`code_change.worst_commit`) and `code_moved` to those of the links now at another - path or symbol than the memory was written against (`relocated`; the links - themselves on `_code_links`), mark for a lower rank (`_code_ranked_down`) the hits - whose code changed or went, and drop, in place, the hits about code that is gone - (`code_change.hidden`).""" + may read (`unlinked` for one that names a file and shows none, `unlinked`), + `code_changed_since` to the commit of that state (`code_change.worst_commit`), + `code_rev` to the commit that link was anchored at (`code_change.anchored_commit`) + and `code_moved` to those of the links now at another path or symbol than the + memory was written against (`relocated`; the links themselves on `_code_links`), + mark for a lower rank (`_code_ranked_down`) the hits whose code changed or went, + and drop, in place, the hits about code that is gone (`code_change.hidden`). When + the links cannot be read a hit gets the `unlinked` label alone, which needs no link.""" try: memories, seen, policies = await _annotation_reads(input, hits) except Exception as e: # noqa: BLE001 — the links are additive to the read log.debug("code links unavailable: %s", e) + for h in hits: + if unlinked(h): + h.code_state = code_change.UNLINKED return kept = [] for h, m in zip(hits, memories, strict=True): @@ -321,6 +338,7 @@ async def annotate_hits(input: Any, hits: list[Any]) -> None: h._code_links = shown h.code_state = code_change.worst([a["state"] for a in shown]) h.code_changed_since = code_change.worst_commit(shown) + h.code_rev = code_change.anchored_commit(shown) h.code_moved = relocated(shown) # the served window moves it down after the verdict (`code_change.rank_down`) h._code_ranked_down = bool( @@ -329,6 +347,8 @@ async def annotate_hits(input: Any, hits: list[Any]) -> None: and h.code_state in code_change.DEMOTED and not code_change.held(m) ) + if unlinked(h): + h.code_state = code_change.UNLINKED kept.append(h) hits[:] = kept diff --git a/server/memory/app/code_plane_reads.py b/server/memory/app/code_plane_reads.py index 9fb6ae38e3d..b6b75f622f4 100644 --- a/server/memory/app/code_plane_reads.py +++ b/server/memory/app/code_plane_reads.py @@ -77,9 +77,10 @@ async def lessons_for_symbol( fresh_at_commit: str = "", ) -> list[dict[str, Any]]: """The served memories of `namespaces` linked to this symbol, current ones first, - each with the state of the symbol's code on the branch read, and `code_moved` when - the read found that code at another path or symbol than the memory was written - against (`_moved_here`). + each with the state of the symbol's code on the branch read, `rev` (the first 12 + characters of the commit its link was anchored at), `first_written` (the day it was + first written) and `code_moved` when the read found that code at another path or + symbol than the memory was written against (`_moved_here`). `fresh_at_commit` restricts the answer to lessons confirmed fresh at that revision. Otherwise an unreadable branch uses trunk's state.""" from server.code.app import memory_links as code @@ -145,6 +146,8 @@ async def lessons_for_symbol( "namespace": str(row["namespace"]), "excerpt": str(row["excerpt"]), "code_state": state, + "rev": str(a.get("anchored_commit") or "")[:12], + "first_written": str(row.get("created_at") or "")[:10], "changed_since": a["changed_since"] if state == "changed" else "", "suggestion": suggestion, } @@ -224,8 +227,8 @@ async def decisions_for_paths( served and the rest left out. The rows `first` admits rank ahead, then constraints, then pinned rows, then by confidence. Each is a `memory.for_file` hit with its `memory_id`, `code_state` the worst over its links on every path, - `code_changed_since` the commit of that state, `code_moved` its relocated links on - every path, `line` (the + `code_changed_since` the commit of that state, `code_rev` the commit the link in that + state was anchored at, `code_moved` its relocated links on every path, `line` (the pre-edit block's line, the value cut) and `text` (the value as that read holds it: cut at its ceiling when `value_truncated`). Each path's read keeps its top PER_PATH_ROWS rows. `refused`, and nothing read, when the caller may not read @@ -262,6 +265,7 @@ async def decisions_for_paths( if worst([row["code_state"], hit["code_state"]]) != row["code_state"]: row["code_state"] = hit["code_state"] row["code_changed_since"] = hit.get("code_changed_since", "") + row["code_rev"] = hit.get("code_rev", "") if row is not hit: row["code_moved"] = [*row.get("code_moved", []), *hit.get("code_moved", [])] found = [r | {"line": listing_line(r), "text": value_text(r)} for r in rows.values()] diff --git a/server/memory/app/context_pack.py b/server/memory/app/context_pack.py index 010f98e8138..cf70e7c54ca 100644 --- a/server/memory/app/context_pack.py +++ b/server/memory/app/context_pack.py @@ -438,7 +438,11 @@ def _vtext(v: Any) -> str: ), conflict=(r.status == "conflicted"), author=author_label([getattr(r, "actor", "")]), - code_state=code_change.label(*_code_state_and_commit(h)), + code_state=_code_label(h), + code_rev=str(getattr(h, "code_rev", "") or ""), + # the row's first write: a pin, a lock or a write of the text moves + # `updated_at`, never this + code_first_written=r.created_at.isoformat() if r.created_at else "", ) for h in hits for r in [h.row] @@ -516,6 +520,13 @@ async def _hit_actors(input: ContextPackInput, hits: list[Any]) -> _KeyWriters: return {} +def _code_label(hit: Any) -> str: + """The hit's code state as a line's label: `@` when a commit put it + there (`code_change.label`), the state alone otherwise; '' when it names no code.""" + state, commit = _code_state_and_commit(hit) + return code_change.label(state, commit) or state + + def _code_state_and_commit(hit: Any) -> tuple[str, str]: """The hit's `code_state` and `code_changed_since`.""" return ( @@ -572,9 +583,7 @@ async def _pack_decisions_from_hits( made = str(rec.get("made_at") or "")[:10] author = _hit_author(actors, input, h) line = f"- [{label_part(f'{ns}/{h.memory_key}')}{author}]" - line += (f" {made}" if made else "") + code_change.note( - *_code_state_and_commit(h), getattr(h, "code_moved", None) or [] - ) + line += (f" {made}" if made else "") + code_change.hit_note(h) line += f" {scenario}" if outcome: line += f" → {rec['stage']}: {outcome}" @@ -586,6 +595,8 @@ async def _pack_decisions_from_hits( line += f"; realized: {realized}{verdict}" lines.append(one_item(line)) citations.append(f"decision:{ns}/{h.memory_key}") + if compared := code_change.compared(_code_state_and_commit(h)[0] for h in decision_hits): + lines.insert(0, compared) st.put( "decisions", "\n".join(lines), @@ -691,7 +702,9 @@ async def _pack_memories(st: _PackState) -> None: conflict=getattr(h, "status", "") == "conflicted", author=_hit_author(actors, input, h), derived_from=tuple(getattr(h, "derived_from", None) or ()), - code_state=code_change.label(*_code_state_and_commit(h)), + code_state=_code_label(h), + code_rev=str(getattr(h, "code_rev", "") or ""), + code_written=str(getattr(h, "created_at", "") or ""), ) ) packed = pack_evidence( diff --git a/server/memory/app/for_file.py b/server/memory/app/for_file.py index cb2c49dbddc..6c1ccfab834 100644 --- a/server/memory/app/for_file.py +++ b/server/memory/app/for_file.py @@ -29,6 +29,7 @@ is_decision, is_whole_row, ) +from server.memory.domain.files import names_file from server.memory.domain.memory_types import KEY_IDENTIFIED_TYPES from server.memory.domain.trust import row_verification from server.memory.store.sql import FILE_LISTING_VISIBLE @@ -71,6 +72,7 @@ memory_key, memory_type, if({{full_values:UInt8}}, value, substring(value, 1, {_READ_BYTES})) AS value, tags, confidence, pinned, CAST(status AS String) AS status_text, agent, updated_at, actor, + created_at, memory_id, conflict_with, source_resource_id, verified_by, verified_sha256, content_sha256, if({{include_source_links:UInt8}}, files, []) AS source_files, @@ -192,7 +194,10 @@ def _body(hit: dict[str, Any], *, decision: bool, whole: bool = True) -> str: def _status_notes(hit: dict[str, Any], *, decision: bool) -> str: """`(pinned)` for a pinned row, `(source changed)` for a decision tagged `source-changed`, `(outcome: failed)` for a decision whose recorded outcome failed, - and a note when its linked code changed or went, or is now at another name or path. + and, for a row with a code state, that state with the commit its link was anchored + at and the day the row was first written (`first_written` of `code_change.lead`; a + pin, a lock or a write of the text moves `updated_at`, never that day), then a note + when its linked code changed or went, or is now at another name or path. An extracted decision nobody pinned is the normal case and carries no pin mark.""" tags = hit.get("tags") or [] out = " (pinned)" if hit.get("pinned") else "" @@ -201,6 +206,9 @@ def _status_notes(hit: dict[str, Any], *, decision: bool) -> str: if decision and FAILURE_TAG in tags: out += " (outcome: failed)" state, commit = str(hit.get("code_state") or ""), str(hit.get("code_changed_since") or "") + first = hit.get("created_at") + day = first.isoformat() if isinstance(first, datetime) else "" + out += code_change.lead(state, str(hit.get("code_rev") or ""), first_written=day) return out + code_change.note(state, commit, hit.get("code_moved") or []) @@ -296,18 +304,30 @@ def listing_line(hit: dict[str, Any]) -> str: return _row_line(hit, naive_utc_now(), str(hit.get("namespace") or ""), whole=False) +def _compared_chars(states: set[str]) -> int: + """The characters what was compared takes in a block whose rows are in `states` + (`code_change.compared`), its newline included; 0 when none of them names code.""" + said = code_change.compared(states) + return len(said) + 1 if said else 0 + + def _ceiling_hides(hits: list[dict[str, Any]], rows: list[str], whole_chars: int) -> bool: """Whether a decision or constraint left out at the ceiling supersedes older rows, with - every other row kept: then the block has a "… more" line for those.""" + every other row kept: then the block has a "… more" line for those. Each one is + charged as `render_block` charges it: its line and what the sentence on what was + compared grows by after the rows printed above it.""" used = 0 + said: set[str] = set() # the code states of the rows printed so far for h, row in zip(hits, rows, strict=True): - if not _is_whole(h): - continue - if h.get("value_truncated") or used + len(row) + 1 > whole_chars: - if h.get("supersedes_ids"): - return True - continue - used += len(row) + 1 + state = str(h.get("code_state") or "") + if _is_whole(h): + cost = len(row) + 1 + _compared_chars(said | {state}) - _compared_chars(said) + if h.get("value_truncated") or used + cost > whole_chars: + if h.get("supersedes_ids"): + return True + continue + used += cost + said.add(state) return False @@ -330,10 +350,12 @@ def render_block( removal footer always print, and the "… more" line whenever a row is counted on it, so a budget smaller than those can be exceeded. `home` is the caller's namespace; a row from any other is a team row (rule or decision), rendered with its author and age, and - the block ends with how to remove one.""" + the block ends with how to remove one. When a printed row names code, what was + compared (`code_change.compared`) follows the header; the row that first needs it, or + needs more of it, pays for it from its own budget or ceiling.""" if not hits: return "", 0, False - now = now or naive_utc_now() + now, printed = now or naive_utc_now(), [] if shown is None else shown budget_chars = token_budget * CHARS_PER_TOKEN whole_chars = settings.memory_for_file_whole_tokens * CHARS_PER_TOKEN n = len(hits) @@ -343,23 +365,29 @@ def render_block( used = len(lines[0]) + (len(footer) + 1 if footer else 0) rows = [_row_line(h, now, home) for h in hits] budgeted = [not _is_whole(h) for h in hits] - # No "… more" line can appear when every budgeted row fits and no decision or constraint - # left out at the ceiling takes older rows with it, so then nothing is reserved for one. - fits = used + sum(len(r) + 1 for r, b in zip(rows, budgeted, strict=True) if b) <= budget_chars - fits = fits and not _ceiling_hides(hits, rows, whole_chars) - left_out = 0 - whole_used = 0 + states = [str(h.get("code_state") or "") for h in hits] + # No "… more" line can appear when every budgeted row fits, with the sentence they need, + # and no decision or constraint left out at the ceiling takes older rows with it, so + # then nothing is reserved for one. + all_budgeted = _compared_chars({s for s, b in zip(states, budgeted, strict=True) if b}) + all_budgeted += sum(len(r) + 1 for r, b in zip(rows, budgeted, strict=True) if b) + fits = used + all_budgeted <= budget_chars and not _ceiling_hides(hits, rows, whole_chars) + left_out = whole_used = 0 whole_left: list[dict[str, Any]] = [] hidden: set[str] = set() # memory_ids of rows whose superseder was left out + said: set[str] = set() # the code states of the rows printed for i, (h, row) in enumerate(zip(hits, rows, strict=True)): + # What the sentence grows by when this row prints: nothing once a row before it + # has paid for the same words. + cost = len(row) + 1 + _compared_chars(said | {states[i]}) - _compared_chars(said) if budgeted[i]: # Keep room for a "… more" line counting every row that may still be left out. most = left_out + n - i - 1 tail = 0 if fits else len(_more_line(path, most)) + 1 - keep = used + len(row) + 1 + tail <= budget_chars + keep = used + cost + tail <= budget_chars else: # A value cut at the read is far longer than the ceiling: it cannot print whole. - keep = not h.get("value_truncated") and whole_used + len(row) + 1 <= whole_chars + keep = not h.get("value_truncated") and whole_used + cost <= whole_chars if str(h.get("memory_id")) in hidden: # An older row goes with its superseder, counted on the "… more" line and never # named as one to read. @@ -375,19 +403,17 @@ def render_block( hidden.update(h.get("supersedes_ids") or []) continue lines.append(row) - if shown is not None: - shown.append(h) + printed.append(h) # `shown` when given: the rows the block prints + said.add(states[i]) if budgeted[i]: - used += len(row) + 1 + used += cost else: - whole_used += len(row) + 1 - if left_out: - lines.append(_more_line(path, left_out)) - if whole_left: - lines.append(_whole_left_out_line(whole_left, home)) - if footer: - lines.append(footer) - text = "\n".join(lines) + whole_used += cost + if compared := code_change.compared(said): + lines.insert(1, compared) + more = [_more_line(path, left_out)] if left_out else [] + named = [_whole_left_out_line(whole_left, home)] if whole_left else [] + text = "\n".join([*lines, *more, *named, *([footer] if footer else [])]) truncated = bool(left_out or whole_left) return text, (len(text) + CHARS_PER_TOKEN - 1) // CHARS_PER_TOKEN, truncated @@ -536,6 +562,7 @@ async def _rows_for( "namespace": namespace, "code_state": code_change.worst([a["state"] for a in links]), "code_changed_since": code_change.worst_commit(links), + "code_rev": code_change.anchored_commit(links), "links": links, "source_links": source_links, } @@ -755,16 +782,29 @@ def _located_names(links: list[LinkRow]) -> list[str]: def _with_ids(hit: _MemoryForFileHit, row: dict[str, Any]) -> dict[str, Any]: """The hit with the row fields a reader needs that are not on the wire: `memory_id` and - `supersedes_ids` (to leave a superseded row out with its superseder) and + `supersedes_ids` (to leave a superseded row out with its superseder), `code_changed_since` (the commit that put its worst link in a changed, unresolved or - missing state).""" + missing state), `code_rev` (the commit that link was anchored at) and `created_at` + (when the row was first written).""" return hit.model_dump() | { "memory_id": str(row.get("memory_id") or ""), "supersedes_ids": row.get("supersedes_ids") or [], "code_changed_since": row.get("code_changed_since", ""), + "code_rev": row.get("code_rev", ""), + "created_at": row.get("created_at"), } +def _as_printed(row: dict[str, Any]) -> dict[str, Any]: + """The row as the block prints it: `unlinked` when it shows no link to code in the + file and its text names a file by its path (`files.names_file`), so the read + has no comparison to show for what it says of that code. A rule that names the file + only in `files` prints as it is.""" + if row.get("code_state") or not names_file(value_text(row)): + return row + return row | {"code_state": code_change.UNLINKED} + + async def handle_memory_for_file(input: MemoryForFileInput) -> MemoryForFileOutput: path = repo_relative(input.path) base = path.rsplit("/", 1)[-1] @@ -775,7 +815,7 @@ async def handle_memory_for_file(input: MemoryForFileInput) -> MemoryForFileOutp for r in rows: hit = _hit(r, input) hits.append(hit) - to_render.append(_with_ids(hit, r)) + to_render.append(_as_printed(_with_ids(hit, r))) shown: list[dict[str, Any]] = [] rendered, tokens, truncated = render_block( diff --git a/server/memory/app/loom_search/fanout.py b/server/memory/app/loom_search/fanout.py index 0f84b0aa3c1..2f5d50255b0 100644 --- a/server/memory/app/loom_search/fanout.py +++ b/server/memory/app/loom_search/fanout.py @@ -465,6 +465,7 @@ async def search_sections( payload["conversations"] = {**conv_dump, "results": conv_hits} payload = answer_first(payload, namespace, explain=explain, moved=moved) + _note_code_of_served(payload["memory"]) if settled is not None: # The block is rendered from the rows left after trimming, through their models: # the dumps hide the score_components the restatement notes read. The @@ -476,6 +477,14 @@ async def search_sections( return payload +def _note_code_of_served(memory: dict[str, Any]) -> None: + """Set the memory section's `code_note` from the rows left after trimming: the + search's own is of every row it served. A failed leg's section has none.""" + if "code_note" in memory: + states = (str(h.get("code_state") or "") for h in memory["results"]) + memory["code_note"] = code_change.compared(states) + + def _leg_error(leg: str, e: Exception) -> str: """A failed leg's error as the payload shows it: a Loom error leads with its code (`EMBED_TIMEOUT: ...`), so an agent can tell what to do. Any other diff --git a/server/memory/app/loom_search/repo_decisions.py b/server/memory/app/loom_search/repo_decisions.py index 84567bcfdd8..bf42827e0cd 100644 --- a/server/memory/app/loom_search/repo_decisions.py +++ b/server/memory/app/loom_search/repo_decisions.py @@ -187,6 +187,7 @@ async def stopped() -> None: apply_explain_default(added, home) update: dict[str, Any] = { "results": hits, + "code_note": code_change.compared(h.code_state for h in hits), "candidates_total": base.candidates_total + len(added), "namespaces_searched": list(dict.fromkeys([*base.namespaces_searched, repo_namespace])), } diff --git a/server/memory/app/path_lessons.py b/server/memory/app/path_lessons.py index f945b94564d..2d87ab85038 100644 --- a/server/memory/app/path_lessons.py +++ b/server/memory/app/path_lessons.py @@ -20,6 +20,7 @@ import time from collections import defaultdict from collections.abc import Sequence +from datetime import datetime from typing import Any, NamedTuple from server.code.domain.anchor import local_name @@ -29,6 +30,7 @@ from server.memory.app.for_file import CHARS_PER_TOKEN, listing_rows, value_text from server.memory.domain import code_change from server.memory.domain.decision_schema import CONSTRAINT_TAG, is_whole_row +from server.memory.domain.files import names_file from server.memory.domain.lemmatize import snowball_stem_tokens from server.memory.domain.recall import query_tokens from server.memory.store import code_links @@ -69,13 +71,20 @@ def _lesson(hit: dict[str, Any], path: str) -> dict[str, Any] | None: excerpt = _excerpt(hit) if excerpt is None: return None + state = str(hit.get("code_state") or "") + if not state and names_file(excerpt): + state = code_change.UNLINKED # it says where code is, with no comparison to show lesson: dict[str, Any] = { "path": path, "memory_key": str(hit["memory_key"]), "namespace": str(hit["namespace"]), "excerpt": excerpt, - "code_state": str(hit.get("code_state") or ""), + "code_state": state, } + if hit.get("code_rev"): + lesson["rev"] = str(hit["code_rev"])[:12] + if state and isinstance(first := hit.get("created_at"), datetime): + lesson["first_written"] = first.date().isoformat() if hit.get("code_changed_since"): lesson["changed_since"] = str(hit["code_changed_since"]) if hit.get("code_moved"): @@ -282,7 +291,10 @@ async def lessons_for_paths( `supersedes_key`, and `memory.for_file` shows them. Each row: `path`, `memory_key`, `namespace`, `excerpt`, `code_state`: the worst state of its links to code in the file (`fresh`, `moved`, or `changed`, `unresolved` or `missing` when that code differs from - what the memory was written against), '' for a row that names the file only; + what the memory was written against), `unlinked` for a row with no link whose text + names a file by its path, '' for one that names the file only in `files`; `rev`, the + first 12 characters of the commit that link was anchored at, for a linked row; + `first_written`, the day a row with a code state was first written; `changed_since`, the commit that put its code in a `changed`, `unresolved` or `missing` state, when one is known; `code_moved`, its links to code in the file that is now at another path or symbol than the row was written against, when there are any; and @@ -381,13 +393,21 @@ def _source_lesson( | { "code_state": code_change.worst([link["state"] for link in matching]), "code_changed_since": code_change.worst_commit(matching), + "code_rev": code_change.anchored_commit(matching), "code_moved": [link.model_dump() for link in relocated(matching)], }, path, ) if hit.get("pinned") or is_whole_row(hit.get("memory_type", ""), hit.get("tags") or []): return _lesson( - hit | {"code_state": "unresolved", "code_changed_since": "", "code_moved": []}, path + hit + | { + "code_state": "unresolved", + "code_changed_since": "", + "code_rev": "", + "code_moved": [], + }, + path, ) return None diff --git a/server/memory/app/search_pages.py b/server/memory/app/search_pages.py index cb0dac6f0a1..b5717a02ca7 100644 --- a/server/memory/app/search_pages.py +++ b/server/memory/app/search_pages.py @@ -20,6 +20,8 @@ "namespaces_searched": [...], "namespaces_skipped": [...], "hits": [...]}` where `hits` is the tail in rank order, each a `_MemorySearchHit` dump, and the namespace lists are the first call's, so every page says what it covers. +A hit is stored without its `unlinked` label, which is not a link state: the +page that serves it labels it again (`unparked`). """ from __future__ import annotations @@ -31,6 +33,7 @@ from server.core import pg from server.core.datetimes import naive_utc_now +from server.memory.domain.code_change import UNLINKED from server.memory.domain.search_types import RowKey, hit_row_key from server.settings import settings @@ -63,10 +66,13 @@ def split_tail(pool: list[Any], final: list[Any]) -> tuple[int, list[Any]]: def _parked(hit: Any) -> dict[str, Any]: """A hit as a page stores it, with what a later page's checks read, off the wire: the row's identity, which tells a shared definition, and under the Postgres authority what - its check reads (`row_chunk`, `row_version`, `chunk_typed`).""" + its check reads (`row_chunk`, `row_version`, `chunk_typed`). `code_state` holds a + link state or none: a build that serves the page may not know another value.""" if not hasattr(hit, "model_dump"): return dict(hit) out: dict[str, Any] = hit.model_dump() + if out["code_state"] == UNLINKED: + out["code_state"] = "" if getattr(hit, "_row_identity", None) is not None: out["row_identity"] = list(hit._row_identity) if not pg.enabled(): @@ -81,9 +87,11 @@ def _parked(hit: Any) -> dict[str, Any]: def unparked(row: dict[str, Any]) -> _MemorySearchHit | None: - """A parked row back as a hit, with what `_parked` kept off the wire; None for a row - this build cannot read.""" + """A parked row back as a hit, with what `_parked` kept off the wire and labelled + `unlinked` as a search labels one (`code_link_reads.unlinked`); None for a row this + build cannot read.""" from server.memory.api.models_search import _MemorySearchHit + from server.memory.app.code_link_reads import unlinked r = dict(row) identity, chunk = r.pop("row_identity", None), r.pop("row_chunk", None) @@ -99,6 +107,8 @@ def unparked(row: dict[str, Any]) -> _MemorySearchHit | None: hit._row_chunk = tuple(chunk) hit._row_version = row_version hit._chunk_typed = chunk_typed + if unlinked(hit): + hit.code_state = UNLINKED return hit diff --git a/server/memory/domain/code_change.py b/server/memory/domain/code_change.py index 8405d1065ae..453d0f08aad 100644 --- a/server/memory/domain/code_change.py +++ b/server/memory/domain/code_change.py @@ -20,12 +20,21 @@ A link that sits at another name or path than the memory was written against is named on the reads that serve its links (`relocation`, `note`): the text still says the old name. + +A read says of every memory that names code which state it is in, the indexed commit +its link was anchored at and a day (`lead`), which a pin, a lock or a label does not +move: `first_written`, the memory's first write, on a read of its row (`memory.for_file`, +a lesson, the startup recall), and `written`, the write of the text served, on a search +hit. One that names a file and shows no link is `unlinked`, a label a read gives and no +store holds: the read has no comparison with code to show for it. A reply that serves a +memory with a state says once what was compared (`compared`): the repository as Loom +indexed it, never the caller's checkout. """ from __future__ import annotations import math -from collections.abc import Mapping, Sequence +from collections.abc import Iterable, Mapping, Sequence from types import SimpleNamespace from typing import Any, Literal, get_args @@ -38,6 +47,11 @@ STATE_RANK: dict[str, int] = {s: i for i, s in enumerate(get_args(CodeState))} # the states of a link that is at a definition or file: its path, name and lines are current LOCATED: tuple[str, ...] = ("fresh", "moved", "changed") +# what a read shows for a memory that names a file and shows no link: no link state +UNLINKED: Literal["unlinked"] = "unlinked" +# what a reply says once of the memories it serves: of an unlinked one, and of a linked one +NOT_COMPARED = "Loom shows no code comparison for memories marked unlinked" +INDEXED = "code_state and rev describe the repository as indexed, not your checkout" CodeChangePolicy = Literal["retire_removed", "flag", "revise"] POLICIES: tuple[CodeChangePolicy, ...] = get_args(CodeChangePolicy) @@ -139,17 +153,81 @@ def label(state: str, commit: str = "") -> str: return f"{state}@{commit[:12]}" if commit else state +def written_on(written: str = "", first_written: str = "") -> str: + """` written=` for the day the text a read serves was written (a search hit's), + ` first_written=` for the day of a memory's first write (a read of its row, + which a later write of the text does not move); '' when the read knows neither.""" + if written: + return f" written={written[:10]}" + return f" first_written={first_written[:10]}" if first_written else "" + + +def lead(state: str, rev: str = "", written: str = "", *, first_written: str = "") -> str: + """` (code_state= rev= written=)` ahead of a line's `note` for a + memory that names code: its state, the indexed commit its worst link was anchored at + (`anchored_commit`) when it holds one, and the day the read knows (`written_on`): + never an `updated_at`, which an unpin, a lock or a restore stamps. '' for a memory + that names no code.""" + if not state: + return "" + at = f" rev={rev[:12]}" if rev else "" + return f" (code_state={state}{at}{written_on(written, first_written)})" + + +def _read(hit: Any, name: str) -> Any: + return hit.get(name) if isinstance(hit, Mapping) else getattr(hit, name, None) + + +def hit_note(hit: Any) -> str: + """`lead` and `note` for a search hit (the model or its dump); the day is its search + document's (`created_at`), printed as `written`: the first write of a memory whose + text was not written again or restored, the last of those writes otherwise.""" + state, written = str(_read(hit, "code_state") or ""), str(_read(hit, "created_at") or "") + return lead(state, str(_read(hit, "code_rev") or ""), written) + note( + state, str(_read(hit, "code_changed_since") or ""), _read(hit, "code_moved") or [] + ) + + +def compared(states: Iterable[str]) -> str: + """What a reply says once of the memories it serves, from their states: that it shows + no comparison with code for an `unlinked` one (`NOT_COMPARED`), and that a link's + state and commit are of the repository as Loom indexed it, which no read compares + with the caller's checkout (`INDEXED`). '' when no memory it serves names code.""" + seen = set(states) + said = [NOT_COMPARED] if UNLINKED in seen else [] + if not seen.isdisjoint(STATE_RANK): + said.append(INDEXED) + return "; ".join(said) + "." if said else "" + + +def _worst_link(links: Sequence[Mapping[str, Any]]) -> Mapping[str, Any] | None: + """Of a memory's links in its worst state, the first by path and name.""" + state = worst([str(a.get("state") or "") for a in links]) + at = [a for a in links if state and a.get("state") == state] + return min( + at, + key=lambda a: (str(a.get("path") or ""), str(a.get("qualified_name") or "")), + default=None, + ) + + def worst_commit(links: Sequence[Mapping[str, Any]]) -> str: """The commit that put a memory in its worst state, when that state is one a read notes: of its links in that state, the first by path and name.""" - state = worst([str(a.get("state") or "") for a in links]) - if state not in DEMOTED: + first = _worst_link(links) + if first is None or first.get("state") not in DEMOTED: return "" - at = [a for a in links if a.get("state") == state] - first = min(at, key=lambda a: (str(a.get("path") or ""), str(a.get("qualified_name") or ""))) return str(first.get("changed_since") or "") +def anchored_commit(links: Sequence[Mapping[str, Any]]) -> str: + """The commit a memory's worst link was anchored at: the repository's indexed head + when the link was made or last re-anchored; of its links in that state, the first + by path and name. '' for a memory with no served link.""" + first = _worst_link(links) + return str(first.get("anchored_commit") or "") if first else "" + + # rows placed by something other than their score, which a move leaves where they are _PLACED = ("identifier_match", *TIER_COMPONENTS) diff --git a/server/memory/domain/evidence_pack.py b/server/memory/domain/evidence_pack.py index 845d540b08e..71d00a8c9ac 100644 --- a/server/memory/domain/evidence_pack.py +++ b/server/memory/domain/evidence_pack.py @@ -9,6 +9,7 @@ from dataclasses import dataclass, field +from server.memory.domain import code_change from server.memory.domain.context_layout import label_part, one_item @@ -26,10 +27,18 @@ class EvidenceItem: author: str = "" # The keys a digest compressed, so a summary says what it derives from. derived_from: tuple[str, ...] = () - # `@` (the state alone when no commit is known) when the memory's - # linked code changed, was not found again or went (` code_state=…` on the line); - # "" otherwise. + # The state of a memory that names code (` code_state=…` on the line), as + # `@` when a commit put it there (`code_change.label`); "" for one + # that names none. code_state: str = "" + # The commit its worst link was anchored at (` rev=…` on the line); "" with no link. + code_rev: str = "" + # When the text served of a memory that names code was written, for a search hit + # (` written=` on the line). + code_written: str = "" + # When a memory that names code was first written, for an item read from its row + # (` first_written=` on the line). + code_first_written: str = "" @dataclass(frozen=True) @@ -57,6 +66,11 @@ def _derived(item: EvidenceItem) -> str: return f" derived_from={','.join(label_part(k) for k in keys[:3])}{more}" +def _state(item: EvidenceItem) -> str: + """The item's code state without the commit `code_change.label` adds.""" + return item.code_state.partition("@")[0] + + def pack_evidence( items: list[EvidenceItem], *, @@ -69,6 +83,8 @@ def pack_evidence( `max_per_group` items before filling the remaining budget. This prevents one verbose transcript or document from crowding out other evidence planes. Order stays relevance-descending; the event date rides each line as a label. + When a line it renders is of a memory that names code the list opens with what + was compared (`code_change.compared`), inside the budget. """ if char_budget <= 0 or not items: @@ -101,21 +117,29 @@ def pack_evidence( citations: list[str] = [] groups: list[str] = [] truncated = False + served: list[str] = [] for item in ordered: group = item.group or item.source or "fact" marker = " conflict=true" if item.conflict else "" date = f" date={item.temporal_anchor[:10]}" if item.temporal_anchor else "" code = f" code_state={item.code_state}" if item.code_state else "" + code += f" rev={item.code_rev[:12]}" if item.code_rev else "" + if code: + code += code_change.written_on(item.code_written, item.code_first_written) labels = f"source={item.source}{item.author}{_derived(item)}{date}{marker}{code}" line = one_item(f"- [{label_part(item.citation)} {labels}] {item.text}") - tentative = "\n".join([*lines, line]) - if len(tentative) > char_budget: + # the line fits with the sentence the list then opens with + said = code_change.compared([*served, _state(item)]) + if len("\n".join([*lines, line])) + (len(said) + 1 if said else 0) > char_budget: truncated = True break lines.append(line) + served.append(_state(item)) citations.append(item.citation) if group not in groups: groups.append(group) + if compared := code_change.compared(served): + lines.insert(0, compared) rendered, trim_truncated = _trim("\n".join(lines), char_budget) return PackedEvidence( diff --git a/server/memory/domain/files.py b/server/memory/domain/files.py index 21b76f460fa..e5646edcd4c 100644 --- a/server/memory/domain/files.py +++ b/server/memory/domain/files.py @@ -14,7 +14,7 @@ from collections.abc import Iterable from typing import Any -from server.code.domain.facets import extract_code_facets +from server.code.domain.facets import extract_code_facets, file_paths from server.core.relative_paths import without_dot_slashes MAX_FILES = 32 @@ -78,6 +78,16 @@ def detect_value_files(text: str) -> list[str]: return normalize_files(f for f in files if f.lower() not in _LIBRARY_NAMES) +def names_file(text: str) -> bool: + """`text` names a file by a path with a directory, as `detect_value_files` finds one: + a bare `notes.txt` may be anything, `src/reader.py` is a repository's. The path + pattern alone, and only for a text with a slash: a read asks it of every row it serves.""" + if "/" not in text: + return False + paths = file_paths(_URL_RE.sub(" ", text)) + return any("/" in without_dot_slashes(path) for path in paths) + + def files_for_set( explicit: list[str] | None, value: Any, serialized: str, existing: Any ) -> list[str]: diff --git a/server/memory/store/code_plane_reads.py b/server/memory/store/code_plane_reads.py index 238b247c6f7..d9b34da763e 100644 --- a/server/memory/store/code_plane_reads.py +++ b/server/memory/store/code_plane_reads.py @@ -24,10 +24,11 @@ async def served_excerpts( """The best `limit` served rows of `namespaces` among `memories` (live, unexpired, not `high`), each read by its identity, the table's sort key, and kept only while that identity still holds its memory_id; with the complete value as text (a JSON - string value decoded), for a code read's lessons. Best is a memory not in `changed` - (its code still matches), then pinned, then the most confident: a file with many - linked memories reads no more excerpts than the answer serves. Each slice of - `memories` keeps its own `limit`, so the caller ranks and cuts again.""" + string value decoded) and when it was first written, for a code read's lessons. Best + is a memory not in `changed` (its code still matches), then pinned, then the most + confident: a file with many linked memories reads no more excerpts than the answer + serves. Each slice of `memories` keeps its own `limit`, so the caller ranks and cuts + again.""" if not memories or not namespaces: return [] return await query_all_sliced( @@ -35,7 +36,7 @@ async def served_excerpts( """ SELECT toString(memory_id) AS mid, memory_key, namespace, if(startsWith(value, '"'), JSONExtractString(value), value) AS excerpt, - pinned, confidence + pinned, confidence, created_at FROM loom.memory FINAL WHERE org = {org:String} AND namespace IN {nss:Array(String)} AND (namespace, agent, user_id, session_id, memory_key, memory_id) diff --git a/server/operations/reach_manifest.py b/server/operations/reach_manifest.py index b69190c5d4e..50dacadb675 100644 --- a/server/operations/reach_manifest.py +++ b/server/operations/reach_manifest.py @@ -107,7 +107,10 @@ "sdk_method", "plugin_hook", ), - "code.outline": ("sdk_method",), + "code.outline": ( + "sdk_method", + "plugin_hook", + ), "code.path_guards": ("sdk_method",), "code.pr_check": ("sdk_method",), "code.read": ("sdk_method",), diff --git a/server/transport/lean_results.py b/server/transport/lean_results.py index b226a32561e..7a97a815abc 100644 --- a/server/transport/lean_results.py +++ b/server/transport/lean_results.py @@ -393,7 +393,8 @@ def lean_search_result( """`lean_result` for `loom_search`: the structured memory hits drop `similarity` (rank_score carries the order), `status` (always active on a served row), `source_class`, `version` (a write receipt, not a read), - `created_at` when the row carries a `valid_at` or `temporal_anchor`, and + `created_at` when the row carries a `valid_at` or `temporal_anchor` and no + `code_state` (the day a memory that names code was written), and `namespace` when it is the caller's home namespace; the memory section drops its zero counters. `explain=true` adds a `why` per hit to that shape when `why` is given.""" @@ -415,7 +416,7 @@ def lean_search_result( continue for k in SEARCH_HIT_DROP: h.pop(k, None) - if h.get("valid_at") or h.get("temporal_anchor"): + if (h.get("valid_at") or h.get("temporal_anchor")) and not h.get("code_state"): h.pop("created_at", None) if home_ns and str(h.get("namespace") or "") == home_ns: h.pop("namespace", None) diff --git a/server/transport/mcp_tools.py b/server/transport/mcp_tools.py index b90b2ae0fb9..cbf8a563e2b 100644 --- a/server/transport/mcp_tools.py +++ b/server/transport/mcp_tools.py @@ -821,7 +821,8 @@ def _memory_section_lines( 200-char lines, level with memory.ask at a fifth of the latency. The reading rule rides once, ahead of the block. Without a block (a later page) the agent reads the plain hit lines, which carry the block line's - note for stale and moved code (`code_change.note`). + note for a hit that names code (`code_change.hit_note`), under the block's + sentence on what was compared. """ block = str(memory.get("reader_block") or "").strip() out: list[str] = [] @@ -851,12 +852,12 @@ def _memory_section_lines( out.extend(f" [{k}] why: {w}" for k, w in whys) return out out.append("\nMemory hits:") + if compared := code_change.compared(h.get("code_state") or "" for h in mem_hits[:top_k]): + out.append(compared) for h in mem_hits[:top_k]: excerpt = (h.get("content_excerpt") or "").replace("\n", " ").strip() ns_label = h.get("namespace") or "-" - code = code_change.note( - h.get("code_state") or "", h.get("code_changed_since") or "", h.get("code_moved") or [] - ) + code = code_change.hit_note(h) why = why_note(h) if explain else (h.get("explanation") or "").replace("\n", " ").strip() out.append( f" - [{h.get('memory_key')}] (ns={ns_label}){code} {excerpt[:200]}" diff --git a/tests/analyzer/shapes.txt b/tests/analyzer/shapes.txt index 55d0532b277..0e1d3ced2f5 100644 --- a/tests/analyzer/shapes.txt +++ b/tests/analyzer/shapes.txt @@ -573,7 +573,6 @@ 4241145d08fa SELECT callee_name, disposition, count() AS n FROM loom.code_call_sites_unresolved FINAL WHERE org = {org:String} AND namespace = {ns:String} AND callee_name IN {names:Array(String)} AND tombstoned_at 424eb9b98496 ALTER TABLE loom.knowledge_ingestions DELETE WHERE (org = {org:String} AND namespace IN {ns:Array(String)}) AND ({erasure_mutation_tag:String} = {erasure_mutation_tag:String}) SETTINGS mutations_sync 425e85d1e2ab SELECT org, namespace, agent, user_id, session_id, run_id, goal, user_request, expected_outcome, environment, model, consumer, status, started_at, completed_at, duration_ms, final_response, confidence -4262da811353 SELECT memory_key, memory_type, if({full_values:UInt8}, value, substring(value, ?, if((memory_type = ? OR hasAny(tags, [?, ?])), {whole_bytes:UInt32}, ?))) AS value, tags, confidence, pinned, CAST(sta 426ca1677676 SELECT DISTINCT candidate_id FROM loom.learnings_queue WHERE org = {org:String} AND source_kind = ? AND proposed_value != ? AND candidate_id NOT IN (SELECT candidate_id FROM loom.learnings_supporters 42714bf1b036 SELECT scope_path AS path, summary, pagerank, cosineDistance(embedding, {q:Array(Float32)}) AS distance FROM loom.code_summaries FINAL WHERE org = {org:String} AND namespace = {ns:String} AND embeddin 429f25bee1e2 SELECT count() AS n FROM loom.search_misses WHERE org = {org:String} AND namespace = {ns:String} AND ? @@ -794,6 +793,7 @@ 59cfa551438a ALTER TABLE loom.learnings_supporters DELETE WHERE (org = {org:String} AND namespace = {ns:String}) AND ({erasure_mutation_tag:String} = {erasure_mutation_tag:String}) SETTINGS mutations_sync = ? 59de9570d846 ALTER TABLE loom.context_blobs UPDATE tombstoned_at = {now:DateTime} WHERE (org = {org:String} AND tombstoned_at IS NULL AND namespace = {ns:String}) AND ({erasure_mutation_tag:String} = {erasure_muta 59dee679bff1 SELECT e.memory_key AS memory_key, e.memory_type AS memory_type, e.content_excerpt AS content_excerpt, e.status AS status, e.version AS version, cosineDistance(e.embedding, {q:Array(Float32)}) AS dist +59f565e11882 SELECT memory_key, memory_type, if({full_values:UInt8}, value, substring(value, ?, if((memory_type = ? OR hasAny(tags, [?, ?])), {whole_bytes:UInt32}, ?))) AS value, tags, confidence, pinned, CAST(sta 5a71c07a9421 SELECT memory_key, content_excerpt, event_date, distance FROM ( SELECT memory_key, content_excerpt, toDate(coalesce(temporal_anchor, valid_at)) AS event_date, cosineDistance(embedding, {q:Array(Float3 5a7665a73fe8 SELECT ? FROM loom.code_test_facets WHERE org = {org:String} AND namespace = {ns:String} LIMIT ? 5a96034314da SELECT count() AS n FROM loom.memory_extraction_queue FINAL WHERE org = {org:String} AND namespace = {ns:String} AND status IN {waiting:Array(String)} diff --git a/tests/unit/session_content_senders.json b/tests/unit/session_content_senders.json index dacb440e828..3917e6f0a78 100644 --- a/tests/unit/session_content_senders.json +++ b/tests/unit/session_content_senders.json @@ -383,7 +383,7 @@ } }, "reviewed_source_sha256": { - "integrations/claude-code-plugin/hooks/loom-code-shunt.mjs": "e19668f1157efba96442e10b17d2e21a9e7303273b8a674c604db5d9f42c1b93", + "integrations/claude-code-plugin/hooks/loom-code-shunt.mjs": "30864872dd02aa5ce12d0e86369208ac3a1c13d0f461f9b246906901f9f3cea9", "integrations/claude-code-plugin/hooks/loom-flush.mjs": "81fe4926c6b1cb944e363af3fbb2d072f86c2508ce437c1b652a30c8aba98a91", "integrations/claude-code-plugin/hooks/loom-namespace-health.mjs": "cc7288accf2812c7e68f2a1ac206be8321eb030ad30413377946fcf4c78ba584", "integrations/claude-code-plugin/hooks/loom-prompt-pack.mjs": "01066a7f10d126e571836b71ec605048694f6177e56394d3e7ebba9887c68be7", @@ -394,11 +394,11 @@ "integrations/claude-code-plugin/lib/loom-client.mjs": "77deae655319bb4dbec3981e38949144d0493041150127b72822876952a1d144", "integrations/claude-code-plugin/lib/namespace-health.mjs": "c8a9aab01f1e996c97643aee7b8f367bf6447f7a6c74dec01a70dc50a0caa182", "integrations/claude-code-plugin/lib/prompt-pack.mjs": "63a0d74d6777b5f98071e500206c5c9c8f284d987e04a853a244cf5f8580ab45", - "integrations/claude-code-plugin/lib/repo-scope.mjs": "127a7daefbe4cdaf014a58351f1b3cec068220985ac940a2952f161a8c881108", + "integrations/claude-code-plugin/lib/repo-scope.mjs": "b89eb707f495d458c449e20b36384284bc34261139bd60545aa7b93dea582f1e", "integrations/claude-code-plugin/lib/session-brief.mjs": "3aee492198a400ed0fa5fee733b4a4e04463efcc4d0b22ff760e1b765a76e28b", "integrations/claude-code-plugin/lib/session-start.mjs": "63ed14793cf0fb6a1df0df9e70652e86a76c95114c3003fe83bdba48e2e7a12e", "integrations/claude-code-plugin/lib/task-inbox.mjs": "33fbb1040e9b6db936928a66e4b90555a556220415f4e6394f6d2cd67821dcfc", - "integrations/codex-plugin/hooks/loom-code-shunt.mjs": "e19668f1157efba96442e10b17d2e21a9e7303273b8a674c604db5d9f42c1b93", + "integrations/codex-plugin/hooks/loom-code-shunt.mjs": "30864872dd02aa5ce12d0e86369208ac3a1c13d0f461f9b246906901f9f3cea9", "integrations/codex-plugin/hooks/loom-flush.mjs": "81fe4926c6b1cb944e363af3fbb2d072f86c2508ce437c1b652a30c8aba98a91", "integrations/codex-plugin/hooks/loom-namespace-health.mjs": "cc7288accf2812c7e68f2a1ac206be8321eb030ad30413377946fcf4c78ba584", "integrations/codex-plugin/hooks/loom-prompt-pack.mjs": "01066a7f10d126e571836b71ec605048694f6177e56394d3e7ebba9887c68be7", @@ -409,7 +409,7 @@ "integrations/codex-plugin/lib/loom-client.mjs": "77deae655319bb4dbec3981e38949144d0493041150127b72822876952a1d144", "integrations/codex-plugin/lib/namespace-health.mjs": "c8a9aab01f1e996c97643aee7b8f367bf6447f7a6c74dec01a70dc50a0caa182", "integrations/codex-plugin/lib/prompt-pack.mjs": "63a0d74d6777b5f98071e500206c5c9c8f284d987e04a853a244cf5f8580ab45", - "integrations/codex-plugin/lib/repo-scope.mjs": "127a7daefbe4cdaf014a58351f1b3cec068220985ac940a2952f161a8c881108", + "integrations/codex-plugin/lib/repo-scope.mjs": "b89eb707f495d458c449e20b36384284bc34261139bd60545aa7b93dea582f1e", "integrations/codex-plugin/lib/session-brief.mjs": "3aee492198a400ed0fa5fee733b4a4e04463efcc4d0b22ff760e1b765a76e28b", "integrations/codex-plugin/lib/session-start.mjs": "63ed14793cf0fb6a1df0df9e70652e86a76c95114c3003fe83bdba48e2e7a12e", "integrations/codex-plugin/lib/task-inbox.mjs": "33fbb1040e9b6db936928a66e4b90555a556220415f4e6394f6d2cd67821dcfc", @@ -422,7 +422,7 @@ "sdk/python/loom/integrations/langgraph.py": "5d68e6ab1645d868477a13b14aa6d734c72f72057464cac9a21aa707add17e7b", "sdk/python/loom/integrations/llamaindex.py": "06eaa071115cad752d27bdc9bf7c4d5b6f5d7d39d9896267fcd459a4e06bf661", "sdk/python/loom/integrations/openai_agents.py": "143fe1df060b96550a33f77fa44416e291c2154552e433f8309275f61c8fca2a", - "sdk/python/loom/memory.py": "9de078f3ad992f7d0d8b0f3b88737393d84564413b336c474580ced0da7f6625", + "sdk/python/loom/memory.py": "0cf1ee9e997a2368f6f2ecbdab50116b6ce0c3469ee875f20fd8b6c295931b82", "sdk/python/loom/run.py": "1d47d5f4d197f78de347d2cf66b9f59f4292846d214f7116c444035971c6ab42", "sdk/python/loom/session.py": "5f0fd61fcfdbf9d60888b111887fca8f32e24eb51ca9ff04a256901657c3202b", "sdk/typescript/src/integrations/claude-memory.ts": "c846f0011d7cf1ba4b30e99fbfd8adb6b29abff56856d0dbe14fba620007f6bc", diff --git a/tests/unit/test_code_link_reads_by_key.py b/tests/unit/test_code_link_reads_by_key.py index 966637a303c..832809aa2db 100644 --- a/tests/unit/test_code_link_reads_by_key.py +++ b/tests/unit/test_code_link_reads_by_key.py @@ -134,6 +134,7 @@ async def test_a_linked_memory_is_read_by_its_identity_while_it_holds_the_linked ] served = await code_plane_reads.served_excerpts("o", ["n"], linked, limit=3, ch=ch) assert [(r["memory_key"], r["excerpt"]) for r in served] == [("k1", "text of k1")] + assert served[0]["created_at"] # when it was first written, for the lesson's `first_written` async def test_no_memory_named_reads_nothing() -> None: diff --git a/tests/unit/test_code_observability.py b/tests/unit/test_code_observability.py index 994733e7260..00f37b24748 100644 --- a/tests/unit/test_code_observability.py +++ b/tests/unit/test_code_observability.py @@ -317,6 +317,8 @@ def test_outcome_pass_reason_is_the_source_from_a_fixed_vocabulary() -> None: "cap_spent", # Read-window cap budget spent "symbol_grep_spent", # Single-file symbol grep budget spent "budget_unrecorded", # A denial budget's spend could not be written + "compound_command", # A Bash command of several parts is never refused + "index_unanswered", # The index did not answer the lookup in full } # The plugin's vocabulary is the same list, in the same order of concern. plugin = ( diff --git a/tests/unit/test_context_pack_decisions.py b/tests/unit/test_context_pack_decisions.py index 2e7b7746d57..3216d1c64c4 100644 --- a/tests/unit/test_context_pack_decisions.py +++ b/tests/unit/test_context_pack_decisions.py @@ -14,6 +14,7 @@ from server.memory.api.models_context import ContextPackInput from server.memory.app.context_pack import handle_context_pack +from server.memory.domain import code_change from tests.unit.checked_pack_fakes import install_pack_target _FACT = NS( @@ -38,6 +39,8 @@ valid_at="", memory_type="decision", ) +# what a block says once when a line it renders holds a link +_INDEXED = code_change.compared(["fresh"]) def _search_stub(hits: list[Any]) -> Any: @@ -260,8 +263,9 @@ async def _records(ch: Any, org: str, ns: str, keys: list[str]) -> dict[str, Any handle_context_pack(ContextPackInput(org="o", namespace="ns", agent="a", query="q")) ) memories = out.sections["memories"] + assert memories.splitlines()[0] == _INDEXED assert "code_state=changed@c0ffeec0ffee] deploys are Tue/Thu" in memories - assert memories.count("code_state=") == 1 # a moved memory needs no label + assert "code_state=moved] deploys are Tue/Thu" in memories assert ( "(the code it is about is gone, commit deaddeaddead: check before relying on it) " "we chose clickhouse" @@ -300,19 +304,55 @@ async def _records(ch: Any, org: str, ns: str, keys: list[str]) -> dict[str, Any out = asyncio.run( handle_context_pack(ContextPackInput(org="o", namespace="ns", agent="a", query="q")) ) - lines = out.sections["memories"].splitlines() + said, *lines = out.sections["memories"].splitlines() + assert said == _INDEXED assert [ln.split("] ", 1)[1] for ln in lines] == [ f"(code moved: {now}) deploys are Tue/Thu", f"(code moved: {now}) deploys are Tue/Thu", "deploys are Tue/Thu", ] - assert ["code_state=" in ln for ln in lines] == [False, True, False] + assert [ln.split("] ", 1)[0].rsplit(" ", 1)[1] for ln in lines] == [ + "code_state=moved", + "code_state=changed@c0ffeec0ffee", + "code_state=moved", + ] + assert out.sections["decisions"].splitlines()[0] == _INDEXED assert ( "(its code changed since it was written, commit c0ffeec0ffee: check before relying " f"on it; {now}) we chose clickhouse" ) in out.sections["decisions"] +def test_a_line_that_names_code_says_its_state_revision_and_write_day( + monkeypatch: pytest.MonkeyPatch, +) -> None: + """An unlinked memory says so with the day it was written and the text it was written + with; a fresh one names the commit its link was anchored at. The `date=` label stays + the date the text is about.""" + _dead_other_sections(monkeypatch) + cause = "the cause is in src/core/print_helpers.py:8" + written = {"content_excerpt": cause, "created_at": "2026-03-02T10:00:00"} + unlinked = NS(**{**vars(_FACT), **written, "code_state": "unlinked"}) + anchored = {"memory_key": "m2", "code_state": "fresh", "code_rev": "ba5e" * 10} + fresh = NS(**{**vars(_FACT), **written, **anchored, "valid_at": "2025-01-15T00:00:00"}) + plain = NS(**{**vars(_FACT), "memory_key": "m3", "created_at": "2026-03-02T10:00:00"}) + + def _memories(hits: list[Any]) -> list[str]: + monkeypatch.setattr("server.memory.app.search.handle_memory_search", _search_stub(hits)) + pack = ContextPackInput(org="o", namespace="ns", agent="a", query="q") + return asyncio.run(handle_context_pack(pack)).sections["memories"].splitlines() + + assert _memories([unlinked, fresh, plain]) == [ + code_change.compared(["unlinked", "fresh"]), + f"- [memory:ns/m1 source=fact by=unknown code_state=unlinked written=2026-03-02] {cause}", + "- [memory:ns/m2 source=fact by=unknown date=2025-01-15 code_state=fresh" + f" rev=ba5eba5eba5e written=2026-03-02] {cause}", + "- [memory:ns/m3 source=fact by=unknown] deploys are Tue/Thu", + ] + assert _memories([fresh, plain])[0] == _INDEXED + assert _memories([plain]) == ["- [memory:ns/m3 source=fact by=unknown] deploys are Tue/Thu"] + + def test_every_governed_definition_leads_the_memories_block( monkeypatch: pytest.MonkeyPatch, ) -> None: diff --git a/tests/unit/test_evidence_pack.py b/tests/unit/test_evidence_pack.py index d184e98f987..248a46e28d9 100644 --- a/tests/unit/test_evidence_pack.py +++ b/tests/unit/test_evidence_pack.py @@ -45,3 +45,35 @@ def test_pack_evidence_limits_each_group_before_overflow() -> None: second_a = packed.rendered.find("[a2") assert first_b != -1 and second_a != -1 assert first_b < second_a + + +def test_a_line_left_out_takes_its_sentence_with_it() -> None: + """Room for what was compared is taken with the line it is about: a list that leaves + its only unlinked line out has the whole budget for its other lines.""" + plain = [ + EvidenceItem(citation=f"memory:ns/{key}", text=key * 40, score=score) + for key, score in (("a", 3.0), ("b", 2.0)) + ] + past = EvidenceItem(citation="memory:ns/c", text="c" * 40, score=1.0, code_state="unlinked") + both = pack_evidence(plain, char_budget=10_000).rendered + packed = pack_evidence([*plain, past], char_budget=len(both)) + assert packed.rendered == both and packed.truncated + # with room for the line and its sentence the list opens with it + whole = pack_evidence([*plain, past], char_budget=10_000).rendered.splitlines() + assert whole[0] == "Loom shows no code comparison for memories marked unlinked." + assert len(whole) == 4 + + +def test_a_line_names_the_day_it_is_given_under_the_label_of_that_day() -> None: + """A search hit's line says when the text it serves was written, a line read from a + memory's row when the memory was first written; a line with no code state says neither.""" + hit = EvidenceItem("memory:ns/a", "a", code_state="fresh", code_written="2026-04-01T08:00:00") + row = EvidenceItem( + "memory:ns/b", "b", code_state="changed@c0ffee", code_first_written="2026-03-02T10:00:00" + ) + plain = EvidenceItem("memory:ns/c", "c", code_first_written="2026-03-02T10:00:00") + assert pack_evidence([hit, row, plain], char_budget=10_000).rendered.splitlines()[1:] == [ + "- [memory:ns/a source=fact code_state=fresh written=2026-04-01] a", + "- [memory:ns/b source=fact code_state=changed@c0ffee first_written=2026-03-02] b", + "- [memory:ns/c source=fact] c", + ] diff --git a/tests/unit/test_loom_search_mcp_render.py b/tests/unit/test_loom_search_mcp_render.py index effde7da963..76ad07f0411 100644 --- a/tests/unit/test_loom_search_mcp_render.py +++ b/tests/unit/test_loom_search_mcp_render.py @@ -22,6 +22,7 @@ from server.auth.fanout import Fanout from server.auth.jwt import AuthInfo +from server.memory.domain import code_change from server.operations.base import Role from tests.unit.test_mcp_lean_results import PAYLOAD as _SEARCH @@ -89,6 +90,7 @@ def hit(key: str, **code: Any) -> Any: similarity=0.8, rank_score=0.8, valid_at="2026-03-02T00:00:00", + created_at=_WRITTEN, **code, ) @@ -110,6 +112,10 @@ def hit(key: str, **code: Any) -> Any: "was_symbol": "reader::fetch_rows", } _MOVED_NOW = "`reader::fetch_rows` is now `reader::load_rows` at src/reader.py:12-40" +# when the hits were written, later than the date their text is about +_WRITTEN = "2026-04-01T08:00:00" +# what a section says once when a hit it serves holds a link +_INDEXED = code_change.compared(["fresh"]) def _moved_hits() -> list[Any]: @@ -126,6 +132,7 @@ def hit(key: str, **code: Any) -> Any: similarity=0.8, rank_score=0.8, valid_at="2026-03-02T00:00:00", + created_at=_WRITTEN, **code, ) @@ -346,14 +353,17 @@ def test_a_hit_whose_code_changed_names_its_state_and_commit_on_both_channels( result = call("s-code", {"query": "q"}, "stale_code") block = result["content"][0]["text"].split("Memory hits:\n")[1].split("\n\nKnowledge hits:")[0] assert block.split("\n\n") == [ - "[2026-03-02] [evict_rule] (semantic) (its code changed since it was written," - " commit c0ffeec0ffee: check before relying on it) text of evict_rule", - "[2026-03-02] [fresh_rule] (semantic) text of fresh_rule", + _INDEXED, + "[2026-03-02] [evict_rule] (semantic) (code_state=changed written=2026-04-01) (its code" + " changed since it was written, commit c0ffeec0ffee: check before relying on it)" + " text of evict_rule", + "[2026-03-02] [fresh_rule] (semantic) (code_state=fresh written=2026-04-01)" + " text of fresh_rule", "[2026-03-02] [plain_fact] (semantic) text of plain_fact", ] stale, fresh, plain = result["structuredContent"]["memory"]["results"] assert (stale["code_state"], stale["code_changed_since"]) == ("changed", _COMMIT) - # a hit whose code is as it was, or that names none, reads as it did without the field + # a hit that names no code reads as it did, without the fields unlinked = { "memory_key": "plain_fact", "memory_type": "semantic", @@ -363,10 +373,12 @@ def test_a_hit_whose_code_changed_names_its_state_and_commit_on_both_channels( "source": "fact", } assert plain == unlinked + # a hit that names code keeps the day it was written beside its state assert fresh == unlinked | { "memory_key": "fresh_rule", "content_excerpt": "text of fresh_rule", "code_state": "fresh", + "created_at": _WRITTEN, } @@ -375,10 +387,14 @@ def test_a_hit_whose_code_moved_names_where_it_is_now_on_both_channels(harness: result = call("s-moved", {"query": "q"}, "moved_code") block = result["content"][0]["text"].split("Memory hits:\n")[1].split("\n\nKnowledge hits:")[0] assert block.split("\n\n") == [ - f"[2026-03-02] [renamed_rule] (semantic) (code moved: {_MOVED_NOW}) text of renamed_rule", - "[2026-03-02] [edited_rule] (semantic) (its code changed since it was written," - f" commit c0ffeec0ffee: check before relying on it; {_MOVED_NOW}) text of edited_rule", - "[2026-03-02] [fresh_rule] (semantic) text of fresh_rule", + _INDEXED, + "[2026-03-02] [renamed_rule] (semantic) (code_state=moved written=2026-04-01)" + f" (code moved: {_MOVED_NOW}) text of renamed_rule", + "[2026-03-02] [edited_rule] (semantic) (code_state=changed written=2026-04-01) (its code" + " changed since it was written, commit c0ffeec0ffee: check before relying on it;" + f" {_MOVED_NOW}) text of edited_rule", + "[2026-03-02] [fresh_rule] (semantic) (code_state=fresh written=2026-04-01)" + " text of fresh_rule", ] renamed, edited, fresh = result["structuredContent"]["memory"]["results"] # the lean result drops a link's empty fields, and the field itself from a hit with none @@ -391,14 +407,65 @@ def test_a_later_page_names_where_moved_code_is_now_on_its_plain_lines(harness: call, _ = harness result = call("s-moved-page", {"query": "q"}, "moved_code_no_block") lines = result["content"][0]["text"].split("Memory hits:\n")[1].split("\n\n")[0].splitlines() + # the day beside a code state is the hit's write day, as on a block line assert lines == [ - f" - [renamed_rule] (ns=-) (code moved: {_MOVED_NOW}) text of renamed_rule", - " - [edited_rule] (ns=-) (its code changed since it was written, commit c0ffeec0ffee:" - f" check before relying on it; {_MOVED_NOW}) text of edited_rule", - " - [fresh_rule] (ns=-) text of fresh_rule", + _INDEXED, + " - [renamed_rule] (ns=-) (code_state=moved written=2026-04-01)" + f" (code moved: {_MOVED_NOW}) text of renamed_rule", + " - [edited_rule] (ns=-) (code_state=changed written=2026-04-01) (its code changed" + " since it was written, commit c0ffeec0ffee: check before relying on it;" + f" {_MOVED_NOW}) text of edited_rule", + " - [fresh_rule] (ns=-) (code_state=fresh written=2026-04-01) text of fresh_rule", ] +def test_an_unlinked_hit_says_so_once_on_both_channels_with_the_text_it_was_written_with() -> None: + from server.memory.api.models_search import MemorySearchOutput, _MemorySearchHit + from server.transport.mcp_tools import search_answer + + def hit(key: str, text: str, **code: Any) -> Any: + return _MemorySearchHit( + memory_key=key, + memory_type="semantic", + content_excerpt=text, + distance=0.2, + similarity=0.8, + created_at="2026-03-02T10:00:00", + **code, + ) + + cause = "The cause is in Printable (src/core/print_helpers.py:8)." + hits = [ + hit("past_fix", cause, code_state="unlinked"), + hit("anchored", cause, code_state="fresh", code_rev="ba5e" * 10), + hit("plain_fact", "Lives in Berlin."), + ] + memory = MemorySearchOutput(results=hits, embedding_model="test").model_dump() + payload = {"memory": memory, "knowledge": {}, "profile": {}, "conversations": {}} + out = search_answer(payload, {"query": "q"}, "team", "") + said = code_change.compared(["unlinked", "fresh"]) + assert out["content"][0]["text"].split("Memory hits:\n")[1].splitlines() == [ + said, + f" - [past_fix] (ns=-) (code_state=unlinked written=2026-03-02) {cause}", + f" - [anchored] (ns=-) (code_state=fresh rev=ba5eba5eba5e written=2026-03-02) {cause}", + " - [plain_fact] (ns=-) Lives in Berlin.", + ] + structured = out["structuredContent"]["memory"] + assert structured["code_note"] == said + past, anchored, plain = structured["results"] + assert (past["code_state"], past["content_excerpt"]) == ("unlinked", cause) + assert (anchored["code_rev"], anchored["content_excerpt"]) == ("ba5e" * 10, cause) + assert not {"code_state", "code_rev"} & set(plain) + # a section with no unlinked hit says nothing of one, and one that names no code nothing + memory = MemorySearchOutput(results=hits[1:], embedding_model="test").model_dump() + out = search_answer({**payload, "memory": memory}, {"query": "q"}, "team", "") + assert out["structuredContent"]["memory"]["code_note"] == _INDEXED + assert code_change.NOT_COMPARED not in out["content"][0]["text"] + memory = MemorySearchOutput(results=hits[2:], embedding_model="test").model_dump() + out = search_answer({**payload, "memory": memory}, {"query": "q"}, "team", "") + assert "code_note" not in out["structuredContent"]["memory"] + + def _knowledge_text(bodies: str) -> str: """The loom_search text for one knowledge hit as `knowledge.search` serves it.""" from server.knowledge.api.models_knowledge import _SearchHit diff --git a/tests/unit/test_loom_search_repo_decisions.py b/tests/unit/test_loom_search_repo_decisions.py index 377a8ca905f..af0d796eeda 100644 --- a/tests/unit/test_loom_search_repo_decisions.py +++ b/tests/unit/test_loom_search_repo_decisions.py @@ -25,6 +25,7 @@ from server.memory.app.ask.reader_render import render_reader_block from server.memory.app.search.scoring import per_key_fetch from server.memory.app.search.telemetry import credit_merged_hits +from server.memory.domain import code_change from server.memory.domain.search_types import SearchHit from tests.unit.checked_repo_search_fakes import install_repo_search from tests.unit.memory_search_fakes import install_search_fakes @@ -733,7 +734,10 @@ async def test_a_decision_answer_first_withholds_leaves_the_mcp_text(monkeypatch _COMMIT = "c0ffee" * 6 + "abcd" +# what a section says once when a hit it serves holds a link +_INDEXED = code_change.compared(["changed"]) _CODE_NOTE = ( + " (code_state=changed)" " (its code changed since it was written, commit c0ffeec0ffee: check before relying on it)" ) @@ -750,9 +754,23 @@ async def test_a_hit_whose_code_changed_says_so_in_the_block(monkeypatch) -> Non out = _output([_changed("evict_rule"), _hit("note-a", 0.7, "me")]) section = (await _assemble(monkeypatch, out))["memory"] assert section["reader_block"].split("\n\n") == [ + _INDEXED, f"[undated] [evict_rule] (semantic){_CODE_NOTE} text of evict_rule", "[undated] [note-a] (semantic) text of note-a", ] + assert section["code_note"] == _INDEXED + + +@pytest.mark.asyncio +async def test_the_note_is_of_the_hits_left_after_trimming(monkeypatch) -> None: + """A changed repository decision the answer withholds leaves nothing to say.""" + stale = _hit("decision:evict", 0.5, TRUNK, "decision") + stale.code_state = "changed" + out = _output([_hit("home_fact", 0.8, "me"), stale]) + assert out.code_note == out.model_dump()["code_note"] == _INDEXED + section = (await _assemble(monkeypatch, out))["memory"] + assert [h["memory_key"] for h in section["results"]] == ["home_fact"] + assert section["code_note"] == "" and _INDEXED not in section["reader_block"] @pytest.mark.asyncio diff --git a/tests/unit/test_memory_code_links.py b/tests/unit/test_memory_code_links.py index b9881626336..69160e98b30 100644 --- a/tests/unit/test_memory_code_links.py +++ b/tests/unit/test_memory_code_links.py @@ -1122,7 +1122,11 @@ async def _startup_lines(monkeypatch, served, *, pinned=(), recent=(), top_k=2) rows = { h["mid"]: SimpleNamespace( - **h, confidence=1.0, valid_at=None, created_at=datetime(2026, 1, 1) + **h, + confidence=1.0, + valid_at=datetime(2026, 1, 1), # what the text is about + created_at=datetime(2026, 1, 9), # its first write + updated_at=datetime(2026, 2, 3), # an unpin or a lock since ) for h in served.heads } @@ -1157,10 +1161,22 @@ async def refuse(*a, **k): ("held", "state", "policy", "kept_current", "label"), [ ({}, "missing", "", True, None), # the code is gone and nobody holds the memory - ({"pinned": 1}, "missing", "", True, "code_state=missing@c0ffeec0ffee]"), - ({}, "changed", "", True, "code_state=changed@c0ffeec0ffee]"), - ({}, "missing", code_change.FLAG, True, "code_state=missing@c0ffeec0ffee]"), - ({}, "missing", "", False, "code_state=missing@c0ffeec0ffee]"), + ( + {"pinned": 1}, + "missing", + "", + True, + "code_state=missing@c0ffeec0ffee first_written=2026-01-09]", + ), + ({}, "changed", "", True, "code_state=changed@c0ffeec0ffee first_written=2026-01-09]"), + ( + {}, + "missing", + code_change.FLAG, + True, + "code_state=missing@c0ffeec0ffee first_written=2026-01-09]", + ), + ({}, "missing", "", False, "code_state=missing@c0ffeec0ffee first_written=2026-01-09]"), ], ) async def test_a_startup_pack_with_no_query_reads_code_state_as_a_search_does( @@ -1191,7 +1207,10 @@ async def test_a_startup_pack_names_where_a_memorys_moved_code_is_now(served, mo lines = await _startup_lines(monkeypatch, served, recent=["m", "edited", "other"], top_k=3) by_key = {ln.split()[1]: ln.split("] ", 1) for ln in lines} label, text = by_key["[memory:agent-a/m"] - assert "code_state" not in label and text == f"(code moved: {_NOW}) claim" + # the day beside the state is the row's first write, which no later unpin or lock + # moves; the `date=` label is the day the text is about + assert label.endswith(" date=2026-01-01 code_state=moved first_written=2026-01-09") + assert text == f"(code moved: {_NOW}) claim" label, text = by_key["[memory:agent-a/edited"] assert "code_state=changed@c0ffeec0ffee" in label and text == f"(code moved: {_NOW}) claim" assert by_key["[memory:agent-a/other"][1] == "claim" diff --git a/tests/unit/test_memory_code_plane_reads.py b/tests/unit/test_memory_code_plane_reads.py index 42643c4a078..6908910497a 100644 --- a/tests/unit/test_memory_code_plane_reads.py +++ b/tests/unit/test_memory_code_plane_reads.py @@ -6,6 +6,7 @@ from __future__ import annotations import asyncio +from datetime import datetime from typing import Any import pytest @@ -180,6 +181,7 @@ def _excerpt(mid: str, key: str, *, pinned: int = 0) -> dict: "excerpt": key, "pinned": pinned, "confidence": 1.0, + "created_at": datetime(2026, 3, 2, 10, 0), } @@ -284,6 +286,8 @@ async def test_a_lesson_reads_changed_where_the_definition_differs_from_the_link ("k1", "fresh", ""), ("k2", "changed", "c2"), ] + # each says the day it was first written beside its state + assert {o["first_written"] for o in out} == {"2026-03-02"} assert changed_read == [{"m2"}] # the read ranks a changed memory last before its cut # a branch still holding the definition k2 was written against reads it fresh branch = [("src/a.py", "src.a::Reader::read", "h0")] diff --git a/tests/unit/test_memory_code_state_lead.py b/tests/unit/test_memory_code_state_lead.py new file mode 100644 index 00000000000..1200249f6e2 --- /dev/null +++ b/tests/unit/test_memory_code_state_lead.py @@ -0,0 +1,319 @@ +"""What a read says of a memory that names code: its state, the commit its link was +anchored at and the day it was written; `unlinked`, a label no store holds, for one that +names a file and shows no link; and one sentence on what was compared.""" + +from __future__ import annotations + +import json +from datetime import datetime +from typing import Any, get_args + +import pytest + +from server.memory.api.models_search import MemorySearchInput, MemorySearchOutput, _MemorySearchHit +from server.memory.app import code_link_reads, for_file, path_lessons, search_pages +from server.memory.domain import code_change, files +from server.memory.store import rows + +# a record of a past fix as an agent wrote it: a line beside the file, a line phrase and +# the change as diff text +_RECORD = ( + "Root Cause: The issue was in the Printable class (src/core/print_helpers.py:8), which" + " is a parent class of Basic. The fix adds two lines at lines 940-944:" + " @@ -940,2 +940,4 @@ class Printable: __slots__ = ()" +) + + +def test_the_lead_names_the_state_then_the_revision_and_write_day_it_is_given() -> None: + assert code_change.lead("") == code_change.lead("", "ba5e" * 10, "2026-03-02") == "" + assert code_change.lead("unlinked") == " (code_state=unlinked)" + assert code_change.lead("fresh", "ba5e" * 10) == " (code_state=fresh rev=ba5eba5eba5e)" + assert code_change.lead("changed", "ba5e" * 10, "2026-03-02T10:00:00") == ( + " (code_state=changed rev=ba5eba5eba5e written=2026-03-02)" + ) + # a read of the memory's row names the day of its first write as that + assert code_change.lead("unlinked", first_written="2026-03-02T10:00:00") == ( + " (code_state=unlinked first_written=2026-03-02)" + ) + + +def test_a_hit_note_reads_a_model_as_its_dump_and_names_the_day_the_hit_was_written() -> None: + hit = _MemorySearchHit( + memory_key="k", + memory_type="semantic", + content_excerpt="x", + distance=0.0, + similarity=1.0, + # the dates of what the text is about are not when it was written + temporal_anchor="2025-01-15T00:00:00", + valid_at="2026-03-02T00:00:00", + created_at="2026-04-01T00:00:00", + code_state="changed", + code_changed_since="c0ffee" * 7, + code_rev="ba5e" * 10, + ) + note = ( + " (code_state=changed rev=ba5eba5eba5e written=2026-04-01) (its code changed since it" + " was written, commit c0ffeec0ffee: check before relying on it)" + ) + assert code_change.hit_note(hit) == code_change.hit_note(hit.model_dump()) == note + assert code_change.hit_note({"memory_key": "plain", "created_at": "2026-04-01"}) == "" + + +def test_a_reply_says_once_what_was_compared_for_the_states_it_serves() -> None: + unlinked = "Loom shows no code comparison for memories marked unlinked" + indexed = "code_state and rev describe the repository as indexed, not your checkout" + assert code_change.compared(["", "unlinked"]) == f"{unlinked}." + # every link state is the index's, a fresh one too: no read compares the caller's tree + for state in get_args(code_change.CodeState): + assert code_change.compared(["", state]) == f"{indexed}." + assert code_change.compared(["fresh", "unlinked", "changed"]) == f"{unlinked}; {indexed}." + assert code_change.compared([]) == code_change.compared(["", ""]) == "" + # the room a block keeps for the candidates' sentence covers the served rows' one + assert len(code_change.compared(["unlinked", "fresh"])) > len(code_change.compared(["fresh"])) + + +def test_a_text_names_a_file_by_a_path_with_a_directory() -> None: + assert files.names_file("the cause is in src/core/print_helpers.py:8") + for text in ("saved as notes.txt", "see README.md", "https://example.com/a/b.py", "and/or"): + assert not files.names_file(text) + # the one pattern answers as the whole detector does + for text in (_RECORD, "./a.py", "././src/a.py:12", "www.example.com/docs/index.html", "v1/2"): + whole = any("/" in name for name in files.detect_value_files(text)) + assert files.names_file(text) is whole + + +def test_the_revision_is_the_anchor_of_the_first_link_in_the_worst_state() -> None: + links = [ + {"state": "changed", "anchored_commit": "a2", "path": "b.py", "qualified_name": "f"}, + {"state": "changed", "anchored_commit": "a1", "path": "a.py", "qualified_name": "g"}, + {"state": "fresh", "anchored_commit": "a3", "path": "0.py", "qualified_name": "h"}, + ] + assert code_change.anchored_commit(links) == "a1" + assert code_change.anchored_commit(links[2:]) == "a3" + assert code_change.anchored_commit([]) == code_change.anchored_commit([{"state": "pending"}]) + assert code_change.anchored_commit([{"state": "fresh"}]) == "" + + +def _hit(key: str, text: str = "x", *, row: bool = True, **code: Any) -> Any: + hit = _MemorySearchHit( + memory_key=key, + memory_type="semantic", + content_excerpt=text, + distance=0.0, + similarity=1.0, + **code, + ) + hit._row_identity = ("a", "-", "-") if row else None + return hit + + +@pytest.mark.asyncio +async def test_a_hit_whose_text_names_a_file_and_holds_no_link_is_unlinked( + monkeypatch: pytest.MonkeyPatch, +) -> None: + """Where no repository is indexed nothing is read, and a hit that names a file still + says no comparison is shown for it; naming a file moves no hit and changes no text.""" + monkeypatch.setattr(code_link_reads.code, "code_namespaces", lambda: []) + hits = [ + _hit("past_fix", _RECORD), + _hit("chunk", _RECORD, row=False), # not a memory's own row: it carries no state + _hit("plain_fact"), + _hit("bare_name", "saved as notes.txt"), + ] + search = MemorySearchInput(org="o", namespace="agent-a", agent="a", query="q") + await code_link_reads.annotate_hits(search, hits) + assert [h.code_state for h in hits] == ["unlinked", "", "", ""] + assert [h.code_rev for h in hits] == [""] * 4 + assert not any(h._code_ranked_down for h in hits) + assert hits[0].content_excerpt == _RECORD + + +@pytest.mark.asyncio +async def test_a_search_whose_links_cannot_be_read_still_labels_a_hit_unlinked( + monkeypatch: pytest.MonkeyPatch, +) -> None: + """The label needs no link: page one of a search says what its later pages say.""" + + async def unreadable(input: Any, hits: list[Any]) -> Any: + raise RuntimeError("no link store") + + monkeypatch.setattr(code_link_reads, "_annotation_reads", unreadable) + hits = [_hit("past_fix", _RECORD), _hit("chunk", _RECORD, row=False), _hit("plain_fact")] + search = MemorySearchInput(org="o", namespace="agent-a", agent="a", query="q") + await code_link_reads.annotate_hits(search, hits) + assert [(h.memory_key, h.code_state) for h in hits] == [ + ("past_fix", "unlinked"), + ("chunk", ""), + ("plain_fact", ""), + ] + # nothing else is annotated: a later read of the links still knows they were not read + assert all(h._code_links is None and not h._code_ranked_down for h in hits) + + +@pytest.mark.parametrize( + "write", + [ + {"pinned": False}, # memory.unpin + {"lock_mode": "value", "lock_reason": "reviewed"}, # memory.lock + {"lock_mode": "", "lock_reason": ""}, # memory.unlock + ], +) +def test_a_write_that_leaves_the_text_alone_does_not_move_the_printed_day( + write: dict[str, Any], +) -> None: + """An unpin, a lock and an unlock stamp `updated_at` and carry `created_at`: the day + beside the state stays the first write's.""" + first = datetime(2026, 3, 2, 10, 0) + said = "Keep 32 buckets (src/a.cpp:8)." + head = rows.MemoryRow.from_snapshot( + { + "org": "o", + "namespace": "team", + "agent": "a", + "memory_key": "rules/buckets", + "memory_type": "semantic", + "value": json.dumps(said), + "pinned": True, + "created_at": first, + "updated_at": first, + } + ) + row = rows.build_memory_version_row(head, version=2, updated_at=rows.written_now(), **write) + assert row["updated_at"] != first and row["value"] == json.dumps(said) + hit = row | {"code_state": "unlinked"} + assert for_file.listing_line(hit) == ( + f"- rules/buckets{' (pinned)' if row['pinned'] else ''}" + f" (code_state=unlinked first_written=2026-03-02): {said}" + ) + lesson = path_lessons._lesson(hit, "src/a.cpp") + assert lesson is not None and lesson["first_written"] == "2026-03-02" + + +def test_a_rewritten_row_says_first_written_on_a_row_read_and_written_on_a_hit() -> None: + """A write of the text carries the row's `created_at` and stamps a new search + document: a `memory.for_file` line and a lesson name the first day as + `first_written`, a search hit names the day of the text it serves as `written`.""" + first, again = datetime(2026, 3, 2, 10, 0), datetime(2026, 4, 1, 8, 0) + said = "Keep 64 buckets (src/a.cpp:8)." + head = rows.MemoryRow.from_snapshot( + { + "org": "o", + "namespace": "team", + "agent": "a", + "memory_key": "rules/buckets", + "memory_type": "semantic", + "value": json.dumps("Keep 32 buckets (src/a.cpp:8)."), + "created_at": first, + "updated_at": first, + } + ) + row = rows.build_revision_row( + head, {"value": json.dumps(said), "version": 2, "updated_at": again} + ) + assert (row["value"], row["created_at"], row["updated_at"]) == (json.dumps(said), first, again) + read = row | {"code_state": "fresh", "code_rev": "ba5e" * 10} + assert for_file.listing_line(read) == ( + f"- rules/buckets (code_state=fresh rev=ba5eba5eba5e first_written=2026-03-02): {said}" + ) + lesson = path_lessons._lesson(read, "src/a.cpp") + assert lesson is not None and "written" not in lesson + assert (lesson["first_written"], lesson["excerpt"]) == ("2026-03-02", said) + # the search document of the rewritten text is created at that write + document = rows.search_document_row( + row | {"run_id": "-", "source_class": "user"}, + embedding_model="test", + embedding=[0.0], + key_embedding=[], + key_text="", + excerpt=said, + ) + assert document["created_at"] != first + hit = _hit( + "rules/buckets", + said, + code_state="fresh", + code_rev="ba5e" * 10, + created_at=again.isoformat(), + ) + assert code_change.hit_note(hit) == " (code_state=fresh rev=ba5eba5eba5e written=2026-04-01)" + + +def test_the_output_says_what_was_compared_for_the_hits_it_was_built_with() -> None: + hits = [_hit("past_fix", _RECORD, code_state="unlinked"), _hit("plain_fact")] + out = MemorySearchOutput(results=hits, embedding_model="test") + said = code_change.compared(["unlinked"]) + # the model says what its dump says, on any dump + assert out.code_note == out.model_dump()["code_note"] == said + without_states = out.model_dump(exclude={"results": {"__all__": {"code_state"}}}) + assert without_states["code_note"] == said + plain = MemorySearchOutput(results=hits[1:], embedding_model="test") + assert plain.code_note == plain.model_dump()["code_note"] == "" + + +def test_a_parked_page_holds_link_states_only_and_its_reader_labels_the_hit_again() -> None: + """`unlinked` is a value the build before this one refuses in a hit: a page it may + serve stores none, and the build that knows it labels the hit as the search did.""" + tail = [ + _hit("past_fix", _RECORD, code_state="unlinked"), + _hit("anchored", _RECORD, code_state="fresh", code_rev="ba5e" * 10), + _hit("chunk", _RECORD, row=False), + _hit("plain_fact"), + ] + page = json.loads( + search_pages.encode_page( + query="q", + top_k=2, + candidates_total=6, + tail=tail, + namespaces_searched=["agent-a"], + namespaces_skipped=[], + ) + ) + stored = [row["code_state"] for row in page["hits"]] + assert stored == ["", "fresh", "", ""] + assert set(stored) <= {"", *get_args(code_change.CodeState)} + served = [search_pages.unparked(row) for row in page["hits"]] + assert [(h.memory_key, h.code_state, h.code_rev) for h in served if h is not None] == [ + ("past_fix", "unlinked", ""), + ("anchored", "fresh", "ba5e" * 10), + ("chunk", "", ""), + ("plain_fact", "", ""), + ] + assert tail[0].code_state == "unlinked" # parking a hit leaves it as it was served + + +def test_a_lesson_that_names_code_carries_its_state_revision_and_write_day() -> None: + def row(key: str, text: str, **code: Any) -> dict[str, Any]: + written = datetime(2026, 3, 2, 10, 0) + hit = {"memory_key": key, "namespace": "team", "value": f'"{text}"', "created_at": written} + return hit | code + + said = "Keep 32 buckets (src/a.cpp:8)." + fresh = path_lessons._lesson( + row("fresh", said, code_state="fresh", code_rev="ba5e" * 10), "src/a.cpp" + ) + assert fresh == { + "path": "src/a.cpp", + "memory_key": "fresh", + "namespace": "team", + "excerpt": said, + "code_state": "fresh", + "rev": "ba5eba5eba5e", + "first_written": "2026-03-02", + } + # an unlinked row says so and keeps the text it was written with + past = path_lessons._lesson(row("past", said), "src/a.cpp") + assert past is not None and (past["code_state"], past["excerpt"], past["first_written"]) == ( + "unlinked", + said, + "2026-03-02", + ) + # a rule that names the file only in `files` reads as it did + assert path_lessons._lesson(row("rule", "Keep 64."), "src/a.cpp") == { + "path": "src/a.cpp", + "memory_key": "rule", + "namespace": "team", + "excerpt": "Keep 64.", + "code_state": "", + } diff --git a/tests/unit/test_memory_for_file.py b/tests/unit/test_memory_for_file.py index 09bf48c70fa..5c11ab0175b 100644 --- a/tests/unit/test_memory_for_file.py +++ b/tests/unit/test_memory_for_file.py @@ -43,6 +43,8 @@ def _row(key: str, value: str, **over: Any) -> dict[str, Any]: "status": "active", "agent": "claude-code", "updated_at": datetime(2026, 9, 11, 12, 0), + # its first write: the day a line prints beside a code state + "created_at": datetime(2026, 3, 2, 9, 0), "matched_files": ["src/a.cpp"], } base.update(over) @@ -458,6 +460,34 @@ def test_a_more_line_from_a_left_out_constraint_fits_the_budget( assert any(ln.startswith("- … ") and "lists them" in ln for ln in lines) +def test_a_more_line_from_a_constraint_left_out_by_its_sentence_fits_the_budget( + monkeypatch: pytest.MonkeyPatch, +) -> None: + """A constraint whose line fits the ceiling and whose sentence on what was compared + does not is left out, and takes the older note with it: the "… more" line that adds + is inside the budget the notes alone would fill.""" + monkeypatch.setattr(mff.settings, "memory_for_file_whole_tokens", 50) + older = _row("notes/old", json.dumps("Keep 32."), namespace="me") + newer = _superseding( + "rules/new", older, "n" * 100, "me", tags=["constraint"], code_state="fresh" + ) + line = len(mff._row_line(newer, _NOW, "me")) + 1 + assert line <= 200 < line + len(_INDEXED) + 1 + header = "Loom: 3 memories anchored to src/a.cpp — read before editing:" + used = len(header) + len("- notes/old: Keep 32.") + 1 + filler = _row( + "notes/f", json.dumps("f" * (240 - used - 1 - len("- notes/f: "))), namespace="me" + ) + text, _, truncated = mff.render_block( + "src/a.cpp", [newer, older, filler], 60, home="me", now=_NOW + ) + lines = text.splitlines() + assert truncated is True and "rules/new [constraint]" not in text and _INDEXED not in text + budgeted = "\n".join(ln for ln in lines if "decision or constraint" not in ln) + assert len(budgeted) <= 60 * mff.CHARS_PER_TOKEN + assert any(ln.startswith("- … ") and "lists them" in ln for ln in lines) + + def test_notes_that_fit_exactly_print_beside_a_constraint_left_out_at_the_ceiling( monkeypatch: pytest.MonkeyPatch, ) -> None: @@ -819,18 +849,20 @@ def test_an_attestation_adds_no_note_whether_current_or_stale() -> None: def test_an_unpinned_decision_whose_code_changed_notes_only_the_code() -> None: - line = _lines([_decision("design/c", pinned=False, code_state="changed")])[1] + said, line = _lines([_decision("design/c", pinned=False, code_state="changed")])[1:3] + assert said == _INDEXED assert line.startswith( - "- Decision (by alice, 3 days ago) (its code changed since it was " - "written: check before relying on it): Decided X because Y." + "- Decision (by alice, 3 days ago) (code_state=changed first_written=2026-03-02) (its code" + " changed since it was written: check before relying on it): Decided X because Y." ) def test_a_note_names_the_commit_its_code_changed_at() -> None: hit = _decision("design/c", pinned=False, code_state="changed", code_changed_since="ab" * 20) - assert _lines([hit])[1].startswith( - "- Decision (by alice, 3 days ago) (its code changed since it was written, commit " - "abababababab: check before relying on it): Decided X because Y." + assert _lines([hit])[2].startswith( + "- Decision (by alice, 3 days ago) (code_state=changed first_written=2026-03-02) (its code" + " changed since it was written, commit abababababab: check before relying on it):" + " Decided X because Y." ) @@ -845,6 +877,8 @@ def test_a_note_names_the_commit_its_code_changed_at() -> None: "was_symbol": "DB::Reader::fetchRows", } _MOVED_NOW = "`DB::Reader::fetchRows` is now `DB::Reader::loadRows` at src/a.cpp:12-40" +# what a block says once when a row it prints holds a link +_INDEXED = code_change.compared(["fresh"]) def test_a_line_whose_code_moved_names_where_it_is_now() -> None: @@ -858,11 +892,56 @@ def test_a_line_whose_code_moved_names_where_it_is_now() -> None: ) plain = _row("rules/plain", json.dumps("Keep 64."), code_state="moved", code_moved=[]) assert _lines([moved, edited, plain])[1:] == [ - f"- rules/moved (code moved: {_MOVED_NOW}): Keep 32.", - "- rules/edited (its code changed since it was written, commit abababababab: check " - f"before relying on it; {_MOVED_NOW}): Keep 48.", + _INDEXED, + f"- rules/moved (code_state=moved first_written=2026-03-02) (code moved: {_MOVED_NOW}): Keep 32.", + "- rules/edited (code_state=changed first_written=2026-03-02) (its code changed since it was" + f" written, commit abababababab: check before relying on it; {_MOVED_NOW}): Keep 48.", + "- rules/plain (code_state=moved first_written=2026-03-02): Keep 64.", + ] + + +def test_a_row_that_names_code_says_its_state_revision_and_write_day() -> None: + """A fresh row names the commit its link was anchored at; an unlinked one says so; + both print the text they were written with, under one sentence on what was compared. + A rule that names the file only in `files` prints as it did.""" + cited = "Do not edit src/gen/table.py:1-50, set at lines 940-944." + fresh = _row("rules/fresh", json.dumps(cited), code_state="fresh", code_rev="ba5e" * 10) + past = mff._as_printed(_row("notes/past", json.dumps(cited))) + rule = mff._as_printed(_row("rules/plain", json.dumps("Keep 64."))) + assert (past["code_state"], rule.get("code_state")) == ("unlinked", None) + assert _lines([fresh, past, rule])[1:] == [ + code_change.compared(["fresh", "unlinked"]), + f"- rules/fresh (code_state=fresh rev=ba5eba5eba5e first_written=2026-03-02): {cited}", + f"- notes/past (code_state=unlinked first_written=2026-03-02): {cited}", "- rules/plain: Keep 64.", ] + # each clause is about a row the block prints + assert _lines([fresh, rule])[1] == _INDEXED + assert _lines([past, rule])[1] == code_change.compared(["unlinked"]) + assert _lines([rule])[1:] == ["- rules/plain: Keep 64."] + + +def test_the_sentence_is_inside_the_budget_and_goes_with_the_row_it_is_about() -> None: + long = [_row(f"notes/n{i}", json.dumps("n" * 200)) for i in range(3)] + past = _row("notes/past", json.dumps("Keep 32 in src/a.cpp."), code_state="unlinked") + text, tokens, truncated = mff.render_block("src/a.cpp", [*long, past], 110, home="me", now=_NOW) + assert truncated and tokens <= 110 and len(text) <= 110 * mff.CHARS_PER_TOKEN + assert "notes/past" not in text and code_change.NOT_COMPARED not in text + + +def test_a_row_left_out_takes_its_sentence_with_it() -> None: + """The row that prints with the sentence pays for it: a block that leaves its only + unlinked row out has the whole budget for its other rows.""" + plain = [_row(f"notes/n{i}", json.dumps("n" * 100)) for i in range(2)] + past = _row("notes/past", json.dumps("p" * 200 + " src/a.cpp"), code_state="unlinked") + both, _, _ = mff.render_block("src/a.cpp", plain, 10_000, home="me", now=_NOW) + # room for the two plain rows and the "… more" line, to the character + more = mff._more_line("src/a.cpp", 1) + budget = (len(both) + 1 + len(more)) // mff.CHARS_PER_TOKEN + 1 + hits = [plain[0], past, plain[1]] + text, tokens, truncated = mff.render_block("src/a.cpp", hits, budget, home="me", now=_NOW) + assert text.splitlines()[1:] == [*both.splitlines()[1:], more] + assert truncated and tokens <= budget and code_change.NOT_COMPARED not in text def test_a_moved_note_counts_against_the_token_budget() -> None: @@ -942,7 +1021,10 @@ async def readable(org: str, nss: set[str]) -> set[str]: (hit,) = out.hits if case == "current": assert [m.model_dump(exclude_defaults=True) for m in hit.code_moved] == [_MOVED] - assert f"- rules/moved (code moved: {_MOVED_NOW}): Keep 32." in out.rendered + assert ( + f"- rules/moved (code_state=moved first_written=2026-03-02) (code moved: {_MOVED_NOW}):" + " Keep 32." + ) in out.rendered rows, _ = await mff.listing_rows(request) # the names a code answer matches against its symbols come from the same rows assert rows[0]["code_symbols"] == ["DB::Reader::loadRows"] diff --git a/tests/unit/test_reader_render.py b/tests/unit/test_reader_render.py index c7fe9433cd3..d5f3e150d26 100644 --- a/tests/unit/test_reader_render.py +++ b/tests/unit/test_reader_render.py @@ -13,6 +13,7 @@ reader_instructions, render_reader_block, ) +from server.memory.domain import code_change _HITS = [ { @@ -64,6 +65,10 @@ def _code_hit(key: str, **code: Any) -> dict[str, Any]: return {"memory_key": key, "memory_type": "semantic", "content_excerpt": "x", **code} +# what a block says once when a hit it serves holds a link +_INDEXED = code_change.compared(["fresh"]) + + def test_a_line_whose_code_changed_or_went_names_the_state_and_its_commit() -> None: block = render_reader_block( [ @@ -73,24 +78,52 @@ def test_a_line_whose_code_changed_or_went_names_the_state_and_its_commit() -> N ] ) assert block.split("\n\n") == [ - "[undated] [a] (semantic) (its code changed since it was written, commit c0ffeec0ffee:" - " check before relying on it) x", - "[undated] [b] (semantic) (its code was renamed or removed and could not be followed:" - " check it) x", - "[undated] [c] (semantic) (the code it is about is gone, commit deaddeaddead:" - " check before relying on it) x", + _INDEXED, + "[undated] [a] (semantic) (code_state=changed) (its code changed since it was written," + " commit c0ffeec0ffee: check before relying on it) x", + "[undated] [b] (semantic) (code_state=unresolved) (its code was renamed or removed and" + " could not be followed: check it) x", + "[undated] [c] (semantic) (code_state=missing) (the code it is about is gone, commit" + " deaddeaddead: check before relying on it) x", ] -def test_a_fresh_moved_or_unlinked_line_carries_no_code_note() -> None: - for code in ( - {}, - {"code_state": ""}, - {"code_state": "fresh"}, +def test_a_line_that_names_code_says_its_state_its_anchor_commit_and_its_write_day() -> None: + for code in ({}, {"code_state": ""}): + assert render_reader_block([_code_hit("k", **code)]) == "[undated] [k] (semantic) x" + # the day in the note is the write day, whatever date the line opens with + anchored = {"code_rev": "ba5e" * 10, "created_at": "2026-04-01T08:00:00"} + dated = {"temporal_anchor": "2026-03-02T00:00:00"} + for code, said in ( + ( + {"code_state": "fresh", **anchored}, + "[2026-04-01 08:00] [k] (semantic) (code_state=fresh rev=ba5eba5eba5e" + " written=2026-04-01) x", + ), # a commit beside a state no note names is never printed - {"code_state": "moved", "code_changed_since": "c0ffee" * 7}, + ( + {"code_state": "moved", "code_changed_since": "c0ffee" * 7, **anchored, **dated}, + "[2026-03-02] [k] (semantic) (code_state=moved rev=ba5eba5eba5e written=2026-04-01) x", + ), ): - assert render_reader_block([_code_hit("k", **code)]) == "[undated] [k] (semantic) x" + # a linked hit's state and commit are the index's, which the block says once + assert render_reader_block([_code_hit("k", **code)]) == f"{_INDEXED}\n\n{said}" + + +def test_an_unlinked_line_says_so_once_and_keeps_the_text_it_was_written_with() -> None: + text = "The cause is in Printable (src/core/print_helpers.py:8), fixed at lines 940-944." + unlinked = _code_hit("u", code_state="unlinked", content_excerpt=text) + fresh = _code_hit("f", code_state="fresh", content_excerpt=text) + assert render_reader_block([unlinked, unlinked | {"memory_key": "v"}]).split("\n\n") == [ + code_change.compared(["unlinked"]), + f"[undated] [u] (semantic) (code_state=unlinked) {text}", + f"[undated] [v] (semantic) (code_state=unlinked) {text}", + ] + assert render_reader_block([unlinked, fresh]).split("\n\n") == [ + code_change.compared(["unlinked", "fresh"]), + f"[undated] [u] (semantic) (code_state=unlinked) {text}", + f"[undated] [f] (semantic) (code_state=fresh) {text}", + ] def test_a_line_whose_code_moved_names_where_it_is_now() -> None: @@ -116,10 +149,11 @@ def test_a_line_whose_code_moved_names_where_it_is_now() -> None: ] ) assert block.split("\n\n") == [ - f"[undated] [a] (semantic) (code moved: {now}) x", - "[undated] [b] (semantic) (its code changed since it was written, commit c0ffeec0ffee:" - f" check before relying on it; {now}) x", - f"[undated] [c] (semantic) (code moved: {now}) x", + _INDEXED, + f"[undated] [a] (semantic) (code_state=moved) (code moved: {now}) x", + "[undated] [b] (semantic) (code_state=changed) (its code changed since it was written," + f" commit c0ffeec0ffee: check before relying on it; {now}) x", + f"[undated] [c] (semantic) (code_state=fresh) (code moved: {now}) x", ] @@ -146,7 +180,10 @@ def test_a_hit_model_renders_its_relocated_links_as_a_wire_dict_does() -> None: code_state="moved", code_moved=[link], ) - line = "[undated] [k] (semantic) (code moved: `reader::fetch_rows` is now at src/io.py:3-9) x" + line = ( + f"{_INDEXED}\n\n[undated] [k] (semantic) (code_state=moved)" + " (code moved: `reader::fetch_rows` is now at src/io.py:3-9) x" + ) assert render_reader_block([hit]) == line assert render_reader_block([hit.model_dump()]) == line diff --git a/tests/unit/test_review_brief_rationale.py b/tests/unit/test_review_brief_rationale.py index fb883596e60..e8c6711aef9 100644 --- a/tests/unit/test_review_brief_rationale.py +++ b/tests/unit/test_review_brief_rationale.py @@ -208,6 +208,11 @@ def test_section_says_check_for_a_row_whose_rejected_option_the_diff_adds() -> N assert spill["names"] == ["DB::SpillingHashSet"] and spill["pinned"] is True assert spill["code_state"] == "changed" and spill["line"].startswith("- design/spill") assert sec["rows_total"] == 3 and not sec["truncated"] and sec["causes"] == [] + # a row with a code state: the section says once what that state was compared with + assert ( + sec["note"] == "code_state and rev describe the repository as indexed, not your checkout." + ) + assert "note" not in _section(rows[1:], DIFF) def test_section_without_a_diff_is_unknown_and_without_rows_none() -> None: @@ -261,10 +266,14 @@ def test_section_keeps_whole_rows_within_its_budget_and_the_verdict_reads_every_ assert sec["verdict"] == "check" and sec["causes"] == ["diff_cut"] -def _listing(for_file_stub: Any, since: dict[tuple[str, str], str] | None = None) -> Any: +def _listing( + for_file_stub: Any, + since: dict[tuple[str, str], str] | None = None, + rev: dict[tuple[str, str], str] | None = None, +) -> Any: """A `listing_rows` over a stub of the memory.for_file handler: its hits as dicts with - a memory_id (the writer and key) and the commit `since` names for (path, key), the - code-links read not skipped.""" + a memory_id (the writer and key), the commit `since` names for (path, key) and the + anchor commit `rev` names for it, the code-links read not skipped.""" async def _rows(inp: Any, *, whole_only: bool = False) -> tuple[list[dict[str, Any]], bool]: assert whole_only # decisions and constraints only, typed or tagged @@ -274,6 +283,7 @@ async def _rows(inp: Any, *, whole_only: bool = False) -> tuple[list[dict[str, A | { "memory_id": f"{h.agent}/{h.memory_key}", "code_changed_since": (since or {}).get((inp.path, h.memory_key), ""), + "code_rev": (rev or {}).get((inp.path, h.memory_key), ""), } for h in out.hits ] @@ -339,7 +349,8 @@ async def _for_file(inp: Any) -> MemoryForFileOutput: monkeypatch.setattr(code_link_reads, "readable_namespaces", _readable) since = {("src/b.cpp", "design/a"): "c1"} - monkeypatch.setattr(for_file, "listing_rows", _listing(_for_file, since)) + rev = {("src/a.cpp", "design/a"): "a0", ("src/b.cpp", "design/a"): "b1"} + monkeypatch.setattr(for_file, "listing_rows", _listing(_for_file, since, rev)) rows, left, full, _, _ = await code_plane_reads.decisions_for_paths( "acme", "code-widgets", ["src/a.cpp", "src/b.cpp", "src/a.cpp"], limit=5 ) @@ -347,7 +358,9 @@ async def _for_file(inp: Any) -> MemoryForFileOutput: assert [r["memory_key"] for r in rows] == ["design/rule", "design/a"] assert rows[1]["code_state"] == "changed" # worst over both paths assert rows[1]["code_changed_since"] == "c1" # and the commit of that path's state + assert rows[1]["code_rev"] == "b1" # and the anchor of that path's link, not the first's assert "commit c1" in rows[1]["line"] # which the brief's line names + assert "(code_state=changed rev=b1)" in rows[1]["line"] assert rows[1]["text"] == "Decided design/a." assert rows[1]["line"].startswith("- design/a [decision]") assert "(its code changed" in rows[1]["line"] diff --git a/tests/unit/test_session_content_senders.py b/tests/unit/test_session_content_senders.py index 16d36324730..d4f43b64790 100644 --- a/tests/unit/test_session_content_senders.py +++ b/tests/unit/test_session_content_senders.py @@ -36,6 +36,7 @@ "namespace.validate", "code.test_gate", "code.symbol", + "code.outline", "code.enclosing", "tracker.duplicate_check", "memory.search",