@hyperdrive.bot/fleet-client 0.3.108 → 0.3.110
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/daemon-client.d.ts +23 -1
- package/dist/daemon-client.js +38 -0
- package/package.json +3 -3
package/dist/daemon-client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { z } from "zod";
|
|
2
2
|
import { type ClientCapability } from "@hyperdrive.bot/fleet-protocol/client-capabilities";
|
|
3
|
-
import { AgentRefreshedStatusPayloadSchema, CheckoutRenameBranchResponseSchema, RenameTerminalResponseSchema, RestartRequestedStatusPayloadSchema, ShutdownRequestedStatusPayloadSchema, DaemonUpdateResponseSchema, type ServerInfoStatusPayload } from "@hyperdrive.bot/fleet-protocol/messages";
|
|
3
|
+
import { type AgentSnoozeState, AgentRefreshedStatusPayloadSchema, CheckoutRenameBranchResponseSchema, RenameTerminalResponseSchema, RestartRequestedStatusPayloadSchema, ShutdownRequestedStatusPayloadSchema, DaemonUpdateResponseSchema, type ServerInfoStatusPayload } from "@hyperdrive.bot/fleet-protocol/messages";
|
|
4
4
|
import type { SourceKind } from "@hyperdrive.bot/fleet-protocol/ingestion/types";
|
|
5
5
|
import type { FilterDraft, FilterPatch } from "@hyperdrive.bot/fleet-protocol/ingestion/rpc-schemas";
|
|
6
6
|
import type { ScheduleCadence } from "@hyperdrive.bot/fleet-protocol/schedule/types";
|
|
@@ -1112,6 +1112,28 @@ export declare class DaemonClient {
|
|
|
1112
1112
|
answerAgentDecision(agentId: string, decisionId: string, optionId: string | null, note: string | null, requestId?: string): Promise<{
|
|
1113
1113
|
decision: PendingDecision | null;
|
|
1114
1114
|
}>;
|
|
1115
|
+
/**
|
|
1116
|
+
* Fold sessions into one that already exists: the winner keeps its transcript,
|
|
1117
|
+
* the sources are linked both ways and then archived.
|
|
1118
|
+
*
|
|
1119
|
+
* One call rather than a client-side loop, because a half-consolidated fleet
|
|
1120
|
+
* is worse than either end state.
|
|
1121
|
+
*/
|
|
1122
|
+
consolidateAgents(winnerId: string, sourceIds: string[], requestId?: string): Promise<{
|
|
1123
|
+
archivedIds: string[];
|
|
1124
|
+
}>;
|
|
1125
|
+
/**
|
|
1126
|
+
* Snooze a session out of the triage ring until a time, or clear it with
|
|
1127
|
+
* `until: null`.
|
|
1128
|
+
*
|
|
1129
|
+
* The three fields are the whole point: a time alone is "later". `untilWhat`
|
|
1130
|
+
* names the event, `why` names what is missing. The daemon accepts a
|
|
1131
|
+
* time-only snooze, because a CLI caller making that call is still deciding;
|
|
1132
|
+
* requiring the other two is a client policy that escalates with the count.
|
|
1133
|
+
*/
|
|
1134
|
+
snoozeAgent(agentId: string, until: string | null, untilWhat?: string | null, why?: string | null, requestId?: string): Promise<{
|
|
1135
|
+
snooze: AgentSnoozeState | null;
|
|
1136
|
+
}>;
|
|
1115
1137
|
resumeAgent(handle: AgentPersistenceHandle, overrides?: Partial<AgentSessionConfig>): Promise<AgentSnapshotPayload>;
|
|
1116
1138
|
importAgent(input: ImportAgentInput): Promise<AgentSnapshotPayload>;
|
|
1117
1139
|
refreshAgent(agentId: string, requestId?: string): Promise<AgentRefreshedStatusPayload>;
|
package/dist/daemon-client.js
CHANGED
|
@@ -2092,6 +2092,44 @@ export class DaemonClient {
|
|
|
2092
2092
|
}
|
|
2093
2093
|
return { decision: payload.decision };
|
|
2094
2094
|
}
|
|
2095
|
+
/**
|
|
2096
|
+
* Fold sessions into one that already exists: the winner keeps its transcript,
|
|
2097
|
+
* the sources are linked both ways and then archived.
|
|
2098
|
+
*
|
|
2099
|
+
* One call rather than a client-side loop, because a half-consolidated fleet
|
|
2100
|
+
* is worse than either end state.
|
|
2101
|
+
*/
|
|
2102
|
+
async consolidateAgents(winnerId, sourceIds, requestId) {
|
|
2103
|
+
const payload = await this.sendCorrelatedSessionRequest({
|
|
2104
|
+
requestId,
|
|
2105
|
+
message: { type: "agent.consolidate.request", winnerId, sourceIds },
|
|
2106
|
+
responseType: "agent.consolidate.response",
|
|
2107
|
+
});
|
|
2108
|
+
if (!payload.accepted) {
|
|
2109
|
+
throw new Error(payload.error ?? "consolidateAgents rejected");
|
|
2110
|
+
}
|
|
2111
|
+
return { archivedIds: payload.archivedIds };
|
|
2112
|
+
}
|
|
2113
|
+
/**
|
|
2114
|
+
* Snooze a session out of the triage ring until a time, or clear it with
|
|
2115
|
+
* `until: null`.
|
|
2116
|
+
*
|
|
2117
|
+
* The three fields are the whole point: a time alone is "later". `untilWhat`
|
|
2118
|
+
* names the event, `why` names what is missing. The daemon accepts a
|
|
2119
|
+
* time-only snooze, because a CLI caller making that call is still deciding;
|
|
2120
|
+
* requiring the other two is a client policy that escalates with the count.
|
|
2121
|
+
*/
|
|
2122
|
+
async snoozeAgent(agentId, until, untilWhat = null, why = null, requestId) {
|
|
2123
|
+
const payload = await this.sendCorrelatedSessionRequest({
|
|
2124
|
+
requestId,
|
|
2125
|
+
message: { type: "agent.snooze.request", agentId, until, untilWhat, why },
|
|
2126
|
+
responseType: "agent.snooze.response",
|
|
2127
|
+
});
|
|
2128
|
+
if (!payload.accepted) {
|
|
2129
|
+
throw new Error(payload.error ?? "snoozeAgent rejected");
|
|
2130
|
+
}
|
|
2131
|
+
return { snooze: payload.snooze };
|
|
2132
|
+
}
|
|
2095
2133
|
async resumeAgent(handle, overrides) {
|
|
2096
2134
|
const requestId = this.createRequestId();
|
|
2097
2135
|
const message = SessionInboundMessageSchema.parse({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperdrive.bot/fleet-client",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.110",
|
|
4
4
|
"description": "Paseo client SDK package",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"test": "vitest run"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@hyperdrive.bot/fleet-protocol": "0.3.
|
|
40
|
-
"@hyperdrive.bot/fleet-relay": "0.3.
|
|
39
|
+
"@hyperdrive.bot/fleet-protocol": "0.3.110",
|
|
40
|
+
"@hyperdrive.bot/fleet-relay": "0.3.110",
|
|
41
41
|
"zod": "^4.4.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|