Compare commits
10 Commits
d820cf75bb
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 72000acfeb | |||
| 993032fd81 | |||
| b9cfff73ec | |||
| ddf86666de | |||
| 51fb19a9b1 | |||
| 7cb504cdb3 | |||
| 57305b99cd | |||
| ce94be2b93 | |||
| 858c3a9ef0 | |||
| df0bb6e31a |
Generated
+13
-13
@@ -2775,9 +2775,9 @@ checksum = "c9356095b4b41197bba32173600e1582792cda618f65d12f68e2e77d273413c5"
|
||||
|
||||
[[package]]
|
||||
name = "html-to-markdown-rs"
|
||||
version = "3.11.0"
|
||||
version = "3.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f3e479289c322f5982b930575658df32d1161d6fab80b4078ce3e692f491df5"
|
||||
checksum = "718ba0514ab76ad0caccf199863df9fb94ed0b7196ae39505900826d4f7441ab"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"astral-tl",
|
||||
@@ -4899,7 +4899,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pi-ast"
|
||||
version = "17.3.8"
|
||||
version = "17.4.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"ast-grep-core",
|
||||
@@ -4969,7 +4969,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pi-builtins"
|
||||
version = "17.3.8"
|
||||
version = "17.4.0"
|
||||
dependencies = [
|
||||
"ansi-width",
|
||||
"anyhow",
|
||||
@@ -5054,7 +5054,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pi-iso"
|
||||
version = "17.3.8"
|
||||
version = "17.4.0"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"libc",
|
||||
@@ -5066,7 +5066,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pi-natives"
|
||||
version = "17.3.8"
|
||||
version = "17.4.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arboard",
|
||||
@@ -5140,7 +5140,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pi-shell"
|
||||
version = "17.3.8"
|
||||
version = "17.4.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"brush-core",
|
||||
@@ -5168,7 +5168,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pi-voice"
|
||||
version = "17.3.8"
|
||||
version = "17.4.0"
|
||||
dependencies = [
|
||||
"audiopus_sys",
|
||||
"bytes",
|
||||
@@ -5183,7 +5183,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pi-walker"
|
||||
version = "17.3.8"
|
||||
version = "17.4.0"
|
||||
dependencies = [
|
||||
"dashmap",
|
||||
"globset",
|
||||
@@ -7538,9 +7538,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "unicode-properties"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0"
|
||||
checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
@@ -9097,9 +9097,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zerovec"
|
||||
version = "0.11.7"
|
||||
version = "0.11.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94b5c6b5976d66c1d703c4fd17d3f5e43c8cedaacf604961b171adc7130896d8"
|
||||
checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"yoke",
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ members = [
|
||||
resolver = "3"
|
||||
|
||||
[workspace.package]
|
||||
version = "17.3.8"
|
||||
version = "17.4.0"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
authors = ["Can Boluk"]
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
"!**/test-sessions.ts",
|
||||
"!**/agent_pb.ts",
|
||||
"!**/devin-gen/**/*",
|
||||
"!packages/catalog/src/discovery/cursor-proto.ts",
|
||||
"!packages/catalog/src/discovery/devin-proto.ts",
|
||||
"!.worktrees/**/*",
|
||||
"!.wt/**/*"
|
||||
]
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
},
|
||||
"packages/agent": {
|
||||
"name": "@oh-my-pi/pi-agent-core",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"dependencies": {
|
||||
"@oh-my-pi/pi-ai": "catalog:",
|
||||
"@oh-my-pi/pi-catalog": "catalog:",
|
||||
@@ -40,16 +40,14 @@
|
||||
},
|
||||
"packages/ai": {
|
||||
"name": "@oh-my-pi/pi-ai",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"dependencies": {
|
||||
"@bufbuild/protobuf": "catalog:",
|
||||
"@oh-my-pi/omptype": "catalog:",
|
||||
"@oh-my-pi/pi-catalog": "catalog:",
|
||||
"@oh-my-pi/pi-utils": "catalog:",
|
||||
"@oh-my-pi/pi-wire": "catalog:",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bufbuild/protoc-gen-es": "catalog:",
|
||||
"@types/bun": "catalog:",
|
||||
},
|
||||
},
|
||||
@@ -63,9 +61,8 @@
|
||||
},
|
||||
"packages/catalog": {
|
||||
"name": "@oh-my-pi/pi-catalog",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"dependencies": {
|
||||
"@bufbuild/protobuf": "catalog:",
|
||||
"@oh-my-pi/omptype": "catalog:",
|
||||
"@oh-my-pi/pi-utils": "catalog:",
|
||||
},
|
||||
@@ -76,7 +73,7 @@
|
||||
},
|
||||
"packages/coding-agent": {
|
||||
"name": "@oh-my-pi/pi-coding-agent",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"bin": {
|
||||
"omp": "src/cli.ts",
|
||||
},
|
||||
@@ -133,7 +130,7 @@
|
||||
},
|
||||
"packages/hashline": {
|
||||
"name": "@oh-my-pi/hashline",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"dependencies": {
|
||||
"@oh-my-pi/pi-natives": "catalog:",
|
||||
"@oh-my-pi/pi-utils": "catalog:",
|
||||
@@ -177,7 +174,7 @@
|
||||
},
|
||||
"packages/mnemopi": {
|
||||
"name": "@oh-my-pi/pi-mnemopi",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"bin": {
|
||||
"mnemopi": "src/cli.ts",
|
||||
},
|
||||
@@ -203,7 +200,7 @@
|
||||
},
|
||||
"packages/natives": {
|
||||
"name": "@oh-my-pi/pi-natives",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"devDependencies": {
|
||||
"@napi-rs/cli": "catalog:",
|
||||
"@types/bun": "catalog:",
|
||||
@@ -218,7 +215,7 @@
|
||||
},
|
||||
"packages/omptype": {
|
||||
"name": "@oh-my-pi/omptype",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"devDependencies": {
|
||||
"@ark/attest": "0.56.3",
|
||||
"@ark/schema": "0.56.2",
|
||||
@@ -231,7 +228,7 @@
|
||||
},
|
||||
"packages/snapcompact": {
|
||||
"name": "@oh-my-pi/snapcompact",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"dependencies": {
|
||||
"@oh-my-pi/pi-ai": "catalog:",
|
||||
"@oh-my-pi/pi-catalog": "catalog:",
|
||||
@@ -245,7 +242,7 @@
|
||||
},
|
||||
"packages/stats": {
|
||||
"name": "@oh-my-pi/omp-stats",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"bin": {
|
||||
"omp-stats": "./src/index.ts",
|
||||
},
|
||||
@@ -270,7 +267,7 @@
|
||||
},
|
||||
"packages/tui": {
|
||||
"name": "@oh-my-pi/pi-tui",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"dependencies": {
|
||||
"@oh-my-pi/pi-natives": "catalog:",
|
||||
"@oh-my-pi/pi-utils": "catalog:",
|
||||
@@ -306,7 +303,7 @@
|
||||
},
|
||||
"packages/utils": {
|
||||
"name": "@oh-my-pi/pi-utils",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"dependencies": {
|
||||
"@oh-my-pi/pi-natives": "catalog:",
|
||||
},
|
||||
@@ -316,7 +313,7 @@
|
||||
},
|
||||
"packages/wire": {
|
||||
"name": "@oh-my-pi/pi-wire",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"devDependencies": {
|
||||
"@types/bun": "catalog:",
|
||||
},
|
||||
@@ -350,23 +347,21 @@
|
||||
"@babel/traverse": "^7.29.7",
|
||||
"@babel/types": "^7.29.7",
|
||||
"@biomejs/biome": "^2.5.3",
|
||||
"@bufbuild/protobuf": "^2.12.1",
|
||||
"@bufbuild/protoc-gen-es": "^2.12.1",
|
||||
"@huggingface/transformers": "^4.2.0",
|
||||
"@napi-rs/cli": "3.7.2",
|
||||
"@oh-my-pi/hashline": "17.3.8",
|
||||
"@oh-my-pi/omp-stats": "17.3.8",
|
||||
"@oh-my-pi/omptype": "17.3.8",
|
||||
"@oh-my-pi/pi-agent-core": "17.3.8",
|
||||
"@oh-my-pi/pi-ai": "17.3.8",
|
||||
"@oh-my-pi/pi-catalog": "17.3.8",
|
||||
"@oh-my-pi/pi-coding-agent": "17.3.8",
|
||||
"@oh-my-pi/pi-mnemopi": "17.3.8",
|
||||
"@oh-my-pi/pi-natives": "17.3.8",
|
||||
"@oh-my-pi/pi-tui": "17.3.8",
|
||||
"@oh-my-pi/pi-utils": "17.3.8",
|
||||
"@oh-my-pi/pi-wire": "17.3.8",
|
||||
"@oh-my-pi/snapcompact": "17.3.8",
|
||||
"@oh-my-pi/hashline": "17.4.0",
|
||||
"@oh-my-pi/omp-stats": "17.4.0",
|
||||
"@oh-my-pi/omptype": "17.4.0",
|
||||
"@oh-my-pi/pi-agent-core": "17.4.0",
|
||||
"@oh-my-pi/pi-ai": "17.4.0",
|
||||
"@oh-my-pi/pi-catalog": "17.4.0",
|
||||
"@oh-my-pi/pi-coding-agent": "17.4.0",
|
||||
"@oh-my-pi/pi-mnemopi": "17.4.0",
|
||||
"@oh-my-pi/pi-natives": "17.4.0",
|
||||
"@oh-my-pi/pi-tui": "17.4.0",
|
||||
"@oh-my-pi/pi-utils": "17.4.0",
|
||||
"@oh-my-pi/pi-wire": "17.4.0",
|
||||
"@oh-my-pi/snapcompact": "17.4.0",
|
||||
"@opentelemetry/api": "^1.9.1",
|
||||
"@opentelemetry/api-logs": "^0.220.0",
|
||||
"@opentelemetry/context-async-hooks": "^2.9.0",
|
||||
@@ -478,12 +473,6 @@
|
||||
|
||||
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.5.8", "", { "os": "win32", "cpu": "x64" }, "sha512-I2czzXTY61f3nFJxXoMDq80t7MivxDEnCjE+8sDKoFfcKMaoQdkqhIFQ3KyY0XLzeSpUBYeNAXgD+iOV/BU0VA=="],
|
||||
|
||||
"@bufbuild/protobuf": ["@bufbuild/protobuf@2.14.0", "", {}, "sha512-C3UGsiCwSprE2NKIIFA3hCDlpXTMCAXRZuEVp88L1GY36Y41+rYL5fryE+nOFhp4p4JPQvdV8PQ4DWgHgeTE+w=="],
|
||||
|
||||
"@bufbuild/protoc-gen-es": ["@bufbuild/protoc-gen-es@2.14.0", "", { "dependencies": { "@bufbuild/protobuf": "2.14.0", "@bufbuild/protoplugin": "2.14.0" }, "bin": { "protoc-gen-es": "bin/protoc-gen-es" } }, "sha512-/Rrui0BJWSRONiKGYzqWq9ivGN3+cYkmc47QWITufr7K6yDb8HfssuJUSQZeptyg/rHbHrfDzCUjzoJ2pwuafg=="],
|
||||
|
||||
"@bufbuild/protoplugin": ["@bufbuild/protoplugin@2.14.0", "", { "dependencies": { "@bufbuild/protobuf": "2.14.0", "@typescript/vfs": "^1.6.2", "typescript": "5.4.5" } }, "sha512-S0TvZhVtTEkZQRj2JsXBCXiib/b0+bLQtJCcn+hj9O/usgbcgxHn4D+ii22Ao3qj0/kKxVYeo7BtAI2dMk+iig=="],
|
||||
|
||||
"@emnapi/core": ["@emnapi/core@1.9.2", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA=="],
|
||||
|
||||
"@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="],
|
||||
@@ -1070,7 +1059,7 @@
|
||||
|
||||
"diff": ["diff@9.0.0", "", {}, "sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw=="],
|
||||
|
||||
"electron-to-chromium": ["electron-to-chromium@1.5.407", "", {}, "sha512-4R8XgQOdfxexCd/u63lRm6wCHjECwI45MV9wxAs2ggtfWe2hwlo1ql97jKsju2IcJ+jFSTwBssyYoiWhh7mauQ=="],
|
||||
"electron-to-chromium": ["electron-to-chromium@1.5.408", "", {}, "sha512-SLoprcYpJ/OH2v2ps0+N5biv9H4/KBT3+YmmDew64TwK5y9j2wv7pMOFY7IorVkyMtEyLSCRlXKLsNlakeAlPw=="],
|
||||
|
||||
"emnapi": ["emnapi@1.11.3", "", { "peerDependencies": { "node-addon-api": ">= 6.1.0" }, "optionalPeers": ["node-addon-api"] }, "sha512-+/ZS90YK/rYfVOHtGLHkGffVsnmD/MAKaBHio+Y4XAtg75RLr4cveV/w0jTkUdLM1CcAlaRgG76mpIemWAlk0A=="],
|
||||
|
||||
@@ -1084,7 +1073,7 @@
|
||||
|
||||
"es-errors": ["es-errors@1.3.0", "", {}, "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="],
|
||||
|
||||
"es-toolkit": ["es-toolkit@1.50.0", "", {}, "sha512-OyZKhUVvEep9ITEiwHn8GKnMRQIVqoSIX7WnRbkWgJkllCujilqP2rD0u979tkl8wqyc8ICwlc1UBVv/Sl1G6w=="],
|
||||
"es-toolkit": ["es-toolkit@1.51.0", "", {}, "sha512-zC2lQGkM7QX+Gm6iM3+WIdZJzthsEd14LvRNJneSO2hzyz/zNBENR8+YXWo1cKxgPBtV6ksPYHELbcwBRzmdCw=="],
|
||||
|
||||
"es6-error": ["es6-error@4.1.1", "", {}, "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg=="],
|
||||
|
||||
@@ -1160,7 +1149,7 @@
|
||||
|
||||
"json-stringify-safe": ["json-stringify-safe@5.0.1", "", {}, "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="],
|
||||
|
||||
"json-with-bigint": ["json-with-bigint@3.5.11", "", {}, "sha512-WvkM9Hfb9kqzCcbsvpwfWDvdfGZDhYuCoaCwHRe5q3LtULKkbrI/L6JYcN8owflgA3di5dP2yVAV2NVCXkgtkA=="],
|
||||
"json-with-bigint": ["json-with-bigint@3.5.12", "", {}, "sha512-uwbF/wSSuOgC7qqlq27Xp5B6a2MHVug3t0idZdTqu0JnlFvgJuH7ju+KAk/J06C7GfhoYy2gnb9wz2INqcne7w=="],
|
||||
|
||||
"json5": ["json5@2.2.3", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="],
|
||||
|
||||
@@ -1414,10 +1403,6 @@
|
||||
|
||||
"@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
|
||||
|
||||
"@bufbuild/protoplugin/@typescript/vfs": ["@typescript/vfs@1.6.4", "", { "dependencies": { "debug": "^4.4.3" }, "peerDependencies": { "typescript": "*" } }, "sha512-PJFXFS4ZJKiJ9Qiuix6Dz/OwEIqHD7Dme1UwZhTK11vR+5dqW2ACbdndWQexBzCx+CPuMe5WBYQWCsFyGlQLlQ=="],
|
||||
|
||||
"@bufbuild/protoplugin/typescript": ["typescript@5.4.5", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ=="],
|
||||
|
||||
"@huggingface/transformers/onnxruntime-node": ["onnxruntime-node@1.24.3", "", { "dependencies": { "adm-zip": "^0.5.16", "global-agent": "^3.0.0", "onnxruntime-common": "1.24.3" }, "os": [ "linux", "win32", "darwin", ] }, "sha512-JH7+czbc8ALA819vlTgcV+Q214/+VjGeBHDjX81+ZCD0PCVCIFGFNtT0V4sXG/1JXypKPgScQcB3ij/hk3YnTg=="],
|
||||
|
||||
"@isaacs/fs-minipass/minipass": ["minipass@7.1.3", "", {}, "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A=="],
|
||||
|
||||
@@ -259,7 +259,7 @@ fn create_windows_napi_tokio_runtime() -> Option<tokio::runtime::Runtime> {
|
||||
/// MUST stay in sync with `VERSION_SENTINEL_EXPORT` in
|
||||
/// `packages/natives/native/index.js` (which derives the name from
|
||||
/// `package.json#version`).
|
||||
#[napi(js_name = "__piNativesV17_3_8")]
|
||||
#[napi(js_name = "__piNativesV17_4_0")]
|
||||
pub const fn pi_natives_version_sentinel() {}
|
||||
|
||||
/// Native module entry point: install crash diagnostics before any tool can
|
||||
|
||||
@@ -51,6 +51,7 @@ fn drop_passed_lines(input: &str) -> String {
|
||||
fn failures_only(input: &str) -> String {
|
||||
let mut out = String::new();
|
||||
let mut keeping_block = false;
|
||||
let mut kept_failure = false;
|
||||
let mut trailing_context = 0usize;
|
||||
|
||||
for line in input.lines() {
|
||||
@@ -72,6 +73,7 @@ fn failures_only(input: &str) -> String {
|
||||
|
||||
if starts_failure_block(trimmed) {
|
||||
keeping_block = true;
|
||||
kept_failure = true;
|
||||
trailing_context = 10;
|
||||
push_line(&mut out, line);
|
||||
continue;
|
||||
@@ -97,7 +99,10 @@ fn failures_only(input: &str) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
if has_content(&out) {
|
||||
// A failing run where no failure block was recognized means the format is
|
||||
// unknown; summary counts alone lose the actual error (issue: bun's non-TTY
|
||||
// `(fail)` output). Fall back to head/tail rather than drop the failure.
|
||||
if kept_failure && has_content(&out) {
|
||||
out
|
||||
} else {
|
||||
primitives::head_tail_lines(input, 80, 80)
|
||||
@@ -147,7 +152,8 @@ fn is_noise_line(trimmed: &str) -> bool {
|
||||
}
|
||||
|
||||
fn is_pass_noise(trimmed: &str) -> bool {
|
||||
trimmed.starts_with("PASS ")
|
||||
trimmed.starts_with("(pass)")
|
||||
|| trimmed.starts_with("PASS ")
|
||||
|| trimmed.starts_with("✓")
|
||||
|| trimmed.starts_with("✔")
|
||||
|| trimmed.starts_with("√")
|
||||
@@ -164,7 +170,8 @@ fn is_pass_noise(trimmed: &str) -> bool {
|
||||
}
|
||||
|
||||
fn starts_failure_block(trimmed: &str) -> bool {
|
||||
trimmed.starts_with("FAIL ")
|
||||
trimmed.starts_with("(fail)")
|
||||
|| trimmed.starts_with("FAIL ")
|
||||
|| trimmed.starts_with("FAILURES")
|
||||
|| trimmed.starts_with("Failed Tests")
|
||||
|| trimmed.starts_with("● ")
|
||||
@@ -173,6 +180,8 @@ fn starts_failure_block(trimmed: &str) -> bool {
|
||||
|| trimmed.starts_with("✗")
|
||||
|| trimmed.starts_with("❯")
|
||||
|| trimmed.starts_with("Error:")
|
||||
|| trimmed.starts_with("error:")
|
||||
|| is_code_frame_line(trimmed)
|
||||
|| trimmed.starts_with("AssertionError")
|
||||
|| trimmed.starts_with("TimeoutError")
|
||||
|| is_playwright_numbered_failure(trimmed)
|
||||
@@ -195,6 +204,15 @@ fn is_error_context_line(trimmed: &str) -> bool {
|
||||
|| trimmed.contains(".test.")
|
||||
}
|
||||
|
||||
/// Source excerpt rows in bun/jest failure output: `12 | expect(x).toBe(y)`
|
||||
/// (optionally behind jest's `> ` pointer). Bun prints the code frame *before*
|
||||
/// its `error:` line, so these must open the failure block.
|
||||
fn is_code_frame_line(trimmed: &str) -> bool {
|
||||
let rest = trimmed.strip_prefix("> ").unwrap_or(trimmed);
|
||||
let after_digits = rest.trim_start_matches(|ch: char| ch.is_ascii_digit());
|
||||
after_digits.len() < rest.len() && after_digits.starts_with(" |")
|
||||
}
|
||||
|
||||
fn is_playwright_numbered_failure(trimmed: &str) -> bool {
|
||||
let mut chars = trimmed.chars();
|
||||
let mut saw_digit = false;
|
||||
@@ -315,6 +333,84 @@ Ran 3 tests across 2 files. [150.00ms]
|
||||
assert!(filtered.contains("1 fail"));
|
||||
}
|
||||
|
||||
// Regression: bun's non-TTY reporter marks results as `(pass)`/`(fail)` and
|
||||
// prints the code frame + `error:` block *before* the `(fail)` line. The
|
||||
// old filter recognized none of these markers and reduced a failing run to
|
||||
// bare counts, dropping the failed test name and assertion entirely.
|
||||
#[test]
|
||||
fn bun_non_tty_failure_keeps_error_block_fail_line_and_counts() {
|
||||
let input = "\
|
||||
bun test v1.2.19 (aad3abea)
|
||||
|
||||
test/ok.test.ts:
|
||||
(pass) suite > works [0.12ms]
|
||||
|
||||
test/bundled-reference-laziness.test.ts:
|
||||
14 | \tconst result = runFixture();
|
||||
15 | \texpect(result.exitCode).toBe(0);
|
||||
^
|
||||
error: expect(received).toBe(expected)
|
||||
|
||||
Expected: 0
|
||||
Received: 1
|
||||
|
||||
at runFixture (/work/pi/packages/catalog/test/bundled-reference-laziness.test.ts:14:52)
|
||||
at <anonymous> (/work/pi/packages/catalog/test/bundled-reference-laziness.test.ts:20:43)
|
||||
(fail) bundled model laziness > provider options and the bundled registry stay lazy [124.31ms]
|
||||
|
||||
625 pass
|
||||
1 fail
|
||||
3042 expect() calls
|
||||
Ran 626 tests across 84 files. [8.37s]
|
||||
";
|
||||
let filtered = failures_only(input);
|
||||
|
||||
assert!(!filtered.contains("(pass) suite > works"));
|
||||
assert!(filtered.contains("error: expect(received).toBe(expected)"));
|
||||
assert!(filtered.contains("15 | \texpect(result.exitCode).toBe(0);"));
|
||||
assert!(filtered.contains("Expected: 0"));
|
||||
assert!(filtered.contains("Received: 1"));
|
||||
assert!(filtered.contains("at runFixture"));
|
||||
assert!(filtered.contains(
|
||||
"(fail) bundled model laziness > provider options and the bundled registry stay lazy"
|
||||
));
|
||||
assert!(filtered.contains("625 pass"));
|
||||
assert!(filtered.contains("1 fail"));
|
||||
assert!(filtered.contains("Ran 626 tests across 84 files."));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn bun_non_tty_pass_lines_collapse_on_success() {
|
||||
let input = "\
|
||||
bun test v1.2.19 (aad3abea)
|
||||
|
||||
test/ok.test.ts:
|
||||
(pass) suite > works [0.12ms]
|
||||
(pass) suite > also works [0.10ms]
|
||||
|
||||
2 pass
|
||||
0 fail
|
||||
Ran 2 tests across 1 file. [50.00ms]
|
||||
";
|
||||
let filtered = drop_passed_lines(input);
|
||||
|
||||
assert!(!filtered.contains("(pass)"));
|
||||
assert!(filtered.contains("2 pass"));
|
||||
assert!(filtered.contains("0 fail"));
|
||||
assert!(filtered.contains("Ran 2 tests across 1 file."));
|
||||
}
|
||||
|
||||
// A failing run in an unrecognized format must never collapse to bare
|
||||
// summary counts: the actual failure text is the whole point of the output.
|
||||
#[test]
|
||||
fn unrecognized_failure_format_falls_back_to_head_tail() {
|
||||
let input = "something exploded in a novel way\nTests: 1 failed, 1 total\n";
|
||||
let filtered = failures_only(input);
|
||||
|
||||
assert!(filtered.contains("something exploded in a novel way"));
|
||||
assert!(filtered.contains("Tests: 1 failed, 1 total"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn vitest_many_passes_collapses_to_summary() {
|
||||
let input = "\
|
||||
|
||||
@@ -432,7 +432,7 @@ The Ollama integration consists of two distinct provider definitions in `package
|
||||
Cursor's integration in `packages/ai` operates over an HTTP/2 Connect RPC transport (`/agent.v1.AgentService/Run`) sending length-prefixed binary Protobuf messages (`AgentClientMessage` and `AgentServerMessage`). Key implementation entry points include `packages/ai/src/providers/cursor.ts` for connection lifecycle, Connect message streaming, and frame dispatching; `packages/ai/src/providers/cursor-pi-args.ts` for pure argument and path transformations; `packages/ai/src/providers/cursor/exec-modern.ts` for local tool result frame builders; `packages/ai/src/registry/cursor.ts` and `packages/ai/src/registry/oauth/cursor.ts` for PKCE browser authentication and token refresh; `packages/ai/src/usage/cursor.ts` for multi-endpoint quota tracking; and `packages/catalog/src/discovery/cursor.ts` for Connect RPC model discovery.
|
||||
|
||||
### Special casings
|
||||
- **Pure Argument Translation (`cursor-pi-args.ts`)**: Path and argument formatting functions (`piReadPath`, `piReadPathHasRange`, `piReadDisplayPath`, `piGrepSkip`, `piJoinPath`, `piLsPath`, `piEscapeRegexLiteral`, `piLimit`, `piTimeout`) are kept strictly independent of Protobuf imports so legacy shims can share them without bundling `@bufbuild/protobuf` into virtual registries.
|
||||
- **Pure Argument Translation (`cursor-pi-args.ts`)**: Path and argument formatting functions (`piReadPath`, `piReadPathHasRange`, `piReadDisplayPath`, `piGrepSkip`, `piJoinPath`, `piLsPath`, `piEscapeRegexLiteral`, `piLimit`, `piTimeout`) are kept strictly independent of Protobuf imports so legacy shims can share them without bundling protobuf schemas into virtual registries.
|
||||
- **Empty Grep Pattern Rejection**: `grepArgs` frames with an empty `pattern` and non-empty `glob` are rejected up front (`emptyGrepPatternRejection`) with a descriptive error, forcing the model to retry or switch tools rather than triggering local tool failure after block persistence.
|
||||
- **Native Tools & `SoftToolRequirement` Interplay**:
|
||||
- Native tools (`CURSOR_NATIVE_TOOL_NAMES`: `bash`, `read`, `write`, `delete`, `ls`, `grep`, `todo`) are omitted when building `requestContext` MCP tool definitions.
|
||||
|
||||
+33
-29
@@ -157,18 +157,6 @@
|
||||
url = "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.5.8.tgz";
|
||||
hash = "sha512-I2czzXTY61f3nFJxXoMDq80t7MivxDEnCjE+8sDKoFfcKMaoQdkqhIFQ3KyY0XLzeSpUBYeNAXgD+iOV/BU0VA==";
|
||||
};
|
||||
"@bufbuild/protobuf@2.14.0" = fetchurl {
|
||||
url = "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.14.0.tgz";
|
||||
hash = "sha512-C3UGsiCwSprE2NKIIFA3hCDlpXTMCAXRZuEVp88L1GY36Y41+rYL5fryE+nOFhp4p4JPQvdV8PQ4DWgHgeTE+w==";
|
||||
};
|
||||
"@bufbuild/protoc-gen-es@2.14.0" = fetchurl {
|
||||
url = "https://registry.npmjs.org/@bufbuild/protoc-gen-es/-/protoc-gen-es-2.14.0.tgz";
|
||||
hash = "sha512-/Rrui0BJWSRONiKGYzqWq9ivGN3+cYkmc47QWITufr7K6yDb8HfssuJUSQZeptyg/rHbHrfDzCUjzoJ2pwuafg==";
|
||||
};
|
||||
"@bufbuild/protoplugin@2.14.0" = fetchurl {
|
||||
url = "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-2.14.0.tgz";
|
||||
hash = "sha512-S0TvZhVtTEkZQRj2JsXBCXiib/b0+bLQtJCcn+hj9O/usgbcgxHn4D+ii22Ao3qj0/kKxVYeo7BtAI2dMk+iig==";
|
||||
};
|
||||
"@emnapi/core@1.11.2" = fetchurl {
|
||||
url = "https://registry.npmjs.org/@emnapi/core/-/core-1.11.2.tgz";
|
||||
hash = "sha512-TC8MkTuZUtcTSiFeuC0ksCh9QIJ5+F21MvZ4Wn4ORfYaFJ/0dsiudv5tVkejgwZlwQ39jL9WWDe2lz8x0WglOA==";
|
||||
@@ -1138,10 +1126,6 @@
|
||||
url = "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.1.tgz";
|
||||
hash = "sha512-JwoxboBh7Oz1v38tPbkrZ62ZXNHAk9bJ7c9x0eI5zBfBnBYGhURdbnh7Z4smN/MV48Y5OCcZb58n972UtbazsA==";
|
||||
};
|
||||
"@typescript/vfs@1.6.4" = fetchurl {
|
||||
url = "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.4.tgz";
|
||||
hash = "sha512-PJFXFS4ZJKiJ9Qiuix6Dz/OwEIqHD7Dme1UwZhTK11vR+5dqW2ACbdndWQexBzCx+CPuMe5WBYQWCsFyGlQLlQ==";
|
||||
};
|
||||
"adm-zip@0.5.18" = fetchurl {
|
||||
url = "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.18.tgz";
|
||||
hash = "sha512-ufJnssQGbxzLNS1Ho9bCtX4rQKCCvoVuDLHoJyc3F9dOGDB4BkWs2Ci0kv53lqocAEQ/Cbi+I2XCsNYGqVYqng==";
|
||||
@@ -1242,6 +1226,10 @@
|
||||
url = "https://registry.npmjs.org/cli-progress/-/cli-progress-3.12.0.tgz";
|
||||
hash = "sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A==";
|
||||
};
|
||||
"cli-truncate@6.1.1" = fetchurl {
|
||||
url = "https://registry.npmjs.org/cli-truncate/-/cli-truncate-6.1.1.tgz";
|
||||
hash = "sha512-06p9vyLahLa4zkGcgsGxU6iEkSOiuI4fhCH6Emhe2lPAcoUv73n72DnODsnHA+5wwXGnV0n9M9/qOQJSjYhFhw==";
|
||||
};
|
||||
"cli-width@4.1.0" = fetchurl {
|
||||
url = "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz";
|
||||
hash = "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==";
|
||||
@@ -1354,9 +1342,9 @@
|
||||
url = "https://registry.npmjs.org/diff/-/diff-9.0.0.tgz";
|
||||
hash = "sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw==";
|
||||
};
|
||||
"electron-to-chromium@1.5.407" = fetchurl {
|
||||
url = "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.407.tgz";
|
||||
hash = "sha512-4R8XgQOdfxexCd/u63lRm6wCHjECwI45MV9wxAs2ggtfWe2hwlo1ql97jKsju2IcJ+jFSTwBssyYoiWhh7mauQ==";
|
||||
"electron-to-chromium@1.5.408" = fetchurl {
|
||||
url = "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.408.tgz";
|
||||
hash = "sha512-SLoprcYpJ/OH2v2ps0+N5biv9H4/KBT3+YmmDew64TwK5y9j2wv7pMOFY7IorVkyMtEyLSCRlXKLsNlakeAlPw==";
|
||||
};
|
||||
"emnapi@1.11.3" = fetchurl {
|
||||
url = "https://registry.npmjs.org/emnapi/-/emnapi-1.11.3.tgz";
|
||||
@@ -1386,9 +1374,9 @@
|
||||
url = "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz";
|
||||
hash = "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==";
|
||||
};
|
||||
"es-toolkit@1.50.0" = fetchurl {
|
||||
url = "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.50.0.tgz";
|
||||
hash = "sha512-OyZKhUVvEep9ITEiwHn8GKnMRQIVqoSIX7WnRbkWgJkllCujilqP2rD0u979tkl8wqyc8ICwlc1UBVv/Sl1G6w==";
|
||||
"es-toolkit@1.51.0" = fetchurl {
|
||||
url = "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.51.0.tgz";
|
||||
hash = "sha512-zC2lQGkM7QX+Gm6iM3+WIdZJzthsEd14LvRNJneSO2hzyz/zNBENR8+YXWo1cKxgPBtV6ksPYHELbcwBRzmdCw==";
|
||||
};
|
||||
"es6-error@4.1.1" = fetchurl {
|
||||
url = "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz";
|
||||
@@ -1478,6 +1466,10 @@
|
||||
url = "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz";
|
||||
hash = "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==";
|
||||
};
|
||||
"gpt-tokenizer@4.0.0" = fetchurl {
|
||||
url = "https://registry.npmjs.org/gpt-tokenizer/-/gpt-tokenizer-4.0.0.tgz";
|
||||
hash = "sha512-YAWIyzvuVUHEfW7tFfFAxH8qQb+Q3RU9nYOTy7skMNX5qzU6Q8jxTHZLyO56ug1vYvCR7wndzpd3jwD86/mhjQ==";
|
||||
};
|
||||
"graceful-fs@4.2.11" = fetchurl {
|
||||
url = "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz";
|
||||
hash = "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==";
|
||||
@@ -1514,6 +1506,10 @@
|
||||
url = "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz";
|
||||
hash = "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==";
|
||||
};
|
||||
"is-fullwidth-code-point@5.1.0" = fetchurl {
|
||||
url = "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz";
|
||||
hash = "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==";
|
||||
};
|
||||
"is-what@4.1.16" = fetchurl {
|
||||
url = "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz";
|
||||
hash = "sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==";
|
||||
@@ -1538,9 +1534,9 @@
|
||||
url = "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz";
|
||||
hash = "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==";
|
||||
};
|
||||
"json-with-bigint@3.5.11" = fetchurl {
|
||||
url = "https://registry.npmjs.org/json-with-bigint/-/json-with-bigint-3.5.11.tgz";
|
||||
hash = "sha512-WvkM9Hfb9kqzCcbsvpwfWDvdfGZDhYuCoaCwHRe5q3LtULKkbrI/L6JYcN8owflgA3di5dP2yVAV2NVCXkgtkA==";
|
||||
"json-with-bigint@3.5.12" = fetchurl {
|
||||
url = "https://registry.npmjs.org/json-with-bigint/-/json-with-bigint-3.5.12.tgz";
|
||||
hash = "sha512-uwbF/wSSuOgC7qqlq27Xp5B6a2MHVug3t0idZdTqu0JnlFvgJuH7ju+KAk/J06C7GfhoYy2gnb9wz2INqcne7w==";
|
||||
};
|
||||
"json5@2.2.3" = fetchurl {
|
||||
url = "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz";
|
||||
@@ -1710,6 +1706,10 @@
|
||||
url = "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz";
|
||||
hash = "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==";
|
||||
};
|
||||
"mitata@1.0.34" = fetchurl {
|
||||
url = "https://registry.npmjs.org/mitata/-/mitata-1.0.34.tgz";
|
||||
hash = "sha512-Mc3zrtNBKIMeHSCQ0XqRLo1vbdIx1wvFV9c8NJAiyho6AjNfMY8bVhbS12bwciUdd1t4rj8099CH3N3NFahaUA==";
|
||||
};
|
||||
"mitt@3.0.1" = fetchurl {
|
||||
url = "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz";
|
||||
hash = "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==";
|
||||
@@ -1955,6 +1955,10 @@
|
||||
url = "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz";
|
||||
hash = "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==";
|
||||
};
|
||||
"slice-ansi@9.0.0" = fetchurl {
|
||||
url = "https://registry.npmjs.org/slice-ansi/-/slice-ansi-9.0.0.tgz";
|
||||
hash = "sha512-SO/3iYL5S3W57LLEniscOGPZgOqZUPCx6d3dB+52B80yJ0XstzsC/eV8gnA4tM3MHDrKz+OCFSLNjswdSC+/bA==";
|
||||
};
|
||||
"solid-js@1.9.14" = fetchurl {
|
||||
url = "https://registry.npmjs.org/solid-js/-/solid-js-1.9.14.tgz";
|
||||
hash = "sha512-sAEXC0Kk0S1EDg+8ysEWJDbYhA3RRoEjwuySUGlKIemeo0I5YZfOyumNjNs9Sv3y2nmhD+0rW66ag2HsMuQiGQ==";
|
||||
@@ -2067,10 +2071,6 @@
|
||||
url = "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.2.tgz";
|
||||
hash = "sha512-EOPFbyIub4ngnEdqi2yOcNeDLaX/0jcE1JoAXQDDMIthap7FoN795lc/SHfIq2d416VufXpM8z/lD+WRm2gfOQ==";
|
||||
};
|
||||
"typescript@5.4.5" = fetchurl {
|
||||
url = "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz";
|
||||
hash = "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==";
|
||||
};
|
||||
"typescript@7.0.2" = fetchurl {
|
||||
url = "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz";
|
||||
hash = "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==";
|
||||
@@ -2107,6 +2107,10 @@
|
||||
url = "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-0.4.2.tgz";
|
||||
hash = "sha512-VSV+fzfChirL3e7jay2yUC7B4HQCGtEWEg/MSSQbK+qWbqeGlRLlXTzPpYr3XGUvbpDHumWZBJxgesg4N7dbtA==";
|
||||
};
|
||||
"wrap-ansi@10.0.0" = fetchurl {
|
||||
url = "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-10.0.0.tgz";
|
||||
hash = "sha512-SGcvg80f0wUy2/fXES19feHMz8E0JoXv2uNgHOu4Dgi2OrCy1lqwFYEJz1BLbDI0exjPMe/ZdzZ/YpGECBG/aQ==";
|
||||
};
|
||||
"wrap-ansi@7.0.0" = fetchurl {
|
||||
url = "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz";
|
||||
hash = "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==";
|
||||
|
||||
+13
-15
@@ -19,23 +19,21 @@
|
||||
"@babel/traverse": "^7.29.7",
|
||||
"@babel/types": "^7.29.7",
|
||||
"@biomejs/biome": "^2.5.3",
|
||||
"@bufbuild/protobuf": "^2.12.1",
|
||||
"@bufbuild/protoc-gen-es": "^2.12.1",
|
||||
"@huggingface/transformers": "^4.2.0",
|
||||
"@napi-rs/cli": "3.7.2",
|
||||
"@oh-my-pi/hashline": "17.3.8",
|
||||
"@oh-my-pi/omp-stats": "17.3.8",
|
||||
"@oh-my-pi/omptype": "17.3.8",
|
||||
"@oh-my-pi/pi-agent-core": "17.3.8",
|
||||
"@oh-my-pi/pi-ai": "17.3.8",
|
||||
"@oh-my-pi/pi-catalog": "17.3.8",
|
||||
"@oh-my-pi/pi-coding-agent": "17.3.8",
|
||||
"@oh-my-pi/pi-mnemopi": "17.3.8",
|
||||
"@oh-my-pi/pi-natives": "17.3.8",
|
||||
"@oh-my-pi/pi-tui": "17.3.8",
|
||||
"@oh-my-pi/pi-utils": "17.3.8",
|
||||
"@oh-my-pi/pi-wire": "17.3.8",
|
||||
"@oh-my-pi/snapcompact": "17.3.8",
|
||||
"@oh-my-pi/hashline": "17.4.0",
|
||||
"@oh-my-pi/omp-stats": "17.4.0",
|
||||
"@oh-my-pi/omptype": "17.4.0",
|
||||
"@oh-my-pi/pi-agent-core": "17.4.0",
|
||||
"@oh-my-pi/pi-ai": "17.4.0",
|
||||
"@oh-my-pi/pi-catalog": "17.4.0",
|
||||
"@oh-my-pi/pi-coding-agent": "17.4.0",
|
||||
"@oh-my-pi/pi-mnemopi": "17.4.0",
|
||||
"@oh-my-pi/pi-natives": "17.4.0",
|
||||
"@oh-my-pi/pi-tui": "17.4.0",
|
||||
"@oh-my-pi/pi-utils": "17.4.0",
|
||||
"@oh-my-pi/pi-wire": "17.4.0",
|
||||
"@oh-my-pi/snapcompact": "17.4.0",
|
||||
"@opentelemetry/api": "^1.9.1",
|
||||
"@opentelemetry/api-logs": "^0.220.0",
|
||||
"@opentelemetry/context-async-hooks": "^2.9.0",
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [17.4.0] - 2026-08-20
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- Replaced global token counting functions (`countTokens`, `countTokensConservatively`, `setTokenizerModel`, and `estimateTokens`) with model-scoped, immutable `Tokenizer` instances (`agent.tokenizer`). Use `tokenizer.countTokens(text, mode?)`, `tokenizer.countMessage(message)`, or `tokenizer.countMessages(messages)`.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"type": "module",
|
||||
"name": "@oh-my-pi/pi-agent-core",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
|
||||
"homepage": "https://omp.sh",
|
||||
"author": "Can Boluk",
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [17.4.0] - 2026-08-20
|
||||
|
||||
### Added
|
||||
|
||||
- Added model metadata fields (`context_length`, `max_output_tokens`, `input_modalities`, etc.) to auth gateway model listing responses
|
||||
@@ -10,6 +12,7 @@
|
||||
|
||||
- Fixed tool-argument repair applying lossy transformations (such as stringifying objects or stripping unrecognized keys) when validating union schemas (`anyOf`/`oneOf`), preventing corrupted tool call and subagent payloads
|
||||
- Fixed 400 errors when communicating with local OpenAI-compatible inference servers that reject `chat_template_kwargs.reasoning_effort` by improving reasoning effort parameter fallback and compatibility handling
|
||||
- Fixed DeepSeek-family models on hosts like Fireworks losing reasoning whenever tools were offered: a redundant `tool_choice: "auto"` is now omitted so the provider keeps thinking enabled; forced and `"none"` selectors still take priority ([#1207](https://github.com/can1357/oh-my-pi/issues/1207))
|
||||
|
||||
## [17.3.8] - 2026-08-19
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"type": "module",
|
||||
"name": "@oh-my-pi/pi-ai",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"description": "Unified LLM API with automatic model discovery and provider configuration",
|
||||
"homepage": "https://omp.sh",
|
||||
"author": "Can Boluk",
|
||||
@@ -37,14 +37,12 @@
|
||||
"fmt": "biome format --write ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@bufbuild/protobuf": "catalog:",
|
||||
"@oh-my-pi/omptype": "catalog:",
|
||||
"@oh-my-pi/pi-catalog": "catalog:",
|
||||
"@oh-my-pi/pi-utils": "catalog:",
|
||||
"@oh-my-pi/pi-wire": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bufbuild/protoc-gen-es": "catalog:",
|
||||
"@types/bun": "catalog:"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Extracts protobuf definitions from bundled JavaScript generated by @bufbuild/protobuf.
|
||||
Extracts protobuf definitions from bundled JavaScript.
|
||||
Reconstructs .proto files with comments preserved.
|
||||
|
||||
Usage: python proto-extractor.py <bundled-js-file> <output-dir>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* Kept apart from `cursor/exec-modern.ts` on purpose: these are pure
|
||||
* string/path functions with no protobuf coupling, while that module pulls in
|
||||
* `@bufbuild/protobuf` and the generated `agent_pb` graph. The legacy shim is
|
||||
* the generated cursor protobuf graph. The legacy shim is
|
||||
* compiled into the bundled virtual module registry, so importing it from a
|
||||
* nested path would drag the whole exec implementation in with it — and
|
||||
* `./providers/*` is a single-segment wildcard export that cannot serve a
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { createHash } from "node:crypto";
|
||||
import * as fs from "node:fs/promises";
|
||||
import http2 from "node:http2";
|
||||
import { create, fromBinary, fromJson, type JsonValue, toBinary, toJson } from "@bufbuild/protobuf";
|
||||
import { ValueSchema } from "@bufbuild/protobuf/wkt";
|
||||
import type { ConversationStep, McpToolDefinition } from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
import type { ConversationStep, McpToolDefinition } from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import {
|
||||
AgentClientMessageSchema,
|
||||
AgentConversationTurnStructureSchema,
|
||||
@@ -139,11 +137,21 @@ import {
|
||||
WriteShellStdinErrorSchema,
|
||||
WriteShellStdinResultSchema,
|
||||
WriteSuccessSchema,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import {
|
||||
create,
|
||||
decodeJsonValue,
|
||||
encodeJsonValue,
|
||||
fromBinary,
|
||||
type JsonValue,
|
||||
toBinary,
|
||||
toJson,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
import { isKimiK3ModelId } from "@oh-my-pi/pi-catalog/identity";
|
||||
import { calculateCost } from "@oh-my-pi/pi-catalog/models";
|
||||
import {
|
||||
$env,
|
||||
isRecord,
|
||||
logger,
|
||||
parseJsonWithRepair,
|
||||
parseStreamingJson,
|
||||
@@ -3099,8 +3107,7 @@ function parseToolArgsJson(text: string): unknown {
|
||||
|
||||
function decodeMcpArgValue(value: Uint8Array): unknown {
|
||||
try {
|
||||
const parsedValue = fromBinary(ValueSchema, value);
|
||||
const jsonValue = toJson(ValueSchema, parsedValue) as JsonValue;
|
||||
const jsonValue = decodeJsonValue(value);
|
||||
if (typeof jsonValue === "string") {
|
||||
return parseToolArgsJson(jsonValue);
|
||||
}
|
||||
@@ -4212,10 +4219,10 @@ export function buildMcpToolDefinitions(tools: Tool[] | undefined): McpToolDefin
|
||||
return forwarded.map(tool => {
|
||||
const jsonSchema = toolWireSchema(tool);
|
||||
const schemaValue: JsonValue =
|
||||
jsonSchema && typeof jsonSchema === "object"
|
||||
? (jsonSchema as JsonValue)
|
||||
jsonSchema !== null && !Array.isArray(jsonSchema) && isJsonValue(jsonSchema)
|
||||
? jsonSchema
|
||||
: { type: "object", properties: {}, required: [] };
|
||||
const inputSchema = toBinary(ValueSchema, fromJson(ValueSchema, schemaValue));
|
||||
const inputSchema = encodeJsonValue(schemaValue);
|
||||
return create(McpToolDefinitionSchema, {
|
||||
name: tool.name,
|
||||
description: tool.description || "",
|
||||
@@ -4463,17 +4470,11 @@ function buildRootPromptMessagesJson(
|
||||
return entries;
|
||||
}
|
||||
|
||||
function isPlainRecord(value: unknown): value is Record<string, unknown> {
|
||||
if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
|
||||
const prototype = Object.getPrototypeOf(value);
|
||||
return prototype === Object.prototype || prototype === null;
|
||||
}
|
||||
|
||||
function isJsonValue(value: unknown): value is JsonValue {
|
||||
if (value === null || typeof value === "string" || typeof value === "boolean") return true;
|
||||
if (typeof value === "number") return Number.isFinite(value);
|
||||
if (Array.isArray(value)) return value.every(isJsonValue);
|
||||
if (!isPlainRecord(value)) return false;
|
||||
if (!isRecord(value)) return false;
|
||||
for (const key in value) {
|
||||
if (!isJsonValue(value[key])) return false;
|
||||
}
|
||||
@@ -4488,7 +4489,7 @@ function encodeCursorMcpArguments(toolCall: ToolCall): Record<string, Uint8Array
|
||||
if (!isJsonValue(value)) {
|
||||
throw new AIError.ValidationError(`Cursor tool argument ${toolCall.name}.${name} is not JSON-serializable`);
|
||||
}
|
||||
encoded[name] = toBinary(ValueSchema, fromJson(ValueSchema, value));
|
||||
encoded[name] = encodeJsonValue(value);
|
||||
}
|
||||
return encoded;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
* the server reads as "the tool ran and produced nothing".
|
||||
*/
|
||||
|
||||
import { create } from "@bufbuild/protobuf";
|
||||
import {
|
||||
AfterAgentResponseRequestResponseSchema,
|
||||
AfterAgentThoughtRequestResponseSchema,
|
||||
@@ -64,7 +63,8 @@ import {
|
||||
StopRequestResponseSchema,
|
||||
SubagentStartRequestResponseSchema,
|
||||
SubagentStopRequestResponseSchema,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import { create } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
import type { ToolResultMessage } from "../../types";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type http2 from "node:http2";
|
||||
import { create, toBinary } from "@bufbuild/protobuf";
|
||||
import {
|
||||
AgentClientMessageSchema,
|
||||
AskQuestionInteractionResponseSchema,
|
||||
@@ -21,7 +20,8 @@ import {
|
||||
WebFetchRequestResponseSchema,
|
||||
WebSearchRequestResponse_ApprovedSchema,
|
||||
WebSearchRequestResponseSchema,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import { create, toBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
import { $env } from "@oh-my-pi/pi-utils";
|
||||
|
||||
const NOT_IMPLEMENTED_SUFFIX = "not implemented by this client";
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
version: v2
|
||||
plugins:
|
||||
- local: /work/pi/node_modules/.bin/protoc-gen-es
|
||||
out: ../gen
|
||||
opt:
|
||||
- target=ts
|
||||
@@ -1,17 +0,0 @@
|
||||
version: v2
|
||||
modules:
|
||||
- path: .
|
||||
lint:
|
||||
use:
|
||||
- STANDARD
|
||||
except:
|
||||
- COMMENT_FIELD
|
||||
- COMMENT_MESSAGE
|
||||
- COMMENT_ENUM
|
||||
- COMMENT_ENUM_VALUE
|
||||
- COMMENT_RPC
|
||||
- COMMENT_SERVICE
|
||||
- COMMENT_ONEOF
|
||||
breaking:
|
||||
use:
|
||||
- FILE
|
||||
@@ -1,32 +1,26 @@
|
||||
import { gunzipSync, gzipSync } from "node:zlib";
|
||||
import { create, fromBinary, toBinary } from "@bufbuild/protobuf";
|
||||
import {
|
||||
ChatMessageRequestType,
|
||||
GetChatMessageRequestSchema,
|
||||
GetChatMessageResponseSchema,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/api_server_pb/api_server_pb";
|
||||
import {
|
||||
GetUserJwtRequestSchema,
|
||||
GetUserJwtResponseSchema,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/auth_pb/auth_pb";
|
||||
import {
|
||||
CacheControlType,
|
||||
type ChatMessagePrompt,
|
||||
ChatMessagePromptSchema,
|
||||
ChatToolChoiceSchema,
|
||||
ChatToolDefinitionSchema,
|
||||
PromptCacheOptionsSchema,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/chat_pb/chat_pb";
|
||||
import {
|
||||
ChatMessageRequestType,
|
||||
ChatMessageSource,
|
||||
type ChatToolCall,
|
||||
ChatToolCallSchema,
|
||||
ChatToolChoiceSchema,
|
||||
ChatToolDefinitionSchema,
|
||||
CompletionConfigurationSchema,
|
||||
ConversationalPlannerMode,
|
||||
GetChatMessageRequestSchema,
|
||||
GetChatMessageResponseSchema,
|
||||
GetUserJwtRequestSchema,
|
||||
GetUserJwtResponseSchema,
|
||||
ImageDataSchema,
|
||||
MetadataSchema,
|
||||
PromptCacheOptionsSchema,
|
||||
StopReason,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/codeium_common_pb/codeium_common_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/devin-proto";
|
||||
import { create, fromBinary, toBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
import { calculateCost } from "@oh-my-pi/pi-catalog/models";
|
||||
import { logger, parseStreamingJson, parseStreamingJsonThrottled } from "@oh-my-pi/pi-utils";
|
||||
import * as AIError from "../error";
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
version: v2
|
||||
# Codegen is scoped to the api_server.proto transitive closure (the RPCs the
|
||||
# devin provider actually uses). The rest of the reverse-engineered Codeium
|
||||
# corpus is kept in this directory for reference/maintenance but is NOT
|
||||
# generated. Vendored google/* WKTs are intentionally absent — buf bundles them.
|
||||
inputs:
|
||||
- directory: .
|
||||
paths:
|
||||
- buf/validate/validate.proto
|
||||
- exa/analytics_pb/analytics.proto
|
||||
- exa/api_server_pb/api_server.proto
|
||||
- exa/auth_pb/auth.proto
|
||||
- exa/auto_cascade_common_pb/auto_cascade_common.proto
|
||||
- exa/bug_checker_pb/bug_checker.proto
|
||||
- exa/cascade_plugins_pb/cascade_plugins.proto
|
||||
- exa/chat_pb/chat.proto
|
||||
- exa/code_edit/code_edit_pb/code_edit.proto
|
||||
- exa/codeium_common_pb/codeium_common.proto
|
||||
- exa/context_module_pb/context_module.proto
|
||||
- exa/cortex_pb/cortex.proto
|
||||
- exa/diff_action_pb/diff_action.proto
|
||||
- exa/index_pb/index.proto
|
||||
- exa/knowledge_base_pb/knowledge_base.proto
|
||||
- exa/language_server_pb/language_server.proto
|
||||
- exa/opensearch_clients_pb/opensearch_clients.proto
|
||||
- exa/prompt_pb/prompt.proto
|
||||
- exa/reactive_component_pb/reactive_component.proto
|
||||
- exa/trust_pb/trust.proto
|
||||
plugins:
|
||||
- local: ../../../../../../node_modules/.bin/protoc-gen-es
|
||||
out: ../../../../../catalog/src/discovery/devin-gen
|
||||
opt:
|
||||
- target=ts
|
||||
@@ -1,17 +0,0 @@
|
||||
version: v2
|
||||
modules:
|
||||
- path: .
|
||||
lint:
|
||||
use:
|
||||
- STANDARD
|
||||
except:
|
||||
- COMMENT_FIELD
|
||||
- COMMENT_MESSAGE
|
||||
- COMMENT_ENUM
|
||||
- COMMENT_ENUM_VALUE
|
||||
- COMMENT_RPC
|
||||
- COMMENT_SERVICE
|
||||
- COMMENT_ONEOF
|
||||
breaking:
|
||||
use:
|
||||
- FILE
|
||||
@@ -106,6 +106,7 @@ import {
|
||||
resolveOpenAICompletionsOutputClamp,
|
||||
resolveOpenAIOutputTokenParam,
|
||||
resolveOpenAIRequestSetup,
|
||||
shouldDropAutoToolChoiceForReasoning,
|
||||
shouldRetryWithoutStrictTools,
|
||||
} from "./openai-shared";
|
||||
import { transformMessages } from "./transform-messages";
|
||||
@@ -1692,6 +1693,10 @@ function buildParams(
|
||||
delete params.tool_choice;
|
||||
}
|
||||
|
||||
if (shouldDropAutoToolChoiceForReasoning(model, initialCompat, params.tool_choice, options)) {
|
||||
delete params.tool_choice;
|
||||
}
|
||||
|
||||
const finalPolicy = resolveOpenAICompatPolicy(model, {
|
||||
endpoint: "chat-completions",
|
||||
reasoning: options?.reasoning,
|
||||
|
||||
@@ -99,6 +99,7 @@ import {
|
||||
resolveOpenAIOutputTokenParam,
|
||||
resolveOpenAIRequestSetup,
|
||||
resolveOpenAIResponsesOutputClamp,
|
||||
shouldDropAutoToolChoiceForReasoning,
|
||||
shouldRetryWithoutStrictTools,
|
||||
} from "./openai-shared";
|
||||
|
||||
@@ -1276,6 +1277,10 @@ export function buildParams(
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldDropAutoToolChoiceForReasoning(model, model.compat, params.tool_choice, options)) {
|
||||
delete params.tool_choice;
|
||||
}
|
||||
|
||||
const reasoningPolicy = resolveOpenAICompatPolicy(model, {
|
||||
endpoint: "responses",
|
||||
reasoning: options?.reasoning,
|
||||
|
||||
@@ -844,6 +844,29 @@ function isImplicitDisableWhenNotRequested(disableMode: OpenAIReasoningDisableMo
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a redundant `tool_choice: "auto"` should be dropped to keep
|
||||
* reasoning alive. Hosts with `disableReasoningOnToolChoice` (DeepSeek family
|
||||
* on e.g. Fireworks) silently turn reasoning off whenever any `tool_choice`
|
||||
* is present. "auto" is already the provider default, so omitting it is
|
||||
* wire-neutral for tool selection; forced and "none" choices are semantic and
|
||||
* still win over reasoning (#1207).
|
||||
*/
|
||||
export function shouldDropAutoToolChoiceForReasoning(
|
||||
model: Pick<Model, "reasoning">,
|
||||
compat: { disableReasoningOnToolChoice: boolean },
|
||||
toolChoice: unknown,
|
||||
options: { reasoning?: string; disableReasoning?: boolean } | undefined,
|
||||
): boolean {
|
||||
return (
|
||||
toolChoice === "auto" &&
|
||||
compat.disableReasoningOnToolChoice &&
|
||||
Boolean(model.reasoning) &&
|
||||
options?.reasoning !== undefined &&
|
||||
!options.disableReasoning
|
||||
);
|
||||
}
|
||||
|
||||
export function resolveOpenAICompatPolicy<TApi extends Api>(
|
||||
model: Model<TApi>,
|
||||
options: ResolveOpenAICompatPolicyOptions,
|
||||
|
||||
@@ -40,7 +40,7 @@ import type { OpenAICompletionsOptions } from "./providers/openai-completions";
|
||||
import { streamPiNative } from "./providers/pi-native-client";
|
||||
// Heavy provider stream functions are imported lazily via register-builtins,
|
||||
// which wraps each provider module in a dynamic import. This keeps the
|
||||
// AWS SDK, google-auth-library, @google/genai, @bufbuild/protobuf, and
|
||||
// AWS SDK, google-auth-library, @google/genai, and
|
||||
// other provider SDKs out of the CLI startup parse graph. The
|
||||
// gitlab-duo / kimi / synthetic providers stay eager because their modules
|
||||
// export routing predicates (isGitLabDuoModel, isKimiModel, isSyntheticModel)
|
||||
|
||||
@@ -32,7 +32,7 @@ import type {
|
||||
ShellResult,
|
||||
WriteArgs,
|
||||
WriteResult,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import type { Effort } from "@oh-my-pi/pi-catalog/effort";
|
||||
import { isOpenAIModelId } from "@oh-my-pi/pi-catalog/identity/family";
|
||||
import type { Api, FetchImpl, KnownApi, Model, Provider, ThinkingBudgets, Usage } from "@oh-my-pi/pi-catalog/types";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { afterEach, describe, expect, it } from "bun:test";
|
||||
import * as http2 from "node:http2";
|
||||
import { create, toBinary } from "@bufbuild/protobuf";
|
||||
import { streamCursor } from "@oh-my-pi/pi-ai/providers/cursor";
|
||||
import type { Context, Model } from "@oh-my-pi/pi-ai/types";
|
||||
import { buildModel } from "@oh-my-pi/pi-catalog/build";
|
||||
@@ -9,7 +8,8 @@ import {
|
||||
InteractionUpdateSchema,
|
||||
TextDeltaUpdateSchema,
|
||||
TurnEndedUpdateSchema,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import { create, toBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
|
||||
// Cursor forwards caller headers (including `before_provider_headers` extension
|
||||
// edits), and it speaks HTTP/2. These assert the TRANSPORT contract against a
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { afterEach, describe, expect, it } from "bun:test";
|
||||
import * as http2 from "node:http2";
|
||||
import { create, fromBinary, toBinary } from "@bufbuild/protobuf";
|
||||
import { streamCursor } from "@oh-my-pi/pi-ai/providers/cursor";
|
||||
import type { Context, Model } from "@oh-my-pi/pi-ai/types";
|
||||
import { buildModel } from "@oh-my-pi/pi-catalog/build";
|
||||
@@ -10,7 +9,8 @@ import {
|
||||
InteractionUpdateSchema,
|
||||
TextDeltaUpdateSchema,
|
||||
TurnEndedUpdateSchema,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import { create, fromBinary, toBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
|
||||
// #8345: a server-side per-conversation rejection (bare resource_exhausted,
|
||||
// zero tokens) poisons the wire conversationId; the next attempt must rotate
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { afterEach, describe, expect, it, vi } from "bun:test";
|
||||
import { create } from "@bufbuild/protobuf";
|
||||
import {
|
||||
type BlockState,
|
||||
buildCursorHistoryForTest,
|
||||
@@ -16,7 +15,7 @@ import type { AssistantMessage, Context, CursorExecHandlers, Model, ToolResultMe
|
||||
import { kCursorExecResolved } from "@oh-my-pi/pi-ai/utils/block-symbols";
|
||||
import { AssistantMessageEventStream } from "@oh-my-pi/pi-ai/utils/event-stream";
|
||||
import { buildModel } from "@oh-my-pi/pi-catalog/build";
|
||||
import type { McpResult, ReadResult } from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
import type { McpResult, ReadResult } from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import {
|
||||
type AgentRunRequest,
|
||||
AgentServerMessageSchema,
|
||||
@@ -31,7 +30,8 @@ import {
|
||||
ReadRejectedSchema,
|
||||
ReadResultSchema,
|
||||
ReadSuccessSchema,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import { create } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
import { logger } from "@oh-my-pi/pi-utils";
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import { create, fromBinary, toBinary } from "@bufbuild/protobuf";
|
||||
import {
|
||||
type BlockState,
|
||||
CURSOR_CLIENT_VERSION,
|
||||
@@ -64,7 +63,8 @@ import {
|
||||
SubagentAwaitArgsSchema,
|
||||
ToolCallSchema,
|
||||
WebFetchAllowlistPrecheckArgsSchema,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import { create, fromBinary, toBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
|
||||
/**
|
||||
* Drive one `ExecServerMessage` through the real dispatcher and decode every
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import { create, fromBinary } from "@bufbuild/protobuf";
|
||||
import { type BlockState, handleServerMessage, type ToolCallState } from "@oh-my-pi/pi-ai/providers/cursor";
|
||||
import type { AssistantMessage } from "@oh-my-pi/pi-ai/types";
|
||||
import { AssistantMessageEventStream } from "@oh-my-pi/pi-ai/utils/event-stream";
|
||||
@@ -16,7 +15,8 @@ import {
|
||||
SetupVmEnvironmentArgsSchema,
|
||||
SwitchModeRequestQuerySchema,
|
||||
WebSearchRequestQuerySchema,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import { create, fromBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
|
||||
type ProtoUnknownField = { no: number; wireType: number; data: Uint8Array };
|
||||
type ProtoUnknownBag = { $unknown?: ProtoUnknownField[] };
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
// buildGrpcRequest is exercised directly (the transport is HTTP/2), and the
|
||||
// serialized run request is decoded back from the wire bytes.
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import { fromBinary } from "@bufbuild/protobuf";
|
||||
import { buildGrpcRequest } from "@oh-my-pi/pi-ai/providers/cursor";
|
||||
import type { Context, Model } from "@oh-my-pi/pi-ai/types";
|
||||
import { buildModel } from "@oh-my-pi/pi-catalog/build";
|
||||
import { AgentClientMessageSchema } from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
import { AgentClientMessageSchema } from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import { fromBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
|
||||
const model: Model<"cursor-agent"> = buildModel({
|
||||
id: "cursor-composer-2.5",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { afterEach, describe, expect, it } from "bun:test";
|
||||
import * as http2 from "node:http2";
|
||||
import { create, toBinary } from "@bufbuild/protobuf";
|
||||
import { streamCursor } from "@oh-my-pi/pi-ai/providers/cursor";
|
||||
import type { Context, CursorToolResultHandler, Model, ToolResultMessage } from "@oh-my-pi/pi-ai/types";
|
||||
import { buildModel } from "@oh-my-pi/pi-catalog/build";
|
||||
@@ -15,7 +14,8 @@ import {
|
||||
TurnEndedUpdateSchema,
|
||||
UpdateTodosArgsSchema,
|
||||
UpdateTodosToolCallSchema,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import { create, toBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
|
||||
const CONNECT_END_STREAM_FLAG = 0b00000010;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import { create, fromBinary, toBinary } from "@bufbuild/protobuf";
|
||||
import {
|
||||
type BlockState,
|
||||
processInteractionUpdate,
|
||||
@@ -29,7 +28,8 @@ import {
|
||||
UpdateTodosResultSchema,
|
||||
UpdateTodosSuccessSchema,
|
||||
UpdateTodosToolCallSchema,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import { create, fromBinary, toBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
|
||||
/** One `todoSync` invocation, recorded verbatim. */
|
||||
interface SyncCall {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import { create, fromBinary, toBinary } from "@bufbuild/protobuf";
|
||||
import { type BlockState, handleServerMessage, type ToolCallState } from "@oh-my-pi/pi-ai/providers/cursor";
|
||||
import type { AssistantMessage } from "@oh-my-pi/pi-ai/types";
|
||||
import { AssistantMessageEventStream } from "@oh-my-pi/pi-ai/utils/event-stream";
|
||||
import type { InteractionQuery, InteractionResponse } from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
import type { InteractionQuery, InteractionResponse } from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import {
|
||||
type AgentClientMessage,
|
||||
AgentClientMessageSchema,
|
||||
@@ -20,7 +19,8 @@ import {
|
||||
WebFetchRequestQuerySchema,
|
||||
WebSearchArgsSchema,
|
||||
WebSearchRequestQuerySchema,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-gen/agent_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/cursor-proto";
|
||||
import { create, fromBinary, toBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
|
||||
function cursorAssistantMessage(): AssistantMessage {
|
||||
return {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import { create, toBinary } from "@bufbuild/protobuf";
|
||||
import { streamDevin } from "@oh-my-pi/pi-ai/providers/devin";
|
||||
import type { Context, Model } from "@oh-my-pi/pi-ai/types";
|
||||
import { buildModel } from "@oh-my-pi/pi-catalog/build";
|
||||
import { GetUserJwtResponseSchema } from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/auth_pb/auth_pb";
|
||||
import { GetUserJwtResponseSchema } from "@oh-my-pi/pi-catalog/discovery/devin-proto";
|
||||
import { create, toBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
|
||||
/**
|
||||
* Regression for #4228: a Devin Connect frame header advertising an outsized
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import { gunzipSync } from "node:zlib";
|
||||
import { create, fromBinary, toBinary } from "@bufbuild/protobuf";
|
||||
import { streamDevin } from "@oh-my-pi/pi-ai/providers/devin";
|
||||
import type { AssistantMessage, Context, Model } from "@oh-my-pi/pi-ai/types";
|
||||
import { buildModel } from "@oh-my-pi/pi-catalog/build";
|
||||
import { GetChatMessageRequestSchema } from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/api_server_pb/api_server_pb";
|
||||
import { GetUserJwtResponseSchema } from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/auth_pb/auth_pb";
|
||||
import { GetChatMessageRequestSchema, GetUserJwtResponseSchema } from "@oh-my-pi/pi-catalog/discovery/devin-proto";
|
||||
import { create, fromBinary, toBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
|
||||
const devinModel: Model<"devin-agent"> = buildModel({
|
||||
id: "devin-test",
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import { create, toBinary } from "@bufbuild/protobuf";
|
||||
import * as AIError from "@oh-my-pi/pi-ai/error";
|
||||
import { streamDevin } from "@oh-my-pi/pi-ai/providers/devin";
|
||||
import type { Context, Model } from "@oh-my-pi/pi-ai/types";
|
||||
import { buildModel } from "@oh-my-pi/pi-catalog/build";
|
||||
import { GetChatMessageResponseSchema } from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/api_server_pb/api_server_pb";
|
||||
import { GetUserJwtResponseSchema } from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/auth_pb/auth_pb";
|
||||
import { GetChatMessageResponseSchema, GetUserJwtResponseSchema } from "@oh-my-pi/pi-catalog/discovery/devin-proto";
|
||||
import { create, toBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
|
||||
const CONNECT_END_STREAM_FLAG = 0x02;
|
||||
const LARGE_TOOL_RESULT_BYTES = 160 * 1024;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import { create, toBinary } from "@bufbuild/protobuf";
|
||||
import { streamDevin } from "@oh-my-pi/pi-ai/providers/devin";
|
||||
import type { Context, Model, ToolCall } from "@oh-my-pi/pi-ai/types";
|
||||
import { buildModel } from "@oh-my-pi/pi-catalog/build";
|
||||
import { GetChatMessageResponseSchema } from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/api_server_pb/api_server_pb";
|
||||
import { GetUserJwtResponseSchema } from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/auth_pb/auth_pb";
|
||||
import {
|
||||
ChatToolCallSchema,
|
||||
GetChatMessageResponseSchema,
|
||||
GetUserJwtResponseSchema,
|
||||
StopReason,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/codeium_common_pb/codeium_common_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/devin-proto";
|
||||
import { create, toBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
|
||||
function frameConnectMessage(payload: Uint8Array): Uint8Array {
|
||||
const out = new Uint8Array(5 + payload.length);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import { create, toBinary } from "@bufbuild/protobuf";
|
||||
import { streamDevin } from "@oh-my-pi/pi-ai/providers/devin";
|
||||
import type { Context, Model } from "@oh-my-pi/pi-ai/types";
|
||||
import { buildModel } from "@oh-my-pi/pi-catalog/build";
|
||||
import { GetChatMessageResponseSchema } from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/api_server_pb/api_server_pb";
|
||||
import { GetUserJwtResponseSchema } from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/auth_pb/auth_pb";
|
||||
import {
|
||||
GetChatMessageResponseSchema,
|
||||
GetUserJwtResponseSchema,
|
||||
ModelUsageStatsSchema,
|
||||
StopReason,
|
||||
} from "@oh-my-pi/pi-catalog/discovery/devin-gen/exa/codeium_common_pb/codeium_common_pb";
|
||||
} from "@oh-my-pi/pi-catalog/discovery/devin-proto";
|
||||
import { create, toBinary } from "@oh-my-pi/pi-catalog/discovery/protobuf";
|
||||
|
||||
function frameConnectMessage(payload: Uint8Array): Uint8Array {
|
||||
const out = new Uint8Array(5 + payload.length);
|
||||
|
||||
@@ -1792,7 +1792,9 @@ describe("kimi model detection via detectCompat", () => {
|
||||
// Dropping reasoning_effort does not turn off the gateway's default thinking
|
||||
// mode, so the compat descriptor itself must mark forced tool choice
|
||||
// unsupported (no per-model override) and buildParams must downgrade the
|
||||
// selector to "auto" while keeping the tool advertised.
|
||||
// selector while keeping the tool advertised. The downgraded "auto" is then
|
||||
// dropped as redundant so reasoning survives (#1207) — omission and "auto"
|
||||
// are wire-equivalent for tool selection.
|
||||
it("scopes the DeepSeek forced tool_choice downgrade to OpenCode gateways", async () => {
|
||||
const todoTool: Tool = {
|
||||
name: "todo",
|
||||
@@ -1839,7 +1841,7 @@ describe("kimi model detection via detectCompat", () => {
|
||||
const openCode = buildModel(deepseekSpec);
|
||||
expect(openCode.compat.supportsForcedToolChoice).toBe(false);
|
||||
const openCodePayload = await captureToolChoice(openCode);
|
||||
expect(openCodePayload.tool_choice).toBe("auto");
|
||||
expect(openCodePayload.tool_choice).toBeUndefined();
|
||||
expect(
|
||||
Array.isArray(openCodePayload.tools) &&
|
||||
openCodePayload.tools.some(tool => getNestedObject(tool, "function")?.name === "todo"),
|
||||
@@ -1853,7 +1855,7 @@ describe("kimi model detection via detectCompat", () => {
|
||||
} satisfies ModelSpec<"openai-completions">);
|
||||
expect(customOpenCode.compat.supportsForcedToolChoice).toBe(false);
|
||||
const customPayload = await captureToolChoice(customOpenCode);
|
||||
expect(customPayload.tool_choice).toBe("auto");
|
||||
expect(customPayload.tool_choice).toBeUndefined();
|
||||
|
||||
const nvidia = buildModel({
|
||||
...deepseekSpec,
|
||||
|
||||
@@ -121,9 +121,11 @@ describe("Chat Completions reasoning-disable conflict policy (per dialect)", ()
|
||||
});
|
||||
|
||||
it("applies the same per-dialect disable on the non-forced disableReasoningOnToolChoice path", async () => {
|
||||
// Non-forced branch (any tool_choice) shares the dialect-aware helper:
|
||||
// an OpenRouter reasoning model with disableReasoningOnToolChoice must emit
|
||||
// Non-forced branch shares the dialect-aware helper: an OpenRouter
|
||||
// reasoning model with disableReasoningOnToolChoice must emit
|
||||
// reasoning={enabled:false} rather than leaving the effort object in place.
|
||||
// A semantic "none" selector exercises the path; a bare "auto" no longer
|
||||
// does — it is dropped as redundant so reasoning survives (#1207).
|
||||
const model = reasoningDialectModel("openrouter", {
|
||||
disableReasoningOnForcedToolChoice: false,
|
||||
disableReasoningOnToolChoice: true,
|
||||
@@ -134,11 +136,11 @@ describe("Chat Completions reasoning-disable conflict policy (per dialect)", ()
|
||||
fetch: createMockFetch(),
|
||||
signal: createAbortedSignal(),
|
||||
reasoning: "high",
|
||||
toolChoice: "auto",
|
||||
toolChoice: "none",
|
||||
onPayload: payload => resolve(payload),
|
||||
});
|
||||
const payload = (await promise) as Record<string, unknown>;
|
||||
expect(payload.tool_choice).toBe("auto");
|
||||
expect(payload.tool_choice).toBe("none");
|
||||
expect(payload.reasoning).toEqual({ enabled: false });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2,11 +2,17 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [17.4.0] - 2026-08-20
|
||||
|
||||
### Added
|
||||
|
||||
- Models now include an optional `tokenizer` family field across bundled, discovered, and custom models (supporting Claude, Qwen, DeepSeek, Kimi, and GLM families), with support for explicit overrides in model configuration.
|
||||
- Added long-context cost tiers (`cost.longContext`) to subscription Codex GPT-5.6 models (Sol, Terra, Luna) matching first-party API pricing above 272K input tokens.
|
||||
|
||||
### Changed
|
||||
|
||||
- Bundled model metadata is prebuilt during generation, reducing catalog startup work.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed tool-call turn failures for `opencode-go/muse-spark-1.2` and related variants by ensuring API transport pins apply to live discovery and automatically inferring response routes for gateway-first OpenCode models ([#8957](https://github.com/can1357/oh-my-pi/issues/8957)).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"type": "module",
|
||||
"name": "@oh-my-pi/pi-catalog",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
|
||||
"homepage": "https://omp.sh",
|
||||
"author": "Can Boluk",
|
||||
@@ -31,10 +31,9 @@
|
||||
"fix": "biome check --write --unsafe .",
|
||||
"fmt": "biome format --write .",
|
||||
"gen:models": "bun scripts/generate-models.ts",
|
||||
"gen:cursor-proto": "protoc --plugin=protoc-gen-es=../../node_modules/.bin/protoc-gen-es --es_out=src/discovery/cursor-gen --es_opt=target=ts -I ../ai/src/providers/cursor/proto ../ai/src/providers/cursor/proto/agent.proto"
|
||||
"gen:proto": "bun scripts/generate-protocols.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bufbuild/protobuf": "catalog:",
|
||||
"@oh-my-pi/omptype": "catalog:",
|
||||
"@oh-my-pi/pi-utils": "catalog:"
|
||||
},
|
||||
|
||||
@@ -16,6 +16,7 @@ import type { OAuthProvider } from "@oh-my-pi/pi-ai/oauth/types";
|
||||
import { getGitLabDuoModels } from "@oh-my-pi/pi-ai/providers/gitlab-duo";
|
||||
import { getProviderDefinition } from "@oh-my-pi/pi-ai/registry";
|
||||
import { $env } from "@oh-my-pi/pi-utils";
|
||||
import { buildModel } from "../src/build";
|
||||
import { ANTIGRAVITY_PRIMARY_ENDPOINT, fetchAntigravityDiscoveryModels } from "../src/discovery/antigravity";
|
||||
import { buildGitLabDuoWorkflowFallbackModel } from "../src/discovery/gitlab-duo-workflow";
|
||||
import { createModelManager } from "../src/model-manager";
|
||||
@@ -52,7 +53,7 @@ import {
|
||||
stripFireworksDeepSeekThinkingToggle,
|
||||
} from "../src/provider-models/openai-compat";
|
||||
import { type OpenAICodexAccount, openaiCodexModelManagerOptions } from "../src/provider-models/special";
|
||||
import type { Api, ModelSpec } from "../src/types";
|
||||
import type { Api, Model, ModelSpec } from "../src/types";
|
||||
import { cleanModelName } from "../src/utils";
|
||||
import { collapseEffortVariantsAcrossProviders } from "../src/variant-collapse";
|
||||
import {
|
||||
@@ -156,7 +157,7 @@ async function fetchProviderModelsFromCatalog(
|
||||
return { models: [], succeeded: true };
|
||||
}
|
||||
console.log(`Fetched ${models.length} models from ${descriptor.catalogDiscovery.label} model manager`);
|
||||
// The manager returns built models; models.json stores specs (sparse compat).
|
||||
// Keep discovery rows as specs until policies finish; the final bundle is fully materialized below.
|
||||
return { models: models.map(model => toModelSpec(model)), succeeded: true };
|
||||
} catch (error) {
|
||||
console.error(`Failed to fetch ${descriptor.catalogDiscovery.label} models:`, error);
|
||||
@@ -657,8 +658,9 @@ async function generateModels() {
|
||||
// Previous-snapshot entries may carry an older ThinkingConfig vocabulary;
|
||||
// applyGeneratedModelPolicies re-bakes `thinking` for every model, so the
|
||||
// inbound shape is irrelevant beyond identity/pricing/compat fields.
|
||||
for (const models of Object.values(prevModelsJson as unknown as Record<string, Record<string, ModelSpec>>)) {
|
||||
for (const model of Object.values(models)) {
|
||||
for (const models of Object.values(prevModelsJson as unknown as Record<string, Record<string, Model<Api>>>)) {
|
||||
for (const bundledModel of Object.values(models)) {
|
||||
const model = toModelSpec(bundledModel);
|
||||
if (
|
||||
!fetchedKeys.has(`${model.provider}/${model.id}`) &&
|
||||
!DISCOVERY_ONLY_PROVIDERS.has(model.provider) &&
|
||||
@@ -744,9 +746,12 @@ async function generateModels() {
|
||||
);
|
||||
};
|
||||
|
||||
const MODELS: Record<string, Record<string, ModelSpec>> = sortObj(providers);
|
||||
for (const key in MODELS) {
|
||||
MODELS[key] = sortObj(MODELS[key]);
|
||||
const modelSpecs: Record<string, Record<string, ModelSpec>> = sortObj(providers);
|
||||
const MODELS: Record<string, Record<string, Model<Api>>> = {};
|
||||
for (const [provider, models] of Object.entries(modelSpecs)) {
|
||||
MODELS[provider] = Object.fromEntries(
|
||||
Object.entries(sortObj(models)).map(([id, model]) => [id, buildModel(model)]),
|
||||
);
|
||||
}
|
||||
|
||||
// Generate JSON file
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
import * as path from "node:path";
|
||||
import { generateProtoTs, ProtoContext, parseProto } from "./proto-parser";
|
||||
|
||||
const PACKAGES_DIR = path.resolve(import.meta.dir, "../..");
|
||||
const CURSOR_PROTO = path.join(PACKAGES_DIR, "ai/src/providers/cursor/proto/agent.proto");
|
||||
const DEVIN_PROTO_DIR = path.join(PACKAGES_DIR, "ai/src/providers/devin/proto");
|
||||
const DISCOVERY_DIR = path.resolve(import.meta.dir, "../src/discovery");
|
||||
|
||||
const CURSOR_CONSUMER_DIRS = [
|
||||
path.join(PACKAGES_DIR, "ai/src"),
|
||||
path.join(PACKAGES_DIR, "ai/test"),
|
||||
path.join(PACKAGES_DIR, "catalog/src"),
|
||||
path.join(PACKAGES_DIR, "catalog/test"),
|
||||
path.join(PACKAGES_DIR, "coding-agent/test"),
|
||||
];
|
||||
|
||||
const CURSOR_ENUMS = ["ForceBackgroundShellStatus", "ForceBackgroundSubagentStatus"];
|
||||
const DEVIN_MESSAGES = [
|
||||
"exa.chat_pb.ChatMessagePrompt",
|
||||
"exa.codeium_common_pb.ChatToolCall",
|
||||
"exa.chat_pb.ChatToolChoice",
|
||||
"exa.chat_pb.ChatToolDefinition",
|
||||
"exa.codeium_common_pb.ClientModelConfig",
|
||||
"exa.codeium_common_pb.CompletionConfiguration",
|
||||
"exa.api_server_pb.GetChatMessageRequest",
|
||||
"exa.api_server_pb.GetChatMessageResponse",
|
||||
"exa.api_server_pb.GetCliModelConfigsRequest",
|
||||
"exa.api_server_pb.GetCliModelConfigsResponse",
|
||||
"exa.auth_pb.GetUserJwtRequest",
|
||||
"exa.auth_pb.GetUserJwtResponse",
|
||||
"exa.codeium_common_pb.ImageData",
|
||||
"exa.codeium_common_pb.Metadata",
|
||||
"exa.codeium_common_pb.ModelUsageStats",
|
||||
"exa.chat_pb.PromptCacheOptions",
|
||||
"exa.codeium_common_pb.ModelInfo",
|
||||
"exa.codeium_common_pb.ModelFeatures",
|
||||
];
|
||||
const DEVIN_ENUMS = [
|
||||
"CacheControlType",
|
||||
"ChatMessageRequestType",
|
||||
"ChatMessageSource",
|
||||
"ConversationalPlannerMode",
|
||||
"StopReason",
|
||||
];
|
||||
|
||||
async function collectCursorMessages(): Promise<string[]> {
|
||||
const symbols = new Set<string>();
|
||||
const importPattern = /import(?:\s+type)?\s*\{([^}]*)\}\s*from\s*["']([^"']+)["'];/g;
|
||||
const sourceFiles = await collectTypeScriptFiles(CURSOR_CONSUMER_DIRS);
|
||||
|
||||
for (const sourceFile of sourceFiles) {
|
||||
const source = await Bun.file(sourceFile).text();
|
||||
for (const match of source.matchAll(importPattern)) {
|
||||
const modulePath = match[2];
|
||||
if (!modulePath.endsWith("cursor-proto")) continue;
|
||||
for (const specifier of match[1].split(",")) {
|
||||
const symbol = specifier
|
||||
.trim()
|
||||
.replace(/^type\s+/, "")
|
||||
.replace(/\s+as\s+.+$/, "");
|
||||
if (!symbol) continue;
|
||||
symbols.add(symbol.endsWith("Schema") ? symbol.slice(0, -6) : symbol);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const enumName of CURSOR_ENUMS) symbols.delete(enumName);
|
||||
if (symbols.size === 0) throw new Error("No Cursor protocol consumers found");
|
||||
return [...symbols].sort();
|
||||
}
|
||||
|
||||
async function collectTypeScriptFiles(directories: string[]): Promise<string[]> {
|
||||
const files: string[] = [];
|
||||
const glob = new Bun.Glob("**/*.ts");
|
||||
for (const directory of directories) {
|
||||
for await (const relativePath of glob.scan({ cwd: directory, onlyFiles: true })) {
|
||||
files.push(path.join(directory, relativePath));
|
||||
}
|
||||
}
|
||||
return files.sort();
|
||||
}
|
||||
|
||||
async function parseProtoDirectory(directory: string): Promise<ProtoContext> {
|
||||
const context = new ProtoContext();
|
||||
const paths: string[] = [];
|
||||
const glob = new Bun.Glob("**/*.proto");
|
||||
for await (const relativePath of glob.scan({ cwd: directory, onlyFiles: true })) paths.push(relativePath);
|
||||
|
||||
for (const relativePath of paths.sort()) {
|
||||
const source = await Bun.file(path.join(directory, relativePath)).text();
|
||||
context.addFile(parseProto(source, relativePath));
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
async function generateProtocols(): Promise<void> {
|
||||
const cursorSource = await Bun.file(CURSOR_PROTO).text();
|
||||
const cursorContext = new ProtoContext();
|
||||
cursorContext.addFile(parseProto(cursorSource, "agent.proto"));
|
||||
|
||||
const cursor = generateProtoTs(cursorContext, {
|
||||
includeMessages: await collectCursorMessages(),
|
||||
includeEnums: CURSOR_ENUMS,
|
||||
includeDependencies: true,
|
||||
packagePrefix: "Cursor agent",
|
||||
protobufImportPath: "./protobuf",
|
||||
});
|
||||
const devin = generateProtoTs(await parseProtoDirectory(DEVIN_PROTO_DIR), {
|
||||
includeMessages: DEVIN_MESSAGES,
|
||||
includeEnums: DEVIN_ENUMS,
|
||||
includeDependencies: true,
|
||||
packagePrefix: "Devin",
|
||||
protobufImportPath: "./protobuf",
|
||||
});
|
||||
|
||||
await Bun.write(path.join(DISCOVERY_DIR, "cursor-proto.ts"), `${cursor}\n`);
|
||||
await Bun.write(path.join(DISCOVERY_DIR, "devin-proto.ts"), `${devin}\n`);
|
||||
}
|
||||
|
||||
await generateProtocols();
|
||||
File diff suppressed because it is too large
Load Diff
@@ -59,6 +59,11 @@ function supportsOpenAIGAComputerUse(spec: ModelSpec<Api>, explicitSupport: bool
|
||||
return parsed !== null && semverGte(parsed.version, "5.4");
|
||||
}
|
||||
|
||||
/**
|
||||
* Build one model from an authored spec. Bundled models.json rows are fully
|
||||
* materialized by the generator and consumed directly (see `models.ts`), so
|
||||
* this only runs for discovered/custom/override specs.
|
||||
*/
|
||||
export function buildModel<TApi extends Api>(spec: ModelSpec<TApi>): Model<TApi> {
|
||||
const compat = buildCompat(spec) as CompatOf<TApi>;
|
||||
const supportsComputerUseConfig = explicitComputerUseConfig(spec);
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,12 @@
|
||||
import * as http2 from "node:http2";
|
||||
import { create, fromBinary, toBinary } from "@bufbuild/protobuf";
|
||||
import { type } from "@oh-my-pi/omptype";
|
||||
import { isKimiK3ModelId } from "../identity";
|
||||
import { bareModelId, parseGlmModel, semverGte } from "../identity/classify";
|
||||
import { getBundledModels } from "../models";
|
||||
import { toModelSpec } from "../provider-models/bundled-references";
|
||||
import type { Model, ModelSpec } from "../types";
|
||||
import { GetUsableModelsRequestSchema, GetUsableModelsResponseSchema } from "./cursor-gen/agent_pb";
|
||||
import { GetUsableModelsRequestSchema, GetUsableModelsResponseSchema } from "./cursor-proto";
|
||||
import { create, fromBinary, toBinary } from "./protobuf";
|
||||
|
||||
const CURSOR_DEFAULT_BASE_URL = "https://api2.cursor.sh";
|
||||
const CURSOR_DEFAULT_CLIENT_VERSION = "cli-2026.02.13-41ac335";
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,71 +0,0 @@
|
||||
// @generated by protoc-gen-es v2.12.0 with parameter "target=ts"
|
||||
// @generated from file exa/auth_pb/auth.proto (package exa.auth_pb, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
||||
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
||||
import { file_buf_validate_validate } from "../../buf/validate/validate_pb";
|
||||
import type { Metadata } from "../codeium_common_pb/codeium_common_pb";
|
||||
import { file_exa_codeium_common_pb_codeium_common } from "../codeium_common_pb/codeium_common_pb";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
* Describes the file exa/auth_pb/auth.proto.
|
||||
*/
|
||||
export const file_exa_auth_pb_auth: GenFile = /*@__PURE__*/
|
||||
fileDesc("ChZleGEvYXV0aF9wYi9hdXRoLnByb3RvEgtleGEuYXV0aF9wYiJGChFHZXRVc2VySnd0UmVxdWVzdBIxCghtZXRhZGF0YRgBIAEoCzIfLmV4YS5jb2RlaXVtX2NvbW1vbl9wYi5NZXRhZGF0YSJFChJHZXRVc2VySnd0UmVzcG9uc2USEAoIdXNlcl9qd3QYASABKAkSHQoVY3VzdG9tX2FwaV9zZXJ2ZXJfdXJsGAIgASgJMlwKC0F1dGhTZXJ2aWNlEk0KCkdldFVzZXJKd3QSHi5leGEuYXV0aF9wYi5HZXRVc2VySnd0UmVxdWVzdBofLmV4YS5hdXRoX3BiLkdldFVzZXJKd3RSZXNwb25zZWIGcHJvdG8z", [file_buf_validate_validate, file_exa_codeium_common_pb_codeium_common]);
|
||||
|
||||
/**
|
||||
* @generated from message exa.auth_pb.GetUserJwtRequest
|
||||
*/
|
||||
export type GetUserJwtRequest = Message<"exa.auth_pb.GetUserJwtRequest"> & {
|
||||
/**
|
||||
* @generated from field: exa.codeium_common_pb.Metadata metadata = 1;
|
||||
*/
|
||||
metadata?: Metadata | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.auth_pb.GetUserJwtRequest.
|
||||
* Use `create(GetUserJwtRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const GetUserJwtRequestSchema: GenMessage<GetUserJwtRequest> = /*@__PURE__*/
|
||||
messageDesc(file_exa_auth_pb_auth, 0);
|
||||
|
||||
/**
|
||||
* @generated from message exa.auth_pb.GetUserJwtResponse
|
||||
*/
|
||||
export type GetUserJwtResponse = Message<"exa.auth_pb.GetUserJwtResponse"> & {
|
||||
/**
|
||||
* @generated from field: string user_jwt = 1;
|
||||
*/
|
||||
userJwt: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string custom_api_server_url = 2;
|
||||
*/
|
||||
customApiServerUrl: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.auth_pb.GetUserJwtResponse.
|
||||
* Use `create(GetUserJwtResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const GetUserJwtResponseSchema: GenMessage<GetUserJwtResponse> = /*@__PURE__*/
|
||||
messageDesc(file_exa_auth_pb_auth, 1);
|
||||
|
||||
/**
|
||||
* @generated from service exa.auth_pb.AuthService
|
||||
*/
|
||||
export const AuthService: GenService<{
|
||||
/**
|
||||
* @generated from rpc exa.auth_pb.AuthService.GetUserJwt
|
||||
*/
|
||||
getUserJwt: {
|
||||
methodKind: "unary";
|
||||
input: typeof GetUserJwtRequestSchema;
|
||||
output: typeof GetUserJwtResponseSchema;
|
||||
},
|
||||
}> = /*@__PURE__*/
|
||||
serviceDesc(file_exa_auth_pb_auth, 0);
|
||||
|
||||
-348
@@ -1,348 +0,0 @@
|
||||
// @generated by protoc-gen-es v2.12.0 with parameter "target=ts"
|
||||
// @generated from file exa/auto_cascade_common_pb/auto_cascade_common.proto (package exa.auto_cascade_common_pb, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
||||
import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
||||
import { file_buf_validate_validate } from "../../buf/validate/validate_pb";
|
||||
import type { CascadeRunStatus, CortexTrajectory } from "../cortex_pb/cortex_pb";
|
||||
import { file_exa_cortex_pb_cortex } from "../cortex_pb/cortex_pb";
|
||||
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
||||
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
* Describes the file exa/auto_cascade_common_pb/auto_cascade_common.proto.
|
||||
*/
|
||||
export const file_exa_auto_cascade_common_pb_auto_cascade_common: GenFile = /*@__PURE__*/
|
||||
fileDesc("CjRleGEvYXV0b19jYXNjYWRlX2NvbW1vbl9wYi9hdXRvX2Nhc2NhZGVfY29tbW9uLnByb3RvEhpleGEuYXV0b19jYXNjYWRlX2NvbW1vbl9wYiJQCgtHaXRSZXBvSW5mbxIRCglyZXBvX25hbWUYASABKAkSDgoGYnJhbmNoGAIgASgJEg4KBmNvbW1pdBgDIAEoCRIOCgZwcl91cmwYBCABKAki7wIKC1Nlc3Npb25JbmZvEhIKCnNlc3Npb25faWQYASABKAkSEwoLZXhwbGFuYXRpb24YAiABKAkSDwoHc3NoX3VybBgDIAEoCRIvCgZzdGF0dXMYBCABKA4yHy5leGEuY29ydGV4X3BiLkNhc2NhZGVSdW5TdGF0dXMSDwoHc3VtbWFyeRgFIAEoCRIzCgp0cmFqZWN0b3J5GAYgASgLMh8uZXhhLmNvcnRleF9wYi5Db3J0ZXhUcmFqZWN0b3J5EhMKC3Nlc3Npb25fa2V5GAcgASgJEi4KCmNyZWF0ZWRfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEjoKCWdpdF9yZXBvcxgJIAMoCzInLmV4YS5hdXRvX2Nhc2NhZGVfY29tbW9uX3BiLkdpdFJlcG9JbmZvEi4KCnVwZGF0ZWRfYXQYCiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIrIBCgxTZXNzaW9uSW5mb3MSSAoIc2Vzc2lvbnMYASADKAsyNi5leGEuYXV0b19jYXNjYWRlX2NvbW1vbl9wYi5TZXNzaW9uSW5mb3MuU2Vzc2lvbnNFbnRyeRpYCg1TZXNzaW9uc0VudHJ5EgsKA2tleRgBIAEoCRI2CgV2YWx1ZRgCIAEoCzInLmV4YS5hdXRvX2Nhc2NhZGVfY29tbW9uX3BiLlNlc3Npb25JbmZvOgI4ASKmAgoVR2l0aHViUHVsbFJlcXVlc3RJbmZvEgsKA3VybBgBIAEoCRINCgVvd25lchgCIAEoCRIMCgRyZXBvGAMgASgJEg0KBXRpdGxlGAQgASgJEg4KBm51bWJlchgFIAEoCRJCCgljaV9zdGF0dXMYBiABKA4yLy5leGEuYXV0b19jYXNjYWRlX2NvbW1vbl9wYi5HaXRodWJDSUNoZWNrU3RhdHVzElAKDWJyYW5jaF9zdGF0dXMYByABKA4yOS5leGEuYXV0b19jYXNjYWRlX2NvbW1vbl9wYi5HaXRodWJQdWxsUmVxdWVzdEJyYW5jaFN0YXR1cxIuCgp1cGRhdGVkX2F0GAggASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCJMChZHaXRodWJJbnN0YWxsYXRpb25JbmZvEhcKD2luc3RhbGxhdGlvbl9pZBgBIAEoCRIZChFvcmdhbml6YXRpb25fbmFtZRgCIAEoCSq9AQoMQnJhbmNoU3RhdHVzEh0KGUJSQU5DSF9TVEFUVVNfVU5TUEVDSUZJRUQQABIXChNCUkFOQ0hfU1RBVFVTX05PX1BSEAESGQoVQlJBTkNIX1NUQVRVU19QUl9PUEVOEAISGwoXQlJBTkNIX1NUQVRVU19QUl9DTE9TRUQQAxIbChdCUkFOQ0hfU1RBVFVTX1BSX01FUkdFRBAEEiAKHEJSQU5DSF9TVEFUVVNfSEFTX1NVR0dFU1RJT04QBSqpAQoLQ29tbWVudFR5cGUSHAoYQ09NTUVOVF9UWVBFX1VOU1BFQ0lGSUVEEAASJgoiQ09NTUVOVF9UWVBFX01BTlVBTF9SRVZJRVdfVFJJR0dFUhABEhUKEUNPTU1FTlRfVFlQRV9MR1RNEAISHAoYQ09NTUVOVF9UWVBFX1JFVklFV19CT0RZEAMSHwobQ09NTUVOVF9UWVBFX1JFVklFV19DT01NRU5UEAQqqAEKE0dpdGh1YkNJQ2hlY2tTdGF0dXMSJgoiR0lUSFVCX0NJX0NIRUNLX1NUQVRVU19VTlNQRUNJRklFRBAAEiIKHkdJVEhVQl9DSV9DSEVDS19TVEFUVVNfU1VDQ0VTUxABEiEKHUdJVEhVQl9DSV9DSEVDS19TVEFUVVNfRkFJTEVEEAISIgoeR0lUSFVCX0NJX0NIRUNLX1NUQVRVU19QRU5ESU5HEAMqhwIKHUdpdGh1YlB1bGxSZXF1ZXN0QnJhbmNoU3RhdHVzEjEKLUdJVEhVQl9QVUxMX1JFUVVFU1RfQlJBTkNIX1NUQVRVU19VTlNQRUNJRklFRBAAEioKJkdJVEhVQl9QVUxMX1JFUVVFU1RfQlJBTkNIX1NUQVRVU19PUEVOEAESLAooR0lUSFVCX1BVTExfUkVRVUVTVF9CUkFOQ0hfU1RBVFVTX0NMT1NFRBACEisKJ0dJVEhVQl9QVUxMX1JFUVVFU1RfQlJBTkNIX1NUQVRVU19EUkFGVBADEiwKKEdJVEhVQl9QVUxMX1JFUVVFU1RfQlJBTkNIX1NUQVRVU19NRVJHRUQQBGIGcHJvdG8z", [file_buf_validate_validate, file_exa_cortex_pb_cortex, file_google_protobuf_timestamp]);
|
||||
|
||||
/**
|
||||
* @generated from message exa.auto_cascade_common_pb.GitRepoInfo
|
||||
*/
|
||||
export type GitRepoInfo = Message<"exa.auto_cascade_common_pb.GitRepoInfo"> & {
|
||||
/**
|
||||
* @generated from field: string repo_name = 1;
|
||||
*/
|
||||
repoName: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string branch = 2;
|
||||
*/
|
||||
branch: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string commit = 3;
|
||||
*/
|
||||
commit: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string pr_url = 4;
|
||||
*/
|
||||
prUrl: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.auto_cascade_common_pb.GitRepoInfo.
|
||||
* Use `create(GitRepoInfoSchema)` to create a new message.
|
||||
*/
|
||||
export const GitRepoInfoSchema: GenMessage<GitRepoInfo> = /*@__PURE__*/
|
||||
messageDesc(file_exa_auto_cascade_common_pb_auto_cascade_common, 0);
|
||||
|
||||
/**
|
||||
* @generated from message exa.auto_cascade_common_pb.SessionInfo
|
||||
*/
|
||||
export type SessionInfo = Message<"exa.auto_cascade_common_pb.SessionInfo"> & {
|
||||
/**
|
||||
* @generated from field: string session_id = 1;
|
||||
*/
|
||||
sessionId: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string explanation = 2;
|
||||
*/
|
||||
explanation: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string ssh_url = 3;
|
||||
*/
|
||||
sshUrl: string;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.cortex_pb.CascadeRunStatus status = 4;
|
||||
*/
|
||||
status: CascadeRunStatus;
|
||||
|
||||
/**
|
||||
* @generated from field: string summary = 5;
|
||||
*/
|
||||
summary: string;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.cortex_pb.CortexTrajectory trajectory = 6;
|
||||
*/
|
||||
trajectory?: CortexTrajectory | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: string session_key = 7;
|
||||
*/
|
||||
sessionKey: string;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp created_at = 8;
|
||||
*/
|
||||
createdAt?: Timestamp | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: repeated exa.auto_cascade_common_pb.GitRepoInfo git_repos = 9;
|
||||
*/
|
||||
gitRepos: GitRepoInfo[];
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp updated_at = 10;
|
||||
*/
|
||||
updatedAt?: Timestamp | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.auto_cascade_common_pb.SessionInfo.
|
||||
* Use `create(SessionInfoSchema)` to create a new message.
|
||||
*/
|
||||
export const SessionInfoSchema: GenMessage<SessionInfo> = /*@__PURE__*/
|
||||
messageDesc(file_exa_auto_cascade_common_pb_auto_cascade_common, 1);
|
||||
|
||||
/**
|
||||
* @generated from message exa.auto_cascade_common_pb.SessionInfos
|
||||
*/
|
||||
export type SessionInfos = Message<"exa.auto_cascade_common_pb.SessionInfos"> & {
|
||||
/**
|
||||
* @generated from field: map<string, exa.auto_cascade_common_pb.SessionInfo> sessions = 1;
|
||||
*/
|
||||
sessions: { [key: string]: SessionInfo };
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.auto_cascade_common_pb.SessionInfos.
|
||||
* Use `create(SessionInfosSchema)` to create a new message.
|
||||
*/
|
||||
export const SessionInfosSchema: GenMessage<SessionInfos> = /*@__PURE__*/
|
||||
messageDesc(file_exa_auto_cascade_common_pb_auto_cascade_common, 2);
|
||||
|
||||
/**
|
||||
* @generated from message exa.auto_cascade_common_pb.GithubPullRequestInfo
|
||||
*/
|
||||
export type GithubPullRequestInfo = Message<"exa.auto_cascade_common_pb.GithubPullRequestInfo"> & {
|
||||
/**
|
||||
* @generated from field: string url = 1;
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string owner = 2;
|
||||
*/
|
||||
owner: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string repo = 3;
|
||||
*/
|
||||
repo: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string title = 4;
|
||||
*/
|
||||
title: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string number = 5;
|
||||
*/
|
||||
number: string;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.auto_cascade_common_pb.GithubCICheckStatus ci_status = 6;
|
||||
*/
|
||||
ciStatus: GithubCICheckStatus;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.auto_cascade_common_pb.GithubPullRequestBranchStatus branch_status = 7;
|
||||
*/
|
||||
branchStatus: GithubPullRequestBranchStatus;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp updated_at = 8;
|
||||
*/
|
||||
updatedAt?: Timestamp | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.auto_cascade_common_pb.GithubPullRequestInfo.
|
||||
* Use `create(GithubPullRequestInfoSchema)` to create a new message.
|
||||
*/
|
||||
export const GithubPullRequestInfoSchema: GenMessage<GithubPullRequestInfo> = /*@__PURE__*/
|
||||
messageDesc(file_exa_auto_cascade_common_pb_auto_cascade_common, 3);
|
||||
|
||||
/**
|
||||
* @generated from message exa.auto_cascade_common_pb.GithubInstallationInfo
|
||||
*/
|
||||
export type GithubInstallationInfo = Message<"exa.auto_cascade_common_pb.GithubInstallationInfo"> & {
|
||||
/**
|
||||
* @generated from field: string installation_id = 1;
|
||||
*/
|
||||
installationId: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string organization_name = 2;
|
||||
*/
|
||||
organizationName: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.auto_cascade_common_pb.GithubInstallationInfo.
|
||||
* Use `create(GithubInstallationInfoSchema)` to create a new message.
|
||||
*/
|
||||
export const GithubInstallationInfoSchema: GenMessage<GithubInstallationInfo> = /*@__PURE__*/
|
||||
messageDesc(file_exa_auto_cascade_common_pb_auto_cascade_common, 4);
|
||||
|
||||
/**
|
||||
* @generated from enum exa.auto_cascade_common_pb.BranchStatus
|
||||
*/
|
||||
export enum BranchStatus {
|
||||
/**
|
||||
* @generated from enum value: BRANCH_STATUS_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: BRANCH_STATUS_NO_PR = 1;
|
||||
*/
|
||||
NO_PR = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: BRANCH_STATUS_PR_OPEN = 2;
|
||||
*/
|
||||
PR_OPEN = 2,
|
||||
|
||||
/**
|
||||
* @generated from enum value: BRANCH_STATUS_PR_CLOSED = 3;
|
||||
*/
|
||||
PR_CLOSED = 3,
|
||||
|
||||
/**
|
||||
* @generated from enum value: BRANCH_STATUS_PR_MERGED = 4;
|
||||
*/
|
||||
PR_MERGED = 4,
|
||||
|
||||
/**
|
||||
* @generated from enum value: BRANCH_STATUS_HAS_SUGGESTION = 5;
|
||||
*/
|
||||
HAS_SUGGESTION = 5,
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the enum exa.auto_cascade_common_pb.BranchStatus.
|
||||
*/
|
||||
export const BranchStatusSchema: GenEnum<BranchStatus> = /*@__PURE__*/
|
||||
enumDesc(file_exa_auto_cascade_common_pb_auto_cascade_common, 0);
|
||||
|
||||
/**
|
||||
* @generated from enum exa.auto_cascade_common_pb.CommentType
|
||||
*/
|
||||
export enum CommentType {
|
||||
/**
|
||||
* @generated from enum value: COMMENT_TYPE_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: COMMENT_TYPE_MANUAL_REVIEW_TRIGGER = 1;
|
||||
*/
|
||||
MANUAL_REVIEW_TRIGGER = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: COMMENT_TYPE_LGTM = 2;
|
||||
*/
|
||||
LGTM = 2,
|
||||
|
||||
/**
|
||||
* @generated from enum value: COMMENT_TYPE_REVIEW_BODY = 3;
|
||||
*/
|
||||
REVIEW_BODY = 3,
|
||||
|
||||
/**
|
||||
* @generated from enum value: COMMENT_TYPE_REVIEW_COMMENT = 4;
|
||||
*/
|
||||
REVIEW_COMMENT = 4,
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the enum exa.auto_cascade_common_pb.CommentType.
|
||||
*/
|
||||
export const CommentTypeSchema: GenEnum<CommentType> = /*@__PURE__*/
|
||||
enumDesc(file_exa_auto_cascade_common_pb_auto_cascade_common, 1);
|
||||
|
||||
/**
|
||||
* @generated from enum exa.auto_cascade_common_pb.GithubCICheckStatus
|
||||
*/
|
||||
export enum GithubCICheckStatus {
|
||||
/**
|
||||
* @generated from enum value: GITHUB_CI_CHECK_STATUS_UNSPECIFIED = 0;
|
||||
*/
|
||||
GITHUB_CI_CHECK_STATUS_UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: GITHUB_CI_CHECK_STATUS_SUCCESS = 1;
|
||||
*/
|
||||
GITHUB_CI_CHECK_STATUS_SUCCESS = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: GITHUB_CI_CHECK_STATUS_FAILED = 2;
|
||||
*/
|
||||
GITHUB_CI_CHECK_STATUS_FAILED = 2,
|
||||
|
||||
/**
|
||||
* @generated from enum value: GITHUB_CI_CHECK_STATUS_PENDING = 3;
|
||||
*/
|
||||
GITHUB_CI_CHECK_STATUS_PENDING = 3,
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the enum exa.auto_cascade_common_pb.GithubCICheckStatus.
|
||||
*/
|
||||
export const GithubCICheckStatusSchema: GenEnum<GithubCICheckStatus> = /*@__PURE__*/
|
||||
enumDesc(file_exa_auto_cascade_common_pb_auto_cascade_common, 2);
|
||||
|
||||
/**
|
||||
* @generated from enum exa.auto_cascade_common_pb.GithubPullRequestBranchStatus
|
||||
*/
|
||||
export enum GithubPullRequestBranchStatus {
|
||||
/**
|
||||
* @generated from enum value: GITHUB_PULL_REQUEST_BRANCH_STATUS_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: GITHUB_PULL_REQUEST_BRANCH_STATUS_OPEN = 1;
|
||||
*/
|
||||
OPEN = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: GITHUB_PULL_REQUEST_BRANCH_STATUS_CLOSED = 2;
|
||||
*/
|
||||
CLOSED = 2,
|
||||
|
||||
/**
|
||||
* @generated from enum value: GITHUB_PULL_REQUEST_BRANCH_STATUS_DRAFT = 3;
|
||||
*/
|
||||
DRAFT = 3,
|
||||
|
||||
/**
|
||||
* @generated from enum value: GITHUB_PULL_REQUEST_BRANCH_STATUS_MERGED = 4;
|
||||
*/
|
||||
MERGED = 4,
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the enum exa.auto_cascade_common_pb.GithubPullRequestBranchStatus.
|
||||
*/
|
||||
export const GithubPullRequestBranchStatusSchema: GenEnum<GithubPullRequestBranchStatus> = /*@__PURE__*/
|
||||
enumDesc(file_exa_auto_cascade_common_pb_auto_cascade_common, 3);
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
// @generated by protoc-gen-es v2.12.0 with parameter "target=ts"
|
||||
// @generated from file exa/bug_checker_pb/bug_checker.proto (package exa.bug_checker_pb, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
||||
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
* Describes the file exa/bug_checker_pb/bug_checker.proto.
|
||||
*/
|
||||
export const file_exa_bug_checker_pb_bug_checker: GenFile = /*@__PURE__*/
|
||||
fileDesc("CiRleGEvYnVnX2NoZWNrZXJfcGIvYnVnX2NoZWNrZXIucHJvdG8SEmV4YS5idWdfY2hlY2tlcl9wYiInCgNGaXgSDwoHb2xkX3N0chgBIAEoCRIPCgduZXdfc3RyGAIgASgJItMBCgNCdWcSCgoCaWQYASABKAkSDAoEZmlsZRgCIAEoCRINCgVzdGFydBgDIAEoBRILCgNlbmQYBCABKAUSDQoFdGl0bGUYBSABKAkSEwoLZGVzY3JpcHRpb24YBiABKAkSEAoIc2V2ZXJpdHkYByABKAkSEgoKcmVzb2x1dGlvbhgIIAEoCRISCgpjb25maWRlbmNlGAkgASgBEhIKCmNhdGVnb3JpZXMYCiADKAkSJAoDZml4GAsgASgLMhcuZXhhLmJ1Z19jaGVja2VyX3BiLkZpeGIGcHJvdG8z");
|
||||
|
||||
/**
|
||||
* @generated from message exa.bug_checker_pb.Fix
|
||||
*/
|
||||
export type Fix = Message<"exa.bug_checker_pb.Fix"> & {
|
||||
/**
|
||||
* @generated from field: string old_str = 1;
|
||||
*/
|
||||
oldStr: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string new_str = 2;
|
||||
*/
|
||||
newStr: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.bug_checker_pb.Fix.
|
||||
* Use `create(FixSchema)` to create a new message.
|
||||
*/
|
||||
export const FixSchema: GenMessage<Fix> = /*@__PURE__*/
|
||||
messageDesc(file_exa_bug_checker_pb_bug_checker, 0);
|
||||
|
||||
/**
|
||||
* @generated from message exa.bug_checker_pb.Bug
|
||||
*/
|
||||
export type Bug = Message<"exa.bug_checker_pb.Bug"> & {
|
||||
/**
|
||||
* @generated from field: string id = 1;
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string file = 2;
|
||||
*/
|
||||
file: string;
|
||||
|
||||
/**
|
||||
* @generated from field: int32 start = 3;
|
||||
*/
|
||||
start: number;
|
||||
|
||||
/**
|
||||
* @generated from field: int32 end = 4;
|
||||
*/
|
||||
end: number;
|
||||
|
||||
/**
|
||||
* @generated from field: string title = 5;
|
||||
*/
|
||||
title: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string description = 6;
|
||||
*/
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string severity = 7;
|
||||
*/
|
||||
severity: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string resolution = 8;
|
||||
*/
|
||||
resolution: string;
|
||||
|
||||
/**
|
||||
* @generated from field: double confidence = 9;
|
||||
*/
|
||||
confidence: number;
|
||||
|
||||
/**
|
||||
* @generated from field: repeated string categories = 10;
|
||||
*/
|
||||
categories: string[];
|
||||
|
||||
/**
|
||||
* @generated from field: exa.bug_checker_pb.Fix fix = 11;
|
||||
*/
|
||||
fix?: Fix | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.bug_checker_pb.Bug.
|
||||
* Use `create(BugSchema)` to create a new message.
|
||||
*/
|
||||
export const BugSchema: GenMessage<Bug> = /*@__PURE__*/
|
||||
messageDesc(file_exa_bug_checker_pb_bug_checker, 1);
|
||||
|
||||
-1198
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-18354
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,312 +0,0 @@
|
||||
// @generated by protoc-gen-es v2.12.0 with parameter "target=ts"
|
||||
// @generated from file exa/diff_action_pb/diff_action.proto (package exa.diff_action_pb, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
||||
import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
||||
import type { Language } from "../codeium_common_pb/codeium_common_pb";
|
||||
import { file_exa_codeium_common_pb_codeium_common } from "../codeium_common_pb/codeium_common_pb";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
* Describes the file exa/diff_action_pb/diff_action.proto.
|
||||
*/
|
||||
export const file_exa_diff_action_pb_diff_action: GenFile = /*@__PURE__*/
|
||||
fileDesc("CiRleGEvZGlmZl9hY3Rpb25fcGIvZGlmZl9hY3Rpb24ucHJvdG8SEmV4YS5kaWZmX2FjdGlvbl9wYiKlAQoLVW5pZmllZERpZmYSPgoFbGluZXMYAyADKAsyLy5leGEuZGlmZl9hY3Rpb25fcGIuVW5pZmllZERpZmYuVW5pZmllZERpZmZMaW5lGlYKD1VuaWZpZWREaWZmTGluZRIMCgR0ZXh0GAEgASgJEjUKBHR5cGUYAiABKA4yJy5leGEuZGlmZl9hY3Rpb25fcGIuVW5pZmllZERpZmZMaW5lVHlwZSLWAQoJRGlmZkJsb2NrEhIKCnN0YXJ0X2xpbmUYASABKAUSEAoIZW5kX2xpbmUYAiABKAUSNQoMdW5pZmllZF9kaWZmGAMgASgLMh8uZXhhLmRpZmZfYWN0aW9uX3BiLlVuaWZpZWREaWZmEjYKDWZyb21fbGFuZ3VhZ2UYBCABKA4yHy5leGEuY29kZWl1bV9jb21tb25fcGIuTGFuZ3VhZ2USNAoLdG9fbGFuZ3VhZ2UYBSABKA4yHy5leGEuY29kZWl1bV9jb21tb25fcGIuTGFuZ3VhZ2UiVQoTQ2hhcmFjdGVyRGlmZkNoYW5nZRIMCgR0ZXh0GAEgASgJEjAKBHR5cGUYAiABKA4yIi5leGEuZGlmZl9hY3Rpb25fcGIuRGlmZkNoYW5nZVR5cGUiSQoNQ2hhcmFjdGVyRGlmZhI4CgdjaGFuZ2VzGAEgAygLMicuZXhhLmRpZmZfYWN0aW9uX3BiLkNoYXJhY3RlckRpZmZDaGFuZ2UiigEKDUNvbWJvRGlmZkxpbmUSDAoEdGV4dBgBIAEoCRIwCgR0eXBlGAIgASgOMiIuZXhhLmRpZmZfYWN0aW9uX3BiLkRpZmZDaGFuZ2VUeXBlEjkKDmNoYXJhY3Rlcl9kaWZmGAMgASgLMiEuZXhhLmRpZmZfYWN0aW9uX3BiLkNoYXJhY3RlckRpZmYiPQoJQ29tYm9EaWZmEjAKBWxpbmVzGAEgAygLMiEuZXhhLmRpZmZfYWN0aW9uX3BiLkNvbWJvRGlmZkxpbmUirgEKB0RpZmZTZXQSNQoMdW5pZmllZF9kaWZmGAEgASgLMh8uZXhhLmRpZmZfYWN0aW9uX3BiLlVuaWZpZWREaWZmEjkKDmNoYXJhY3Rlcl9kaWZmGAIgASgLMiEuZXhhLmRpZmZfYWN0aW9uX3BiLkNoYXJhY3RlckRpZmYSMQoKY29tYm9fZGlmZhgDIAEoCzIdLmV4YS5kaWZmX2FjdGlvbl9wYi5Db21ib0RpZmYiOAoIRGlmZkxpc3QSLAoFZGlmZnMYAiADKAsyHS5leGEuZGlmZl9hY3Rpb25fcGIuRGlmZkJsb2NrKqkBChNVbmlmaWVkRGlmZkxpbmVUeXBlEiYKIlVOSUZJRURfRElGRl9MSU5FX1RZUEVfVU5TUEVDSUZJRUQQABIhCh1VTklGSUVEX0RJRkZfTElORV9UWVBFX0lOU0VSVBABEiEKHVVOSUZJRURfRElGRl9MSU5FX1RZUEVfREVMRVRFEAISJAogVU5JRklFRF9ESUZGX0xJTkVfVFlQRV9VTkNIQU5HRUQQAyqMAQoORGlmZkNoYW5nZVR5cGUSIAocRElGRl9DSEFOR0VfVFlQRV9VTlNQRUNJRklFRBAAEhsKF0RJRkZfQ0hBTkdFX1RZUEVfSU5TRVJUEAESGwoXRElGRl9DSEFOR0VfVFlQRV9ERUxFVEUQAhIeChpESUZGX0NIQU5HRV9UWVBFX1VOQ0hBTkdFRBADKnYKCERpZmZUeXBlEhkKFURJRkZfVFlQRV9VTlNQRUNJRklFRBAAEhUKEURJRkZfVFlQRV9VTklGSUVEEAESFwoTRElGRl9UWVBFX0NIQVJBQ1RFUhACEhMKD0RJRkZfVFlQRV9DT01CTxADIgQIBBAEIgQIBRAFYgZwcm90bzM", [file_exa_codeium_common_pb_codeium_common]);
|
||||
|
||||
/**
|
||||
* @generated from message exa.diff_action_pb.UnifiedDiff
|
||||
*/
|
||||
export type UnifiedDiff = Message<"exa.diff_action_pb.UnifiedDiff"> & {
|
||||
/**
|
||||
* @generated from field: repeated exa.diff_action_pb.UnifiedDiff.UnifiedDiffLine lines = 3;
|
||||
*/
|
||||
lines: UnifiedDiff_UnifiedDiffLine[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.diff_action_pb.UnifiedDiff.
|
||||
* Use `create(UnifiedDiffSchema)` to create a new message.
|
||||
*/
|
||||
export const UnifiedDiffSchema: GenMessage<UnifiedDiff> = /*@__PURE__*/
|
||||
messageDesc(file_exa_diff_action_pb_diff_action, 0);
|
||||
|
||||
/**
|
||||
* @generated from message exa.diff_action_pb.UnifiedDiff.UnifiedDiffLine
|
||||
*/
|
||||
export type UnifiedDiff_UnifiedDiffLine = Message<"exa.diff_action_pb.UnifiedDiff.UnifiedDiffLine"> & {
|
||||
/**
|
||||
* @generated from field: string text = 1;
|
||||
*/
|
||||
text: string;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.diff_action_pb.UnifiedDiffLineType type = 2;
|
||||
*/
|
||||
type: UnifiedDiffLineType;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.diff_action_pb.UnifiedDiff.UnifiedDiffLine.
|
||||
* Use `create(UnifiedDiff_UnifiedDiffLineSchema)` to create a new message.
|
||||
*/
|
||||
export const UnifiedDiff_UnifiedDiffLineSchema: GenMessage<UnifiedDiff_UnifiedDiffLine> = /*@__PURE__*/
|
||||
messageDesc(file_exa_diff_action_pb_diff_action, 0, 0);
|
||||
|
||||
/**
|
||||
* @generated from message exa.diff_action_pb.DiffBlock
|
||||
*/
|
||||
export type DiffBlock = Message<"exa.diff_action_pb.DiffBlock"> & {
|
||||
/**
|
||||
* @generated from field: int32 start_line = 1;
|
||||
*/
|
||||
startLine: number;
|
||||
|
||||
/**
|
||||
* @generated from field: int32 end_line = 2;
|
||||
*/
|
||||
endLine: number;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.diff_action_pb.UnifiedDiff unified_diff = 3;
|
||||
*/
|
||||
unifiedDiff?: UnifiedDiff | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.codeium_common_pb.Language from_language = 4;
|
||||
*/
|
||||
fromLanguage: Language;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.codeium_common_pb.Language to_language = 5;
|
||||
*/
|
||||
toLanguage: Language;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.diff_action_pb.DiffBlock.
|
||||
* Use `create(DiffBlockSchema)` to create a new message.
|
||||
*/
|
||||
export const DiffBlockSchema: GenMessage<DiffBlock> = /*@__PURE__*/
|
||||
messageDesc(file_exa_diff_action_pb_diff_action, 1);
|
||||
|
||||
/**
|
||||
* @generated from message exa.diff_action_pb.CharacterDiffChange
|
||||
*/
|
||||
export type CharacterDiffChange = Message<"exa.diff_action_pb.CharacterDiffChange"> & {
|
||||
/**
|
||||
* @generated from field: string text = 1;
|
||||
*/
|
||||
text: string;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.diff_action_pb.DiffChangeType type = 2;
|
||||
*/
|
||||
type: DiffChangeType;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.diff_action_pb.CharacterDiffChange.
|
||||
* Use `create(CharacterDiffChangeSchema)` to create a new message.
|
||||
*/
|
||||
export const CharacterDiffChangeSchema: GenMessage<CharacterDiffChange> = /*@__PURE__*/
|
||||
messageDesc(file_exa_diff_action_pb_diff_action, 2);
|
||||
|
||||
/**
|
||||
* @generated from message exa.diff_action_pb.CharacterDiff
|
||||
*/
|
||||
export type CharacterDiff = Message<"exa.diff_action_pb.CharacterDiff"> & {
|
||||
/**
|
||||
* @generated from field: repeated exa.diff_action_pb.CharacterDiffChange changes = 1;
|
||||
*/
|
||||
changes: CharacterDiffChange[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.diff_action_pb.CharacterDiff.
|
||||
* Use `create(CharacterDiffSchema)` to create a new message.
|
||||
*/
|
||||
export const CharacterDiffSchema: GenMessage<CharacterDiff> = /*@__PURE__*/
|
||||
messageDesc(file_exa_diff_action_pb_diff_action, 3);
|
||||
|
||||
/**
|
||||
* @generated from message exa.diff_action_pb.ComboDiffLine
|
||||
*/
|
||||
export type ComboDiffLine = Message<"exa.diff_action_pb.ComboDiffLine"> & {
|
||||
/**
|
||||
* @generated from field: string text = 1;
|
||||
*/
|
||||
text: string;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.diff_action_pb.DiffChangeType type = 2;
|
||||
*/
|
||||
type: DiffChangeType;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.diff_action_pb.CharacterDiff character_diff = 3;
|
||||
*/
|
||||
characterDiff?: CharacterDiff | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.diff_action_pb.ComboDiffLine.
|
||||
* Use `create(ComboDiffLineSchema)` to create a new message.
|
||||
*/
|
||||
export const ComboDiffLineSchema: GenMessage<ComboDiffLine> = /*@__PURE__*/
|
||||
messageDesc(file_exa_diff_action_pb_diff_action, 4);
|
||||
|
||||
/**
|
||||
* @generated from message exa.diff_action_pb.ComboDiff
|
||||
*/
|
||||
export type ComboDiff = Message<"exa.diff_action_pb.ComboDiff"> & {
|
||||
/**
|
||||
* @generated from field: repeated exa.diff_action_pb.ComboDiffLine lines = 1;
|
||||
*/
|
||||
lines: ComboDiffLine[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.diff_action_pb.ComboDiff.
|
||||
* Use `create(ComboDiffSchema)` to create a new message.
|
||||
*/
|
||||
export const ComboDiffSchema: GenMessage<ComboDiff> = /*@__PURE__*/
|
||||
messageDesc(file_exa_diff_action_pb_diff_action, 5);
|
||||
|
||||
/**
|
||||
* @generated from message exa.diff_action_pb.DiffSet
|
||||
*/
|
||||
export type DiffSet = Message<"exa.diff_action_pb.DiffSet"> & {
|
||||
/**
|
||||
* @generated from field: exa.diff_action_pb.UnifiedDiff unified_diff = 1;
|
||||
*/
|
||||
unifiedDiff?: UnifiedDiff | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.diff_action_pb.CharacterDiff character_diff = 2;
|
||||
*/
|
||||
characterDiff?: CharacterDiff | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.diff_action_pb.ComboDiff combo_diff = 3;
|
||||
*/
|
||||
comboDiff?: ComboDiff | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.diff_action_pb.DiffSet.
|
||||
* Use `create(DiffSetSchema)` to create a new message.
|
||||
*/
|
||||
export const DiffSetSchema: GenMessage<DiffSet> = /*@__PURE__*/
|
||||
messageDesc(file_exa_diff_action_pb_diff_action, 6);
|
||||
|
||||
/**
|
||||
* @generated from message exa.diff_action_pb.DiffList
|
||||
*/
|
||||
export type DiffList = Message<"exa.diff_action_pb.DiffList"> & {
|
||||
/**
|
||||
* @generated from field: repeated exa.diff_action_pb.DiffBlock diffs = 2;
|
||||
*/
|
||||
diffs: DiffBlock[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.diff_action_pb.DiffList.
|
||||
* Use `create(DiffListSchema)` to create a new message.
|
||||
*/
|
||||
export const DiffListSchema: GenMessage<DiffList> = /*@__PURE__*/
|
||||
messageDesc(file_exa_diff_action_pb_diff_action, 7);
|
||||
|
||||
/**
|
||||
* @generated from enum exa.diff_action_pb.UnifiedDiffLineType
|
||||
*/
|
||||
export enum UnifiedDiffLineType {
|
||||
/**
|
||||
* @generated from enum value: UNIFIED_DIFF_LINE_TYPE_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: UNIFIED_DIFF_LINE_TYPE_INSERT = 1;
|
||||
*/
|
||||
INSERT = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: UNIFIED_DIFF_LINE_TYPE_DELETE = 2;
|
||||
*/
|
||||
DELETE = 2,
|
||||
|
||||
/**
|
||||
* @generated from enum value: UNIFIED_DIFF_LINE_TYPE_UNCHANGED = 3;
|
||||
*/
|
||||
UNCHANGED = 3,
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the enum exa.diff_action_pb.UnifiedDiffLineType.
|
||||
*/
|
||||
export const UnifiedDiffLineTypeSchema: GenEnum<UnifiedDiffLineType> = /*@__PURE__*/
|
||||
enumDesc(file_exa_diff_action_pb_diff_action, 0);
|
||||
|
||||
/**
|
||||
* @generated from enum exa.diff_action_pb.DiffChangeType
|
||||
*/
|
||||
export enum DiffChangeType {
|
||||
/**
|
||||
* @generated from enum value: DIFF_CHANGE_TYPE_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: DIFF_CHANGE_TYPE_INSERT = 1;
|
||||
*/
|
||||
INSERT = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: DIFF_CHANGE_TYPE_DELETE = 2;
|
||||
*/
|
||||
DELETE = 2,
|
||||
|
||||
/**
|
||||
* @generated from enum value: DIFF_CHANGE_TYPE_UNCHANGED = 3;
|
||||
*/
|
||||
UNCHANGED = 3,
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the enum exa.diff_action_pb.DiffChangeType.
|
||||
*/
|
||||
export const DiffChangeTypeSchema: GenEnum<DiffChangeType> = /*@__PURE__*/
|
||||
enumDesc(file_exa_diff_action_pb_diff_action, 1);
|
||||
|
||||
/**
|
||||
* @generated from enum exa.diff_action_pb.DiffType
|
||||
*/
|
||||
export enum DiffType {
|
||||
/**
|
||||
* @generated from enum value: DIFF_TYPE_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: DIFF_TYPE_UNIFIED = 1;
|
||||
*/
|
||||
UNIFIED = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: DIFF_TYPE_CHARACTER = 2;
|
||||
*/
|
||||
CHARACTER = 2,
|
||||
|
||||
/**
|
||||
* @generated from enum value: DIFF_TYPE_COMBO = 3;
|
||||
*/
|
||||
COMBO = 3,
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the enum exa.diff_action_pb.DiffType.
|
||||
*/
|
||||
export const DiffTypeSchema: GenEnum<DiffType> = /*@__PURE__*/
|
||||
enumDesc(file_exa_diff_action_pb_diff_action, 2);
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-10918
File diff suppressed because one or more lines are too long
-2125
File diff suppressed because one or more lines are too long
@@ -1,361 +0,0 @@
|
||||
// @generated by protoc-gen-es v2.12.0 with parameter "target=ts"
|
||||
// @generated from file exa/prompt_pb/prompt.proto (package exa.prompt_pb, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
||||
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
||||
import type { ChatMessage, DeepWikiContext, DeepWikiSymbolContext } from "../chat_pb/chat_pb";
|
||||
import { file_exa_chat_pb_chat } from "../chat_pb/chat_pb";
|
||||
import type { CodeDiagnostic, CommandRequestSource, Document, IntellisenseSuggestion, TerminalCommandData, TerminalShellCommand } from "../codeium_common_pb/codeium_common_pb";
|
||||
import { file_exa_codeium_common_pb_codeium_common } from "../codeium_common_pb/codeium_common_pb";
|
||||
import type { ContextModuleResult } from "../context_module_pb/context_module_pb";
|
||||
import { file_exa_context_module_pb_context_module } from "../context_module_pb/context_module_pb";
|
||||
import type { CortexStepType, CortexTrajectory } from "../cortex_pb/cortex_pb";
|
||||
import { file_exa_cortex_pb_cortex } from "../cortex_pb/cortex_pb";
|
||||
import type { HandleStreamingTabV2Response_Diff, HandleStreamingTabV2Response_TabJump } from "../language_server_pb/language_server_pb";
|
||||
import { file_exa_language_server_pb_language_server } from "../language_server_pb/language_server_pb";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
* Describes the file exa/prompt_pb/prompt.proto.
|
||||
*/
|
||||
export const file_exa_prompt_pb_prompt: GenFile = /*@__PURE__*/
|
||||
fileDesc("ChpleGEvcHJvbXB0X3BiL3Byb21wdC5wcm90bxINZXhhLnByb21wdF9wYiI5Cg5QZW5kaW5nQ29tbWFuZBITCgtpbnN0cnVjdGlvbhgBIAEoCRISCgpjb21wbGV0aW9uGAIgASgJIs4EChFDb21tYW5kSW50ZW50SW5mbxIRCglzZWxlY3Rpb24YASABKAkSEwoLaW5zdHJ1Y3Rpb24YAiABKAkSNwoOaW5wdXRfZG9jdW1lbnQYAyABKAsyHy5leGEuY29kZWl1bV9jb21tb25fcGIuRG9jdW1lbnQSHAoUc2VsZWN0aW9uX3N0YXJ0X2xpbmUYBCABKAQSGgoSc2VsZWN0aW9uX2VuZF9saW5lGAUgASgEEkkKFXRlcm1pbmFsX2NvbW1hbmRfZGF0YRgGIAEoCzIqLmV4YS5jb2RlaXVtX2NvbW1vbl9wYi5UZXJtaW5hbENvbW1hbmREYXRhEkYKEXByZXZpb3VzX2NvbW1hbmRzGAcgAygLMisuZXhhLmNvZGVpdW1fY29tbW9uX3BiLlRlcm1pbmFsU2hlbGxDb21tYW5kEjcKEHBlbmRpbmdfY29tbWFuZHMYCCADKAsyHS5leGEucHJvbXB0X3BiLlBlbmRpbmdDb21tYW5kEkMKDnJlcXVlc3Rfc291cmNlGAkgASgOMisuZXhhLmNvZGVpdW1fY29tbW9uX3BiLkNvbW1hbmRSZXF1ZXN0U291cmNlEkoKE2ludGVsbGlzZW5zZV9wcm9tcHQYCiADKAsyLS5leGEuY29kZWl1bV9jb21tb25fcGIuSW50ZWxsaXNlbnNlU3VnZ2VzdGlvbhJBChJkaWFnbm9zdGljc19wcm9tcHQYCyADKAsyJS5leGEuY29kZWl1bV9jb21tb25fcGIuQ29kZURpYWdub3N0aWMioAIKFVN1cGVyY29tcGxldGVGZWVkYmFjaxIQCghhY2NlcHRlZBgBIAEoCBIaChJpbnRlbnRpb25hbF9yZWplY3QYAiABKAgSFQoNY29tcGxldGlvbl9pZBgDIAEoCRIUCgx0aW1lc3RhbXBfbXMYBCABKAMSUgoPZGlmZl9zdWdnZXN0aW9uGAUgASgLMjkuZXhhLmxhbmd1YWdlX3NlcnZlcl9wYi5IYW5kbGVTdHJlYW1pbmdUYWJWMlJlc3BvbnNlLkRpZmYSWAoSdGFianVtcF9zdWdnZXN0aW9uGAYgASgLMjwuZXhhLmxhbmd1YWdlX3NlcnZlcl9wYi5IYW5kbGVTdHJlYW1pbmdUYWJWMlJlc3BvbnNlLlRhYkp1bXAiVgocU3VwZXJjb21wbGV0ZUZlZWRiYWNrQ29udGV4dBI2CghmZWVkYmFjaxgBIAMoCzIkLmV4YS5wcm9tcHRfcGIuU3VwZXJjb21wbGV0ZUZlZWRiYWNrIrUFChdVbmlmaWVkUHJvbXB0Q29tcG9uZW50cxJJChVjb250ZXh0X21vZHVsZV9yZXN1bHQYAiABKAsyKi5leGEuY29udGV4dF9tb2R1bGVfcGIuQ29udGV4dE1vZHVsZVJlc3VsdBI6ChFjb3J0ZXhfdHJhamVjdG9yeRgDIAEoCzIfLmV4YS5jb3J0ZXhfcGIuQ29ydGV4VHJhamVjdG9yeRI9ChNjb21tYW5kX2ludGVudF9pbmZvGAQgASgLMiAuZXhhLnByb21wdF9wYi5Db21tYW5kSW50ZW50SW5mbxIvCg1jaGF0X21lc3NhZ2VzGAEgAygLMhguZXhhLmNoYXRfcGIuQ2hhdE1lc3NhZ2USPwoQY29kZV9kaWFnbm9zdGljcxgFIAMoCzIlLmV4YS5jb2RlaXVtX2NvbW1vbl9wYi5Db2RlRGlhZ25vc3RpYxI4Cg9vdGhlcl9kb2N1bWVudHMYCSADKAsyHy5leGEuY29kZWl1bV9jb21tb25fcGIuRG9jdW1lbnQSQQoRZGVlcF93aWtpX2NvbnRleHQYCiABKAsyIi5leGEuY2hhdF9wYi5EZWVwV2lraVN5bWJvbENvbnRleHRCAhgBEjoKFGRlZXBfd2lraV9jb250ZXh0X3YyGAsgASgLMhwuZXhhLmNoYXRfcGIuRGVlcFdpa2lDb250ZXh0ElMKHnN1cGVyY29tcGxldGVfZmVlZGJhY2tfY29udGV4dBgMIAEoCzIrLmV4YS5wcm9tcHRfcGIuU3VwZXJjb21wbGV0ZUZlZWRiYWNrQ29udGV4dEoECAYQB0oECAcQCEoECAgQCVIVa25vd2xlZGdlX2Jhc2VfcmVzdWx0UhRrbm93bGVkZ2VfYmFzZV9pdGVtc1IVa25vd2xlZGdlX2Jhc2VfZ3JvdXBzIjsKHlN5c3RlbVByb21wdENvbnN0cnVjdGlvbkNvbmZpZxIZChFlbGVtZW50X3NlcGFyYXRvchgBIAEoCSJUChhDb21tYW5kUHJvbXB0Q2FjaGVDb25maWcSGQoRbWF4X3RyYWNrZWRfZmlsZXMYASABKAMSHQoVbWF4X2NhY2hlX2FnZV9zZWNvbmRzGAIgASgDItYHChZDdW11bGF0aXZlUHJvbXB0Q29uZmlnEiUKHXBlcnNpc3RlbnRfY29udGV4dF9tdWx0aXBsaWVyGAcgASgCEi0KJXBlcnNpc3RlbnRfYWN0aXZlX2RvY3VtZW50X211bHRpcGxpZXIYCiABKAISJwofcGVyc2lzdGVudF9vcGVuX2RvY3NfbXVsdGlwbGllchgLIAEoAhIqCiJwZXJzaXN0ZW50X21heF90b2tlbnNfcGVyX29wZW5fZG9jGBEgASgDEiYKHnBlcnNpc3RlbnRfbWF4X2NjaXNfY29uc2lkZXJlZBgMIAEoAxInCh9wZXJzaXN0ZW50X2RvY3VtZW50X3N1ZmZpeF9mcmFjGBQgASgCEiUKHXRyYWplY3RvcnlfY29udGV4dF9tdWx0aXBsaWVyGAIgASgCEi8KJ3RyYWplY3RvcnlfcmVmcmVzaF90aHJlc2hvbGRfbXVsdGlwbGllchgPIAEoAhIoCiB0cmFqZWN0b3J5X3RydW5jYXRpb25fbXVsdGlwbGllchgQIAEoAhIkChxlcGhlbWVyYWxfY29udGV4dF9tdWx0aXBsaWVyGAkgASgCEiEKGWludGVudF9yZXNlcnZhdGlvbl90b2tlbnMYBiABKAMSLAokZXBoZW1lcmFsX2FjdGl2ZV9kb2N1bWVudF9tdWx0aXBsaWVyGA0gASgCEiUKHWVwaGVtZXJhbF9tYXhfY2Npc19jb25zaWRlcmVkGA4gASgDEiYKHmVwaGVtZXJhbF9kb2N1bWVudF9zdWZmaXhfZnJhYxgVIAEoAhJBChphbGxvd2VkX2Nhc2NhZGVfc3RlcF90eXBlcxgSIAMoDjIdLmV4YS5jb3J0ZXhfcGIuQ29ydGV4U3RlcFR5cGUSaAobYWxsb3dlZF9pbXBsaWNpdF9zdGVwX3R5cGVzGBYgAygLMkMuZXhhLnByb21wdF9wYi5DdW11bGF0aXZlUHJvbXB0Q29uZmlnLkFsbG93ZWRJbXBsaWNpdFN0ZXBUeXBlc0VudHJ5Gj8KHUFsbG93ZWRJbXBsaWNpdFN0ZXBUeXBlc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCDoCOAFKBAgBEAJKBAgDEARKBAgEEAVKBAgFEAZSImFjdGl2ZV9kb2N1bWVudF9jb250ZXh0X211bHRpcGxpZXJSH2NvbnRleHRfaXRlbV9jb250ZXh0X211bHRpcGxpZXJSGGNhY2hlX2NvbnRleHRfbXVsdGlwbGllclITbWF4X2NjaXNfY29uc2lkZXJlZGIGcHJvdG8z", [file_exa_chat_pb_chat, file_exa_codeium_common_pb_codeium_common, file_exa_context_module_pb_context_module, file_exa_cortex_pb_cortex, file_exa_language_server_pb_language_server]);
|
||||
|
||||
/**
|
||||
* @generated from message exa.prompt_pb.PendingCommand
|
||||
*/
|
||||
export type PendingCommand = Message<"exa.prompt_pb.PendingCommand"> & {
|
||||
/**
|
||||
* @generated from field: string instruction = 1;
|
||||
*/
|
||||
instruction: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string completion = 2;
|
||||
*/
|
||||
completion: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.prompt_pb.PendingCommand.
|
||||
* Use `create(PendingCommandSchema)` to create a new message.
|
||||
*/
|
||||
export const PendingCommandSchema: GenMessage<PendingCommand> = /*@__PURE__*/
|
||||
messageDesc(file_exa_prompt_pb_prompt, 0);
|
||||
|
||||
/**
|
||||
* @generated from message exa.prompt_pb.CommandIntentInfo
|
||||
*/
|
||||
export type CommandIntentInfo = Message<"exa.prompt_pb.CommandIntentInfo"> & {
|
||||
/**
|
||||
* @generated from field: string selection = 1;
|
||||
*/
|
||||
selection: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string instruction = 2;
|
||||
*/
|
||||
instruction: string;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.codeium_common_pb.Document input_document = 3;
|
||||
*/
|
||||
inputDocument?: Document | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: uint64 selection_start_line = 4;
|
||||
*/
|
||||
selectionStartLine: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: uint64 selection_end_line = 5;
|
||||
*/
|
||||
selectionEndLine: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.codeium_common_pb.TerminalCommandData terminal_command_data = 6;
|
||||
*/
|
||||
terminalCommandData?: TerminalCommandData | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: repeated exa.codeium_common_pb.TerminalShellCommand previous_commands = 7;
|
||||
*/
|
||||
previousCommands: TerminalShellCommand[];
|
||||
|
||||
/**
|
||||
* @generated from field: repeated exa.prompt_pb.PendingCommand pending_commands = 8;
|
||||
*/
|
||||
pendingCommands: PendingCommand[];
|
||||
|
||||
/**
|
||||
* @generated from field: exa.codeium_common_pb.CommandRequestSource request_source = 9;
|
||||
*/
|
||||
requestSource: CommandRequestSource;
|
||||
|
||||
/**
|
||||
* @generated from field: repeated exa.codeium_common_pb.IntellisenseSuggestion intellisense_prompt = 10;
|
||||
*/
|
||||
intellisensePrompt: IntellisenseSuggestion[];
|
||||
|
||||
/**
|
||||
* @generated from field: repeated exa.codeium_common_pb.CodeDiagnostic diagnostics_prompt = 11;
|
||||
*/
|
||||
diagnosticsPrompt: CodeDiagnostic[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.prompt_pb.CommandIntentInfo.
|
||||
* Use `create(CommandIntentInfoSchema)` to create a new message.
|
||||
*/
|
||||
export const CommandIntentInfoSchema: GenMessage<CommandIntentInfo> = /*@__PURE__*/
|
||||
messageDesc(file_exa_prompt_pb_prompt, 1);
|
||||
|
||||
/**
|
||||
* @generated from message exa.prompt_pb.SupercompleteFeedback
|
||||
*/
|
||||
export type SupercompleteFeedback = Message<"exa.prompt_pb.SupercompleteFeedback"> & {
|
||||
/**
|
||||
* @generated from field: bool accepted = 1;
|
||||
*/
|
||||
accepted: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: bool intentional_reject = 2;
|
||||
*/
|
||||
intentionalReject: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: string completion_id = 3;
|
||||
*/
|
||||
completionId: string;
|
||||
|
||||
/**
|
||||
* @generated from field: int64 timestamp_ms = 4;
|
||||
*/
|
||||
timestampMs: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.language_server_pb.HandleStreamingTabV2Response.Diff diff_suggestion = 5;
|
||||
*/
|
||||
diffSuggestion?: HandleStreamingTabV2Response_Diff | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.language_server_pb.HandleStreamingTabV2Response.TabJump tabjump_suggestion = 6;
|
||||
*/
|
||||
tabjumpSuggestion?: HandleStreamingTabV2Response_TabJump | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.prompt_pb.SupercompleteFeedback.
|
||||
* Use `create(SupercompleteFeedbackSchema)` to create a new message.
|
||||
*/
|
||||
export const SupercompleteFeedbackSchema: GenMessage<SupercompleteFeedback> = /*@__PURE__*/
|
||||
messageDesc(file_exa_prompt_pb_prompt, 2);
|
||||
|
||||
/**
|
||||
* @generated from message exa.prompt_pb.SupercompleteFeedbackContext
|
||||
*/
|
||||
export type SupercompleteFeedbackContext = Message<"exa.prompt_pb.SupercompleteFeedbackContext"> & {
|
||||
/**
|
||||
* @generated from field: repeated exa.prompt_pb.SupercompleteFeedback feedback = 1;
|
||||
*/
|
||||
feedback: SupercompleteFeedback[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.prompt_pb.SupercompleteFeedbackContext.
|
||||
* Use `create(SupercompleteFeedbackContextSchema)` to create a new message.
|
||||
*/
|
||||
export const SupercompleteFeedbackContextSchema: GenMessage<SupercompleteFeedbackContext> = /*@__PURE__*/
|
||||
messageDesc(file_exa_prompt_pb_prompt, 3);
|
||||
|
||||
/**
|
||||
* @generated from message exa.prompt_pb.UnifiedPromptComponents
|
||||
*/
|
||||
export type UnifiedPromptComponents = Message<"exa.prompt_pb.UnifiedPromptComponents"> & {
|
||||
/**
|
||||
* @generated from field: exa.context_module_pb.ContextModuleResult context_module_result = 2;
|
||||
*/
|
||||
contextModuleResult?: ContextModuleResult | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.cortex_pb.CortexTrajectory cortex_trajectory = 3;
|
||||
*/
|
||||
cortexTrajectory?: CortexTrajectory | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.prompt_pb.CommandIntentInfo command_intent_info = 4;
|
||||
*/
|
||||
commandIntentInfo?: CommandIntentInfo | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: repeated exa.chat_pb.ChatMessage chat_messages = 1;
|
||||
*/
|
||||
chatMessages: ChatMessage[];
|
||||
|
||||
/**
|
||||
* @generated from field: repeated exa.codeium_common_pb.CodeDiagnostic code_diagnostics = 5;
|
||||
*/
|
||||
codeDiagnostics: CodeDiagnostic[];
|
||||
|
||||
/**
|
||||
* @generated from field: repeated exa.codeium_common_pb.Document other_documents = 9;
|
||||
*/
|
||||
otherDocuments: Document[];
|
||||
|
||||
/**
|
||||
* @generated from field: exa.chat_pb.DeepWikiSymbolContext deep_wiki_context = 10 [deprecated = true];
|
||||
* @deprecated
|
||||
*/
|
||||
deepWikiContext?: DeepWikiSymbolContext | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.chat_pb.DeepWikiContext deep_wiki_context_v2 = 11;
|
||||
*/
|
||||
deepWikiContextV2?: DeepWikiContext | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.prompt_pb.SupercompleteFeedbackContext supercomplete_feedback_context = 12;
|
||||
*/
|
||||
supercompleteFeedbackContext?: SupercompleteFeedbackContext | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.prompt_pb.UnifiedPromptComponents.
|
||||
* Use `create(UnifiedPromptComponentsSchema)` to create a new message.
|
||||
*/
|
||||
export const UnifiedPromptComponentsSchema: GenMessage<UnifiedPromptComponents> = /*@__PURE__*/
|
||||
messageDesc(file_exa_prompt_pb_prompt, 4);
|
||||
|
||||
/**
|
||||
* @generated from message exa.prompt_pb.SystemPromptConstructionConfig
|
||||
*/
|
||||
export type SystemPromptConstructionConfig = Message<"exa.prompt_pb.SystemPromptConstructionConfig"> & {
|
||||
/**
|
||||
* @generated from field: string element_separator = 1;
|
||||
*/
|
||||
elementSeparator: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.prompt_pb.SystemPromptConstructionConfig.
|
||||
* Use `create(SystemPromptConstructionConfigSchema)` to create a new message.
|
||||
*/
|
||||
export const SystemPromptConstructionConfigSchema: GenMessage<SystemPromptConstructionConfig> = /*@__PURE__*/
|
||||
messageDesc(file_exa_prompt_pb_prompt, 5);
|
||||
|
||||
/**
|
||||
* @generated from message exa.prompt_pb.CommandPromptCacheConfig
|
||||
*/
|
||||
export type CommandPromptCacheConfig = Message<"exa.prompt_pb.CommandPromptCacheConfig"> & {
|
||||
/**
|
||||
* @generated from field: int64 max_tracked_files = 1;
|
||||
*/
|
||||
maxTrackedFiles: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: int64 max_cache_age_seconds = 2;
|
||||
*/
|
||||
maxCacheAgeSeconds: bigint;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.prompt_pb.CommandPromptCacheConfig.
|
||||
* Use `create(CommandPromptCacheConfigSchema)` to create a new message.
|
||||
*/
|
||||
export const CommandPromptCacheConfigSchema: GenMessage<CommandPromptCacheConfig> = /*@__PURE__*/
|
||||
messageDesc(file_exa_prompt_pb_prompt, 6);
|
||||
|
||||
/**
|
||||
* @generated from message exa.prompt_pb.CumulativePromptConfig
|
||||
*/
|
||||
export type CumulativePromptConfig = Message<"exa.prompt_pb.CumulativePromptConfig"> & {
|
||||
/**
|
||||
* @generated from field: float persistent_context_multiplier = 7;
|
||||
*/
|
||||
persistentContextMultiplier: number;
|
||||
|
||||
/**
|
||||
* @generated from field: float persistent_active_document_multiplier = 10;
|
||||
*/
|
||||
persistentActiveDocumentMultiplier: number;
|
||||
|
||||
/**
|
||||
* @generated from field: float persistent_open_docs_multiplier = 11;
|
||||
*/
|
||||
persistentOpenDocsMultiplier: number;
|
||||
|
||||
/**
|
||||
* @generated from field: int64 persistent_max_tokens_per_open_doc = 17;
|
||||
*/
|
||||
persistentMaxTokensPerOpenDoc: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: int64 persistent_max_ccis_considered = 12;
|
||||
*/
|
||||
persistentMaxCcisConsidered: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: float persistent_document_suffix_frac = 20;
|
||||
*/
|
||||
persistentDocumentSuffixFrac: number;
|
||||
|
||||
/**
|
||||
* @generated from field: float trajectory_context_multiplier = 2;
|
||||
*/
|
||||
trajectoryContextMultiplier: number;
|
||||
|
||||
/**
|
||||
* @generated from field: float trajectory_refresh_threshold_multiplier = 15;
|
||||
*/
|
||||
trajectoryRefreshThresholdMultiplier: number;
|
||||
|
||||
/**
|
||||
* @generated from field: float trajectory_truncation_multiplier = 16;
|
||||
*/
|
||||
trajectoryTruncationMultiplier: number;
|
||||
|
||||
/**
|
||||
* @generated from field: float ephemeral_context_multiplier = 9;
|
||||
*/
|
||||
ephemeralContextMultiplier: number;
|
||||
|
||||
/**
|
||||
* @generated from field: int64 intent_reservation_tokens = 6;
|
||||
*/
|
||||
intentReservationTokens: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: float ephemeral_active_document_multiplier = 13;
|
||||
*/
|
||||
ephemeralActiveDocumentMultiplier: number;
|
||||
|
||||
/**
|
||||
* @generated from field: int64 ephemeral_max_ccis_considered = 14;
|
||||
*/
|
||||
ephemeralMaxCcisConsidered: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: float ephemeral_document_suffix_frac = 21;
|
||||
*/
|
||||
ephemeralDocumentSuffixFrac: number;
|
||||
|
||||
/**
|
||||
* @generated from field: repeated exa.cortex_pb.CortexStepType allowed_cascade_step_types = 18;
|
||||
*/
|
||||
allowedCascadeStepTypes: CortexStepType[];
|
||||
|
||||
/**
|
||||
* @generated from field: map<string, bool> allowed_implicit_step_types = 22;
|
||||
*/
|
||||
allowedImplicitStepTypes: { [key: string]: boolean };
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.prompt_pb.CumulativePromptConfig.
|
||||
* Use `create(CumulativePromptConfigSchema)` to create a new message.
|
||||
*/
|
||||
export const CumulativePromptConfigSchema: GenMessage<CumulativePromptConfig> = /*@__PURE__*/
|
||||
messageDesc(file_exa_prompt_pb_prompt, 7);
|
||||
|
||||
-450
@@ -1,450 +0,0 @@
|
||||
// @generated by protoc-gen-es v2.12.0 with parameter "target=ts"
|
||||
// @generated from file exa/reactive_component_pb/reactive_component.proto (package exa.reactive_component_pb, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
||||
import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
* Describes the file exa/reactive_component_pb/reactive_component.proto.
|
||||
*/
|
||||
export const file_exa_reactive_component_pb_reactive_component: GenFile = /*@__PURE__*/
|
||||
fileDesc("CjJleGEvcmVhY3RpdmVfY29tcG9uZW50X3BiL3JlYWN0aXZlX2NvbXBvbmVudC5wcm90bxIZZXhhLnJlYWN0aXZlX2NvbXBvbmVudF9wYiJEChxTdHJlYW1SZWFjdGl2ZVVwZGF0ZXNSZXF1ZXN0EhgKEHByb3RvY29sX3ZlcnNpb24YASABKA0SCgoCaWQYAiABKAkiegodU3RyZWFtUmVhY3RpdmVVcGRhdGVzUmVzcG9uc2USDwoHdmVyc2lvbhgBIAEoBBI0CgRkaWZmGAIgASgLMiYuZXhhLnJlYWN0aXZlX2NvbXBvbmVudF9wYi5NZXNzYWdlRGlmZhISCgpmdWxsX3N0YXRlGAMgASgMIqEBCglUZXN0UHJvdG8SDwoHY291bnRlchgBIAEoBRIOCgZ2YWx1ZXMYAiADKAUSNAoGbmVzdGVkGAMgASgLMiQuZXhhLnJlYWN0aXZlX2NvbXBvbmVudF9wYi5UZXN0UHJvdG8SPQoPbmVzdGVkX3JlcGVhdGVkGAQgAygLMiQuZXhhLnJlYWN0aXZlX2NvbXBvbmVudF9wYi5UZXN0UHJvdG8iSAoLTWVzc2FnZURpZmYSOQoLZmllbGRfZGlmZnMYASADKAsyJC5leGEucmVhY3RpdmVfY29tcG9uZW50X3BiLkZpZWxkRGlmZiL9AQoJRmllbGREaWZmEhQKDGZpZWxkX251bWJlchgBIAEoDRJDCg91cGRhdGVfc2luZ3VsYXIYAiABKAsyKC5leGEucmVhY3RpdmVfY29tcG9uZW50X3BiLlNpbmd1bGFyVmFsdWVIABJCCg91cGRhdGVfcmVwZWF0ZWQYAyABKAsyJy5leGEucmVhY3RpdmVfY29tcG9uZW50X3BiLlJlcGVhdGVkRGlmZkgAEjgKCnVwZGF0ZV9tYXAYBCABKAsyIi5leGEucmVhY3RpdmVfY29tcG9uZW50X3BiLk1hcERpZmZIABIPCgVjbGVhchgFIAEoCEgAQgYKBGRpZmYiewoMUmVwZWF0ZWREaWZmEhIKCm5ld19sZW5ndGgYASABKA0SPwoNdXBkYXRlX3ZhbHVlcxgCIAMoCzIoLmV4YS5yZWFjdGl2ZV9jb21wb25lbnRfcGIuU2luZ3VsYXJWYWx1ZRIWCg51cGRhdGVfaW5kaWNlcxgDIAMoDSJHCgdNYXBEaWZmEjwKDW1hcF9rZXlfZGlmZnMYASADKAsyJS5leGEucmVhY3RpdmVfY29tcG9uZW50X3BiLk1hcEtleURpZmYipQEKCk1hcEtleURpZmYSOQoHbWFwX2tleRgBIAEoCzIoLmV4YS5yZWFjdGl2ZV9jb21wb25lbnRfcGIuU2luZ3VsYXJWYWx1ZRJDCg91cGRhdGVfc2luZ3VsYXIYAiABKAsyKC5leGEucmVhY3RpdmVfY29tcG9uZW50X3BiLlNpbmd1bGFyVmFsdWVIABIPCgVjbGVhchgDIAEoCEgAQgYKBGRpZmYi1wMKDVNpbmd1bGFyVmFsdWUSFgoMZG91YmxlX3ZhbHVlGAEgASgBSAASFQoLZmxvYXRfdmFsdWUYAiABKAJIABIVCgtpbnQzMl92YWx1ZRgDIAEoBUgAEhUKC2ludDY0X3ZhbHVlGAQgASgDSAASFgoMdWludDMyX3ZhbHVlGAUgASgNSAASFgoMdWludDY0X3ZhbHVlGAYgASgESAASFgoMc2ludDMyX3ZhbHVlGAcgASgRSAASFgoMc2ludDY0X3ZhbHVlGAggASgSSAASFwoNZml4ZWQzMl92YWx1ZRgJIAEoB0gAEhcKDWZpeGVkNjRfdmFsdWUYCiABKAZIABIYCg5zZml4ZWQzMl92YWx1ZRgLIAEoD0gAEhgKDnNmaXhlZDY0X3ZhbHVlGAwgASgQSAASFAoKYm9vbF92YWx1ZRgNIAEoCEgAEhQKCmVudW1fdmFsdWUYDiABKA1IABIWCgxzdHJpbmdfdmFsdWUYDyABKAlIABIVCgtieXRlc192YWx1ZRgQIAEoDEgAEj8KDW1lc3NhZ2VfdmFsdWUYESABKAsyJi5leGEucmVhY3RpdmVfY29tcG9uZW50X3BiLk1lc3NhZ2VEaWZmSABCBwoFdmFsdWUiiAYKDVRlc3REaWZmUHJvdG8SHQoVc2luZ3VsYXJfc2NhbGFyX3ZhbHVlGAEgASgBEkQKFnNpbmd1bGFyX21lc3NhZ2VfdmFsdWUYAiABKAsyJC5leGEucmVhY3RpdmVfY29tcG9uZW50X3BiLlRlc3RQcm90bxIiChVvcHRpb25hbF9zY2FsYXJfdmFsdWUYCiABKAFIAYgBARIdChVyZXBlYXRlZF9zY2FsYXJfdmFsdWUYAyADKAESRAoWcmVwZWF0ZWRfbWVzc2FnZV92YWx1ZRgEIAMoCzIkLmV4YS5yZWFjdGl2ZV9jb21wb25lbnRfcGIuVGVzdFByb3RvElYKEG1hcF9zY2FsYXJfdmFsdWUYBSADKAsyPC5leGEucmVhY3RpdmVfY29tcG9uZW50X3BiLlRlc3REaWZmUHJvdG8uTWFwU2NhbGFyVmFsdWVFbnRyeRJYChFtYXBfbWVzc2FnZV92YWx1ZRgGIAMoCzI9LmV4YS5yZWFjdGl2ZV9jb21wb25lbnRfcGIuVGVzdERpZmZQcm90by5NYXBNZXNzYWdlVmFsdWVFbnRyeRIcChJvbmVvZl9zY2FsYXJfdmFsdWUYByABKAFIABJDChNvbmVvZl9tZXNzYWdlX3ZhbHVlGAggASgLMiQuZXhhLnJlYWN0aXZlX2NvbXBvbmVudF9wYi5UZXN0UHJvdG9IABI3CgplbnVtX3ZhbHVlGAkgASgOMiMuZXhhLnJlYWN0aXZlX2NvbXBvbmVudF9wYi5UZXN0RW51bRo1ChNNYXBTY2FsYXJWYWx1ZUVudHJ5EgsKA2tleRgBIAEoBRINCgV2YWx1ZRgCIAEoAToCOAEaXAoUTWFwTWVzc2FnZVZhbHVlRW50cnkSCwoDa2V5GAEgASgJEjMKBXZhbHVlGAIgASgLMiQuZXhhLnJlYWN0aXZlX2NvbXBvbmVudF9wYi5UZXN0UHJvdG86AjgBQgwKCm9uZW9mX3Rlc3RCGAoWX29wdGlvbmFsX3NjYWxhcl92YWx1ZSpLCghUZXN0RW51bRIZChVURVNUX0VOVU1fVU5TUEVDSUZJRUQQABIRCg1URVNUX0VOVU1fT05FEAESEQoNVEVTVF9FTlVNX1RXTxACYgZwcm90bzM");
|
||||
|
||||
/**
|
||||
* @generated from message exa.reactive_component_pb.StreamReactiveUpdatesRequest
|
||||
*/
|
||||
export type StreamReactiveUpdatesRequest = Message<"exa.reactive_component_pb.StreamReactiveUpdatesRequest"> & {
|
||||
/**
|
||||
* @generated from field: uint32 protocol_version = 1;
|
||||
*/
|
||||
protocolVersion: number;
|
||||
|
||||
/**
|
||||
* @generated from field: string id = 2;
|
||||
*/
|
||||
id: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.reactive_component_pb.StreamReactiveUpdatesRequest.
|
||||
* Use `create(StreamReactiveUpdatesRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const StreamReactiveUpdatesRequestSchema: GenMessage<StreamReactiveUpdatesRequest> = /*@__PURE__*/
|
||||
messageDesc(file_exa_reactive_component_pb_reactive_component, 0);
|
||||
|
||||
/**
|
||||
* @generated from message exa.reactive_component_pb.StreamReactiveUpdatesResponse
|
||||
*/
|
||||
export type StreamReactiveUpdatesResponse = Message<"exa.reactive_component_pb.StreamReactiveUpdatesResponse"> & {
|
||||
/**
|
||||
* @generated from field: uint64 version = 1;
|
||||
*/
|
||||
version: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.reactive_component_pb.MessageDiff diff = 2;
|
||||
*/
|
||||
diff?: MessageDiff | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: bytes full_state = 3;
|
||||
*/
|
||||
fullState: Uint8Array;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.reactive_component_pb.StreamReactiveUpdatesResponse.
|
||||
* Use `create(StreamReactiveUpdatesResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const StreamReactiveUpdatesResponseSchema: GenMessage<StreamReactiveUpdatesResponse> = /*@__PURE__*/
|
||||
messageDesc(file_exa_reactive_component_pb_reactive_component, 1);
|
||||
|
||||
/**
|
||||
* @generated from message exa.reactive_component_pb.TestProto
|
||||
*/
|
||||
export type TestProto = Message<"exa.reactive_component_pb.TestProto"> & {
|
||||
/**
|
||||
* @generated from field: int32 counter = 1;
|
||||
*/
|
||||
counter: number;
|
||||
|
||||
/**
|
||||
* @generated from field: repeated int32 values = 2;
|
||||
*/
|
||||
values: number[];
|
||||
|
||||
/**
|
||||
* @generated from field: exa.reactive_component_pb.TestProto nested = 3;
|
||||
*/
|
||||
nested?: TestProto | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: repeated exa.reactive_component_pb.TestProto nested_repeated = 4;
|
||||
*/
|
||||
nestedRepeated: TestProto[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.reactive_component_pb.TestProto.
|
||||
* Use `create(TestProtoSchema)` to create a new message.
|
||||
*/
|
||||
export const TestProtoSchema: GenMessage<TestProto> = /*@__PURE__*/
|
||||
messageDesc(file_exa_reactive_component_pb_reactive_component, 2);
|
||||
|
||||
/**
|
||||
* @generated from message exa.reactive_component_pb.MessageDiff
|
||||
*/
|
||||
export type MessageDiff = Message<"exa.reactive_component_pb.MessageDiff"> & {
|
||||
/**
|
||||
* @generated from field: repeated exa.reactive_component_pb.FieldDiff field_diffs = 1;
|
||||
*/
|
||||
fieldDiffs: FieldDiff[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.reactive_component_pb.MessageDiff.
|
||||
* Use `create(MessageDiffSchema)` to create a new message.
|
||||
*/
|
||||
export const MessageDiffSchema: GenMessage<MessageDiff> = /*@__PURE__*/
|
||||
messageDesc(file_exa_reactive_component_pb_reactive_component, 3);
|
||||
|
||||
/**
|
||||
* @generated from message exa.reactive_component_pb.FieldDiff
|
||||
*/
|
||||
export type FieldDiff = Message<"exa.reactive_component_pb.FieldDiff"> & {
|
||||
/**
|
||||
* @generated from field: uint32 field_number = 1;
|
||||
*/
|
||||
fieldNumber: number;
|
||||
|
||||
/**
|
||||
* @generated from oneof exa.reactive_component_pb.FieldDiff.diff
|
||||
*/
|
||||
diff: {
|
||||
/**
|
||||
* @generated from field: exa.reactive_component_pb.SingularValue update_singular = 2;
|
||||
*/
|
||||
value: SingularValue;
|
||||
case: "updateSingular";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: exa.reactive_component_pb.RepeatedDiff update_repeated = 3;
|
||||
*/
|
||||
value: RepeatedDiff;
|
||||
case: "updateRepeated";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: exa.reactive_component_pb.MapDiff update_map = 4;
|
||||
*/
|
||||
value: MapDiff;
|
||||
case: "updateMap";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: bool clear = 5;
|
||||
*/
|
||||
value: boolean;
|
||||
case: "clear";
|
||||
} | { case: undefined; value?: undefined };
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.reactive_component_pb.FieldDiff.
|
||||
* Use `create(FieldDiffSchema)` to create a new message.
|
||||
*/
|
||||
export const FieldDiffSchema: GenMessage<FieldDiff> = /*@__PURE__*/
|
||||
messageDesc(file_exa_reactive_component_pb_reactive_component, 4);
|
||||
|
||||
/**
|
||||
* @generated from message exa.reactive_component_pb.RepeatedDiff
|
||||
*/
|
||||
export type RepeatedDiff = Message<"exa.reactive_component_pb.RepeatedDiff"> & {
|
||||
/**
|
||||
* @generated from field: uint32 new_length = 1;
|
||||
*/
|
||||
newLength: number;
|
||||
|
||||
/**
|
||||
* @generated from field: repeated exa.reactive_component_pb.SingularValue update_values = 2;
|
||||
*/
|
||||
updateValues: SingularValue[];
|
||||
|
||||
/**
|
||||
* @generated from field: repeated uint32 update_indices = 3;
|
||||
*/
|
||||
updateIndices: number[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.reactive_component_pb.RepeatedDiff.
|
||||
* Use `create(RepeatedDiffSchema)` to create a new message.
|
||||
*/
|
||||
export const RepeatedDiffSchema: GenMessage<RepeatedDiff> = /*@__PURE__*/
|
||||
messageDesc(file_exa_reactive_component_pb_reactive_component, 5);
|
||||
|
||||
/**
|
||||
* @generated from message exa.reactive_component_pb.MapDiff
|
||||
*/
|
||||
export type MapDiff = Message<"exa.reactive_component_pb.MapDiff"> & {
|
||||
/**
|
||||
* @generated from field: repeated exa.reactive_component_pb.MapKeyDiff map_key_diffs = 1;
|
||||
*/
|
||||
mapKeyDiffs: MapKeyDiff[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.reactive_component_pb.MapDiff.
|
||||
* Use `create(MapDiffSchema)` to create a new message.
|
||||
*/
|
||||
export const MapDiffSchema: GenMessage<MapDiff> = /*@__PURE__*/
|
||||
messageDesc(file_exa_reactive_component_pb_reactive_component, 6);
|
||||
|
||||
/**
|
||||
* @generated from message exa.reactive_component_pb.MapKeyDiff
|
||||
*/
|
||||
export type MapKeyDiff = Message<"exa.reactive_component_pb.MapKeyDiff"> & {
|
||||
/**
|
||||
* @generated from field: exa.reactive_component_pb.SingularValue map_key = 1;
|
||||
*/
|
||||
mapKey?: SingularValue | undefined;
|
||||
|
||||
/**
|
||||
* @generated from oneof exa.reactive_component_pb.MapKeyDiff.diff
|
||||
*/
|
||||
diff: {
|
||||
/**
|
||||
* @generated from field: exa.reactive_component_pb.SingularValue update_singular = 2;
|
||||
*/
|
||||
value: SingularValue;
|
||||
case: "updateSingular";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: bool clear = 3;
|
||||
*/
|
||||
value: boolean;
|
||||
case: "clear";
|
||||
} | { case: undefined; value?: undefined };
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.reactive_component_pb.MapKeyDiff.
|
||||
* Use `create(MapKeyDiffSchema)` to create a new message.
|
||||
*/
|
||||
export const MapKeyDiffSchema: GenMessage<MapKeyDiff> = /*@__PURE__*/
|
||||
messageDesc(file_exa_reactive_component_pb_reactive_component, 7);
|
||||
|
||||
/**
|
||||
* @generated from message exa.reactive_component_pb.SingularValue
|
||||
*/
|
||||
export type SingularValue = Message<"exa.reactive_component_pb.SingularValue"> & {
|
||||
/**
|
||||
* @generated from oneof exa.reactive_component_pb.SingularValue.value
|
||||
*/
|
||||
value: {
|
||||
/**
|
||||
* @generated from field: double double_value = 1;
|
||||
*/
|
||||
value: number;
|
||||
case: "doubleValue";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: float float_value = 2;
|
||||
*/
|
||||
value: number;
|
||||
case: "floatValue";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: int32 int32_value = 3;
|
||||
*/
|
||||
value: number;
|
||||
case: "int32Value";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: int64 int64_value = 4;
|
||||
*/
|
||||
value: bigint;
|
||||
case: "int64Value";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: uint32 uint32_value = 5;
|
||||
*/
|
||||
value: number;
|
||||
case: "uint32Value";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: uint64 uint64_value = 6;
|
||||
*/
|
||||
value: bigint;
|
||||
case: "uint64Value";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: sint32 sint32_value = 7;
|
||||
*/
|
||||
value: number;
|
||||
case: "sint32Value";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: sint64 sint64_value = 8;
|
||||
*/
|
||||
value: bigint;
|
||||
case: "sint64Value";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: fixed32 fixed32_value = 9;
|
||||
*/
|
||||
value: number;
|
||||
case: "fixed32Value";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: fixed64 fixed64_value = 10;
|
||||
*/
|
||||
value: bigint;
|
||||
case: "fixed64Value";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: sfixed32 sfixed32_value = 11;
|
||||
*/
|
||||
value: number;
|
||||
case: "sfixed32Value";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: sfixed64 sfixed64_value = 12;
|
||||
*/
|
||||
value: bigint;
|
||||
case: "sfixed64Value";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: bool bool_value = 13;
|
||||
*/
|
||||
value: boolean;
|
||||
case: "boolValue";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: uint32 enum_value = 14;
|
||||
*/
|
||||
value: number;
|
||||
case: "enumValue";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: string string_value = 15;
|
||||
*/
|
||||
value: string;
|
||||
case: "stringValue";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: bytes bytes_value = 16;
|
||||
*/
|
||||
value: Uint8Array;
|
||||
case: "bytesValue";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: exa.reactive_component_pb.MessageDiff message_value = 17;
|
||||
*/
|
||||
value: MessageDiff;
|
||||
case: "messageValue";
|
||||
} | { case: undefined; value?: undefined };
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.reactive_component_pb.SingularValue.
|
||||
* Use `create(SingularValueSchema)` to create a new message.
|
||||
*/
|
||||
export const SingularValueSchema: GenMessage<SingularValue> = /*@__PURE__*/
|
||||
messageDesc(file_exa_reactive_component_pb_reactive_component, 8);
|
||||
|
||||
/**
|
||||
* @generated from message exa.reactive_component_pb.TestDiffProto
|
||||
*/
|
||||
export type TestDiffProto = Message<"exa.reactive_component_pb.TestDiffProto"> & {
|
||||
/**
|
||||
* @generated from field: double singular_scalar_value = 1;
|
||||
*/
|
||||
singularScalarValue: number;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.reactive_component_pb.TestProto singular_message_value = 2;
|
||||
*/
|
||||
singularMessageValue?: TestProto | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: optional double optional_scalar_value = 10;
|
||||
*/
|
||||
optionalScalarValue?: number | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: repeated double repeated_scalar_value = 3;
|
||||
*/
|
||||
repeatedScalarValue: number[];
|
||||
|
||||
/**
|
||||
* @generated from field: repeated exa.reactive_component_pb.TestProto repeated_message_value = 4;
|
||||
*/
|
||||
repeatedMessageValue: TestProto[];
|
||||
|
||||
/**
|
||||
* @generated from field: map<int32, double> map_scalar_value = 5;
|
||||
*/
|
||||
mapScalarValue: { [key: number]: number };
|
||||
|
||||
/**
|
||||
* @generated from field: map<string, exa.reactive_component_pb.TestProto> map_message_value = 6;
|
||||
*/
|
||||
mapMessageValue: { [key: string]: TestProto };
|
||||
|
||||
/**
|
||||
* @generated from oneof exa.reactive_component_pb.TestDiffProto.oneof_test
|
||||
*/
|
||||
oneofTest: {
|
||||
/**
|
||||
* @generated from field: double oneof_scalar_value = 7;
|
||||
*/
|
||||
value: number;
|
||||
case: "oneofScalarValue";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: exa.reactive_component_pb.TestProto oneof_message_value = 8;
|
||||
*/
|
||||
value: TestProto;
|
||||
case: "oneofMessageValue";
|
||||
} | { case: undefined; value?: undefined };
|
||||
|
||||
/**
|
||||
* @generated from field: exa.reactive_component_pb.TestEnum enum_value = 9;
|
||||
*/
|
||||
enumValue: TestEnum;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.reactive_component_pb.TestDiffProto.
|
||||
* Use `create(TestDiffProtoSchema)` to create a new message.
|
||||
*/
|
||||
export const TestDiffProtoSchema: GenMessage<TestDiffProto> = /*@__PURE__*/
|
||||
messageDesc(file_exa_reactive_component_pb_reactive_component, 9);
|
||||
|
||||
/**
|
||||
* @generated from enum exa.reactive_component_pb.TestEnum
|
||||
*/
|
||||
export enum TestEnum {
|
||||
/**
|
||||
* @generated from enum value: TEST_ENUM_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: TEST_ENUM_ONE = 1;
|
||||
*/
|
||||
ONE = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: TEST_ENUM_TWO = 2;
|
||||
*/
|
||||
TWO = 2,
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the enum exa.reactive_component_pb.TestEnum.
|
||||
*/
|
||||
export const TestEnumSchema: GenEnum<TestEnum> = /*@__PURE__*/
|
||||
enumDesc(file_exa_reactive_component_pb_reactive_component, 0);
|
||||
|
||||
@@ -1,712 +0,0 @@
|
||||
// @generated by protoc-gen-es v2.12.0 with parameter "target=ts"
|
||||
// @generated from file exa/trust_pb/trust.proto (package exa.trust_pb, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
||||
import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
||||
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
||||
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
* Describes the file exa/trust_pb/trust.proto.
|
||||
*/
|
||||
export const file_exa_trust_pb_trust: GenFile = /*@__PURE__*/
|
||||
fileDesc("ChhleGEvdHJ1c3RfcGIvdHJ1c3QucHJvdG8SDGV4YS50cnVzdF9wYiJhCg9UcnVzdElkZW50aWZpZXISOgoPaWRlbnRpZmllcl90eXBlGAEgASgOMiEuZXhhLnRydXN0X3BiLlRydXN0SWRlbnRpZmllclR5cGUSEgoKaWRlbnRpZmllchgCIAEoCSJPCg1UcnVzdFF1ZXJ5S2V5EjEKCGtleV90eXBlGAEgASgOMh8uZXhhLnRydXN0X3BiLlRydXN0UXVlcnlLZXlUeXBlEgsKA2tleRgCIAEoCSKPBwoKVHJ1c3RFdmVudBIvCgtvYnNlcnZlZF9hdBgBIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLgoGc291cmNlGAMgASgOMh4uZXhhLnRydXN0X3BiLlRydXN0RXZlbnRTb3VyY2USFwoPaWRlbXBvdGVuY3lfa2V5GAQgASgJEi4KB3Vua25vd24YBSABKAsyGy5leGEudHJ1c3RfcGIuVW5rbm93blNpZ25hbEgAEkUKE3Byb3ZpZGVyc19leGhhdXN0ZWQYBiABKAsyJi5leGEudHJ1c3RfcGIuUHJvdmlkZXJzRXhoYXVzdGVkU2lnbmFsSAASSQoWY3Jvc3NfbW9kZWxfcmF0ZV9saW1pdBgHIAEoCzInLmV4YS50cnVzdF9wYi5Dcm9zc01vZGVsUmF0ZUxpbWl0U2lnbmFsSAASOwoOYWNjb3VudF9mYW5vdXQYCCABKAsyIS5leGEudHJ1c3RfcGIuQWNjb3VudEZhbm91dFNpZ25hbEgAEkQKE211bHRpX2lwX3RyYWplY3RvcnkYCSABKAsyJS5leGEudHJ1c3RfcGIuTXVsdGlJcFRyYWplY3RvcnlTaWduYWxIABI0CgtjeWJlcl9hYnVzZRgKIAEoCzIdLmV4YS50cnVzdF9wYi5DeWJlckFidXNlRXZlbnRIABJDChNvcGVuYWlfYmxvY2tlZF91c2VyGAsgASgLMiQuZXhhLnRydXN0X3BiLk9wZW5BSUJsb2NrZWRVc2VyRXZlbnRIABJIChVzdXNwaWNpb3VzX3VzZXJfYWdlbnQYDCABKAsyJy5leGEudHJ1c3RfcGIuU3VzcGljaW91c1VzZXJBZ2VudFNpZ25hbEgAEjcKDG1hbnVhbF90cnVzdBgOIAEoCzIfLmV4YS50cnVzdF9wYi5NYW51YWxUcnVzdFNpZ25hbEgAElAKGWh1bnRlcl9lbWFpbF92ZXJpZmljYXRpb24YESABKAsyKy5leGEudHJ1c3RfcGIuSHVudGVyRW1haWxWZXJpZmljYXRpb25TaWduYWxIABIyCgtpZGVudGlmaWVycxgNIAMoCzIdLmV4YS50cnVzdF9wYi5UcnVzdElkZW50aWZpZXISLgoJcXVlcnlfa2V5GA8gASgLMhsuZXhhLnRydXN0X3BiLlRydXN0UXVlcnlLZXlCCAoGc2lnbmFsSgQIAhADIg8KDVVua25vd25TaWduYWwiswEKGFByb3ZpZGVyc0V4aGF1c3RlZFNpZ25hbBIRCgltb2RlbF91aWQYASABKAkSDAoEdGllchgCIAEoCRIWCg50b3RhbF9hdHRlbXB0cxgDIAEoBRIXCg9sYXN0X2Vycm9yX2NvZGUYBCABKAkSGgoSbGFzdF9lcnJvcl9tZXNzYWdlGAUgASgJEhcKD3Byb3ZpZGVyc190cmllZBgGIAEoBRIQCghhdXRoX3VpZBgHIAEoCSKcAQoZQ3Jvc3NNb2RlbFJhdGVMaW1pdFNpZ25hbBIRCgltb2RlbF91aWQYASABKAkSDAoEdGllchgCIAEoCRINCgVjb3VudBgDIAEoAxINCgVsaW1pdBgEIAEoAxIWCg5wZXJpb2Rfc2Vjb25kcxgFIAEoBRIWCg5lbWFpbF9taXNtYXRjaBgGIAEoCBIQCghhdXRoX3VpZBgHIAEoCSJfChNBY2NvdW50RmFub3V0U2lnbmFsEhAKCGF1dGhfdWlkGAEgASgJEhAKCGlkZW50aXR5GAIgASgJEhIKCmFjY291bnRfaWQYAyABKAkSEAoIaXNfdHJpYWwYBCABKAgilwEKF011bHRpSXBUcmFqZWN0b3J5U2lnbmFsEhAKCGF1dGhfdWlkGAEgASgJEhAKCGlwX2NvdW50GAIgASgDEhEKCXRocmVzaG9sZBgDIAEoAxIWCg53aW5kb3dfc2Vjb25kcxgEIAEoBRIMCgR0aWVyGAUgASgJEg0KBWVtYWlsGAYgASgJEhAKCGVuZm9yY2VkGAcgASgIImoKD0N5YmVyQWJ1c2VFdmVudBIQCghhdXRoX3VpZBgBIAEoCRIQCghwcm92aWRlchgCIAEoCRISCgpldmVudF90eXBlGAMgASgJEhEKCW1vZGVsX3VpZBgEIAEoCRIMCgR0aWVyGAUgASgJIl0KFk9wZW5BSUJsb2NrZWRVc2VyRXZlbnQSEAoIYXV0aF91aWQYASABKAkSEAoIcHJvdmlkZXIYAiABKAkSEQoJbW9kZWxfdWlkGAMgASgJEgwKBHRpZXIYBCABKAkiWQoZU3VzcGljaW91c1VzZXJBZ2VudFNpZ25hbBIQCghhdXRoX3VpZBgBIAEoCRISCgp1c2VyX2FnZW50GAIgASgJEhYKDm1hdGNoZWRfcHJlZml4GAMgASgJIo0BChFNYW51YWxUcnVzdFNpZ25hbBIQCghhdXRoX3VpZBgBIAEoCRIxCgd2ZXJkaWN0GAIgASgOMiAuZXhhLnRydXN0X3BiLk1hbnVhbFRydXN0VmVyZGljdBIPCgdwZXJjZW50GAMgASgFEg4KBnJlYXNvbhgEIAEoCRISCgpmbGFnZ2VkX2J5GAUgASgJIpwCCh1IdW50ZXJFbWFpbFZlcmlmaWNhdGlvblNpZ25hbBINCgVlbWFpbBgBIAEoCRIOCgZyZXN1bHQYAiABKAkSDgoGc3RhdHVzGAMgASgJEg0KBXNjb3JlGAQgASgFEg4KBnJlZ2V4cBgFIAEoCBIRCglnaWJiZXJpc2gYBiABKAgSEgoKZGlzcG9zYWJsZRgHIAEoCBIPCgd3ZWJtYWlsGAggASgIEhIKCm14X3JlY29yZHMYCSABKAgSEwoLc210cF9zZXJ2ZXIYCiABKAgSEgoKc210cF9jaGVjaxgLIAEoCBISCgphY2NlcHRfYWxsGAwgASgIEg0KBWJsb2NrGA0gASgIEhUKDXNvdXJjZXNfY291bnQYDiABKAUiRAoYUmVjb3JkVHJ1c3RFdmVudHNSZXF1ZXN0EigKBmV2ZW50cxgBIAMoCzIYLmV4YS50cnVzdF9wYi5UcnVzdEV2ZW50IhsKGVJlY29yZFRydXN0RXZlbnRzUmVzcG9uc2UqqwEKEFRydXN0RXZlbnRTb3VyY2USIgoeVFJVU1RfRVZFTlRfU09VUkNFX1VOU1BFQ0lGSUVEEAASIQodVFJVU1RfRVZFTlRfU09VUkNFX0FQSV9TRVJWRVIQARImCiJUUlVTVF9FVkVOVF9TT1VSQ0VfREVWSU5fV0VCU0VSVkVSEAISKAokVFJVU1RfRVZFTlRfU09VUkNFX0lOVEVSTkFMX0RFVEVDVE9SEAMqsgEKE1RydXN0SWRlbnRpZmllclR5cGUSJQohVFJVU1RfSURFTlRJRklFUl9UWVBFX1VOU1BFQ0lGSUVEEAASHwobVFJVU1RfSURFTlRJRklFUl9UWVBFX0VNQUlMEAESJwojVFJVU1RfSURFTlRJRklFUl9UWVBFX0RFVklOX1VTRVJfSUQQAhIqCiZUUlVTVF9JREVOVElGSUVSX1RZUEVfREVWSU5fQUNDT1VOVF9JRBADKq8BChFUcnVzdFF1ZXJ5S2V5VHlwZRIkCiBUUlVTVF9RVUVSWV9LRVlfVFlQRV9VTlNQRUNJRklFRBAAEiEKHVRSVVNUX1FVRVJZX0tFWV9UWVBFX0FVVEhfVUlEEAESJgoiVFJVU1RfUVVFUllfS0VZX1RZUEVfREVWSU5fVVNFUl9JRBACEikKJVRSVVNUX1FVRVJZX0tFWV9UWVBFX0RFVklOX0FDQ09VTlRfSUQQAyp9ChJNYW51YWxUcnVzdFZlcmRpY3QSJAogTUFOVUFMX1RSVVNUX1ZFUkRJQ1RfVU5TUEVDSUZJRUQQABIeChpNQU5VQUxfVFJVU1RfVkVSRElDVF9UUlVTVBABEiEKHU1BTlVBTF9UUlVTVF9WRVJESUNUX0RJU1RSVVNUEAJiBnByb3RvMw", [file_google_protobuf_timestamp]);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.TrustIdentifier
|
||||
*/
|
||||
export type TrustIdentifier = Message<"exa.trust_pb.TrustIdentifier"> & {
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.TrustIdentifierType identifier_type = 1;
|
||||
*/
|
||||
identifierType: TrustIdentifierType;
|
||||
|
||||
/**
|
||||
* @generated from field: string identifier = 2;
|
||||
*/
|
||||
identifier: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.TrustIdentifier.
|
||||
* Use `create(TrustIdentifierSchema)` to create a new message.
|
||||
*/
|
||||
export const TrustIdentifierSchema: GenMessage<TrustIdentifier> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 0);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.TrustQueryKey
|
||||
*/
|
||||
export type TrustQueryKey = Message<"exa.trust_pb.TrustQueryKey"> & {
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.TrustQueryKeyType key_type = 1;
|
||||
*/
|
||||
keyType: TrustQueryKeyType;
|
||||
|
||||
/**
|
||||
* @generated from field: string key = 2;
|
||||
*/
|
||||
key: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.TrustQueryKey.
|
||||
* Use `create(TrustQueryKeySchema)` to create a new message.
|
||||
*/
|
||||
export const TrustQueryKeySchema: GenMessage<TrustQueryKey> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 1);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.TrustEvent
|
||||
*/
|
||||
export type TrustEvent = Message<"exa.trust_pb.TrustEvent"> & {
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp observed_at = 1;
|
||||
*/
|
||||
observedAt?: Timestamp | undefined;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.TrustEventSource source = 3;
|
||||
*/
|
||||
source: TrustEventSource;
|
||||
|
||||
/**
|
||||
* @generated from field: string idempotency_key = 4;
|
||||
*/
|
||||
idempotencyKey: string;
|
||||
|
||||
/**
|
||||
* @generated from oneof exa.trust_pb.TrustEvent.signal
|
||||
*/
|
||||
signal: {
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.UnknownSignal unknown = 5;
|
||||
*/
|
||||
value: UnknownSignal;
|
||||
case: "unknown";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.ProvidersExhaustedSignal providers_exhausted = 6;
|
||||
*/
|
||||
value: ProvidersExhaustedSignal;
|
||||
case: "providersExhausted";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.CrossModelRateLimitSignal cross_model_rate_limit = 7;
|
||||
*/
|
||||
value: CrossModelRateLimitSignal;
|
||||
case: "crossModelRateLimit";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.AccountFanoutSignal account_fanout = 8;
|
||||
*/
|
||||
value: AccountFanoutSignal;
|
||||
case: "accountFanout";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.MultiIpTrajectorySignal multi_ip_trajectory = 9;
|
||||
*/
|
||||
value: MultiIpTrajectorySignal;
|
||||
case: "multiIpTrajectory";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.CyberAbuseEvent cyber_abuse = 10;
|
||||
*/
|
||||
value: CyberAbuseEvent;
|
||||
case: "cyberAbuse";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.OpenAIBlockedUserEvent openai_blocked_user = 11;
|
||||
*/
|
||||
value: OpenAIBlockedUserEvent;
|
||||
case: "openaiBlockedUser";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.SuspiciousUserAgentSignal suspicious_user_agent = 12;
|
||||
*/
|
||||
value: SuspiciousUserAgentSignal;
|
||||
case: "suspiciousUserAgent";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.ManualTrustSignal manual_trust = 14;
|
||||
*/
|
||||
value: ManualTrustSignal;
|
||||
case: "manualTrust";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.HunterEmailVerificationSignal hunter_email_verification = 17;
|
||||
*/
|
||||
value: HunterEmailVerificationSignal;
|
||||
case: "hunterEmailVerification";
|
||||
} | { case: undefined; value?: undefined };
|
||||
|
||||
/**
|
||||
* @generated from field: repeated exa.trust_pb.TrustIdentifier identifiers = 13;
|
||||
*/
|
||||
identifiers: TrustIdentifier[];
|
||||
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.TrustQueryKey query_key = 15;
|
||||
*/
|
||||
queryKey?: TrustQueryKey | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.TrustEvent.
|
||||
* Use `create(TrustEventSchema)` to create a new message.
|
||||
*/
|
||||
export const TrustEventSchema: GenMessage<TrustEvent> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 2);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.UnknownSignal
|
||||
*/
|
||||
export type UnknownSignal = Message<"exa.trust_pb.UnknownSignal"> & {
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.UnknownSignal.
|
||||
* Use `create(UnknownSignalSchema)` to create a new message.
|
||||
*/
|
||||
export const UnknownSignalSchema: GenMessage<UnknownSignal> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 3);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.ProvidersExhaustedSignal
|
||||
*/
|
||||
export type ProvidersExhaustedSignal = Message<"exa.trust_pb.ProvidersExhaustedSignal"> & {
|
||||
/**
|
||||
* @generated from field: string model_uid = 1;
|
||||
*/
|
||||
modelUid: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string tier = 2;
|
||||
*/
|
||||
tier: string;
|
||||
|
||||
/**
|
||||
* @generated from field: int32 total_attempts = 3;
|
||||
*/
|
||||
totalAttempts: number;
|
||||
|
||||
/**
|
||||
* @generated from field: string last_error_code = 4;
|
||||
*/
|
||||
lastErrorCode: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string last_error_message = 5;
|
||||
*/
|
||||
lastErrorMessage: string;
|
||||
|
||||
/**
|
||||
* @generated from field: int32 providers_tried = 6;
|
||||
*/
|
||||
providersTried: number;
|
||||
|
||||
/**
|
||||
* @generated from field: string auth_uid = 7;
|
||||
*/
|
||||
authUid: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.ProvidersExhaustedSignal.
|
||||
* Use `create(ProvidersExhaustedSignalSchema)` to create a new message.
|
||||
*/
|
||||
export const ProvidersExhaustedSignalSchema: GenMessage<ProvidersExhaustedSignal> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 4);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.CrossModelRateLimitSignal
|
||||
*/
|
||||
export type CrossModelRateLimitSignal = Message<"exa.trust_pb.CrossModelRateLimitSignal"> & {
|
||||
/**
|
||||
* @generated from field: string model_uid = 1;
|
||||
*/
|
||||
modelUid: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string tier = 2;
|
||||
*/
|
||||
tier: string;
|
||||
|
||||
/**
|
||||
* @generated from field: int64 count = 3;
|
||||
*/
|
||||
count: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: int64 limit = 4;
|
||||
*/
|
||||
limit: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: int32 period_seconds = 5;
|
||||
*/
|
||||
periodSeconds: number;
|
||||
|
||||
/**
|
||||
* @generated from field: bool email_mismatch = 6;
|
||||
*/
|
||||
emailMismatch: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: string auth_uid = 7;
|
||||
*/
|
||||
authUid: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.CrossModelRateLimitSignal.
|
||||
* Use `create(CrossModelRateLimitSignalSchema)` to create a new message.
|
||||
*/
|
||||
export const CrossModelRateLimitSignalSchema: GenMessage<CrossModelRateLimitSignal> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 5);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.AccountFanoutSignal
|
||||
*/
|
||||
export type AccountFanoutSignal = Message<"exa.trust_pb.AccountFanoutSignal"> & {
|
||||
/**
|
||||
* @generated from field: string auth_uid = 1;
|
||||
*/
|
||||
authUid: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string identity = 2;
|
||||
*/
|
||||
identity: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string account_id = 3;
|
||||
*/
|
||||
accountId: string;
|
||||
|
||||
/**
|
||||
* @generated from field: bool is_trial = 4;
|
||||
*/
|
||||
isTrial: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.AccountFanoutSignal.
|
||||
* Use `create(AccountFanoutSignalSchema)` to create a new message.
|
||||
*/
|
||||
export const AccountFanoutSignalSchema: GenMessage<AccountFanoutSignal> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 6);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.MultiIpTrajectorySignal
|
||||
*/
|
||||
export type MultiIpTrajectorySignal = Message<"exa.trust_pb.MultiIpTrajectorySignal"> & {
|
||||
/**
|
||||
* @generated from field: string auth_uid = 1;
|
||||
*/
|
||||
authUid: string;
|
||||
|
||||
/**
|
||||
* @generated from field: int64 ip_count = 2;
|
||||
*/
|
||||
ipCount: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: int64 threshold = 3;
|
||||
*/
|
||||
threshold: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: int32 window_seconds = 4;
|
||||
*/
|
||||
windowSeconds: number;
|
||||
|
||||
/**
|
||||
* @generated from field: string tier = 5;
|
||||
*/
|
||||
tier: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string email = 6;
|
||||
*/
|
||||
email: string;
|
||||
|
||||
/**
|
||||
* @generated from field: bool enforced = 7;
|
||||
*/
|
||||
enforced: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.MultiIpTrajectorySignal.
|
||||
* Use `create(MultiIpTrajectorySignalSchema)` to create a new message.
|
||||
*/
|
||||
export const MultiIpTrajectorySignalSchema: GenMessage<MultiIpTrajectorySignal> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 7);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.CyberAbuseEvent
|
||||
*/
|
||||
export type CyberAbuseEvent = Message<"exa.trust_pb.CyberAbuseEvent"> & {
|
||||
/**
|
||||
* @generated from field: string auth_uid = 1;
|
||||
*/
|
||||
authUid: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string provider = 2;
|
||||
*/
|
||||
provider: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string event_type = 3;
|
||||
*/
|
||||
eventType: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string model_uid = 4;
|
||||
*/
|
||||
modelUid: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string tier = 5;
|
||||
*/
|
||||
tier: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.CyberAbuseEvent.
|
||||
* Use `create(CyberAbuseEventSchema)` to create a new message.
|
||||
*/
|
||||
export const CyberAbuseEventSchema: GenMessage<CyberAbuseEvent> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 8);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.OpenAIBlockedUserEvent
|
||||
*/
|
||||
export type OpenAIBlockedUserEvent = Message<"exa.trust_pb.OpenAIBlockedUserEvent"> & {
|
||||
/**
|
||||
* @generated from field: string auth_uid = 1;
|
||||
*/
|
||||
authUid: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string provider = 2;
|
||||
*/
|
||||
provider: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string model_uid = 3;
|
||||
*/
|
||||
modelUid: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string tier = 4;
|
||||
*/
|
||||
tier: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.OpenAIBlockedUserEvent.
|
||||
* Use `create(OpenAIBlockedUserEventSchema)` to create a new message.
|
||||
*/
|
||||
export const OpenAIBlockedUserEventSchema: GenMessage<OpenAIBlockedUserEvent> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 9);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.SuspiciousUserAgentSignal
|
||||
*/
|
||||
export type SuspiciousUserAgentSignal = Message<"exa.trust_pb.SuspiciousUserAgentSignal"> & {
|
||||
/**
|
||||
* @generated from field: string auth_uid = 1;
|
||||
*/
|
||||
authUid: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string user_agent = 2;
|
||||
*/
|
||||
userAgent: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string matched_prefix = 3;
|
||||
*/
|
||||
matchedPrefix: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.SuspiciousUserAgentSignal.
|
||||
* Use `create(SuspiciousUserAgentSignalSchema)` to create a new message.
|
||||
*/
|
||||
export const SuspiciousUserAgentSignalSchema: GenMessage<SuspiciousUserAgentSignal> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 10);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.ManualTrustSignal
|
||||
*/
|
||||
export type ManualTrustSignal = Message<"exa.trust_pb.ManualTrustSignal"> & {
|
||||
/**
|
||||
* @generated from field: string auth_uid = 1;
|
||||
*/
|
||||
authUid: string;
|
||||
|
||||
/**
|
||||
* @generated from field: exa.trust_pb.ManualTrustVerdict verdict = 2;
|
||||
*/
|
||||
verdict: ManualTrustVerdict;
|
||||
|
||||
/**
|
||||
* @generated from field: int32 percent = 3;
|
||||
*/
|
||||
percent: number;
|
||||
|
||||
/**
|
||||
* @generated from field: string reason = 4;
|
||||
*/
|
||||
reason: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string flagged_by = 5;
|
||||
*/
|
||||
flaggedBy: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.ManualTrustSignal.
|
||||
* Use `create(ManualTrustSignalSchema)` to create a new message.
|
||||
*/
|
||||
export const ManualTrustSignalSchema: GenMessage<ManualTrustSignal> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 11);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.HunterEmailVerificationSignal
|
||||
*/
|
||||
export type HunterEmailVerificationSignal = Message<"exa.trust_pb.HunterEmailVerificationSignal"> & {
|
||||
/**
|
||||
* @generated from field: string email = 1;
|
||||
*/
|
||||
email: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string result = 2;
|
||||
*/
|
||||
result: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string status = 3;
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* @generated from field: int32 score = 4;
|
||||
*/
|
||||
score: number;
|
||||
|
||||
/**
|
||||
* @generated from field: bool regexp = 5;
|
||||
*/
|
||||
regexp: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: bool gibberish = 6;
|
||||
*/
|
||||
gibberish: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: bool disposable = 7;
|
||||
*/
|
||||
disposable: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: bool webmail = 8;
|
||||
*/
|
||||
webmail: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: bool mx_records = 9;
|
||||
*/
|
||||
mxRecords: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: bool smtp_server = 10;
|
||||
*/
|
||||
smtpServer: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: bool smtp_check = 11;
|
||||
*/
|
||||
smtpCheck: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: bool accept_all = 12;
|
||||
*/
|
||||
acceptAll: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: bool block = 13;
|
||||
*/
|
||||
block: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: int32 sources_count = 14;
|
||||
*/
|
||||
sourcesCount: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.HunterEmailVerificationSignal.
|
||||
* Use `create(HunterEmailVerificationSignalSchema)` to create a new message.
|
||||
*/
|
||||
export const HunterEmailVerificationSignalSchema: GenMessage<HunterEmailVerificationSignal> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 12);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.RecordTrustEventsRequest
|
||||
*/
|
||||
export type RecordTrustEventsRequest = Message<"exa.trust_pb.RecordTrustEventsRequest"> & {
|
||||
/**
|
||||
* @generated from field: repeated exa.trust_pb.TrustEvent events = 1;
|
||||
*/
|
||||
events: TrustEvent[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.RecordTrustEventsRequest.
|
||||
* Use `create(RecordTrustEventsRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const RecordTrustEventsRequestSchema: GenMessage<RecordTrustEventsRequest> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 13);
|
||||
|
||||
/**
|
||||
* @generated from message exa.trust_pb.RecordTrustEventsResponse
|
||||
*/
|
||||
export type RecordTrustEventsResponse = Message<"exa.trust_pb.RecordTrustEventsResponse"> & {
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message exa.trust_pb.RecordTrustEventsResponse.
|
||||
* Use `create(RecordTrustEventsResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const RecordTrustEventsResponseSchema: GenMessage<RecordTrustEventsResponse> = /*@__PURE__*/
|
||||
messageDesc(file_exa_trust_pb_trust, 14);
|
||||
|
||||
/**
|
||||
* @generated from enum exa.trust_pb.TrustEventSource
|
||||
*/
|
||||
export enum TrustEventSource {
|
||||
/**
|
||||
* @generated from enum value: TRUST_EVENT_SOURCE_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: TRUST_EVENT_SOURCE_API_SERVER = 1;
|
||||
*/
|
||||
API_SERVER = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: TRUST_EVENT_SOURCE_DEVIN_WEBSERVER = 2;
|
||||
*/
|
||||
DEVIN_WEBSERVER = 2,
|
||||
|
||||
/**
|
||||
* @generated from enum value: TRUST_EVENT_SOURCE_INTERNAL_DETECTOR = 3;
|
||||
*/
|
||||
INTERNAL_DETECTOR = 3,
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the enum exa.trust_pb.TrustEventSource.
|
||||
*/
|
||||
export const TrustEventSourceSchema: GenEnum<TrustEventSource> = /*@__PURE__*/
|
||||
enumDesc(file_exa_trust_pb_trust, 0);
|
||||
|
||||
/**
|
||||
* @generated from enum exa.trust_pb.TrustIdentifierType
|
||||
*/
|
||||
export enum TrustIdentifierType {
|
||||
/**
|
||||
* @generated from enum value: TRUST_IDENTIFIER_TYPE_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: TRUST_IDENTIFIER_TYPE_EMAIL = 1;
|
||||
*/
|
||||
EMAIL = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: TRUST_IDENTIFIER_TYPE_DEVIN_USER_ID = 2;
|
||||
*/
|
||||
DEVIN_USER_ID = 2,
|
||||
|
||||
/**
|
||||
* @generated from enum value: TRUST_IDENTIFIER_TYPE_DEVIN_ACCOUNT_ID = 3;
|
||||
*/
|
||||
DEVIN_ACCOUNT_ID = 3,
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the enum exa.trust_pb.TrustIdentifierType.
|
||||
*/
|
||||
export const TrustIdentifierTypeSchema: GenEnum<TrustIdentifierType> = /*@__PURE__*/
|
||||
enumDesc(file_exa_trust_pb_trust, 1);
|
||||
|
||||
/**
|
||||
* @generated from enum exa.trust_pb.TrustQueryKeyType
|
||||
*/
|
||||
export enum TrustQueryKeyType {
|
||||
/**
|
||||
* @generated from enum value: TRUST_QUERY_KEY_TYPE_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: TRUST_QUERY_KEY_TYPE_AUTH_UID = 1;
|
||||
*/
|
||||
AUTH_UID = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: TRUST_QUERY_KEY_TYPE_DEVIN_USER_ID = 2;
|
||||
*/
|
||||
DEVIN_USER_ID = 2,
|
||||
|
||||
/**
|
||||
* @generated from enum value: TRUST_QUERY_KEY_TYPE_DEVIN_ACCOUNT_ID = 3;
|
||||
*/
|
||||
DEVIN_ACCOUNT_ID = 3,
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the enum exa.trust_pb.TrustQueryKeyType.
|
||||
*/
|
||||
export const TrustQueryKeyTypeSchema: GenEnum<TrustQueryKeyType> = /*@__PURE__*/
|
||||
enumDesc(file_exa_trust_pb_trust, 2);
|
||||
|
||||
/**
|
||||
* @generated from enum exa.trust_pb.ManualTrustVerdict
|
||||
*/
|
||||
export enum ManualTrustVerdict {
|
||||
/**
|
||||
* @generated from enum value: MANUAL_TRUST_VERDICT_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: MANUAL_TRUST_VERDICT_TRUST = 1;
|
||||
*/
|
||||
TRUST = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: MANUAL_TRUST_VERDICT_DISTRUST = 2;
|
||||
*/
|
||||
DISTRUST = 2,
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the enum exa.trust_pb.ManualTrustVerdict.
|
||||
*/
|
||||
export const ManualTrustVerdictSchema: GenEnum<ManualTrustVerdict> = /*@__PURE__*/
|
||||
enumDesc(file_exa_trust_pb_trust, 3);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,13 @@
|
||||
import { gunzipSync } from "node:zlib";
|
||||
import { create, fromBinary, toBinary } from "@bufbuild/protobuf";
|
||||
import type { FetchImpl, ModelSpec } from "../types";
|
||||
import { discoveryFetch } from "../utils";
|
||||
import {
|
||||
type ClientModelConfig,
|
||||
GetCliModelConfigsRequestSchema,
|
||||
GetCliModelConfigsResponseSchema,
|
||||
} from "./devin-gen/exa/api_server_pb/api_server_pb";
|
||||
import { type ClientModelConfig, MetadataSchema } from "./devin-gen/exa/codeium_common_pb/codeium_common_pb";
|
||||
MetadataSchema,
|
||||
} from "./devin-proto";
|
||||
import { create, fromBinary, toBinary } from "./protobuf";
|
||||
|
||||
const DEVIN_DEFAULT_BASE_URL = "https://server.codeium.com";
|
||||
const DEVIN_GET_CLI_MODEL_CONFIGS_PATH = "/exa.api_server_pb.ApiServerService/GetCliModelConfigs";
|
||||
|
||||
@@ -3,3 +3,4 @@ export * from "./codex";
|
||||
export * from "./gemini";
|
||||
export * from "./gitlab-duo-workflow";
|
||||
export * from "./openai-compatible";
|
||||
export * from "./protobuf";
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -72,13 +72,34 @@ export const KNOWN_HOSTS = {
|
||||
|
||||
export type KnownHost = keyof typeof KNOWN_HOSTS;
|
||||
|
||||
// Host checks fan out across every compatibility field for a model. Bound the
|
||||
// cache because custom providers may contribute arbitrary endpoints at runtime.
|
||||
const MAX_URL_HOST_MATCHES = 512;
|
||||
const urlHostMatches = new Map<string, Map<KnownHost, boolean>>();
|
||||
|
||||
function getUrlHostMatches(baseUrl: string): Map<KnownHost, boolean> {
|
||||
let matches = urlHostMatches.get(baseUrl);
|
||||
if (matches !== undefined) return matches;
|
||||
if (urlHostMatches.size === MAX_URL_HOST_MATCHES) urlHostMatches.clear();
|
||||
matches = new Map<KnownHost, boolean>();
|
||||
urlHostMatches.set(baseUrl, matches);
|
||||
return matches;
|
||||
}
|
||||
|
||||
/** URL-only host check (for call sites that have no provider id, e.g. raw env config). */
|
||||
export function hostMatchesUrl(baseUrl: string | undefined, host: KnownHost): boolean {
|
||||
if (!baseUrl) return false;
|
||||
const matches = getUrlHostMatches(baseUrl);
|
||||
const cached = matches.get(host);
|
||||
if (cached !== undefined) return cached;
|
||||
const spec: HostClassSpec = KNOWN_HOSTS[host];
|
||||
for (const marker of spec.urlMarkers) {
|
||||
if (includesAsciiCaseInsensitive(baseUrl, marker)) return true;
|
||||
if (includesAsciiCaseInsensitive(baseUrl, marker)) {
|
||||
matches.set(host, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
matches.set(host, false);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,6 +119,11 @@ export const isMimoModelIdOrName = memo((value: string): boolean => {
|
||||
return value.toLowerCase().includes("mimo");
|
||||
});
|
||||
|
||||
/** StepFun Step 3.7 Flash SKU in any namespace form (`kilo/stepfun/step-3.7-flash:free`). */
|
||||
export const isStep37FlashModelId = memo((modelId: string): boolean => {
|
||||
return modelId.toLowerCase().includes("step-3.7-flash");
|
||||
});
|
||||
|
||||
/** Gemini family ids in any namespace form (`gemini-*`, `google/gemini-*`, `openrouter/google/gemini-…`). */
|
||||
export const isGeminiModelId = memo((modelId: string): boolean => {
|
||||
return /(^|\/)gemini[-.]?/i.test(modelId);
|
||||
@@ -399,6 +404,22 @@ export const supportsMidConversationSystemMessages = memo((modelId: string): boo
|
||||
return parsed !== null && isAnthropicAdaptiveGenAtLeast(parsed, "4.8");
|
||||
});
|
||||
|
||||
/**
|
||||
* Models that reliably follow the hashline line-anchored edit dialect
|
||||
* (`[path#TAG]` headers plus 1-indexed anchors). Kimi, MiMo, DeepSeek V4
|
||||
* Flash, and Step 3.7 Flash miscount anchors or drop the tag header often
|
||||
* enough that hosts fall back to a literal search-replace edit format for
|
||||
* them.
|
||||
*/
|
||||
export const supportsHashlineEdits = memo((modelId: string): boolean => {
|
||||
return !(
|
||||
isKimiModelId(modelId) ||
|
||||
isMimoModelIdOrName(modelId) ||
|
||||
isDeepseekV4FlashModelId(modelId) ||
|
||||
isStep37FlashModelId(modelId)
|
||||
);
|
||||
});
|
||||
|
||||
export const isAnthropicFableOrMythosModel = memo((modelId: string): boolean => {
|
||||
const parsed = parseAnthropicModel(bareModelId(modelId));
|
||||
return parsed !== null && isFableOrMythos(parsed.kind);
|
||||
|
||||
@@ -10,6 +10,10 @@ const KIMI_K2_ALIASES: Record<string, true> = {
|
||||
"kimi-for-coding-highspeed": true,
|
||||
};
|
||||
|
||||
// Resolution is pure and catalog ids recur across providers and aliases.
|
||||
const MAX_TOKENIZER_CACHE_ENTRIES = 2_048;
|
||||
const modelTokenizerCache = new Map<string, ModelTokenizer | null>();
|
||||
|
||||
function claudeTokenizer(modelId: string): ModelTokenizer | undefined {
|
||||
const parsed = parseAnthropicModel(modelId);
|
||||
if (parsed) {
|
||||
@@ -56,12 +60,16 @@ function glmTokenizer(modelId: string): ModelTokenizer | undefined {
|
||||
* materializes the result as `Model.tokenizer`; consumers read that property.
|
||||
*/
|
||||
export function resolveModelTokenizer(modelId: string): ModelTokenizer | undefined {
|
||||
const cached = modelTokenizerCache.get(modelId);
|
||||
if (cached !== undefined) return cached ?? undefined;
|
||||
const bare = bareModelId(modelId);
|
||||
return (
|
||||
const tokenizer =
|
||||
claudeTokenizer(bare) ??
|
||||
qwenTokenizer(bare) ??
|
||||
deepSeekTokenizer(bare) ??
|
||||
kimiTokenizer(bare) ??
|
||||
glmTokenizer(bare)
|
||||
);
|
||||
glmTokenizer(bare);
|
||||
if (modelTokenizerCache.size === MAX_TOKENIZER_CACHE_ENTRIES) modelTokenizerCache.clear();
|
||||
modelTokenizerCache.set(modelId, tokenizer ?? null);
|
||||
return tokenizer;
|
||||
}
|
||||
|
||||
+183610
-2414
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,5 @@
|
||||
import { buildModel } from "./build";
|
||||
import MODELS from "./models.json" with { type: "json" };
|
||||
import type { Api, KnownProvider, Model, ModelSpec, TokenCost, Usage } from "./types";
|
||||
import type { Api, KnownProvider, Model, TokenCost, Usage } from "./types";
|
||||
|
||||
/**
|
||||
* Static bundled model registry loaded from `models.json`.
|
||||
@@ -12,7 +11,7 @@ import type { Api, KnownProvider, Model, ModelSpec, TokenCost, Usage } from "./t
|
||||
*/
|
||||
const modelRegistry = new Map<string, Map<string, Model<Api>>>();
|
||||
|
||||
/** Build (once) and return one provider's enriched bundled models. */
|
||||
/** Return one provider's bundled models, materialized by the generator. */
|
||||
function getProviderModels(provider: string): Map<string, Model<Api>> | undefined {
|
||||
const cachedModels = modelRegistry.get(provider);
|
||||
if (cachedModels !== undefined) return cachedModels;
|
||||
@@ -20,8 +19,10 @@ function getProviderModels(provider: string): Map<string, Model<Api>> | undefine
|
||||
|
||||
const providerModels = new Map<string, Model<Api>>();
|
||||
const rawModels = MODELS[provider as keyof typeof MODELS];
|
||||
for (const [id, model] of Object.entries(rawModels)) {
|
||||
providerModels.set(id, buildModel(model as ModelSpec<Api>));
|
||||
for (const id in rawModels) {
|
||||
// models.json rows are complete Models emitted by generate-models.ts;
|
||||
// consuming them verbatim keeps startup allocation-free.
|
||||
providerModels.set(id, rawModels[id as keyof typeof rawModels] as unknown as Model<Api>);
|
||||
}
|
||||
modelRegistry.set(provider, providerModels);
|
||||
return providerModels;
|
||||
|
||||
@@ -9,8 +9,18 @@ import type { Api, Model, ModelSpec } from "../types";
|
||||
* manager, which rebuilds via `buildModel`.
|
||||
*/
|
||||
export function toModelSpec<TApi extends Api>(model: Model<TApi>): ModelSpec<TApi> {
|
||||
const { compat: _compat, compatConfig, ...rest } = model;
|
||||
return { ...rest, compat: compatConfig } as ModelSpec<TApi>;
|
||||
const {
|
||||
compat: _compat,
|
||||
compatConfig,
|
||||
supportsComputerUse: _derivedComputerUse,
|
||||
supportsComputerUseConfig,
|
||||
...rest
|
||||
} = model;
|
||||
return {
|
||||
...rest,
|
||||
...(supportsComputerUseConfig !== undefined ? { supportsComputerUse: supportsComputerUseConfig } : {}),
|
||||
compat: compatConfig,
|
||||
} as ModelSpec<TApi>;
|
||||
}
|
||||
|
||||
export function createBundledReferenceMap<TApi extends Api>(
|
||||
|
||||
@@ -11,7 +11,7 @@ import { readModelCache, writeModelCache } from "@oh-my-pi/pi-catalog/model-cach
|
||||
import { resolveProviderModels } from "@oh-my-pi/pi-catalog/model-manager";
|
||||
import { getBundledModel } from "@oh-my-pi/pi-catalog/models";
|
||||
import { openrouterModelManagerOptions } from "@oh-my-pi/pi-catalog/provider-models/openai-compat";
|
||||
import type { Model, ModelSpec } from "@oh-my-pi/pi-catalog/types";
|
||||
import type { Api, Model, ModelSpec } from "@oh-my-pi/pi-catalog/types";
|
||||
|
||||
function completionsSpec(overrides: Partial<ModelSpec<"openai-completions">> = {}): ModelSpec<"openai-completions"> {
|
||||
return {
|
||||
@@ -58,6 +58,16 @@ describe("buildModel", () => {
|
||||
expect(model.compatConfig).toBeUndefined();
|
||||
});
|
||||
|
||||
it("built models survive a JSON roundtrip, so generator-materialized rows need no rebuild", () => {
|
||||
// models.ts consumes models.json rows verbatim as complete Models; this
|
||||
// holds only if buildModel output is pure JSON (no functions, no
|
||||
// undefined-valued fields that JSON would drop).
|
||||
const generated = [buildModel(completionsSpec({ reasoning: true })), buildModel(openrouterSpec())];
|
||||
for (const model of generated) {
|
||||
expect(JSON.parse(JSON.stringify(model)) as Model<Api>).toEqual(model);
|
||||
}
|
||||
});
|
||||
|
||||
it("lets sparse overrides win over detection and keeps the verbatim config", () => {
|
||||
const sparse = { supportsDeveloperRole: true } as const;
|
||||
const model = buildModel(
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import { createReferenceResolver } from "../src/provider-models/bundled-references";
|
||||
import type { ModelSpec } from "../src/types";
|
||||
|
||||
const FIXTURE = `${import.meta.dir}/fixtures/bundled-reference-laziness.ts`;
|
||||
|
||||
function runFixture(fixture: string): string {
|
||||
const result = Bun.spawnSync({
|
||||
cmd: [process.execPath, fixture],
|
||||
env: process.env,
|
||||
stdout: "pipe",
|
||||
stderr: "pipe",
|
||||
});
|
||||
expect(result.exitCode, result.stderr.toString()).toBe(0);
|
||||
return result.stdout.toString();
|
||||
}
|
||||
|
||||
describe("bundled model laziness", () => {
|
||||
test("provider options and the bundled registry stay lazy", () => {
|
||||
const { retainedRssBytes } = JSON.parse(runFixture(FIXTURE)) as { retainedRssBytes: number };
|
||||
expect(retainedRssBytes).toBeLessThan(8 * 1024 * 1024);
|
||||
}, 60_000);
|
||||
test("a lazy provider-reference factory initializes on first resolution and only once", () => {
|
||||
const reference = {
|
||||
id: "fixture-model",
|
||||
name: "Fixture Model",
|
||||
api: "openai-completions",
|
||||
provider: "fixture",
|
||||
baseUrl: "https://example.test/v1",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||
contextWindow: 8192,
|
||||
maxTokens: 1024,
|
||||
} satisfies ModelSpec<"openai-completions">;
|
||||
let factoryCalls = 0;
|
||||
const resolveReference = createReferenceResolver(() => {
|
||||
factoryCalls++;
|
||||
return new Map([[reference.id, reference]]);
|
||||
});
|
||||
|
||||
expect(factoryCalls).toBe(0);
|
||||
expect(resolveReference(reference.id)).toBe(reference);
|
||||
expect(resolveReference(reference.id)).toBe(reference);
|
||||
expect(factoryCalls).toBe(1);
|
||||
});
|
||||
});
|
||||
@@ -4,11 +4,11 @@ import * as http2 from "node:http2";
|
||||
import type * as net from "node:net";
|
||||
import * as os from "node:os";
|
||||
import * as path from "node:path";
|
||||
import { create, toBinary } from "@bufbuild/protobuf";
|
||||
// Import from source, not the package specifier: the workspace `node_modules`
|
||||
// copy resolves to the primary checkout, not this worktree.
|
||||
import { fetchCursorUsableModels } from "../src/discovery/cursor";
|
||||
import { GetUsableModelsResponseSchema, ModelDetailsSchema } from "../src/discovery/cursor-gen/agent_pb";
|
||||
import { GetUsableModelsResponseSchema, ModelDetailsSchema } from "../src/discovery/cursor-proto";
|
||||
import { create, toBinary } from "../src/discovery/protobuf";
|
||||
import { resolveProviderModels } from "../src/model-manager";
|
||||
import { cursorModelManagerOptions } from "../src/provider-models/special";
|
||||
import type { ModelSpec } from "../src/types";
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
import { expect, spyOn } from "bun:test";
|
||||
import * as buildModule from "../../src/build";
|
||||
import type { GeneratedProvider } from "../../src/models";
|
||||
import { ollamaCloudModelManagerOptions } from "../../src/provider-models/ollama";
|
||||
import { nanoGptModelManagerOptions } from "../../src/provider-models/openai-compat";
|
||||
|
||||
Bun.gc(true);
|
||||
const rssBefore = process.memoryUsage().rss;
|
||||
nanoGptModelManagerOptions();
|
||||
ollamaCloudModelManagerOptions();
|
||||
Bun.gc(true);
|
||||
const retainedRssBytes = process.memoryUsage().rss - rssBefore;
|
||||
|
||||
process.stdout.write(JSON.stringify({ retainedRssBytes }));
|
||||
|
||||
// Keep the model-registry import below the RSS assertion setup: importing it
|
||||
// eagerly loads models.json and would invalidate the provider-option laziness
|
||||
// measurement above. This same isolated process can then verify the registry's
|
||||
// own lazy, per-provider enrichment without paying for a second Bun startup.
|
||||
const { getBundledModel, getBundledModels, getBundledProviders } = await import("../../src/models");
|
||||
const { default: MODELS } = await import("../../src/models.json", { with: { type: "json" } });
|
||||
const buildSpy = spyOn(buildModule, "buildModel");
|
||||
const rawProviders = Object.keys(MODELS);
|
||||
const firstProviders = getBundledProviders();
|
||||
const secondProviders = getBundledProviders();
|
||||
|
||||
expect(buildSpy).toHaveBeenCalledTimes(0);
|
||||
expect(firstProviders as string[]).toEqual(rawProviders);
|
||||
expect(secondProviders as string[]).toEqual(rawProviders);
|
||||
expect(secondProviders).not.toBe(firstProviders);
|
||||
|
||||
const provider = "sakana" satisfies GeneratedProvider;
|
||||
const rawModelIds = Object.keys(MODELS[provider]);
|
||||
const firstModels = getBundledModels(provider);
|
||||
|
||||
expect(buildSpy).toHaveBeenCalledTimes(rawModelIds.length);
|
||||
expect(firstModels.map(model => model.id)).toEqual(rawModelIds);
|
||||
|
||||
const secondModels = getBundledModels(provider);
|
||||
expect(secondModels).not.toBe(firstModels);
|
||||
expect(secondModels).toHaveLength(firstModels.length);
|
||||
for (let index = 0; index < firstModels.length; index++) {
|
||||
expect(secondModels[index]).toBe(firstModels[index]);
|
||||
}
|
||||
expect(buildSpy).toHaveBeenCalledTimes(rawModelIds.length);
|
||||
|
||||
const firstModelId = rawModelIds[0];
|
||||
if (firstModelId === undefined) throw new Error(`${provider} must have a bundled model`);
|
||||
expect(getBundledModel(provider, firstModelId)).toBe(firstModels[0]);
|
||||
expect(getBundledModel(provider, firstModelId)).toBe(firstModels[0]);
|
||||
expect(buildSpy).toHaveBeenCalledTimes(rawModelIds.length);
|
||||
|
||||
const unknownProvider = "not-a-bundled-provider" as GeneratedProvider;
|
||||
expect(getBundledModels(unknownProvider)).toEqual([]);
|
||||
expect(getBundledModel(unknownProvider, "missing-model")).toBeUndefined();
|
||||
expect(buildSpy).toHaveBeenCalledTimes(rawModelIds.length);
|
||||
|
||||
buildSpy.mockRestore();
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
modelFamilyToken,
|
||||
parseAnthropicModel,
|
||||
supportsAdaptiveThinkingDisplay,
|
||||
supportsHashlineEdits,
|
||||
supportsMidConversationSystemMessages,
|
||||
} from "@oh-my-pi/pi-catalog/identity";
|
||||
|
||||
@@ -31,6 +32,20 @@ describe("isKimiModelId", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("supportsHashlineEdits", () => {
|
||||
test("declines the families that miscount line anchors", () => {
|
||||
expect(supportsHashlineEdits("openrouter/moonshotai/Kimi-K2-Instruct")).toBe(false);
|
||||
expect(supportsHashlineEdits("xiaomi/MiMo-V2.5-Pro")).toBe(false);
|
||||
expect(supportsHashlineEdits("tensormesh/deepseek-ai/DeepSeek-V4-Flash")).toBe(false);
|
||||
expect(supportsHashlineEdits("kilo/stepfun/step-3.7-flash:free")).toBe(false);
|
||||
});
|
||||
test("vouches for structured-edit-capable models", () => {
|
||||
expect(supportsHashlineEdits("google/gemini-3.5-flash")).toBe(true);
|
||||
expect(supportsHashlineEdits("claude-fable-5")).toBe(true);
|
||||
expect(supportsHashlineEdits("moonshot/moonshot-v1-128k")).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("isQwen38PlusTemplateEffortModelId", () => {
|
||||
test("matches Qwen 3.8+ open-weight ids across id shapes and versions", () => {
|
||||
expect(isQwen38PlusTemplateEffortModelId("qwen3.8-27b")).toBe(true);
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import { expect, it } from "bun:test";
|
||||
import { generateProtoTs, parseProto } from "../scripts/proto-parser";
|
||||
|
||||
it("emits a requested message's transitive schema and enum dependencies", () => {
|
||||
const output = generateProtoTs(
|
||||
parseProto(`
|
||||
syntax = "proto3";
|
||||
package example;
|
||||
|
||||
enum State {
|
||||
STATE_UNSPECIFIED = 0;
|
||||
STATE_READY = 1;
|
||||
}
|
||||
|
||||
message Child {
|
||||
string text = 1;
|
||||
}
|
||||
|
||||
message Root {
|
||||
optional bool enabled = 1;
|
||||
Child child = 2;
|
||||
State state = 3;
|
||||
}
|
||||
|
||||
message Unused {
|
||||
string ignored = 1;
|
||||
}
|
||||
`),
|
||||
{ includeMessages: ["example.Root"] },
|
||||
);
|
||||
|
||||
expect(output).toContain("export interface Root");
|
||||
expect(output).toContain("export interface Child");
|
||||
expect(output).toContain("export enum State");
|
||||
expect(output).toContain('name: "enabled", kind: "bool", optional: true');
|
||||
expect(output).not.toContain("export interface Unused");
|
||||
});
|
||||
@@ -0,0 +1,68 @@
|
||||
import { expect, it } from "bun:test";
|
||||
import {
|
||||
decodeJsonValue,
|
||||
encodeJsonValue,
|
||||
type JsonValue,
|
||||
type MessageCodec,
|
||||
type ProtoMessage,
|
||||
pb,
|
||||
} from "../src/discovery/protobuf";
|
||||
|
||||
interface Envelope extends ProtoMessage {
|
||||
enabled?: boolean;
|
||||
choice: { case: undefined; value?: undefined } | { case: "text"; value: string };
|
||||
}
|
||||
|
||||
const EnvelopeSchema = pb<Envelope>("test.Envelope", [
|
||||
{ no: 1, name: "enabled", kind: "bool", optional: true },
|
||||
{
|
||||
kind: "oneof",
|
||||
name: "choice",
|
||||
variants: [{ no: 2, name: "text", kind: "string" }],
|
||||
},
|
||||
]);
|
||||
|
||||
interface Counter extends ProtoMessage {
|
||||
value: number;
|
||||
}
|
||||
|
||||
const CounterSchema = pb<Counter>("test.Counter", [{ no: 1, name: "value", kind: "int32" }]);
|
||||
|
||||
interface Node extends ProtoMessage {
|
||||
label: string;
|
||||
child?: Node;
|
||||
}
|
||||
|
||||
const NodeSchema: MessageCodec<Node> = pb<Node>("test.Node", [
|
||||
{ no: 1, name: "label", kind: "string" },
|
||||
{ no: 2, name: "child", kind: "message", T: () => NodeSchema },
|
||||
]);
|
||||
|
||||
it("preserves selected oneofs and explicit optional defaults", () => {
|
||||
const decoded = EnvelopeSchema.decode(
|
||||
EnvelopeSchema.encode({ enabled: false, choice: { case: "text", value: "hello" } }),
|
||||
);
|
||||
|
||||
expect(decoded).toMatchObject({ enabled: false, choice: { case: "text", value: "hello" } });
|
||||
expect(EnvelopeSchema.toJson(decoded)).toEqual({ enabled: false, text: "hello" });
|
||||
});
|
||||
|
||||
it("retains unknown wire fields while re-encoding a message", () => {
|
||||
const input = new Uint8Array([0x08, 0x2a, 0x10, 0x07]);
|
||||
|
||||
expect(CounterSchema.encode(CounterSchema.decode(input))).toEqual(input);
|
||||
});
|
||||
|
||||
it("round-trips JSON values with empty struct keys", () => {
|
||||
const value: JsonValue = { "": ["kept", { nested: true }], count: 1 };
|
||||
|
||||
expect(decodeJsonValue(encodeJsonValue(value))).toEqual(value);
|
||||
});
|
||||
|
||||
it("resolves recursive static message descriptors on demand", () => {
|
||||
const decoded = NodeSchema.decode(
|
||||
NodeSchema.encode({ label: "root", child: { label: "child", child: { label: "leaf" } } }),
|
||||
);
|
||||
|
||||
expect(decoded.child?.child?.label).toBe("leaf");
|
||||
});
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [17.4.0] - 2026-08-20
|
||||
|
||||
### Added
|
||||
|
||||
- `/cleanse` (and `omp cleanse`) — run the checker/repair loop in-session, with a live status board of running checkers, repair subagents, and token/cost totals.
|
||||
@@ -11,6 +13,7 @@
|
||||
- Backgroundable Python — `eval` cells can run async and auto-background like `bash`, with configurable thresholds.
|
||||
- Local Claude token counting — Anthropic-family tokens now count via a native local tokenizer, and every counter (session maintenance, advisor, stats, context tools) uses the active model's own tokenizer.
|
||||
- `extendedContext` setting — pick whether models with premium long-context pricing (272K/1M tiers on Codex-class models) use the extended window or compact early and stay on standard pricing.
|
||||
- `/extended-context` — toggle premium long-context windows without leaving the session.
|
||||
- Speculative compaction — with `compaction.asyncEnabled`, all compaction modes compact in parallel while the session continues, then splice the result in instantly.
|
||||
- `tokenizer` property on custom models and `modelOverrides` to pin the tokenizer family for proxy models.
|
||||
- `qwenTemplateReasoningEffort` in `models.yml` `compat` to disable the Qwen 3.8+ reasoning-effort template parameter for strict local servers.
|
||||
@@ -19,15 +22,18 @@
|
||||
|
||||
### Changed
|
||||
|
||||
- Typing anywhere in the /models UI now immediately focuses the model list for instant search and arrow navigation.
|
||||
- Revamped the todo HUD — overall progress renders along the tree-spine connector with smooth completion transitions.
|
||||
- Compaction divider now names the maintenance method that fired (`remote-compacted`, `soft-compacted`, `handed-off`, `snap-compacted`) and shows the before → after context size (e.g. `256K→20K`).
|
||||
- `/handoff` (and automatic handoff compaction) now compacts in place, replacing the session context instead of forking a new session.
|
||||
- Compaction method priorities — `compaction.methodOrder` takes an ordered preference list (e.g. `[remote, snap]` uses remote compaction where the provider supports it, such as OpenAI, and snap everywhere else), replacing `compaction.strategy`/`compaction.remoteEnabled`.
|
||||
- Unified inline overlays and selectors (model picker, settings, `/cleanse`) into one titled rounded-box panel style.
|
||||
- Risk badges and warnings on `/settings` rows, starting with External Thinking.
|
||||
- Faster CLI Startup
|
||||
|
||||
### Fixed
|
||||
|
||||
- `/models` keeps `auto` thinking on non-default roles such as `task` instead of changing the active model and displaying the role as `max`.
|
||||
- Subagent `yield` structured results no longer get corrupted by lossy argument repairs; prompt guidance improved for weak callers.
|
||||
- GitHub `file_read` returns proper image blocks and direct view URLs for image/binary files.
|
||||
- Cancelled prompts during pre-stream turn setup restore the text and image attachments to the editor.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"type": "module",
|
||||
"name": "@oh-my-pi/pi-coding-agent",
|
||||
"version": "17.3.8",
|
||||
"version": "17.4.0",
|
||||
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
||||
"homepage": "https://omp.sh",
|
||||
"author": "Can Boluk",
|
||||
|
||||
@@ -22,6 +22,7 @@ import { memoryFixtures } from "./memory";
|
||||
import { miscFixtures } from "./misc";
|
||||
import { searchFixtures } from "./search";
|
||||
import { shellFixtures } from "./shell";
|
||||
import { statusLineFixtures } from "./status-line";
|
||||
import { webFixtures } from "./web";
|
||||
|
||||
export * from "./types";
|
||||
@@ -36,5 +37,6 @@ export const galleryFixtures = {
|
||||
...memoryFixtures,
|
||||
...webFixtures,
|
||||
...codeintelFixtures,
|
||||
...statusLineFixtures,
|
||||
...miscFixtures,
|
||||
};
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
/**
|
||||
* Gallery fixture for the status-line context gauge — the box top border that
|
||||
* bridges the segment groups. Renders the real `StatusLineComponent` against a
|
||||
* fake session at four usage levels, mapping the gallery lifecycle states to
|
||||
* fill levels; `error` shows the >100% overflow case (usage anchored to a
|
||||
* larger window than the active model's, e.g. after switching to a smaller
|
||||
* model mid-session), where the gauge clamps to full while the context_pct
|
||||
* segment reports the raw percent.
|
||||
*/
|
||||
import { StatusLineComponent } from "../../modes/components/status-line";
|
||||
import { theme } from "../../modes/theme/theme";
|
||||
import type { AgentSession } from "../../session/agent-session";
|
||||
import type { GalleryFixture, GalleryFixtureState } from "./types";
|
||||
|
||||
const GAUGE_WINDOW = 200_000;
|
||||
|
||||
/** Simulated usage per gallery lifecycle state, against {@link GAUGE_WINDOW}. */
|
||||
const GAUGE_CASES: Record<GalleryFixtureState, { tokens: number; note: string }> = {
|
||||
streaming: { tokens: 6_000, note: "3% used — fresh session" },
|
||||
progress: { tokens: 124_000, note: "62% used — warning zone" },
|
||||
success: { tokens: 194_000, note: "97% used — past compaction threshold" },
|
||||
error: { tokens: 240_000, note: "120% used — overflow: percent breaks past the window label in red" },
|
||||
};
|
||||
|
||||
/** Minimal session double satisfying every query `getTopBorder` makes. */
|
||||
function fakeGaugeSession(tokens: number): AgentSession {
|
||||
const model = { id: "test-model", contextWindow: GAUGE_WINDOW };
|
||||
const messages = [{ role: "user", content: "hi" }];
|
||||
return {
|
||||
messages,
|
||||
systemPrompt: [],
|
||||
agent: { state: { tools: [] } },
|
||||
skills: [],
|
||||
model,
|
||||
modelRegistry: { isUsingOAuth: () => false },
|
||||
state: { messages, model },
|
||||
settings: undefined,
|
||||
sessionManager: {
|
||||
getUsageStatistics: () => ({
|
||||
input: 0,
|
||||
output: 0,
|
||||
cacheRead: 0,
|
||||
cacheWrite: 0,
|
||||
totalTokens: 0,
|
||||
orchestrationInput: 0,
|
||||
orchestrationOutput: 0,
|
||||
orchestrationCacheRead: 0,
|
||||
premiumRequests: 0,
|
||||
cost: 0,
|
||||
}),
|
||||
getSessionName: () => "gallery",
|
||||
},
|
||||
getAsyncJobSnapshot: () => ({ running: [] }),
|
||||
isFastModeActive: () => false,
|
||||
getContextUsage: () => ({ tokens, contextWindow: GAUGE_WINDOW, percent: (tokens / GAUGE_WINDOW) * 100 }),
|
||||
contextUsageRevision: 0,
|
||||
} as unknown as AgentSession;
|
||||
}
|
||||
|
||||
/** Render one contextLine variant of the top border for the given usage. */
|
||||
function renderGaugeVariant(tokens: number, contextLine: "annotated" | "embedded", width: number): string {
|
||||
const component = new StatusLineComponent(fakeGaugeSession(tokens));
|
||||
component.updateSettings({
|
||||
preset: "custom",
|
||||
leftSegments: contextLine === "embedded" ? ["model", "context_pct"] : ["model"],
|
||||
rightSegments: contextLine === "embedded" ? ["session_name"] : ["context_pct"],
|
||||
separator: "powerline-thin",
|
||||
sessionAccent: false,
|
||||
contextLine,
|
||||
});
|
||||
try {
|
||||
return component.getTopBorder(width).content;
|
||||
} finally {
|
||||
component.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
function renderContextGaugeState(state: GalleryFixtureState, width: number): readonly string[] {
|
||||
const { tokens, note } = GAUGE_CASES[state];
|
||||
return [
|
||||
theme.fg("dim", ` ${note}`),
|
||||
renderGaugeVariant(tokens, "annotated", width),
|
||||
renderGaugeVariant(tokens, "embedded", width),
|
||||
];
|
||||
}
|
||||
|
||||
export const statusLineFixtures: Record<string, GalleryFixture> = {
|
||||
context_gauge: {
|
||||
label: "Context Gauge",
|
||||
renderState: renderContextGaugeState,
|
||||
args: { note: "status-line context gauge preview" },
|
||||
result: { content: [{ type: "text", text: "Rendered annotated and embedded context gauges." }] },
|
||||
},
|
||||
};
|
||||
@@ -2,6 +2,7 @@ import type { Api, Model, ModelSpec, RemoteCompactionConfig, ThinkingConfig } fr
|
||||
import { buildModel } from "@oh-my-pi/pi-catalog/build";
|
||||
import { isVertexExpressOpenAIUrl } from "@oh-my-pi/pi-catalog/hosts";
|
||||
import { PROVIDER_DESCRIPTORS } from "@oh-my-pi/pi-catalog/provider-models";
|
||||
import { toModelSpec } from "@oh-my-pi/pi-catalog/provider-models/bundled-references";
|
||||
import { isRecord } from "@oh-my-pi/pi-utils";
|
||||
import type { ModelOverride } from "./models-config-schema";
|
||||
/** Provider override config (baseUrl, headers, apiKey, compat, transport) without custom models */
|
||||
@@ -49,7 +50,7 @@ export function mergeDiscoveredModel<TApi extends Api>(
|
||||
if (existing) {
|
||||
const supportsTools = model.supportsTools ?? existing.supportsTools;
|
||||
return buildModel({
|
||||
...model,
|
||||
...toModelSpec(model),
|
||||
baseUrl: providerOverride?.baseUrl ?? model.baseUrl ?? existing.baseUrl,
|
||||
headers: existing.headers ? { ...existing.headers, ...model.headers } : model.headers,
|
||||
transport: providerOverride?.transport ?? existing.transport ?? model.transport,
|
||||
@@ -63,7 +64,7 @@ export function mergeDiscoveredModel<TApi extends Api>(
|
||||
}
|
||||
if (providerOverride) {
|
||||
return buildModel({
|
||||
...model,
|
||||
...toModelSpec(model),
|
||||
baseUrl: providerOverride.baseUrl ?? model.baseUrl,
|
||||
headers: providerOverride.headers ? { ...model.headers, ...providerOverride.headers } : model.headers,
|
||||
...(providerOverride.transport !== undefined ? { transport: providerOverride.transport } : {}),
|
||||
@@ -164,15 +165,6 @@ export function mergeProviderRemoteCompactionConfig(
|
||||
return mergeRemoteCompactionConfig(providerConfig, modelConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* Project a built model back to spec shape for the model-manager/cache
|
||||
* boundary: sparse compat comes from `compatConfig`, never from the resolved
|
||||
* record.
|
||||
*/
|
||||
export function toModelSpec<TApi extends Api>(model: Model<TApi>): ModelSpec<TApi> {
|
||||
return { ...model, compat: model.compatConfig } as ModelSpec<TApi>;
|
||||
}
|
||||
|
||||
/**
|
||||
* The patchable subset of `Model` fields shared by `modelOverrides` entries,
|
||||
* custom model definitions, and parsed custom-model overlays. `undefined`
|
||||
@@ -244,7 +236,7 @@ export function applyModelPatch(base: Model<Api>, patch: ModelPatch, transport:
|
||||
result.headers = patch.headers;
|
||||
compat = patch.compat;
|
||||
}
|
||||
const built = buildModel({ ...result, compat } as ModelSpec<Api>);
|
||||
const built = buildModel({ ...toModelSpec(result), compat } as ModelSpec<Api>);
|
||||
if (patch.thinking !== undefined && built.thinking !== undefined) {
|
||||
// Config-authored capability metadata owns the explicit surface; build
|
||||
// first so non-reasoning and wire-disabled models still suppress it.
|
||||
|
||||
@@ -31,6 +31,7 @@ import {
|
||||
resolveModelCacheProviderId,
|
||||
resolveOllamaModelCacheProviderId,
|
||||
} from "@oh-my-pi/pi-catalog/provider-models";
|
||||
import { toModelSpec } from "@oh-my-pi/pi-catalog/provider-models/bundled-references";
|
||||
import { collapseBuiltModelVariants } from "@oh-my-pi/pi-catalog/variant-collapse";
|
||||
import { getAgentDir, isBunTestRuntime, logger, wrapFetchForExtraCa } from "@oh-my-pi/pi-utils";
|
||||
import { resolveProviderModelReference } from "../config/model-resolver";
|
||||
@@ -80,7 +81,6 @@ import {
|
||||
mergeRemoteCompactionConfig,
|
||||
type ProviderOverride,
|
||||
providersWithAuthoritativeProjectCatalog,
|
||||
toModelSpec,
|
||||
} from "./model-patch";
|
||||
import {
|
||||
BUILT_IN_DISCOVERY_CACHE_TTL_MS,
|
||||
@@ -108,7 +108,7 @@ export {
|
||||
|
||||
import { ModelsConfigFile, type ProviderValidationModel, validateProviderConfiguration } from "./models-config";
|
||||
import type { ModelOverride, ModelsConfig, ProviderAuthMode } from "./models-config-schema";
|
||||
import { settings } from "./settings";
|
||||
import { type Settings, settings } from "./settings";
|
||||
|
||||
// DeviceCheck attestation (`x-oai-attestation`) for ChatGPT-OAuth Codex
|
||||
// requests; the pi-ai provider resolves it just-in-time per request.
|
||||
@@ -132,21 +132,21 @@ interface CustomModelsResult {
|
||||
*/
|
||||
type ModifyModelsHook = (models: Model<Api>[], credentials: OAuthCredentials) => Model<Api>[];
|
||||
|
||||
function getDisabledProviderIdsFromSettings(): Set<string> {
|
||||
function getDisabledProviderIdsFromSettings(settingsInstance?: Settings): Set<string> {
|
||||
try {
|
||||
return new Set(settings.get("disabledProviders"));
|
||||
return new Set((settingsInstance ?? settings).get("disabledProviders"));
|
||||
} catch {
|
||||
return new Set();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether premium long-context windows are enabled. Defaults to true when the
|
||||
* settings singleton is not initialized (SDK embedding, early boot).
|
||||
* Whether premium long-context windows are enabled. Defaults to true when no
|
||||
* settings source is available (SDK embedding, early boot).
|
||||
*/
|
||||
function isExtendedContextEnabledFromSettings(): boolean {
|
||||
function isExtendedContextEnabledFromSettings(settingsInstance?: Settings): boolean {
|
||||
try {
|
||||
return settings.get("extendedContext");
|
||||
return (settingsInstance ?? settings).get("extendedContext");
|
||||
} catch {
|
||||
return true;
|
||||
}
|
||||
@@ -209,6 +209,7 @@ export class ModelRegistry {
|
||||
#runtimeModelManagers: Map<string, { options: ModelManagerOptions<Api>; sourceId: string }> = new Map();
|
||||
#ignoreLocalModelConfig: boolean;
|
||||
#fetch: FetchImpl;
|
||||
#settings: Settings | undefined;
|
||||
|
||||
#resolveCommandBackedApiKey(provider: string, options?: { forceCommandRefresh?: boolean }): CommandApiKeyResolution {
|
||||
const keyConfig = this.#customProviderApiKeys.get(provider);
|
||||
@@ -252,10 +253,13 @@ export class ModelRegistry {
|
||||
* must never apply client-side credential or routing overrides.
|
||||
*/
|
||||
ignoreLocalModelConfig?: boolean;
|
||||
/** Settings source for availability and context-window policies. */
|
||||
settings?: Settings;
|
||||
fetch?: FetchImpl;
|
||||
},
|
||||
) {
|
||||
this.#ignoreLocalModelConfig = options?.ignoreLocalModelConfig ?? false;
|
||||
this.#settings = options?.settings;
|
||||
this.#fetch =
|
||||
options?.fetch ??
|
||||
(isBunTestRuntime()
|
||||
@@ -558,6 +562,16 @@ export class ModelRegistry {
|
||||
});
|
||||
}
|
||||
|
||||
#invalidateProviderModelCache(providerName: string): void {
|
||||
const prefix = `${providerName}\u0000`;
|
||||
for (const key of this.#internedStaticModels.keys()) {
|
||||
if (key.startsWith(prefix)) {
|
||||
this.#internedStaticModels.delete(key);
|
||||
}
|
||||
}
|
||||
this.#providerLookupSnapshots.delete(providerName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-apply the credential-aware projections registered by extension providers.
|
||||
*
|
||||
@@ -646,7 +660,7 @@ export class ModelRegistry {
|
||||
|
||||
return models.map(m => {
|
||||
if (!providerOverride) return m;
|
||||
const withTransportOverride = this.#applyProviderTransportOverride(m, providerOverride);
|
||||
const withTransportOverride = this.#applyProviderTransportOverride(toModelSpec(m), providerOverride);
|
||||
return buildModel({
|
||||
...withTransportOverride,
|
||||
compat: mergeCompat(m.compatConfig, providerOverride.compat),
|
||||
@@ -886,7 +900,7 @@ export class ModelRegistry {
|
||||
}
|
||||
|
||||
#addImplicitDiscoverableProviders(configuredProviders: Set<string>): void {
|
||||
const disabledProviders = getDisabledProviderIdsFromSettings();
|
||||
const disabledProviders = getDisabledProviderIdsFromSettings(this.#settings);
|
||||
if (!configuredProviders.has("ollama") && !disabledProviders.has("ollama")) {
|
||||
this.#discoverableProviders.push({
|
||||
provider: "ollama",
|
||||
@@ -1058,7 +1072,7 @@ export class ModelRegistry {
|
||||
strategy: ModelRefreshStrategy,
|
||||
providerFilter?: ReadonlySet<string>,
|
||||
): Promise<void> {
|
||||
const disabledProviders = getDisabledProviderIdsFromSettings();
|
||||
const disabledProviders = getDisabledProviderIdsFromSettings(this.#settings);
|
||||
const selectedDiscoverableProviders = (
|
||||
providerFilter
|
||||
? this.#discoverableProviders.filter(provider => providerFilter.has(provider.provider))
|
||||
@@ -1367,7 +1381,7 @@ export class ModelRegistry {
|
||||
}),
|
||||
},
|
||||
];
|
||||
const disabledProviders = getDisabledProviderIdsFromSettings();
|
||||
const disabledProviders = getDisabledProviderIdsFromSettings(this.#settings);
|
||||
const standardProviderDescriptors = PROVIDER_DESCRIPTORS.filter(descriptor => {
|
||||
if (disabledProviders.has(descriptor.providerId)) return false;
|
||||
if (configuredDiscoveryProviders.has(descriptor.providerId)) return false;
|
||||
@@ -1592,7 +1606,7 @@ export class ModelRegistry {
|
||||
});
|
||||
}
|
||||
#applyHardcodedModelPolicies(models: Model<Api>[]): Model<Api>[] {
|
||||
const extendedContext = isExtendedContextEnabledFromSettings();
|
||||
const extendedContext = isExtendedContextEnabledFromSettings(this.#settings);
|
||||
return models.map(model => {
|
||||
// Extended context off: cap models with a premium long-context price
|
||||
// tier (e.g. GPT-5.6 bills 2x input above 272K) at the standard-pricing
|
||||
@@ -1683,7 +1697,7 @@ export class ModelRegistry {
|
||||
* full bundled catalog (thousands of models, ~50 providers).
|
||||
*/
|
||||
#createProviderAvailabilityCheck(): (provider: string) => boolean {
|
||||
const disabledProviders = getDisabledProviderIdsFromSettings();
|
||||
const disabledProviders = getDisabledProviderIdsFromSettings(this.#settings);
|
||||
const byProvider = new Map<string, boolean>();
|
||||
return provider => {
|
||||
let available = byProvider.get(provider);
|
||||
@@ -1752,7 +1766,7 @@ export class ModelRegistry {
|
||||
}
|
||||
|
||||
getDiscoverableProviders(): string[] {
|
||||
const disabledProviders = getDisabledProviderIdsFromSettings();
|
||||
const disabledProviders = getDisabledProviderIdsFromSettings(this.#settings);
|
||||
return this.#discoverableProviders
|
||||
.filter(provider => !disabledProviders.has(provider.provider))
|
||||
.map(provider => provider.provider);
|
||||
@@ -1770,7 +1784,7 @@ export class ModelRegistry {
|
||||
hasProvider(providerId: string): boolean {
|
||||
const providerModels = this.#hasFullSnapshot ? this.#models : this.#composeStaticModels(new Set([providerId]));
|
||||
if (providerModels.some(model => model.provider === providerId)) return true;
|
||||
if (getDisabledProviderIdsFromSettings().has(providerId)) return false;
|
||||
if (getDisabledProviderIdsFromSettings(this.#settings).has(providerId)) return false;
|
||||
return (
|
||||
this.#discoverableProviders.some(provider => provider.provider === providerId) ||
|
||||
this.#runtimeModelManagers.has(providerId)
|
||||
@@ -2087,7 +2101,7 @@ export class ModelRegistry {
|
||||
this.#runtimeModelModifiers.delete(providerName);
|
||||
}
|
||||
this.#models = this.#applyRuntimeModelModifiers(this.#unprojectedModels);
|
||||
this.#providerLookupSnapshots.clear();
|
||||
this.#invalidateProviderModelCache(providerName);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2163,7 +2177,7 @@ export class ModelRegistry {
|
||||
}),
|
||||
);
|
||||
this.#models = this.#applyRuntimeModelModifiers(this.#unprojectedModels);
|
||||
this.#providerLookupSnapshots.clear();
|
||||
this.#invalidateProviderModelCache(providerName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
/// <reference path="./legacy-pi-virtual-modules.d.ts" />
|
||||
|
||||
import { Database } from "bun:sqlite";
|
||||
import * as fs from "node:fs";
|
||||
import { createRequire, isBuiltin } from "node:module";
|
||||
import * as path from "node:path";
|
||||
import * as url from "node:url";
|
||||
import type { ParseResult, ParserPlugin } from "@babel/parser";
|
||||
import { parse as parseBabel } from "@babel/parser";
|
||||
import { isCompiledBinary, stripWindowsExtendedLengthPathPrefix } from "@oh-my-pi/pi-utils";
|
||||
import {
|
||||
getLegacyPiExtensionCacheDbPath,
|
||||
isCompiledBinary,
|
||||
logger,
|
||||
stripWindowsExtendedLengthPathPrefix,
|
||||
} from "@oh-my-pi/pi-utils";
|
||||
import { registerPluginCacheInvalidator } from "../../discovery/helpers";
|
||||
|
||||
const IS_COMPILED_BINARY = isCompiledBinary();
|
||||
@@ -537,6 +543,159 @@ function collectExtensionSpecifierReferences(
|
||||
return references;
|
||||
}
|
||||
|
||||
const EXTENSION_PARSE_CACHE_SCHEMA_VERSION = 1;
|
||||
const EXTENSION_PARSE_CACHE_MAX_BYTES = 8 * 1024 * 1024;
|
||||
const EXTENSION_PARSE_CACHE_MAX_ENTRIES = 10_000;
|
||||
|
||||
interface ExtensionSourceAnalysis {
|
||||
readonly sourceType: "script" | "module";
|
||||
readonly references: readonly ExtensionSpecifierReference[];
|
||||
readonly commonJsNamedExports: readonly string[];
|
||||
readonly commonJsReexportSpecifiers: readonly string[];
|
||||
}
|
||||
|
||||
interface ExtensionParseCacheRow {
|
||||
source_type: "script" | "module";
|
||||
references: string;
|
||||
commonjs_named_exports: string;
|
||||
commonjs_reexport_specifiers: string;
|
||||
}
|
||||
|
||||
let extensionParseCacheDb: Database | null | undefined;
|
||||
const extensionSourceAnalysisCache = new Map<string, ExtensionSourceAnalysis>();
|
||||
|
||||
function extensionParseCacheKey(source: string, importerPath: string): string {
|
||||
return `${EXTENSION_PARSE_CACHE_SCHEMA_VERSION}:${path.extname(importerPath).toLowerCase()}:${Bun.hash(source).toString(16)}`;
|
||||
}
|
||||
|
||||
function getExtensionParseCacheDb(): Database | null {
|
||||
if (extensionParseCacheDb !== undefined) return extensionParseCacheDb;
|
||||
try {
|
||||
const cachePath = getLegacyPiExtensionCacheDbPath();
|
||||
try {
|
||||
if (fs.statSync(cachePath).size > EXTENSION_PARSE_CACHE_MAX_BYTES) {
|
||||
fs.rmSync(cachePath, { force: true });
|
||||
}
|
||||
} catch {
|
||||
// A missing or unreadable cache is a cold cache.
|
||||
}
|
||||
fs.mkdirSync(path.dirname(cachePath), { recursive: true });
|
||||
const db = new Database(cachePath, { create: true });
|
||||
db.run("PRAGMA busy_timeout = 50");
|
||||
db.run(
|
||||
"CREATE TABLE IF NOT EXISTS extension_parse_cache (cache_key TEXT PRIMARY KEY, source_type TEXT NOT NULL, references TEXT NOT NULL, commonjs_named_exports TEXT NOT NULL, commonjs_reexport_specifiers TEXT NOT NULL)",
|
||||
);
|
||||
extensionParseCacheDb = db;
|
||||
return db;
|
||||
} catch (error) {
|
||||
logger.debug("legacy Pi extension parse cache unavailable", {
|
||||
error: error instanceof Error ? error.message : String(error),
|
||||
});
|
||||
extensionParseCacheDb = null;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function parseCachedAnalysis(row: ExtensionParseCacheRow): ExtensionSourceAnalysis | null {
|
||||
try {
|
||||
if (row.source_type !== "script" && row.source_type !== "module") return null;
|
||||
const references = JSON.parse(row.references) as unknown;
|
||||
const commonJsNamedExports = JSON.parse(row.commonjs_named_exports) as unknown;
|
||||
const commonJsReexportSpecifiers = JSON.parse(row.commonjs_reexport_specifiers) as unknown;
|
||||
if (
|
||||
!Array.isArray(references) ||
|
||||
!references.every(
|
||||
reference =>
|
||||
reference &&
|
||||
typeof reference === "object" &&
|
||||
(reference.kind === "import" || reference.kind === "require") &&
|
||||
typeof reference.specifier === "string" &&
|
||||
typeof reference.start === "number" &&
|
||||
typeof reference.end === "number",
|
||||
) ||
|
||||
!Array.isArray(commonJsNamedExports) ||
|
||||
!commonJsNamedExports.every(name => typeof name === "string") ||
|
||||
!Array.isArray(commonJsReexportSpecifiers) ||
|
||||
!commonJsReexportSpecifiers.every(specifier => typeof specifier === "string")
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
sourceType: row.source_type,
|
||||
references: references as ExtensionSpecifierReference[],
|
||||
commonJsNamedExports,
|
||||
commonJsReexportSpecifiers,
|
||||
};
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function writeExtensionSourceAnalysis(cacheKey: string, analysis: ExtensionSourceAnalysis): void {
|
||||
void Promise.resolve()
|
||||
.then(() => {
|
||||
const db = getExtensionParseCacheDb();
|
||||
if (!db) return;
|
||||
db.run(
|
||||
"INSERT OR REPLACE INTO extension_parse_cache (cache_key, source_type, references, commonjs_named_exports, commonjs_reexport_specifiers) VALUES (?, ?, ?, ?, ?)",
|
||||
[
|
||||
cacheKey,
|
||||
analysis.sourceType,
|
||||
JSON.stringify(analysis.references),
|
||||
JSON.stringify(analysis.commonJsNamedExports),
|
||||
JSON.stringify(analysis.commonJsReexportSpecifiers),
|
||||
],
|
||||
);
|
||||
const count =
|
||||
db.query<{ count: number }, []>("SELECT count(*) AS count FROM extension_parse_cache").get()?.count ?? 0;
|
||||
if (count > EXTENSION_PARSE_CACHE_MAX_ENTRIES) {
|
||||
db.run("DELETE FROM extension_parse_cache");
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
logger.debug("legacy Pi extension parse cache write failed", {
|
||||
error: error instanceof Error ? error.message : String(error),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function getExtensionSourceAnalysis(source: string, importerPath: string): ExtensionSourceAnalysis {
|
||||
const cacheKey = extensionParseCacheKey(source, importerPath);
|
||||
const memoryCached = extensionSourceAnalysisCache.get(cacheKey);
|
||||
if (memoryCached) return memoryCached;
|
||||
|
||||
const db = getExtensionParseCacheDb();
|
||||
try {
|
||||
const row = db
|
||||
?.query<ExtensionParseCacheRow, [string]>(
|
||||
"SELECT source_type, references, commonjs_named_exports, commonjs_reexport_specifiers FROM extension_parse_cache WHERE cache_key = ?",
|
||||
)
|
||||
.get(cacheKey);
|
||||
if (row) {
|
||||
const cached = parseCachedAnalysis(row);
|
||||
if (cached) {
|
||||
extensionSourceAnalysisCache.set(cacheKey, cached);
|
||||
return cached;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
logger.debug("legacy Pi extension parse cache read failed", {
|
||||
error: error instanceof Error ? error.message : String(error),
|
||||
});
|
||||
}
|
||||
|
||||
const ast = parseExtensionSource(source, importerPath);
|
||||
const commonJs = collectCommonJsExportAnalysis(ast);
|
||||
const analysis: ExtensionSourceAnalysis = {
|
||||
sourceType: ast.program.sourceType,
|
||||
references: collectExtensionSpecifierReferences(source, importerPath, ast),
|
||||
...commonJs,
|
||||
};
|
||||
extensionSourceAnalysisCache.set(cacheKey, analysis);
|
||||
writeExtensionSourceAnalysis(cacheKey, analysis);
|
||||
return analysis;
|
||||
}
|
||||
|
||||
function applySpecifierReplacements(
|
||||
source: string,
|
||||
replacements: ReadonlyArray<ExtensionSpecifierReference & { readonly replacement: string }>,
|
||||
@@ -1003,7 +1162,7 @@ async function rewriteLegacyExtensionSource(
|
||||
// Compiled mode completes the override map from the build-supplied module
|
||||
// keys on first use; every rewrite path must see the full map.
|
||||
await ensureLegacyPiOverridesReady();
|
||||
const references = collectExtensionSpecifierReferences(source, importerPath);
|
||||
const references = getExtensionSourceAnalysis(source, importerPath).references;
|
||||
const replacements: Array<ExtensionSpecifierReference & { replacement: string }> = [];
|
||||
for (const reference of references) {
|
||||
if (reference.kind !== "import") continue;
|
||||
@@ -1448,7 +1607,7 @@ async function isCommonJsModulePath(
|
||||
return true;
|
||||
}
|
||||
const parsedSourceType =
|
||||
sourceType ?? parseExtensionSource(await Bun.file(modulePath).text(), modulePath).program.sourceType;
|
||||
sourceType ?? getExtensionSourceAnalysis(await Bun.file(modulePath).text(), modulePath).sourceType;
|
||||
if (parsedSourceType === "module") {
|
||||
return false;
|
||||
}
|
||||
@@ -1776,7 +1935,7 @@ async function rewriteExtensionSpecifiers(
|
||||
importerPath: string,
|
||||
rewriteImports = false,
|
||||
): Promise<string> {
|
||||
const references = collectExtensionSpecifierReferences(source, importerPath);
|
||||
const references = getExtensionSourceAnalysis(source, importerPath).references;
|
||||
const resolvedSpecifierTargets = new Map<string, string>();
|
||||
const replacements: Array<ExtensionSpecifierReference & { replacement: string }> = [];
|
||||
for (const reference of references) {
|
||||
@@ -1808,7 +1967,7 @@ function rewriteExtensionSpecifiersFromCache(source: string, importerPath: strin
|
||||
return source;
|
||||
}
|
||||
const replacements: Array<ExtensionSpecifierReference & { replacement: string }> = [];
|
||||
for (const reference of collectExtensionSpecifierReferences(source, importerPath)) {
|
||||
for (const reference of getExtensionSourceAnalysis(source, importerPath).references) {
|
||||
const replacement = resolvedSpecifierTargets.get(`${reference.kind}\0${reference.specifier}`);
|
||||
if (replacement) {
|
||||
replacements.push({ ...reference, replacement });
|
||||
@@ -1839,7 +1998,7 @@ async function moduleRequiresNativeAddonUncached(modulePath: string): Promise<bo
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
for (const reference of collectExtensionSpecifierReferences(source, modulePath)) {
|
||||
for (const reference of getExtensionSourceAnalysis(source, modulePath).references) {
|
||||
if (reference.kind === "require" && (await resolveExtensionNativeAddon(reference.specifier, modulePath))) {
|
||||
return true;
|
||||
}
|
||||
@@ -2040,18 +2199,18 @@ async function collectExtensionModules(entryRealPath: string): Promise<Extension
|
||||
continue;
|
||||
}
|
||||
modules.set(file, source);
|
||||
const ast = parseExtensionSource(source, file);
|
||||
const analysis = getExtensionSourceAnalysis(source, file);
|
||||
const sourceIsCommonJs = await isGraphOwnedCommonJsModule(
|
||||
file,
|
||||
entryRealPath,
|
||||
ast.program.sourceType,
|
||||
analysis.sourceType,
|
||||
inheritedModuleKind,
|
||||
);
|
||||
if (sourceIsCommonJs) {
|
||||
commonJsPaths.add(file);
|
||||
}
|
||||
const dir = path.dirname(file);
|
||||
const references = collectExtensionSpecifierReferences(source, file, ast);
|
||||
const references = analysis.references;
|
||||
for (const reference of references) {
|
||||
const specifier = reference.specifier;
|
||||
try {
|
||||
@@ -2233,22 +2392,11 @@ export async function __collectLegacyPiExtensionSourcesForTests(
|
||||
*/
|
||||
const COMMONJS_NAMED_EXPORT_IDENTIFIER = /^[A-Za-z_$][\w$]*$/;
|
||||
|
||||
function collectCommonJsNamedExports(source: string, modulePath: string, visited = new Set<string>()): string[] {
|
||||
let realModulePath = modulePath;
|
||||
try {
|
||||
realModulePath = fs.realpathSync(modulePath);
|
||||
} catch {
|
||||
// The caller's path remains the stable cycle key when realpath fails.
|
||||
}
|
||||
if (visited.has(realModulePath)) {
|
||||
return [];
|
||||
}
|
||||
visited.add(realModulePath);
|
||||
|
||||
function collectCommonJsExportAnalysis(
|
||||
ast: ParseResult,
|
||||
): Pick<ExtensionSourceAnalysis, "commonJsNamedExports" | "commonJsReexportSpecifiers"> {
|
||||
const names = new Set<string>();
|
||||
|
||||
const reexportSpecifiers = new Set<string>();
|
||||
const ast = parseExtensionSource(source, modulePath);
|
||||
for (const { node, scope } of collectScopedAstNodes(
|
||||
ast,
|
||||
candidate => candidate.type === "CallExpression" || candidate.type === "AssignmentExpression",
|
||||
@@ -2284,17 +2432,13 @@ function collectCommonJsNamedExports(source: string, modulePath: string, visited
|
||||
if (node.type !== "AssignmentExpression" || node.operator !== "=") continue;
|
||||
const left = asAstNode(node.left);
|
||||
if (left?.type !== "MemberExpression") continue;
|
||||
|
||||
const propertyName = staticMemberPropertyName(left);
|
||||
const object = asAstNode(left.object);
|
||||
if (propertyName !== null && isUnshadowedExportsTarget(object, scope)) {
|
||||
if (propertyName !== "default" && COMMONJS_NAMED_EXPORT_IDENTIFIER.test(propertyName)) {
|
||||
names.add(propertyName);
|
||||
}
|
||||
if (propertyName !== "default" && COMMONJS_NAMED_EXPORT_IDENTIFIER.test(propertyName)) names.add(propertyName);
|
||||
continue;
|
||||
}
|
||||
if (!isUncomputedMember(left, "module", "exports") || scopeHasBinding(scope, MODULE_BINDING)) continue;
|
||||
|
||||
const right = asAstNode(node.right);
|
||||
if (right?.type === "ObjectExpression") {
|
||||
const properties = nodeArray(right, "properties");
|
||||
@@ -2303,28 +2447,37 @@ function collectCommonJsNamedExports(source: string, modulePath: string, visited
|
||||
const property = asAstNode(value);
|
||||
if (!property || (property.type !== "ObjectProperty" && property.type !== "ObjectMethod")) continue;
|
||||
const name = staticObjectPropertyName(property);
|
||||
if (name && name !== "default" && COMMONJS_NAMED_EXPORT_IDENTIFIER.test(name)) {
|
||||
names.add(name);
|
||||
}
|
||||
if (name && name !== "default" && COMMONJS_NAMED_EXPORT_IDENTIFIER.test(name)) names.add(name);
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (isGlobalRequireCall(right, scope)) {
|
||||
const argument = nodeArgument(right, 0);
|
||||
if (argument?.type === "StringLiteral" && typeof argument.value === "string") {
|
||||
if (argument?.type === "StringLiteral" && typeof argument.value === "string")
|
||||
reexportSpecifiers.add(argument.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return { commonJsNamedExports: [...names], commonJsReexportSpecifiers: [...reexportSpecifiers] };
|
||||
}
|
||||
|
||||
function collectCommonJsNamedExports(source: string, modulePath: string, visited = new Set<string>()): string[] {
|
||||
let realModulePath = modulePath;
|
||||
try {
|
||||
realModulePath = fs.realpathSync(modulePath);
|
||||
} catch {
|
||||
// The caller's path remains the stable cycle key when realpath fails.
|
||||
}
|
||||
if (visited.has(realModulePath)) return [];
|
||||
visited.add(realModulePath);
|
||||
const analysis = getExtensionSourceAnalysis(source, modulePath);
|
||||
const names = new Set(analysis.commonJsNamedExports);
|
||||
const nativeRequire = createRequire(modulePath);
|
||||
for (const specifier of reexportSpecifiers) {
|
||||
for (const specifier of analysis.commonJsReexportSpecifiers) {
|
||||
try {
|
||||
const resolved = fs.realpathSync(nativeRequire.resolve(specifier));
|
||||
const reexportedSource = rewriteExtensionSpecifiersFromCache(fs.readFileSync(resolved, "utf8"), resolved);
|
||||
for (const name of collectCommonJsNamedExports(reexportedSource, resolved, visited)) {
|
||||
names.add(name);
|
||||
}
|
||||
for (const name of collectCommonJsNamedExports(reexportedSource, resolved, visited)) names.add(name);
|
||||
} catch {
|
||||
// Native modules and non-source re-exports do not expose analyzable names.
|
||||
}
|
||||
|
||||
@@ -1289,9 +1289,9 @@ export async function runRootCommand(
|
||||
// tree; declare it so headless subagent optimizations (e.g. skipping replan
|
||||
// title refresh) can tell a focusable process from a print/RPC/eval one.
|
||||
setInteractiveHost(isInteractive);
|
||||
// Create AuthStorage and ModelRegistry upfront. A configured-but-unreachable
|
||||
// auth broker throws here; convert it to an actionable stderr message + clean
|
||||
// exit instead of a raw uncaught stack trace (issue #8096).
|
||||
// Create AuthStorage upfront. A configured-but-unreachable auth broker throws
|
||||
// here; convert it to an actionable stderr message + clean exit instead of a
|
||||
// raw uncaught stack trace (issue #8096).
|
||||
let authStorage: AuthStorage;
|
||||
try {
|
||||
authStorage = await logger.time("discoverAuthStorage", deps.discoverAuthStorage ?? discoverAuthStorage);
|
||||
@@ -1301,7 +1301,6 @@ export async function runRootCommand(
|
||||
process.stderr.write(`${chalk.red(`Error: ${message}`)}\n`);
|
||||
process.exit(1);
|
||||
}
|
||||
const modelRegistry = logger.time("modelRegistry:init", () => new ModelRegistry(authStorage));
|
||||
|
||||
const settingsInstance =
|
||||
deps.settings ?? (await logger.time("settings:init", Settings.init, { cwd, configFiles: parsedArgs.config }));
|
||||
@@ -1319,6 +1318,13 @@ export async function runRootCommand(
|
||||
} else if (parsedArgs.mode === "acp") {
|
||||
applyAcpDefaultSettingOverrides(settingsInstance);
|
||||
}
|
||||
|
||||
// The registry composes policy-dependent metadata synchronously, including
|
||||
// extended-context window caps, so it must receive the finalized settings.
|
||||
const modelRegistry = logger.time(
|
||||
"modelRegistry:init",
|
||||
() => new ModelRegistry(authStorage, undefined, { settings: settingsInstance }),
|
||||
);
|
||||
if (parsedArgs.noPty || parsedArgs.mode === "rpc-ui") {
|
||||
Bun.env.PI_NO_PTY = "1";
|
||||
}
|
||||
|
||||
@@ -198,9 +198,9 @@ export class ModelHubComponent implements Component {
|
||||
#sidebarFollowActive = true;
|
||||
#sidebarHover: number | null = null;
|
||||
/**
|
||||
* Arrow-key ownership: `scope` (default) hops the sidebar even while the
|
||||
* search bar holds the caret; `list` navigates rows (browser models or
|
||||
* role rows). Tab toggles.
|
||||
* Arrow-key ownership: `scope` (default) hops the sidebar; `list`
|
||||
* navigates rows (browser models or role rows). Typing anywhere focuses
|
||||
* the model list; Tab toggles; ←/→ switches between sidebar and list.
|
||||
*/
|
||||
#focus: "scope" | "list" = "scope";
|
||||
|
||||
@@ -1200,8 +1200,7 @@ export class ModelHubComponent implements Component {
|
||||
return;
|
||||
}
|
||||
|
||||
// Arrow ownership: scope mode hops the sidebar even while the search
|
||||
// bar holds the caret; list mode navigates rows.
|
||||
// Arrow ownership: scope mode hops the sidebar; list mode navigates rows.
|
||||
if (this.#focus === "scope") {
|
||||
if (matchesSelectUp(data)) {
|
||||
this.#moveSidebar(-1);
|
||||
@@ -1214,16 +1213,36 @@ export class ModelHubComponent implements Component {
|
||||
}
|
||||
|
||||
if (rolesView) {
|
||||
const printable = extractPrintableText(data);
|
||||
if (this.#focus === "scope" && printable !== undefined && printable.trim().length > 0) {
|
||||
this.#setActiveEntry("all");
|
||||
this.#focus = "list";
|
||||
this.#browser.handleInput(data);
|
||||
return;
|
||||
}
|
||||
this.#handleRolesViewInput(data);
|
||||
return;
|
||||
}
|
||||
if (lockedView) {
|
||||
const printable = extractPrintableText(data);
|
||||
if (printable !== undefined && printable.trim().length > 0) {
|
||||
this.#setActiveEntry("all");
|
||||
this.#focus = "list";
|
||||
this.#browser.handleInput(data);
|
||||
return;
|
||||
}
|
||||
if (matchesKey(data, "enter") || matchesKey(data, "return") || data === "\n") {
|
||||
this.#requestLogin(entry);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const beforeQuery = this.#browser.query;
|
||||
const isPrintable = extractPrintableText(data) !== undefined;
|
||||
this.#browser.handleInput(data);
|
||||
if (isPrintable || this.#browser.query !== beforeQuery) {
|
||||
this.#focus = "list";
|
||||
}
|
||||
}
|
||||
|
||||
#isBrowserView(entry: SidebarEntry): boolean {
|
||||
|
||||
@@ -2021,13 +2021,22 @@ export class StatusLineComponent implements Component {
|
||||
let percentStart = -1;
|
||||
let windowStart = -1;
|
||||
let scaleWidth = gapWidth;
|
||||
// >100%: usage anchored past the active window (e.g. model switch to a
|
||||
// smaller window). The bar clamps full, but the embedded label breaks
|
||||
// past the window label — `──200K─120%` with the percent in error color.
|
||||
const percentOverflow = pct > 100;
|
||||
if (embedContext) {
|
||||
const candidatePercent = formatEmbeddedContextPercent(clampedPct);
|
||||
const candidatePercent = formatEmbeddedContextPercent(percentOverflow ? pct : clampedPct);
|
||||
const candidateWindow = formatNumber(ctx.contextWindow);
|
||||
if (gapWidth >= candidatePercent.length + candidateWindow.length + 4) {
|
||||
percentLabel = candidatePercent;
|
||||
windowLabel = candidateWindow;
|
||||
windowStart = gapWidth - windowLabel.length - 1;
|
||||
if (percentOverflow) {
|
||||
percentStart = gapWidth - percentLabel.length;
|
||||
windowStart = percentStart - 1 - windowLabel.length;
|
||||
} else {
|
||||
windowStart = gapWidth - windowLabel.length - 1;
|
||||
}
|
||||
scaleWidth = windowStart;
|
||||
}
|
||||
}
|
||||
@@ -2054,7 +2063,7 @@ export class StatusLineComponent implements Component {
|
||||
}
|
||||
}
|
||||
|
||||
if (percentLabel) {
|
||||
if (percentLabel && percentStart < 0) {
|
||||
const maxStart = scaleWidth - percentLabel.length - 1;
|
||||
const preferredStart = Math.min(maxStart, Math.max(1, usedCount));
|
||||
const overlapsBoundary = (start: number): boolean => {
|
||||
@@ -2079,6 +2088,7 @@ export class StatusLineComponent implements Component {
|
||||
const speculationGlyph = theme.symbol("context.speculation");
|
||||
const thresholdGlyph = theme.symbol("context.compaction");
|
||||
const speculationColor = theme.getFgAnsi("muted");
|
||||
const overflowColor = theme.getFgAnsi("error");
|
||||
const rawAccentHex = accentHex ?? theme.getColorHex("borderAccent");
|
||||
const dimmedAccentHex = adjustHsv(rawAccentHex, { s: 0.7, v: 0.75 });
|
||||
const thresholdColor = getSessionAccentAnsi(dimmedAccentHex) ?? usedColor;
|
||||
@@ -2089,7 +2099,7 @@ export class StatusLineComponent implements Component {
|
||||
let color = i < usedCount ? usedColor : unusedColor;
|
||||
let glyph = horizontal;
|
||||
if (percentStart >= 0 && i >= percentStart && i < percentStart + percentLabel.length) {
|
||||
color = usedColor;
|
||||
color = percentOverflow ? overflowColor : usedColor;
|
||||
glyph = percentLabel.charAt(i - percentStart);
|
||||
} else if (i === thresholdIdx) {
|
||||
color = thresholdColor;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user