Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"cliVersion": "4.53.1",
"cliVersion": "4.54.1",
"generatorName": "fernapi/fern-java-sdk",
"generatorVersion": "4.0.9",
"generatorConfig": {
"client-class-name": "Lattice",
"package-prefix": "com.anduril"
},
"originGitCommit": "d139ec85d28b73d9598251516d91b3f51152cb46",
"sdkVersion": "5.4.0"
"originGitCommit": "31cf9b8ebaf3f1e840ff708245036a2ca58603df",
"sdkVersion": "5.5.0"
}
27 changes: 9 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Add the dependency in your `build.gradle` file:

```groovy
dependencies {
implementation 'com.anduril:lattice-sdk:5.4.0'
implementation 'com.anduril:lattice-sdk:5.5.0'
}
```

Expand All @@ -53,7 +53,7 @@ Add the dependency in your `pom.xml` file:
<dependency>
<groupId>com.anduril</groupId>
<artifactId>lattice-sdk</artifactId>
<version>5.4.0</version>
<version>5.5.0</version>
</dependency>
```

Expand All @@ -69,22 +69,13 @@ Instantiate and use the client with the following:
package com.example.usage;

import com.anduril.Lattice;
import com.anduril.resources.entities.requests.EntityEventRequest;

public class Example {
public static void main(String[] args) {
Lattice client = Lattice.withCredentials("<clientId>", "<clientSecret>")
.build()
;

client.entities().longPollEntityEvents(
EntityEventRequest
.builder()
.sessionToken("sessionToken")
.build()
);
}
}

Lattice client = Lattice
.builder()
.server("YOUR_SERVER")
.build();

client.entities().longPollEntityEvents(...);
```

## Authentication
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java {

group = 'com.anduril'

version = '5.4.0'
version = '5.5.0'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -78,7 +78,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.anduril'
artifactId = 'lattice-sdk'
version = '5.4.0'
version = '5.5.0'
from components.java
pom {
name = 'Anduril Industries, Inc.'
Expand Down
51 changes: 43 additions & 8 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -753,12 +753,11 @@ Cancels a task by marking it for cancellation in the system.
This method initiates task cancellation based on the task's current state:
- If the task has not been sent to an agent, it cancels immediately and transitions the task
to a terminal state (`STATUS_DONE_NOT_OK` with `ERROR_CODE_CANCELLED`).
- If the task has already been sent to an agent, the cancellation request is routed to the agent with a delivery status of `DELIVERY_STATUS_PENDING_CANCEL`.
The agent is responsible for determining whether cancellation is possible and updating
the task status accordingly via the `UpdateStatus` endpoint:
- If the task can be cancelled, the agent should update the task status to `STATUS_DONE_NOT_OK`.
- If the task cannot be cancelled, the agent should attach an error to the task stating why cancellation is not possible using `UpdateStatus`
or the returned task object.
- If the task has already been sent to an agent, the cancellation request is routed to the agent.
The agent is then responsible for deciding whether cancellation is possible or not:
- If the task can be cancelled, the agent must use `UpdateTaskStatus` and set the task status to `STATUS_DONE_NOT_OK`.
- If the task cannot be cancelled, the agent must use `UpdateTaskStatus` to attach a `TaskError` to the task with the error code `ERROR_CODE_REJECTED`
and a `message` explaining why the task cannot be cancelled.
</dd>
</dl>
</dd>
Expand Down Expand Up @@ -972,8 +971,8 @@ client.tasks().streamTasks(

**rateLimit:** `Optional<Integer>`

The time interval, in milliseconds, after an update for a given task before another one will be sent for the same task.
If set, value must be >= 250.
The time interval, in milliseconds, after an update for a given task before another one will be sent for the same task.
If set, value must be >= 250.

</dd>
</dl>
Expand All @@ -994,6 +993,42 @@ If unset or false, the stream will include any new tasks and task updates, as we

**taskType:** `Optional<TaskStreamRequestTaskType>` — Optional filter that only returns tasks with specific types. If not provided, all task types will be streamed.

</dd>
</dl>

<dl>
<dd>

**updateStartTime:** `Optional<String>` — If provided, returns tasks which have been updated since the given time.

</dd>
</dl>

<dl>
<dd>

**parentTaskId:** `Optional<String>`

A filter for tasks with a specific parent task ID.
Note: This filter is mutually exclusive with all other filter fields (`updateStartTime`, `assignee`, `statusFilter`, `taskType`).
Either provide `parentTaskId` or any combination of the other filters, but not both.

</dd>
</dl>

<dl>
<dd>

**assignee:** `Optional<Principal>` — A filter for tasks assigned to a specific principal.

</dd>
</dl>

<dl>
<dd>

**statusFilter:** `Optional<TaskStreamRequestStatusFilter>` — A filter for task statuses (inclusive or exclusive).

</dd>
</dl>
</dd>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/anduril/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap<String, String>() {
{
put("User-Agent", "com.anduril:lattice-sdk/5.4.0");
put("User-Agent", "com.anduril:lattice-sdk/5.5.0");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.anduril:lattice-sdk");
put("X-Fern-SDK-Version", "5.4.0");
put("X-Fern-SDK-Version", "5.5.0");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,12 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
* <ul>
* <li>If the task has not been sent to an agent, it cancels immediately and transitions the task
* to a terminal state (<code>STATUS_DONE_NOT_OK</code> with <code>ERROR_CODE_CANCELLED</code>).</li>
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent with a delivery status of <code>DELIVERY_STATUS_PENDING_CANCEL</code>.
* The agent is responsible for determining whether cancellation is possible and updating
* the task status accordingly via the <code>UpdateStatus</code> endpoint:
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent.
* The agent is then responsible for deciding whether cancellation is possible or not:
* <ul>
* <li>If the task can be cancelled, the agent should update the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent should attach an error to the task stating why cancellation is not possible using <code>UpdateStatus</code>
* or the returned task object.</li>
* <li>If the task can be cancelled, the agent must use <code>UpdateTaskStatus</code> and set the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent must use <code>UpdateTaskStatus</code> to attach a <code>TaskError</code> to the task with the error code <code>ERROR_CODE_REJECTED</code>
* and a <code>message</code> explaining why the task cannot be cancelled.</li>
* </ul>
* </li>
* </ul>
Expand All @@ -438,13 +437,12 @@ public CompletableFuture<LatticeHttpResponse<Task>> cancelTask(String taskId) {
* <ul>
* <li>If the task has not been sent to an agent, it cancels immediately and transitions the task
* to a terminal state (<code>STATUS_DONE_NOT_OK</code> with <code>ERROR_CODE_CANCELLED</code>).</li>
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent with a delivery status of <code>DELIVERY_STATUS_PENDING_CANCEL</code>.
* The agent is responsible for determining whether cancellation is possible and updating
* the task status accordingly via the <code>UpdateStatus</code> endpoint:
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent.
* The agent is then responsible for deciding whether cancellation is possible or not:
* <ul>
* <li>If the task can be cancelled, the agent should update the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent should attach an error to the task stating why cancellation is not possible using <code>UpdateStatus</code>
* or the returned task object.</li>
* <li>If the task can be cancelled, the agent must use <code>UpdateTaskStatus</code> and set the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent must use <code>UpdateTaskStatus</code> to attach a <code>TaskError</code> to the task with the error code <code>ERROR_CODE_REJECTED</code>
* and a <code>message</code> explaining why the task cannot be cancelled.</li>
* </ul>
* </li>
* </ul>
Expand All @@ -459,13 +457,12 @@ public CompletableFuture<LatticeHttpResponse<Task>> cancelTask(String taskId, Re
* <ul>
* <li>If the task has not been sent to an agent, it cancels immediately and transitions the task
* to a terminal state (<code>STATUS_DONE_NOT_OK</code> with <code>ERROR_CODE_CANCELLED</code>).</li>
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent with a delivery status of <code>DELIVERY_STATUS_PENDING_CANCEL</code>.
* The agent is responsible for determining whether cancellation is possible and updating
* the task status accordingly via the <code>UpdateStatus</code> endpoint:
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent.
* The agent is then responsible for deciding whether cancellation is possible or not:
* <ul>
* <li>If the task can be cancelled, the agent should update the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent should attach an error to the task stating why cancellation is not possible using <code>UpdateStatus</code>
* or the returned task object.</li>
* <li>If the task can be cancelled, the agent must use <code>UpdateTaskStatus</code> and set the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent must use <code>UpdateTaskStatus</code> to attach a <code>TaskError</code> to the task with the error code <code>ERROR_CODE_REJECTED</code>
* and a <code>message</code> explaining why the task cannot be cancelled.</li>
* </ul>
* </li>
* </ul>
Expand All @@ -480,13 +477,12 @@ public CompletableFuture<LatticeHttpResponse<Task>> cancelTask(String taskId, Ta
* <ul>
* <li>If the task has not been sent to an agent, it cancels immediately and transitions the task
* to a terminal state (<code>STATUS_DONE_NOT_OK</code> with <code>ERROR_CODE_CANCELLED</code>).</li>
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent with a delivery status of <code>DELIVERY_STATUS_PENDING_CANCEL</code>.
* The agent is responsible for determining whether cancellation is possible and updating
* the task status accordingly via the <code>UpdateStatus</code> endpoint:
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent.
* The agent is then responsible for deciding whether cancellation is possible or not:
* <ul>
* <li>If the task can be cancelled, the agent should update the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent should attach an error to the task stating why cancellation is not possible using <code>UpdateStatus</code>
* or the returned task object.</li>
* <li>If the task can be cancelled, the agent must use <code>UpdateTaskStatus</code> and set the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent must use <code>UpdateTaskStatus</code> to attach a <code>TaskError</code> to the task with the error code <code>ERROR_CODE_REJECTED</code>
* and a <code>message</code> explaining why the task cannot be cancelled.</li>
* </ul>
* </li>
* </ul>
Expand Down
44 changes: 20 additions & 24 deletions src/main/java/com/anduril/resources/tasks/AsyncTasksClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,12 @@ public CompletableFuture<Task> updateTaskStatus(
* <ul>
* <li>If the task has not been sent to an agent, it cancels immediately and transitions the task
* to a terminal state (<code>STATUS_DONE_NOT_OK</code> with <code>ERROR_CODE_CANCELLED</code>).</li>
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent with a delivery status of <code>DELIVERY_STATUS_PENDING_CANCEL</code>.
* The agent is responsible for determining whether cancellation is possible and updating
* the task status accordingly via the <code>UpdateStatus</code> endpoint:
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent.
* The agent is then responsible for deciding whether cancellation is possible or not:
* <ul>
* <li>If the task can be cancelled, the agent should update the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent should attach an error to the task stating why cancellation is not possible using <code>UpdateStatus</code>
* or the returned task object.</li>
* <li>If the task can be cancelled, the agent must use <code>UpdateTaskStatus</code> and set the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent must use <code>UpdateTaskStatus</code> to attach a <code>TaskError</code> to the task with the error code <code>ERROR_CODE_REJECTED</code>
* and a <code>message</code> explaining why the task cannot be cancelled.</li>
* </ul>
* </li>
* </ul>
Expand All @@ -217,13 +216,12 @@ public CompletableFuture<Task> cancelTask(String taskId) {
* <ul>
* <li>If the task has not been sent to an agent, it cancels immediately and transitions the task
* to a terminal state (<code>STATUS_DONE_NOT_OK</code> with <code>ERROR_CODE_CANCELLED</code>).</li>
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent with a delivery status of <code>DELIVERY_STATUS_PENDING_CANCEL</code>.
* The agent is responsible for determining whether cancellation is possible and updating
* the task status accordingly via the <code>UpdateStatus</code> endpoint:
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent.
* The agent is then responsible for deciding whether cancellation is possible or not:
* <ul>
* <li>If the task can be cancelled, the agent should update the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent should attach an error to the task stating why cancellation is not possible using <code>UpdateStatus</code>
* or the returned task object.</li>
* <li>If the task can be cancelled, the agent must use <code>UpdateTaskStatus</code> and set the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent must use <code>UpdateTaskStatus</code> to attach a <code>TaskError</code> to the task with the error code <code>ERROR_CODE_REJECTED</code>
* and a <code>message</code> explaining why the task cannot be cancelled.</li>
* </ul>
* </li>
* </ul>
Expand All @@ -238,13 +236,12 @@ public CompletableFuture<Task> cancelTask(String taskId, RequestOptions requestO
* <ul>
* <li>If the task has not been sent to an agent, it cancels immediately and transitions the task
* to a terminal state (<code>STATUS_DONE_NOT_OK</code> with <code>ERROR_CODE_CANCELLED</code>).</li>
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent with a delivery status of <code>DELIVERY_STATUS_PENDING_CANCEL</code>.
* The agent is responsible for determining whether cancellation is possible and updating
* the task status accordingly via the <code>UpdateStatus</code> endpoint:
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent.
* The agent is then responsible for deciding whether cancellation is possible or not:
* <ul>
* <li>If the task can be cancelled, the agent should update the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent should attach an error to the task stating why cancellation is not possible using <code>UpdateStatus</code>
* or the returned task object.</li>
* <li>If the task can be cancelled, the agent must use <code>UpdateTaskStatus</code> and set the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent must use <code>UpdateTaskStatus</code> to attach a <code>TaskError</code> to the task with the error code <code>ERROR_CODE_REJECTED</code>
* and a <code>message</code> explaining why the task cannot be cancelled.</li>
* </ul>
* </li>
* </ul>
Expand All @@ -259,13 +256,12 @@ public CompletableFuture<Task> cancelTask(String taskId, TaskCancellation reques
* <ul>
* <li>If the task has not been sent to an agent, it cancels immediately and transitions the task
* to a terminal state (<code>STATUS_DONE_NOT_OK</code> with <code>ERROR_CODE_CANCELLED</code>).</li>
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent with a delivery status of <code>DELIVERY_STATUS_PENDING_CANCEL</code>.
* The agent is responsible for determining whether cancellation is possible and updating
* the task status accordingly via the <code>UpdateStatus</code> endpoint:
* <li>If the task has already been sent to an agent, the cancellation request is routed to the agent.
* The agent is then responsible for deciding whether cancellation is possible or not:
* <ul>
* <li>If the task can be cancelled, the agent should update the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent should attach an error to the task stating why cancellation is not possible using <code>UpdateStatus</code>
* or the returned task object.</li>
* <li>If the task can be cancelled, the agent must use <code>UpdateTaskStatus</code> and set the task status to <code>STATUS_DONE_NOT_OK</code>.</li>
* <li>If the task cannot be cancelled, the agent must use <code>UpdateTaskStatus</code> to attach a <code>TaskError</code> to the task with the error code <code>ERROR_CODE_REJECTED</code>
* and a <code>message</code> explaining why the task cannot be cancelled.</li>
* </ul>
* </li>
* </ul>
Expand Down
Loading
Loading