@anduril-industries/lattice-sdk 4.4.1 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@anduril-industries/lattice-sdk",
46
- "X-Fern-SDK-Version": "4.4.1",
47
- "User-Agent": "@anduril-industries/lattice-sdk/4.4.1",
46
+ "X-Fern-SDK-Version": "4.5.0",
47
+ "User-Agent": "@anduril-industries/lattice-sdk/4.5.0",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -93,12 +93,11 @@ export declare class TasksClient {
93
93
  * This method initiates task cancellation based on the task's current state:
94
94
  * - If the task has not been sent to an agent, it cancels immediately and transitions the task
95
95
  * to a terminal state (`STATUS_DONE_NOT_OK` with `ERROR_CODE_CANCELLED`).
96
- * - 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`.
97
- * The agent is responsible for determining whether cancellation is possible and updating
98
- * the task status accordingly via the `UpdateStatus` endpoint:
99
- * - If the task can be cancelled, the agent should update the task status to `STATUS_DONE_NOT_OK`.
100
- * - If the task cannot be cancelled, the agent should attach an error to the task stating why cancellation is not possible using `UpdateStatus`
101
- * or the returned task object.
96
+ * - If the task has already been sent to an agent, the cancellation request is routed to the agent.
97
+ * The agent is then responsible for deciding whether cancellation is possible or not:
98
+ * - If the task can be cancelled, the agent must use `UpdateTaskStatus` and set the task status to `STATUS_DONE_NOT_OK`.
99
+ * - 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`
100
+ * and a `message` explaining why the task cannot be cancelled.
102
101
  *
103
102
  * @param {Lattice.TaskCancellation} request
104
103
  * @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -272,12 +272,11 @@ class TasksClient {
272
272
  * This method initiates task cancellation based on the task's current state:
273
273
  * - If the task has not been sent to an agent, it cancels immediately and transitions the task
274
274
  * to a terminal state (`STATUS_DONE_NOT_OK` with `ERROR_CODE_CANCELLED`).
275
- * - 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`.
276
- * The agent is responsible for determining whether cancellation is possible and updating
277
- * the task status accordingly via the `UpdateStatus` endpoint:
278
- * - If the task can be cancelled, the agent should update the task status to `STATUS_DONE_NOT_OK`.
279
- * - If the task cannot be cancelled, the agent should attach an error to the task stating why cancellation is not possible using `UpdateStatus`
280
- * or the returned task object.
275
+ * - If the task has already been sent to an agent, the cancellation request is routed to the agent.
276
+ * The agent is then responsible for deciding whether cancellation is possible or not:
277
+ * - If the task can be cancelled, the agent must use `UpdateTaskStatus` and set the task status to `STATUS_DONE_NOT_OK`.
278
+ * - 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`
279
+ * and a `message` explaining why the task cannot be cancelled.
281
280
  *
282
281
  * @param {Lattice.TaskCancellation} request
283
282
  * @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1,3 +1,4 @@
1
+ import type * as Lattice from "../../../../index.js";
1
2
  /**
2
3
  * @example
3
4
  * {}
@@ -17,6 +18,18 @@ export interface TaskStreamRequest {
17
18
  excludePreexistingTasks?: boolean;
18
19
  /** Optional filter that only returns tasks with specific types. If not provided, all task types will be streamed. */
19
20
  taskType?: TaskStreamRequest.TaskType;
21
+ /** If provided, returns tasks which have been updated since the given time. */
22
+ updateStartTime?: Lattice.Timestamp;
23
+ /**
24
+ * A filter for tasks with a specific parent task ID.
25
+ * Note: This filter is mutually exclusive with all other filter fields (`updateStartTime`, `assignee`, `statusFilter`, `taskType`).
26
+ * Either provide `parentTaskId` or any combination of the other filters, but not both.
27
+ */
28
+ parentTaskId?: string;
29
+ /** A filter for tasks assigned to a specific principal. */
30
+ assignee?: Lattice.Principal;
31
+ /** A filter for task statuses (inclusive or exclusive). */
32
+ statusFilter?: TaskStreamRequest.StatusFilter;
20
33
  }
21
34
  export declare namespace TaskStreamRequest {
22
35
  /**
@@ -27,4 +40,43 @@ export declare namespace TaskStreamRequest {
27
40
  } | {
28
41
  taskTypePrefix: string;
29
42
  };
43
+ /**
44
+ * A filter for task statuses (inclusive or exclusive).
45
+ */
46
+ interface StatusFilter {
47
+ /** The statuses to filter by. */
48
+ statuses?: StatusFilter.Statuses.Item[] | undefined;
49
+ /** The type of filter to apply. */
50
+ filterType?: StatusFilter.FilterType | undefined;
51
+ }
52
+ namespace StatusFilter {
53
+ type Statuses = Statuses.Item[];
54
+ namespace Statuses {
55
+ const Item: {
56
+ readonly StatusInvalid: "STATUS_INVALID";
57
+ readonly StatusCreated: "STATUS_CREATED";
58
+ readonly StatusScheduledInManager: "STATUS_SCHEDULED_IN_MANAGER";
59
+ readonly StatusSent: "STATUS_SENT";
60
+ readonly StatusMachineReceipt: "STATUS_MACHINE_RECEIPT";
61
+ readonly StatusAck: "STATUS_ACK";
62
+ readonly StatusWilco: "STATUS_WILCO";
63
+ readonly StatusExecuting: "STATUS_EXECUTING";
64
+ readonly StatusWaitingForUpdate: "STATUS_WAITING_FOR_UPDATE";
65
+ readonly StatusDoneOk: "STATUS_DONE_OK";
66
+ readonly StatusDoneNotOk: "STATUS_DONE_NOT_OK";
67
+ readonly StatusReplaced: "STATUS_REPLACED";
68
+ readonly StatusCancelRequested: "STATUS_CANCEL_REQUESTED";
69
+ readonly StatusCompleteRequested: "STATUS_COMPLETE_REQUESTED";
70
+ readonly StatusVersionRejected: "STATUS_VERSION_REJECTED";
71
+ };
72
+ type Item = (typeof Item)[keyof typeof Item];
73
+ }
74
+ /** The type of filter to apply. */
75
+ const FilterType: {
76
+ readonly FilterTypeInvalid: "FILTER_TYPE_INVALID";
77
+ readonly FilterTypeInclusive: "FILTER_TYPE_INCLUSIVE";
78
+ readonly FilterTypeExclusive: "FILTER_TYPE_EXCLUSIVE";
79
+ };
80
+ type FilterType = (typeof FilterType)[keyof typeof FilterType];
81
+ }
30
82
  }
@@ -1,3 +1,36 @@
1
1
  "use strict";
2
2
  // This file was auto-generated from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TaskStreamRequest = void 0;
5
+ var TaskStreamRequest;
6
+ (function (TaskStreamRequest) {
7
+ let StatusFilter;
8
+ (function (StatusFilter) {
9
+ let Statuses;
10
+ (function (Statuses) {
11
+ Statuses.Item = {
12
+ StatusInvalid: "STATUS_INVALID",
13
+ StatusCreated: "STATUS_CREATED",
14
+ StatusScheduledInManager: "STATUS_SCHEDULED_IN_MANAGER",
15
+ StatusSent: "STATUS_SENT",
16
+ StatusMachineReceipt: "STATUS_MACHINE_RECEIPT",
17
+ StatusAck: "STATUS_ACK",
18
+ StatusWilco: "STATUS_WILCO",
19
+ StatusExecuting: "STATUS_EXECUTING",
20
+ StatusWaitingForUpdate: "STATUS_WAITING_FOR_UPDATE",
21
+ StatusDoneOk: "STATUS_DONE_OK",
22
+ StatusDoneNotOk: "STATUS_DONE_NOT_OK",
23
+ StatusReplaced: "STATUS_REPLACED",
24
+ StatusCancelRequested: "STATUS_CANCEL_REQUESTED",
25
+ StatusCompleteRequested: "STATUS_COMPLETE_REQUESTED",
26
+ StatusVersionRejected: "STATUS_VERSION_REJECTED",
27
+ };
28
+ })(Statuses = StatusFilter.Statuses || (StatusFilter.Statuses = {}));
29
+ /** The type of filter to apply. */
30
+ StatusFilter.FilterType = {
31
+ FilterTypeInvalid: "FILTER_TYPE_INVALID",
32
+ FilterTypeInclusive: "FILTER_TYPE_INCLUSIVE",
33
+ FilterTypeExclusive: "FILTER_TYPE_EXCLUSIVE",
34
+ };
35
+ })(StatusFilter = TaskStreamRequest.StatusFilter || (TaskStreamRequest.StatusFilter = {}));
36
+ })(TaskStreamRequest || (exports.TaskStreamRequest = TaskStreamRequest = {}));
@@ -5,4 +5,4 @@ export type { TaskCancellation } from "./TaskCancellation.js";
5
5
  export type { TaskCreation } from "./TaskCreation.js";
6
6
  export { TaskQuery } from "./TaskQuery.js";
7
7
  export type { TaskStatusUpdate } from "./TaskStatusUpdate.js";
8
- export type { TaskStreamRequest } from "./TaskStreamRequest.js";
8
+ export { TaskStreamRequest } from "./TaskStreamRequest.js";
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TaskQuery = void 0;
3
+ exports.TaskStreamRequest = exports.TaskQuery = void 0;
4
4
  var TaskQuery_js_1 = require("./TaskQuery.js");
5
5
  Object.defineProperty(exports, "TaskQuery", { enumerable: true, get: function () { return TaskQuery_js_1.TaskQuery; } });
6
+ var TaskStreamRequest_js_1 = require("./TaskStreamRequest.js");
7
+ Object.defineProperty(exports, "TaskStreamRequest", { enumerable: true, get: function () { return TaskStreamRequest_js_1.TaskStreamRequest; } });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.4.1";
1
+ export declare const SDK_VERSION = "4.5.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "4.4.1";
4
+ exports.SDK_VERSION = "4.5.0";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@anduril-industries/lattice-sdk",
9
- "X-Fern-SDK-Version": "4.4.1",
10
- "User-Agent": "@anduril-industries/lattice-sdk/4.4.1",
9
+ "X-Fern-SDK-Version": "4.5.0",
10
+ "User-Agent": "@anduril-industries/lattice-sdk/4.5.0",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -93,12 +93,11 @@ export declare class TasksClient {
93
93
  * This method initiates task cancellation based on the task's current state:
94
94
  * - If the task has not been sent to an agent, it cancels immediately and transitions the task
95
95
  * to a terminal state (`STATUS_DONE_NOT_OK` with `ERROR_CODE_CANCELLED`).
96
- * - 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`.
97
- * The agent is responsible for determining whether cancellation is possible and updating
98
- * the task status accordingly via the `UpdateStatus` endpoint:
99
- * - If the task can be cancelled, the agent should update the task status to `STATUS_DONE_NOT_OK`.
100
- * - If the task cannot be cancelled, the agent should attach an error to the task stating why cancellation is not possible using `UpdateStatus`
101
- * or the returned task object.
96
+ * - If the task has already been sent to an agent, the cancellation request is routed to the agent.
97
+ * The agent is then responsible for deciding whether cancellation is possible or not:
98
+ * - If the task can be cancelled, the agent must use `UpdateTaskStatus` and set the task status to `STATUS_DONE_NOT_OK`.
99
+ * - 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`
100
+ * and a `message` explaining why the task cannot be cancelled.
102
101
  *
103
102
  * @param {Lattice.TaskCancellation} request
104
103
  * @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -236,12 +236,11 @@ export class TasksClient {
236
236
  * This method initiates task cancellation based on the task's current state:
237
237
  * - If the task has not been sent to an agent, it cancels immediately and transitions the task
238
238
  * to a terminal state (`STATUS_DONE_NOT_OK` with `ERROR_CODE_CANCELLED`).
239
- * - 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`.
240
- * The agent is responsible for determining whether cancellation is possible and updating
241
- * the task status accordingly via the `UpdateStatus` endpoint:
242
- * - If the task can be cancelled, the agent should update the task status to `STATUS_DONE_NOT_OK`.
243
- * - If the task cannot be cancelled, the agent should attach an error to the task stating why cancellation is not possible using `UpdateStatus`
244
- * or the returned task object.
239
+ * - If the task has already been sent to an agent, the cancellation request is routed to the agent.
240
+ * The agent is then responsible for deciding whether cancellation is possible or not:
241
+ * - If the task can be cancelled, the agent must use `UpdateTaskStatus` and set the task status to `STATUS_DONE_NOT_OK`.
242
+ * - 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`
243
+ * and a `message` explaining why the task cannot be cancelled.
245
244
  *
246
245
  * @param {Lattice.TaskCancellation} request
247
246
  * @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1,3 +1,4 @@
1
+ import type * as Lattice from "../../../../index.mjs";
1
2
  /**
2
3
  * @example
3
4
  * {}
@@ -17,6 +18,18 @@ export interface TaskStreamRequest {
17
18
  excludePreexistingTasks?: boolean;
18
19
  /** Optional filter that only returns tasks with specific types. If not provided, all task types will be streamed. */
19
20
  taskType?: TaskStreamRequest.TaskType;
21
+ /** If provided, returns tasks which have been updated since the given time. */
22
+ updateStartTime?: Lattice.Timestamp;
23
+ /**
24
+ * A filter for tasks with a specific parent task ID.
25
+ * Note: This filter is mutually exclusive with all other filter fields (`updateStartTime`, `assignee`, `statusFilter`, `taskType`).
26
+ * Either provide `parentTaskId` or any combination of the other filters, but not both.
27
+ */
28
+ parentTaskId?: string;
29
+ /** A filter for tasks assigned to a specific principal. */
30
+ assignee?: Lattice.Principal;
31
+ /** A filter for task statuses (inclusive or exclusive). */
32
+ statusFilter?: TaskStreamRequest.StatusFilter;
20
33
  }
21
34
  export declare namespace TaskStreamRequest {
22
35
  /**
@@ -27,4 +40,43 @@ export declare namespace TaskStreamRequest {
27
40
  } | {
28
41
  taskTypePrefix: string;
29
42
  };
43
+ /**
44
+ * A filter for task statuses (inclusive or exclusive).
45
+ */
46
+ interface StatusFilter {
47
+ /** The statuses to filter by. */
48
+ statuses?: StatusFilter.Statuses.Item[] | undefined;
49
+ /** The type of filter to apply. */
50
+ filterType?: StatusFilter.FilterType | undefined;
51
+ }
52
+ namespace StatusFilter {
53
+ type Statuses = Statuses.Item[];
54
+ namespace Statuses {
55
+ const Item: {
56
+ readonly StatusInvalid: "STATUS_INVALID";
57
+ readonly StatusCreated: "STATUS_CREATED";
58
+ readonly StatusScheduledInManager: "STATUS_SCHEDULED_IN_MANAGER";
59
+ readonly StatusSent: "STATUS_SENT";
60
+ readonly StatusMachineReceipt: "STATUS_MACHINE_RECEIPT";
61
+ readonly StatusAck: "STATUS_ACK";
62
+ readonly StatusWilco: "STATUS_WILCO";
63
+ readonly StatusExecuting: "STATUS_EXECUTING";
64
+ readonly StatusWaitingForUpdate: "STATUS_WAITING_FOR_UPDATE";
65
+ readonly StatusDoneOk: "STATUS_DONE_OK";
66
+ readonly StatusDoneNotOk: "STATUS_DONE_NOT_OK";
67
+ readonly StatusReplaced: "STATUS_REPLACED";
68
+ readonly StatusCancelRequested: "STATUS_CANCEL_REQUESTED";
69
+ readonly StatusCompleteRequested: "STATUS_COMPLETE_REQUESTED";
70
+ readonly StatusVersionRejected: "STATUS_VERSION_REJECTED";
71
+ };
72
+ type Item = (typeof Item)[keyof typeof Item];
73
+ }
74
+ /** The type of filter to apply. */
75
+ const FilterType: {
76
+ readonly FilterTypeInvalid: "FILTER_TYPE_INVALID";
77
+ readonly FilterTypeInclusive: "FILTER_TYPE_INCLUSIVE";
78
+ readonly FilterTypeExclusive: "FILTER_TYPE_EXCLUSIVE";
79
+ };
80
+ type FilterType = (typeof FilterType)[keyof typeof FilterType];
81
+ }
30
82
  }
@@ -1,2 +1,33 @@
1
1
  // This file was auto-generated from our API Definition.
2
- export {};
2
+ export var TaskStreamRequest;
3
+ (function (TaskStreamRequest) {
4
+ let StatusFilter;
5
+ (function (StatusFilter) {
6
+ let Statuses;
7
+ (function (Statuses) {
8
+ Statuses.Item = {
9
+ StatusInvalid: "STATUS_INVALID",
10
+ StatusCreated: "STATUS_CREATED",
11
+ StatusScheduledInManager: "STATUS_SCHEDULED_IN_MANAGER",
12
+ StatusSent: "STATUS_SENT",
13
+ StatusMachineReceipt: "STATUS_MACHINE_RECEIPT",
14
+ StatusAck: "STATUS_ACK",
15
+ StatusWilco: "STATUS_WILCO",
16
+ StatusExecuting: "STATUS_EXECUTING",
17
+ StatusWaitingForUpdate: "STATUS_WAITING_FOR_UPDATE",
18
+ StatusDoneOk: "STATUS_DONE_OK",
19
+ StatusDoneNotOk: "STATUS_DONE_NOT_OK",
20
+ StatusReplaced: "STATUS_REPLACED",
21
+ StatusCancelRequested: "STATUS_CANCEL_REQUESTED",
22
+ StatusCompleteRequested: "STATUS_COMPLETE_REQUESTED",
23
+ StatusVersionRejected: "STATUS_VERSION_REJECTED",
24
+ };
25
+ })(Statuses = StatusFilter.Statuses || (StatusFilter.Statuses = {}));
26
+ /** The type of filter to apply. */
27
+ StatusFilter.FilterType = {
28
+ FilterTypeInvalid: "FILTER_TYPE_INVALID",
29
+ FilterTypeInclusive: "FILTER_TYPE_INCLUSIVE",
30
+ FilterTypeExclusive: "FILTER_TYPE_EXCLUSIVE",
31
+ };
32
+ })(StatusFilter = TaskStreamRequest.StatusFilter || (TaskStreamRequest.StatusFilter = {}));
33
+ })(TaskStreamRequest || (TaskStreamRequest = {}));
@@ -5,4 +5,4 @@ export type { TaskCancellation } from "./TaskCancellation.mjs";
5
5
  export type { TaskCreation } from "./TaskCreation.mjs";
6
6
  export { TaskQuery } from "./TaskQuery.mjs";
7
7
  export type { TaskStatusUpdate } from "./TaskStatusUpdate.mjs";
8
- export type { TaskStreamRequest } from "./TaskStreamRequest.mjs";
8
+ export { TaskStreamRequest } from "./TaskStreamRequest.mjs";
@@ -1 +1,2 @@
1
1
  export { TaskQuery } from "./TaskQuery.mjs";
2
+ export { TaskStreamRequest } from "./TaskStreamRequest.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.4.1";
1
+ export declare const SDK_VERSION = "4.5.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "4.4.1";
1
+ export const SDK_VERSION = "4.5.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anduril-industries/lattice-sdk",
3
- "version": "4.4.1",
3
+ "version": "4.5.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -650,12 +650,11 @@ Cancels a task by marking it for cancellation in the system.
650
650
  This method initiates task cancellation based on the task's current state:
651
651
  - If the task has not been sent to an agent, it cancels immediately and transitions the task
652
652
  to a terminal state (`STATUS_DONE_NOT_OK` with `ERROR_CODE_CANCELLED`).
653
- - 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`.
654
- The agent is responsible for determining whether cancellation is possible and updating
655
- the task status accordingly via the `UpdateStatus` endpoint:
656
- - If the task can be cancelled, the agent should update the task status to `STATUS_DONE_NOT_OK`.
657
- - If the task cannot be cancelled, the agent should attach an error to the task stating why cancellation is not possible using `UpdateStatus`
658
- or the returned task object.
653
+ - If the task has already been sent to an agent, the cancellation request is routed to the agent.
654
+ The agent is then responsible for deciding whether cancellation is possible or not:
655
+ - If the task can be cancelled, the agent must use `UpdateTaskStatus` and set the task status to `STATUS_DONE_NOT_OK`.
656
+ - 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`
657
+ and a `message` explaining why the task cannot be cancelled.
659
658
  </dd>
660
659
  </dl>
661
660
  </dd>