@otto-code/client 0.9.6 → 0.9.8
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 +8 -0
- package/dist/daemon-client.js +44 -0
- package/package.json +3 -3
package/dist/daemon-client.d.ts
CHANGED
|
@@ -1245,6 +1245,7 @@ export declare class DaemonClient {
|
|
|
1245
1245
|
requestId?: string;
|
|
1246
1246
|
timeout?: number;
|
|
1247
1247
|
}): Promise<ProviderSubagentListPayload>;
|
|
1248
|
+
controlProviderSubagent(parentAgentId: string, subagentId: string, action: "stop" | "archive", allowStopParent?: boolean): Promise<void>;
|
|
1248
1249
|
fetchProviderSubagentTimeline(parentAgentId: string, subagentId: string, options?: FetchProviderSubagentTimelineOptions): Promise<ProviderSubagentTimelinePayload>;
|
|
1249
1250
|
checkoutForgeGetCheckDetails(input: {
|
|
1250
1251
|
cwd: string;
|
|
@@ -2204,6 +2205,13 @@ export declare class DaemonClient {
|
|
|
2204
2205
|
brainModelLoad(modelId: string, requestId?: string): Promise<BrainModelLoadResponse["payload"]>;
|
|
2205
2206
|
/** Unload the resident model, leaving the brain up and serving nothing. */
|
|
2206
2207
|
brainModelUnload(requestId?: string): Promise<BrainHostStatus | null>;
|
|
2208
|
+
searchBrowserHistory(workspaceId: string, query: string): Promise<{
|
|
2209
|
+
url: string;
|
|
2210
|
+
title: string;
|
|
2211
|
+
visitedAt: string;
|
|
2212
|
+
}[]>;
|
|
2213
|
+
recordBrowserHistory(workspaceId: string, url: string, title: string): Promise<void>;
|
|
2214
|
+
clearBrowserHistory(projectId: string): Promise<void>;
|
|
2207
2215
|
getProjectIcon(projectId: string, requestId?: string): Promise<ProjectIconGetResponse["payload"]>;
|
|
2208
2216
|
/** Delete a model's files. The brain refuses while that model is loaded. */
|
|
2209
2217
|
brainModelDelete(modelId: string, requestId?: string): Promise<BrainModelDeleteResponse["payload"]>;
|
package/dist/daemon-client.js
CHANGED
|
@@ -2208,6 +2208,28 @@ export class DaemonClient {
|
|
|
2208
2208
|
}
|
|
2209
2209
|
return payload;
|
|
2210
2210
|
}
|
|
2211
|
+
async controlProviderSubagent(parentAgentId, subagentId, action, allowStopParent = false) {
|
|
2212
|
+
const requestId = this.createRequestId();
|
|
2213
|
+
const message = SessionInboundMessageSchema.parse({
|
|
2214
|
+
type: "agent.provider_subagents.control.request",
|
|
2215
|
+
requestId,
|
|
2216
|
+
parentAgentId,
|
|
2217
|
+
subagentId,
|
|
2218
|
+
action,
|
|
2219
|
+
allowStopParent,
|
|
2220
|
+
});
|
|
2221
|
+
const payload = await this.sendRequest({
|
|
2222
|
+
requestId,
|
|
2223
|
+
message,
|
|
2224
|
+
options: { skipQueue: true },
|
|
2225
|
+
select: (response) => response.type === "agent.provider_subagents.control.response" &&
|
|
2226
|
+
response.payload.requestId === requestId
|
|
2227
|
+
? response.payload
|
|
2228
|
+
: null,
|
|
2229
|
+
});
|
|
2230
|
+
if (payload.error)
|
|
2231
|
+
throw new Error(payload.error);
|
|
2232
|
+
}
|
|
2211
2233
|
async fetchProviderSubagentTimeline(parentAgentId, subagentId, options = {}) {
|
|
2212
2234
|
const requestId = this.createRequestId(options.requestId);
|
|
2213
2235
|
const message = SessionInboundMessageSchema.parse({
|
|
@@ -5439,6 +5461,28 @@ export class DaemonClient {
|
|
|
5439
5461
|
}
|
|
5440
5462
|
return payload.status;
|
|
5441
5463
|
}
|
|
5464
|
+
async searchBrowserHistory(workspaceId, query) {
|
|
5465
|
+
const result = await this.sendNamespacedCorrelatedSessionRequest({
|
|
5466
|
+
message: { type: "browser.history.search.request", workspaceId, query },
|
|
5467
|
+
});
|
|
5468
|
+
if (result.error)
|
|
5469
|
+
throw new Error(result.error);
|
|
5470
|
+
return result.entries;
|
|
5471
|
+
}
|
|
5472
|
+
async recordBrowserHistory(workspaceId, url, title) {
|
|
5473
|
+
const result = await this.sendNamespacedCorrelatedSessionRequest({
|
|
5474
|
+
message: { type: "browser.history.record.request", workspaceId, url, title },
|
|
5475
|
+
});
|
|
5476
|
+
if (result.error)
|
|
5477
|
+
throw new Error(result.error);
|
|
5478
|
+
}
|
|
5479
|
+
async clearBrowserHistory(projectId) {
|
|
5480
|
+
const result = await this.sendNamespacedCorrelatedSessionRequest({
|
|
5481
|
+
message: { type: "browser.history.clear.request", projectId },
|
|
5482
|
+
});
|
|
5483
|
+
if (result.error)
|
|
5484
|
+
throw new Error(result.error);
|
|
5485
|
+
}
|
|
5442
5486
|
async getProjectIcon(projectId, requestId) {
|
|
5443
5487
|
return this.sendNamespacedCorrelatedSessionRequest({
|
|
5444
5488
|
requestId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@otto-code/client",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
4
4
|
"description": "Otto client SDK package",
|
|
5
5
|
"license": "AGPL-3.0-or-later",
|
|
6
6
|
"files": [
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"test": "vitest run"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@otto-code/protocol": "0.9.
|
|
44
|
-
"@otto-code/relay": "0.9.
|
|
43
|
+
"@otto-code/protocol": "0.9.8",
|
|
44
|
+
"@otto-code/relay": "0.9.8",
|
|
45
45
|
"zod": "^4.4.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|