@autohq/cli 0.1.239 → 0.1.241
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.
- package/dist/agent-bridge.js +2 -1
- package/dist/index.js +27 -4
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -23340,7 +23340,7 @@ Object.assign(lookup, {
|
|
|
23340
23340
|
// package.json
|
|
23341
23341
|
var package_default = {
|
|
23342
23342
|
name: "@autohq/cli",
|
|
23343
|
-
version: "0.1.
|
|
23343
|
+
version: "0.1.241",
|
|
23344
23344
|
license: "SEE LICENSE IN README.md",
|
|
23345
23345
|
publishConfig: {
|
|
23346
23346
|
access: "public"
|
|
@@ -27097,6 +27097,7 @@ var SessionRecordSchema = external_exports.object({
|
|
|
27097
27097
|
input: JsonValueSchema2,
|
|
27098
27098
|
createdAt: external_exports.string().datetime(),
|
|
27099
27099
|
updatedAt: external_exports.string().datetime(),
|
|
27100
|
+
lastActivityAt: external_exports.string().datetime(),
|
|
27100
27101
|
startedAt: external_exports.string().datetime().nullable(),
|
|
27101
27102
|
finishedAt: external_exports.string().datetime().nullable(),
|
|
27102
27103
|
archivedAt: external_exports.string().datetime().nullable(),
|
package/dist/index.js
CHANGED
|
@@ -18869,6 +18869,7 @@ var init_sessions = __esm({
|
|
|
18869
18869
|
input: JsonValueSchema,
|
|
18870
18870
|
createdAt: external_exports.string().datetime(),
|
|
18871
18871
|
updatedAt: external_exports.string().datetime(),
|
|
18872
|
+
lastActivityAt: external_exports.string().datetime(),
|
|
18872
18873
|
startedAt: external_exports.string().datetime().nullable(),
|
|
18873
18874
|
finishedAt: external_exports.string().datetime().nullable(),
|
|
18874
18875
|
archivedAt: external_exports.string().datetime().nullable(),
|
|
@@ -21834,20 +21835,40 @@ function secretPath(organizationId, projectId, name) {
|
|
|
21834
21835
|
}
|
|
21835
21836
|
function runListSearchParams(options) {
|
|
21836
21837
|
const searchParams = [];
|
|
21837
|
-
if (options.
|
|
21838
|
+
if (options.archived) {
|
|
21839
|
+
searchParams.push(["archived", options.archived]);
|
|
21840
|
+
} else if (options.includeArchived) {
|
|
21838
21841
|
searchParams.push(["include_archived", "true"]);
|
|
21839
21842
|
}
|
|
21843
|
+
for (const agentName of options.agentNames ?? []) {
|
|
21844
|
+
searchParams.push(["agent", agentName]);
|
|
21845
|
+
}
|
|
21840
21846
|
for (const status of options.statuses ?? []) {
|
|
21841
21847
|
searchParams.push(["status", status]);
|
|
21842
21848
|
}
|
|
21843
21849
|
if (options.since) {
|
|
21844
21850
|
searchParams.push(["created_after", options.since]);
|
|
21845
21851
|
}
|
|
21852
|
+
if (options.createdBefore) {
|
|
21853
|
+
searchParams.push(["created_before", options.createdBefore]);
|
|
21854
|
+
}
|
|
21855
|
+
if (options.orderBy) {
|
|
21856
|
+
searchParams.push(["order_by", listRunsOrderByParam(options.orderBy)]);
|
|
21857
|
+
}
|
|
21846
21858
|
if (options.limit !== void 0) {
|
|
21847
21859
|
searchParams.push(["limit", String(options.limit)]);
|
|
21848
21860
|
}
|
|
21849
21861
|
return searchParams;
|
|
21850
21862
|
}
|
|
21863
|
+
function listRunsOrderByParam(orderBy) {
|
|
21864
|
+
if (orderBy === "updatedAt") {
|
|
21865
|
+
return "updated_at";
|
|
21866
|
+
}
|
|
21867
|
+
if (orderBy === "duration") {
|
|
21868
|
+
return "duration";
|
|
21869
|
+
}
|
|
21870
|
+
return "created_at";
|
|
21871
|
+
}
|
|
21851
21872
|
var init_client = __esm({
|
|
21852
21873
|
"src/lib/api/client.ts"() {
|
|
21853
21874
|
"use strict";
|
|
@@ -22390,7 +22411,7 @@ var init_package = __esm({
|
|
|
22390
22411
|
"package.json"() {
|
|
22391
22412
|
package_default = {
|
|
22392
22413
|
name: "@autohq/cli",
|
|
22393
|
-
version: "0.1.
|
|
22414
|
+
version: "0.1.241",
|
|
22394
22415
|
license: "SEE LICENSE IN README.md",
|
|
22395
22416
|
publishConfig: {
|
|
22396
22417
|
access: "public"
|
|
@@ -28162,7 +28183,9 @@ function agentSessionsQueryOptions(client, agentName, apiUrl, includeArchived =
|
|
|
28162
28183
|
queryFn: async () => {
|
|
28163
28184
|
const res = await client.listAgentSessions(agentName ?? "", {
|
|
28164
28185
|
apiBaseUrl: apiUrl,
|
|
28186
|
+
archived: includeArchived ? "archived" : "active",
|
|
28165
28187
|
includeArchived,
|
|
28188
|
+
orderBy: "updatedAt",
|
|
28166
28189
|
// The session-list routes default to 50; ask for the server max so the
|
|
28167
28190
|
// TUI keeps showing deep history.
|
|
28168
28191
|
limit: TUI_SESSION_LIST_LIMIT
|
|
@@ -28179,7 +28202,9 @@ function sessionsQueryOptions(client, apiUrl, includeArchived = false) {
|
|
|
28179
28202
|
queryFn: async () => {
|
|
28180
28203
|
const res = await client.listSessions({
|
|
28181
28204
|
apiBaseUrl: apiUrl,
|
|
28205
|
+
archived: includeArchived ? "archived" : "active",
|
|
28182
28206
|
includeArchived,
|
|
28207
|
+
orderBy: "updatedAt",
|
|
28183
28208
|
limit: TUI_SESSION_LIST_LIMIT
|
|
28184
28209
|
});
|
|
28185
28210
|
return res.sessions;
|
|
@@ -28545,8 +28570,6 @@ function errorMessage4(session) {
|
|
|
28545
28570
|
function sessionsForArchiveMode(sessions, showArchived) {
|
|
28546
28571
|
return sessions.filter(
|
|
28547
28572
|
(session) => showArchived ? Boolean(session.archivedAt) : !session.archivedAt
|
|
28548
|
-
).slice().sort(
|
|
28549
|
-
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
|
|
28550
28573
|
);
|
|
28551
28574
|
}
|
|
28552
28575
|
var COL_SELECTED, COL_ID, COL_STATUS2, COL_AGENT, COL_TRIGGER, COL_STARTED, COL_DURATION, ROW_GAP_COUNT2, EMPTY_SELECTED_RUN_IDS, CHROME_ROWS;
|