@neta-art/cohub-cli 1.12.1 → 1.13.1
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/commands/spaces.js +37 -0
- package/dist/commands/tasks.js +21 -1
- package/package.json +2 -2
package/dist/commands/spaces.js
CHANGED
|
@@ -192,6 +192,7 @@ async function sendPrompt(command, words, opts) {
|
|
|
192
192
|
model: opts.model,
|
|
193
193
|
provider: opts.provider,
|
|
194
194
|
accessMode: opts.readOnly ? "read_only" : "full_access",
|
|
195
|
+
intent: opts.steer ? "steer" : undefined,
|
|
195
196
|
schedule,
|
|
196
197
|
labelRefs: opts.label?.length ? opts.label : undefined,
|
|
197
198
|
});
|
|
@@ -216,6 +217,7 @@ export function registerPrompt(program) {
|
|
|
216
217
|
.option("-m, --model <model>", "Model name")
|
|
217
218
|
.option("-p, --provider <provider>", "Provider name")
|
|
218
219
|
.option("--read-only", "Use read-only tools")
|
|
220
|
+
.option("--steer", "Interrupt the current turn and run immediately")
|
|
219
221
|
.option("--delay-ms <ms>", "Delay sending by milliseconds")
|
|
220
222
|
.option("--at <iso>", "Send once at an ISO 8601 time with timezone")
|
|
221
223
|
.option("--cron <expression>", "Repeat using a 5-field cron expression")
|
|
@@ -375,6 +377,7 @@ export function registerSpaces(program) {
|
|
|
375
377
|
.option("-m, --model <model>", "Model name")
|
|
376
378
|
.option("-p, --provider <provider>", "Provider name")
|
|
377
379
|
.option("--read-only", "Use read-only tools")
|
|
380
|
+
.option("--steer", "Interrupt the current turn and run immediately")
|
|
378
381
|
.option("--delay-ms <ms>", "Delay sending by milliseconds")
|
|
379
382
|
.option("--at <iso>", "Send once at an ISO 8601 time with timezone")
|
|
380
383
|
.option("--cron <expression>", "Repeat using a 5-field cron expression")
|
|
@@ -1064,6 +1067,40 @@ function registerTurns(sessionsCmd) {
|
|
|
1064
1067
|
handleHttp(e);
|
|
1065
1068
|
}
|
|
1066
1069
|
});
|
|
1070
|
+
turnsCmd
|
|
1071
|
+
.command("steer <sessionId> <turnId>")
|
|
1072
|
+
.description("Run a queued follow-up now")
|
|
1073
|
+
.option("--json", "Output as JSON")
|
|
1074
|
+
.action(async (sessionId, turnId, opts) => {
|
|
1075
|
+
const spaceId = resolveSpace(sessionsCmd);
|
|
1076
|
+
const client = createClient();
|
|
1077
|
+
try {
|
|
1078
|
+
const result = await client.space(spaceId).session(sessionId).steerTurn(turnId);
|
|
1079
|
+
if (jsonRequested(opts))
|
|
1080
|
+
return outJson(result);
|
|
1081
|
+
ok(`Turn steered: ${result.turn.id}`);
|
|
1082
|
+
}
|
|
1083
|
+
catch (e) {
|
|
1084
|
+
handleHttp(e);
|
|
1085
|
+
}
|
|
1086
|
+
});
|
|
1087
|
+
turnsCmd
|
|
1088
|
+
.command("cancel <sessionId> <turnId>")
|
|
1089
|
+
.description("Cancel a queued follow-up")
|
|
1090
|
+
.option("--json", "Output as JSON")
|
|
1091
|
+
.action(async (sessionId, turnId, opts) => {
|
|
1092
|
+
const spaceId = resolveSpace(sessionsCmd);
|
|
1093
|
+
const client = createClient();
|
|
1094
|
+
try {
|
|
1095
|
+
const result = await client.space(spaceId).session(sessionId).cancelTurn(turnId);
|
|
1096
|
+
if (jsonRequested(opts))
|
|
1097
|
+
return outJson(result);
|
|
1098
|
+
ok(`Turn cancelled: ${result.turn.id}`);
|
|
1099
|
+
}
|
|
1100
|
+
catch (e) {
|
|
1101
|
+
handleHttp(e);
|
|
1102
|
+
}
|
|
1103
|
+
});
|
|
1067
1104
|
turnsCmd
|
|
1068
1105
|
.command("index <sessionId>", { hidden: true })
|
|
1069
1106
|
.description("List lightweight turn index")
|
package/dist/commands/tasks.js
CHANGED
|
@@ -8,15 +8,31 @@ export function registerTasks(program) {
|
|
|
8
8
|
.description("List task runs")
|
|
9
9
|
.option("--cron-job <id>", "Filter by cron job")
|
|
10
10
|
.option("--space <id>", "Filter by space")
|
|
11
|
+
.option("--session <id>", "Filter by session")
|
|
12
|
+
.option("--type <type>", "Filter by task type")
|
|
13
|
+
.option("--status <status>", "Filter by status: active, pending, running, completed, failed")
|
|
14
|
+
.option("--limit <n>", "Page size", "50")
|
|
15
|
+
.option("--cursor <cursor>", "Page cursor")
|
|
11
16
|
.option("--json", "Output as JSON")
|
|
12
17
|
.action(async (opts) => {
|
|
13
18
|
const client = createClient();
|
|
14
19
|
try {
|
|
15
|
-
const
|
|
20
|
+
const limit = opts.limit ? Number(opts.limit) : 50;
|
|
21
|
+
if (!Number.isFinite(limit) || limit < 1)
|
|
22
|
+
throw new Error("limit must be a positive number");
|
|
23
|
+
const filters = { limit: Math.floor(limit) };
|
|
16
24
|
if (opts.cronJob)
|
|
17
25
|
filters.cronJobId = opts.cronJob;
|
|
18
26
|
if (opts.space)
|
|
19
27
|
filters.spaceId = opts.space;
|
|
28
|
+
if (opts.session)
|
|
29
|
+
filters.sessionId = opts.session;
|
|
30
|
+
if (opts.type)
|
|
31
|
+
filters.taskType = opts.type;
|
|
32
|
+
if (opts.status)
|
|
33
|
+
filters.status = opts.status;
|
|
34
|
+
if (opts.cursor)
|
|
35
|
+
filters.cursor = opts.cursor;
|
|
20
36
|
const result = await client.tasks.list(filters);
|
|
21
37
|
if (jsonRequested(opts))
|
|
22
38
|
return outJson(result);
|
|
@@ -26,8 +42,12 @@ export function registerTasks(program) {
|
|
|
26
42
|
{ key: "id", label: "ID" },
|
|
27
43
|
{ key: "taskType", label: "Type" },
|
|
28
44
|
{ key: "status", label: "Status" },
|
|
45
|
+
{ key: "sessionId", label: "Session" },
|
|
29
46
|
{ key: "createdAt", label: "Created" },
|
|
30
47
|
]);
|
|
48
|
+
if (result.pageInfo?.hasMore && result.pageInfo.nextCursor) {
|
|
49
|
+
console.log(`\n More task runs available — next cursor: ${result.pageInfo.nextCursor}`);
|
|
50
|
+
}
|
|
31
51
|
}
|
|
32
52
|
catch (e) {
|
|
33
53
|
handleHttp(e);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neta-art/cohub-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"description": "CLI for Cohub — spaces, sessions, and agent collaboration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@neta-art/generation": "^0.1.2",
|
|
17
17
|
"commander": "^14.0.3",
|
|
18
18
|
"sharp": "^0.34.5",
|
|
19
|
-
"@neta-art/cohub": "1.
|
|
19
|
+
"@neta-art/cohub": "1.23.1"
|
|
20
20
|
},
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public"
|