Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import io.orkes.conductor.client.ApiClient;
import io.orkes.conductor.client.OrkesClients;

import com.fasterxml.jackson.databind.ObjectMapper;
import tools.jackson.databind.ObjectMapper;


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.conductoross.conductor.ai.internal.ToolRegistry;
import org.conductoross.conductor.ai.model.AgentResult;

import com.fasterxml.jackson.databind.ObjectMapper;
import tools.jackson.databind.ObjectMapper;

/**
* Example 57 — Plan Dry Run
Expand Down
16 changes: 10 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,16 @@ subprojects {
implementation "com.google.guava:guava:${versions.guava}"
// #################################

implementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
implementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
implementation "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${versions.jackson}"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:${versions.jackson}"
implementation "com.fasterxml.jackson.module:jackson-module-afterburner:${versions.jackson}"
// Jackson 3 (tools.jackson) -- versions managed by the Jackson 3 BOM, mirroring
// the server's Spring Boot BOM resolution (conductor-oss/conductor#1573). The jdk8
// and java.time datatypes and the afterburner property-access optimisation are all
// built into core now, so those modules are gone. Annotations stay on the 2.x line
// (com.fasterxml.jackson.annotation) per JSTEP-1 -- the BOM pins the right 2.x build.
implementation platform("tools.jackson:jackson-bom:${versions.jacksonBom}")
implementation "tools.jackson.core:jackson-databind"
implementation "tools.jackson.core:jackson-core"
implementation "com.fasterxml.jackson.core:jackson-annotations"
implementation "tools.jackson.module:jackson-module-kotlin"
implementation "org.openjdk.nashorn:nashorn-core:15.6"

implementation "org.slf4j:slf4j-api:${versions.slf4j}"
Expand Down
19 changes: 8 additions & 11 deletions conductor-client-ai-spring/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
# This file is expected to be part of source control.
ch.qos.logback:logback-classic:1.5.34=runtimeClasspath
ch.qos.logback:logback-core:1.5.34=runtimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.18.11=runtimeClasspath
com.fasterxml.jackson.core:jackson-core:2.18.11=runtimeClasspath
com.fasterxml.jackson.core:jackson-databind:2.18.11=runtimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.11=runtimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.11=runtimeClasspath
com.fasterxml.jackson.module:jackson-module-afterburner:2.18.11=runtimeClasspath
com.fasterxml.jackson.module:jackson-module-kotlin:2.18.11=runtimeClasspath
com.fasterxml.jackson:jackson-bom:2.18.11=runtimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.21=runtimeClasspath
com.google.errorprone:error_prone_annotations:2.47.0=runtimeClasspath
com.google.guava:failureaccess:1.0.3=runtimeClasspath
com.google.guava:guava:33.6.0-jre=runtimeClasspath
Expand All @@ -25,11 +18,11 @@ jakarta.annotation:jakarta.annotation-api:2.1.1=runtimeClasspath
org.apache.commons:commons-lang3:3.19.0=runtimeClasspath
org.apache.logging.log4j:log4j-api:2.24.3=runtimeClasspath
org.apache.logging.log4j:log4j-to-slf4j:2.24.3=runtimeClasspath
org.jetbrains.kotlin:kotlin-reflect:1.8.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-reflect:2.1.21=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-common:2.1.21=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:1.9.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.1.21=runtimeClasspath
org.jetbrains:annotations:13.0=runtimeClasspath
org.jspecify:jspecify:1.0.0=runtimeClasspath
org.openjdk.nashorn:nashorn-core:15.6=runtimeClasspath
Expand All @@ -51,4 +44,8 @@ org.springframework:spring-core:6.2.19=runtimeClasspath
org.springframework:spring-expression:6.2.19=runtimeClasspath
org.springframework:spring-jcl:6.2.19=runtimeClasspath
org.yaml:snakeyaml:2.4=runtimeClasspath
tools.jackson.core:jackson-core:3.1.7=runtimeClasspath
tools.jackson.core:jackson-databind:3.1.7=runtimeClasspath
tools.jackson.module:jackson-module-kotlin:3.1.7=runtimeClasspath
tools.jackson:jackson-bom:3.1.7=runtimeClasspath
empty=
11 changes: 6 additions & 5 deletions conductor-client-ai/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ dependencies {
// so downstream modules and user code must see conductor-client transitively.
api project(":conductor-client")

api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
api "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${versions.jackson}"
// not injected by the root subprojects block — must stay explicit
api "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${versions.jackson}"
// Jackson 3 (tools.jackson), versions managed by the Jackson 3 BOM. Exposed as `api`
// because AgentRuntime's public surface returns types that serialize through it. The
// jsr310 and jdk8 datatypes are built into core now, so those modules are gone.
api platform("tools.jackson:jackson-bom:${versions.jacksonBom}")
api "tools.jackson.core:jackson-databind"
api "com.fasterxml.jackson.core:jackson-annotations"

// compileOnly so the SDK doesn't force LLM frameworks onto users: the framework
// bridge classes only link at runtime when the user passes a native object in —
Expand Down
19 changes: 8 additions & 11 deletions conductor-client-ai/gradle.lockfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.fasterxml.jackson.core:jackson-annotations:2.18.11=runtimeClasspath
com.fasterxml.jackson.core:jackson-core:2.18.11=runtimeClasspath
com.fasterxml.jackson.core:jackson-databind:2.18.11=runtimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.11=runtimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.11=runtimeClasspath
com.fasterxml.jackson.module:jackson-module-afterburner:2.18.11=runtimeClasspath
com.fasterxml.jackson.module:jackson-module-kotlin:2.18.11=runtimeClasspath
com.fasterxml.jackson:jackson-bom:2.18.11=runtimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.21=runtimeClasspath
com.google.errorprone:error_prone_annotations:2.47.0=runtimeClasspath
com.google.guava:failureaccess:1.0.3=runtimeClasspath
com.google.guava:guava:33.6.0-jre=runtimeClasspath
Expand All @@ -18,11 +11,11 @@ com.squareup.okhttp3:okhttp:4.12.0=runtimeClasspath
com.squareup.okio:okio-jvm:3.6.0=runtimeClasspath
com.squareup.okio:okio:3.6.0=runtimeClasspath
org.apache.commons:commons-lang3:3.19.0=runtimeClasspath
org.jetbrains.kotlin:kotlin-reflect:1.8.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-reflect:2.1.21=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-common:2.1.21=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:1.9.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.1.21=runtimeClasspath
org.jetbrains:annotations:13.0=runtimeClasspath
org.jspecify:jspecify:1.0.0=runtimeClasspath
org.openjdk.nashorn:nashorn-core:15.6=runtimeClasspath
Expand All @@ -32,4 +25,8 @@ org.ow2.asm:asm-tree:7.3.1=runtimeClasspath
org.ow2.asm:asm-util:7.3.1=runtimeClasspath
org.ow2.asm:asm:7.3.1=runtimeClasspath
org.slf4j:slf4j-api:1.7.36=runtimeClasspath
tools.jackson.core:jackson-core:3.1.7=runtimeClasspath
tools.jackson.core:jackson-databind:3.1.7=runtimeClasspath
tools.jackson.module:jackson-module-kotlin:3.1.7=runtimeClasspath
tools.jackson:jackson-bom:3.1.7=runtimeClasspath
empty=
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import org.conductoross.conductor.ai.internal.JsonMapper;

import com.fasterxml.jackson.databind.JsonNode;
import tools.jackson.databind.JsonNode;

/**
* Execute code against a Jupyter Kernel Gateway.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import org.conductoross.conductor.ai.internal.JsonMapper;

import com.fasterxml.jackson.databind.JsonNode;
import tools.jackson.databind.JsonNode;

/**
* Execute code via a remote serverless execution service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
package org.conductoross.conductor.ai.internal;

import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
Expand All @@ -35,9 +34,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import tools.jackson.core.JsonGenerator;
import tools.jackson.databind.SerializationContext;
import tools.jackson.databind.ValueSerializer;

/**
* Serializes an {@link Agent} tree to the camelCase JSON dict for POST /agent/start.
Expand Down Expand Up @@ -727,18 +726,18 @@ private Map<String, Object> generateJsonSchema(Class<?> cls) {
}

/**
* Jackson {@link JsonSerializer} that delegates to {@link AgentConfigSerializer#serialize(Agent)}.
* Jackson {@link ValueSerializer} that delegates to {@link AgentConfigSerializer#serialize(Agent)}.
* Applied via {@code @JsonSerialize(using = AgentConfigSerializer.AsJson.class)} on
* {@code Agent}-typed fields so Jackson writes the correct wire format (camelCase
* map matching the server's AgentConfig DTO) without requiring the caller to
* pre-serialize to a Map.
*/
public static final class AsJson extends JsonSerializer<Agent> {
public static final class AsJson extends ValueSerializer<Agent> {
private static final AgentConfigSerializer INSTANCE = new AgentConfigSerializer();

@Override
public void serialize(Agent agent, JsonGenerator gen, SerializerProvider provider) throws IOException {
provider.defaultSerializeValue(INSTANCE.serialize(agent), gen);
public void serialize(Agent agent, JsonGenerator gen, SerializationContext ctxt) {
ctxt.writeValue(gen, INSTANCE.serialize(agent));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@
package org.conductoross.conductor.ai.internal;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import tools.jackson.databind.DeserializationFeature;
import tools.jackson.databind.ObjectMapper;
import tools.jackson.databind.cfg.DateTimeFeature;

/**
* Singleton ObjectMapper factory with consistent configuration.
*/
public class JsonMapper {
private static final ObjectMapper INSTANCE;

static {
INSTANCE = new ObjectMapper();
INSTANCE.registerModule(new JavaTimeModule());
INSTANCE.registerModule(new Jdk8Module());
INSTANCE.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
INSTANCE.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
INSTANCE.setSerializationInclusion(JsonInclude.Include.NON_NULL);
}
// Jackson 3 mappers are immutable: all configuration goes through the builder. The jdk8 and
// java.time datatypes are built into core now, so no module registration is needed. Dates are
// written as ISO-8601 strings (WRITE_DATES_AS_TIMESTAMPS disabled -- the Jackson 3 default,
// kept explicit to preserve the behavior this mapper had on Jackson 2).
private static final ObjectMapper INSTANCE =
tools.jackson.databind.json.JsonMapper.builder()
.disable(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS)
.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
.changeDefaultPropertyInclusion(
value -> value.withValueInclusion(JsonInclude.Include.NON_NULL))
.build();

private JsonMapper() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ private static Object coerce(Object value, Class<?> targetType, Type genericType
// even when the method signature declares List<Double>.
if (List.class.isAssignableFrom(targetType)) {
try {
com.fasterxml.jackson.databind.type.TypeFactory tf =
tools.jackson.databind.type.TypeFactory tf =
JsonMapper.get().getTypeFactory();
com.fasterxml.jackson.databind.JavaType jt = (genericType != null)
tools.jackson.databind.JavaType jt = (genericType != null)
? tf.constructType(genericType)
: tf.constructCollectionType(List.class, Object.class);
return JsonMapper.get().convertValue(value, jt);
Expand Down Expand Up @@ -355,7 +355,7 @@ private static Object coerce(Object value, Class<?> targetType, Type genericType
}
// Fallback: try Jackson conversion for complex types
try {
com.fasterxml.jackson.databind.JavaType jt = (genericType != null)
tools.jackson.databind.JavaType jt = (genericType != null)
? JsonMapper.get().getTypeFactory().constructType(genericType)
: JsonMapper.get().getTypeFactory().constructType(targetType);
return JsonMapper.get().convertValue(value, jt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.conductoross.conductor.ai.enums.AgentStatus;
import org.conductoross.conductor.ai.internal.JsonMapper;

import com.fasterxml.jackson.databind.ObjectMapper;
import tools.jackson.databind.ObjectMapper;

/**
* The result of a completed agent execution.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
*/
package org.conductoross.conductor.ai.plans;

import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import tools.jackson.core.JsonGenerator;
import tools.jackson.databind.SerializationContext;
import tools.jackson.databind.ValueSerializer;

/**
* A compiled plan ready for {@code Strategy.PLAN_EXECUTE} execution.
Expand Down Expand Up @@ -114,10 +113,10 @@ public Plan build() {
* in {@code AgentRequest} writes the correct wire format without the caller
* pre-converting to a {@code Map}.
*/
public static final class AsJson extends JsonSerializer<Plan> {
public static final class AsJson extends ValueSerializer<Plan> {
@Override
public void serialize(Plan plan, JsonGenerator gen, SerializerProvider provider) throws IOException {
provider.defaultSerializeValue(plan.toJson(), gen);
public void serialize(Plan plan, JsonGenerator gen, SerializationContext ctxt) {
ctxt.writeValue(gen, plan.toJson());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;

import com.fasterxml.jackson.databind.ObjectMapper;
import okhttp3.mockwebserver.Dispatcher;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest;
import tools.jackson.databind.ObjectMapper;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import io.orkes.conductor.client.http.OrkesAgentClient;
import io.orkes.conductor.client.model.agent.AgentStatusResponse;

import com.fasterxml.jackson.databind.ObjectMapper;
import tools.jackson.databind.ObjectMapper;

import static org.junit.jupiter.api.Assertions.*;

Expand Down
18 changes: 8 additions & 10 deletions conductor-client-metrics/gradle.lockfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.fasterxml.jackson.core:jackson-annotations:2.18.11=runtimeClasspath
com.fasterxml.jackson.core:jackson-core:2.18.11=runtimeClasspath
com.fasterxml.jackson.core:jackson-databind:2.18.11=runtimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.11=runtimeClasspath
com.fasterxml.jackson.module:jackson-module-afterburner:2.18.11=runtimeClasspath
com.fasterxml.jackson.module:jackson-module-kotlin:2.18.11=runtimeClasspath
com.fasterxml.jackson:jackson-bom:2.18.11=runtimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.21=runtimeClasspath
com.google.errorprone:error_prone_annotations:2.47.0=runtimeClasspath
com.google.guava:failureaccess:1.0.3=runtimeClasspath
com.google.guava:guava:33.6.0-jre=runtimeClasspath
Expand All @@ -28,11 +22,11 @@ io.prometheus:prometheus-metrics-model:1.3.10=runtimeClasspath
io.prometheus:prometheus-metrics-tracer-common:1.3.10=runtimeClasspath
org.apache.commons:commons-lang3:3.19.0=runtimeClasspath
org.hdrhistogram:HdrHistogram:2.2.2=runtimeClasspath
org.jetbrains.kotlin:kotlin-reflect:1.8.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-reflect:2.1.21=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-common:2.1.21=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:1.9.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.1.21=runtimeClasspath
org.jetbrains:annotations:13.0=runtimeClasspath
org.jspecify:jspecify:1.0.0=runtimeClasspath
org.latencyutils:LatencyUtils:2.0.3=runtimeClasspath
Expand All @@ -43,4 +37,8 @@ org.ow2.asm:asm-tree:7.3.1=runtimeClasspath
org.ow2.asm:asm-util:7.3.1=runtimeClasspath
org.ow2.asm:asm:7.3.1=runtimeClasspath
org.slf4j:slf4j-api:1.7.36=runtimeClasspath
tools.jackson.core:jackson-core:3.1.7=runtimeClasspath
tools.jackson.core:jackson-databind:3.1.7=runtimeClasspath
tools.jackson.module:jackson-module-kotlin:3.1.7=runtimeClasspath
tools.jackson:jackson-bom:3.1.7=runtimeClasspath
empty=
Loading
Loading