mirror of
https://github.com/langchain-ai/langsmith-java.git
synced 2026-08-24 22:01:31 -04:00
14634be733
* codegen metadata * codegen metadata * codegen metadata * feat(api): sandbox apis add sandbox apis * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * feat(api): api update * feat(api): api update * codegen metadata * codegen metadata * feat(api): api update * codegen metadata * codegen metadata * chore(deps): bump the minor-and-patch group across 1 directory with 5 updates (#123) * chore(deps): bump the minor-and-patch group with 5 updates Bumps the minor-and-patch group with 5 updates: | Package | From | To | | --- | --- | --- | | [org.jetbrains.dokka](https://github.com/Kotlin/dokka) | `2.0.0` | `2.2.0` | | [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) | `2.0.21` | `2.3.20` | | [com.vanniktech:gradle-maven-publish-plugin](https://github.com/vanniktech/gradle-maven-publish-plugin) | `0.28.0` | `0.36.0` | | [jvm](https://github.com/JetBrains/kotlin) | `2.0.21` | `2.3.20` | | [com.vanniktech.maven.publish](https://github.com/vanniktech/gradle-maven-publish-plugin) | `0.28.0` | `0.36.0` | Updates `org.jetbrains.dokka` from 2.0.0 to 2.2.0 - [Release notes](https://github.com/Kotlin/dokka/releases) - [Commits](https://github.com/Kotlin/dokka/compare/v2.0.0...v2.2.0) Updates `org.jetbrains.kotlin:kotlin-gradle-plugin` from 2.0.21 to 2.3.20 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v2.0.21...v2.3.20) Updates `com.vanniktech:gradle-maven-publish-plugin` from 0.28.0 to 0.36.0 - [Release notes](https://github.com/vanniktech/gradle-maven-publish-plugin/releases) - [Changelog](https://github.com/vanniktech/gradle-maven-publish-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/vanniktech/gradle-maven-publish-plugin/compare/0.28.0...0.36.0) Updates `jvm` from 2.0.21 to 2.3.20 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v2.0.21...v2.3.20) Updates `com.vanniktech.maven.publish` from 0.28.0 to 0.36.0 - [Release notes](https://github.com/vanniktech/gradle-maven-publish-plugin/releases) - [Changelog](https://github.com/vanniktech/gradle-maven-publish-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/vanniktech/gradle-maven-publish-plugin/compare/0.28.0...0.36.0) --- updated-dependencies: - dependency-name: org.jetbrains.dokka dependency-version: 2.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin dependency-version: 2.3.20 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: com.vanniktech:gradle-maven-publish-plugin dependency-version: 0.36.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: jvm dependency-version: 2.3.20 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: com.vanniktech.maven.publish dependency-version: 0.36.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Fix build failures from dependency bumps Remove SonatypeHost reference removed in gradle-maven-publish-plugin 0.34.0+ (publishToMavenCentral() defaults to Central Portal). Bump proguard-gradle 7.6.0 → 7.9.0 to support Kotlin 2.3.x metadata. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Revert Kotlin to 2.3.0 to match Gradle 9.4.1 embedded version Kotlin 2.3.20 is not yet supported by CodeQL and conflicts with the kotlin-dsl plugin's embedded Kotlin 2.3.0. Keeping the Kotlin version aligned with the Gradle wrapper avoids both issues. Bump proguard-gradle to 7.8.0 (from 7.6.0) to support Kotlin 2.3.0 metadata. 7.9.0 has a null pointer regression; 7.8.x is the sweet spot. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: John Kennedy <65985482+jkennedyvz@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * codegen metadata * codegen metadata * codegen metadata * feat(api): api update * codegen metadata * codegen metadata * feat(evaluators): add list evaluators (GET /api/v1/runs/rules) Exposes `GET /api/v1/runs/rules`. Will result in `client.evaluators.list()` in the Go SDK. The endpoint returns online evaluators (internally called "run rules") — automated rules that trigger on incoming runs to apply LLM/code evaluators, add runs to annotation queues, trigger webhooks, etc. The `runs/rules` URL path is an implementation detail; `evaluators` matches the user-facing branding. * codegen metadata * feat(api): api update * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * feat(api): api update * codegen metadata * codegen metadata * feat: support setting headers via env * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * feat: Add autobatch tracing mode (#134) * Add autobatch mode * Fix * Update signature * Add async impl * Fix optin * Fix * Fix * Fix tests * Add test * Refactor to be more idiomatic * Feedback * Use explicit lock, add to AGENTS.md * Remove test script * codegen metadata * feat: Merge enqueued posts and patches to optimize batching (#135) * Merge enqueued posts and patches to optimize batching * Exclude patched inputs by default * Logs * Fix import order * Feedback * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * feat: Make autobatch queue denote batches by payload size, add aggregation delay (#137) * Make autobatch queue denote batches by payload size, add aggregation delay * Fully drain queue when batch delay is hit * Feedback on locks * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * feat: Add multipart batching (#138) * Add multipart batching * Handle 404s better * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * feat(api): api update * codegen metadata * codegen metadata * feat(api): add workspaces * feat(api): manual updates * codegen metadata * feat(api): manual updates * codegen metadata * codegen metadata * codegen metadata * feat: Add zstd compression to runs service (#136) * Add zstd compression * Merge * Fix * nits * Feedback * Fix build * codegen metadata * release: 0.1.0-beta.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: John Kennedy <65985482+jkennedyvz@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Jacob Lee <jacoblee93@gmail.com>
113 lines
5.1 KiB
Kotlin
113 lines
5.1 KiB
Kotlin
plugins {
|
|
application
|
|
kotlin("jvm")
|
|
id("org.jetbrains.kotlin.plugin.spring") version "2.1.20"
|
|
id("org.springframework.boot") version "2.7.18" apply false
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
// Align with Kotlin JVM target (Kotlin plugin applies Java plugin; keep targets consistent)
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":langsmith-java"))
|
|
implementation(kotlin("stdlib"))
|
|
|
|
// Jackson for JSON handling in examples
|
|
implementation("com.fasterxml.jackson.core:jackson-databind:2.13.4")
|
|
|
|
// Spring Boot dependencies (optional - only needed for Spring Boot example)
|
|
implementation(platform("org.springframework.boot:spring-boot-dependencies:2.7.18"))
|
|
implementation("org.springframework.boot:spring-boot-starter-web")
|
|
implementation("org.springframework.boot:spring-boot-starter")
|
|
|
|
// Simple logging for examples. This lets smoke tests show SDK debug/trace logs.
|
|
runtimeOnly("org.slf4j:slf4j-simple:2.0.17")
|
|
|
|
// Security: constrain vulnerable transitive dependencies from Spring Boot 2.7.18.
|
|
// Spring Boot 2.7.x is EOL; these constraints override the managed versions in-place.
|
|
// None of these affect published artifacts (this is a non-published example module).
|
|
constraints {
|
|
// CVE-2025-24813 (CRITICAL), CVE-2026-24734, CVE-2025-55752, CVE-2025-53506,
|
|
// CVE-2025-52520, CVE-2025-48989, CVE-2025-48988, CVE-2024-56337, CVE-2024-50379, CVE-2024-34750
|
|
// Remove this constraint when upgrading to Spring Boot 3.x (which manages Tomcat 10+).
|
|
implementation("org.apache.tomcat.embed:tomcat-embed-core") { version { require("9.0.115") } }
|
|
implementation("org.apache.tomcat.embed:tomcat-embed-websocket") { version { require("9.0.115") } }
|
|
// CVE-2024-22243, CVE-2024-22259, CVE-2024-22262
|
|
// Note: CVE-2016-1000027 (CRITICAL) requires spring-web 6.0.0 — needs Spring Boot 3.x upgrade.
|
|
implementation("org.springframework:spring-web") { version { require("5.3.34") } }
|
|
implementation("org.springframework:spring-webmvc") { version { require("5.3.34") } }
|
|
// CVE-2023-6481, CVE-2023-6378
|
|
implementation("ch.qos.logback:logback-core") { version { require("1.2.13") } }
|
|
implementation("ch.qos.logback:logback-classic") { version { require("1.2.13") } }
|
|
// CVE-2022-25857 (note: CVE-2022-1471 requires snakeyaml 2.0 which is incompatible with Spring Boot 2.7.x)
|
|
implementation("org.yaml:snakeyaml") { version { require("1.31") } }
|
|
}
|
|
}
|
|
|
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
|
compilerOptions {
|
|
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
|
|
}
|
|
}
|
|
|
|
application {
|
|
// Require -Pexample=Name to run an example (e.g. -Pexample=ListRuns, -Pexample=OtelLangSmith)
|
|
mainClass = if (project.hasProperty("example")) {
|
|
var exampleName = project.property("example") as String
|
|
val aliases = mapOf(
|
|
"OtelLangSmithSimple" to "OtelLangSmith",
|
|
"PromptManagmentExample" to "PromptManagement",
|
|
"PromptManagment" to "PromptManagement",
|
|
)
|
|
exampleName = aliases[exampleName] ?: exampleName
|
|
val baseName = if (exampleName.endsWith("Example")) exampleName else "${exampleName}Example"
|
|
val searchPaths = listOf(
|
|
"" to "com.langchain.smith.example",
|
|
"otel/" to "com.langchain.smith.example.otel"
|
|
)
|
|
var foundPackage = ""
|
|
for ((subdir, packageName) in searchPaths) {
|
|
val kotlinFile = file("src/main/kotlin/com/langchain/smith/example/${subdir}${baseName}.kt")
|
|
if (kotlinFile.exists()) {
|
|
foundPackage = packageName
|
|
break
|
|
}
|
|
}
|
|
if (foundPackage.isNotEmpty()) {
|
|
"${foundPackage}.${baseName}Kt"
|
|
} else {
|
|
throw GradleException(
|
|
"Example '$exampleName' not found. No ${baseName}.kt in " +
|
|
"src/main/kotlin/.../example/ or .../example/otel/. " +
|
|
"Use -Pexample=ListRuns, -Pexample=OtelLangSmith, -Pexample=OtelLangSmithSimple, -Pexample=OtelOpenAI, etc."
|
|
)
|
|
}
|
|
} else {
|
|
"Main" // placeholder; run task doFirst will require -Pexample=
|
|
}
|
|
}
|
|
|
|
// Export stdin to examples for readln(); require -Pexample= when running (configuration-cache safe: no project access in doFirst)
|
|
tasks.named<JavaExec>("run") {
|
|
standardInput = System.`in`
|
|
systemProperty("org.slf4j.simpleLogger.defaultLogLevel", "info")
|
|
systemProperty("org.slf4j.simpleLogger.log.com.langchain.smith.client.AutoBatchQueue", "trace")
|
|
systemProperty("org.slf4j.simpleLogger.showDateTime", "false")
|
|
systemProperty("org.slf4j.simpleLogger.showShortLogName", "true")
|
|
doFirst {
|
|
if (mainClass.get() == "Main") {
|
|
throw GradleException(
|
|
"Example module requires -Pexample=ExampleName. " +
|
|
"e.g. ./gradlew :langsmith-java-example:run -Pexample=ListRuns"
|
|
)
|
|
}
|
|
}
|
|
}
|