@otto-code/client 0.9.7 → 0.9.9
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 +12 -1
- package/dist/daemon-client.js +46 -1
- 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;
|
|
@@ -2011,7 +2012,10 @@ export declare class DaemonClient {
|
|
|
2011
2012
|
* itself settles later on the `connectors.oauth.status` push, because the user
|
|
2012
2013
|
* is in a browser by then.
|
|
2013
2014
|
*/
|
|
2014
|
-
connectorsOauthAuthorize(connectorId: string, scope?: string, requestId?: string
|
|
2015
|
+
connectorsOauthAuthorize(connectorId: string, scope?: string, requestId?: string, oauthClient?: {
|
|
2016
|
+
clientId: string;
|
|
2017
|
+
clientSecret: string;
|
|
2018
|
+
}): Promise<ConnectorsOauthAuthorizeResponse["payload"]>;
|
|
2015
2019
|
/** Drop a connector's stored authorization. */
|
|
2016
2020
|
connectorsOauthDisconnect(connectorId: string, requestId?: string): Promise<ConnectorsOauthDisconnectResponse["payload"]>;
|
|
2017
2021
|
/**
|
|
@@ -2204,6 +2208,13 @@ export declare class DaemonClient {
|
|
|
2204
2208
|
brainModelLoad(modelId: string, requestId?: string): Promise<BrainModelLoadResponse["payload"]>;
|
|
2205
2209
|
/** Unload the resident model, leaving the brain up and serving nothing. */
|
|
2206
2210
|
brainModelUnload(requestId?: string): Promise<BrainHostStatus | null>;
|
|
2211
|
+
searchBrowserHistory(workspaceId: string, query: string): Promise<{
|
|
2212
|
+
url: string;
|
|
2213
|
+
title: string;
|
|
2214
|
+
visitedAt: string;
|
|
2215
|
+
}[]>;
|
|
2216
|
+
recordBrowserHistory(workspaceId: string, url: string, title: string): Promise<void>;
|
|
2217
|
+
clearBrowserHistory(projectId: string): Promise<void>;
|
|
2207
2218
|
getProjectIcon(projectId: string, requestId?: string): Promise<ProjectIconGetResponse["payload"]>;
|
|
2208
2219
|
/** Delete a model's files. The brain refuses while that model is loaded. */
|
|
2209
2220
|
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({
|
|
@@ -4838,13 +4860,14 @@ export class DaemonClient {
|
|
|
4838
4860
|
* itself settles later on the `connectors.oauth.status` push, because the user
|
|
4839
4861
|
* is in a browser by then.
|
|
4840
4862
|
*/
|
|
4841
|
-
async connectorsOauthAuthorize(connectorId, scope, requestId) {
|
|
4863
|
+
async connectorsOauthAuthorize(connectorId, scope, requestId, oauthClient) {
|
|
4842
4864
|
return this.sendCorrelatedSessionRequest({
|
|
4843
4865
|
requestId,
|
|
4844
4866
|
message: {
|
|
4845
4867
|
type: "connectors.oauth.authorize.request",
|
|
4846
4868
|
connectorId,
|
|
4847
4869
|
...(scope ? { scope } : {}),
|
|
4870
|
+
...(oauthClient ? { oauthClient } : {}),
|
|
4848
4871
|
},
|
|
4849
4872
|
responseType: "connectors.oauth.authorize.response",
|
|
4850
4873
|
});
|
|
@@ -5439,6 +5462,28 @@ export class DaemonClient {
|
|
|
5439
5462
|
}
|
|
5440
5463
|
return payload.status;
|
|
5441
5464
|
}
|
|
5465
|
+
async searchBrowserHistory(workspaceId, query) {
|
|
5466
|
+
const result = await this.sendNamespacedCorrelatedSessionRequest({
|
|
5467
|
+
message: { type: "browser.history.search.request", workspaceId, query },
|
|
5468
|
+
});
|
|
5469
|
+
if (result.error)
|
|
5470
|
+
throw new Error(result.error);
|
|
5471
|
+
return result.entries;
|
|
5472
|
+
}
|
|
5473
|
+
async recordBrowserHistory(workspaceId, url, title) {
|
|
5474
|
+
const result = await this.sendNamespacedCorrelatedSessionRequest({
|
|
5475
|
+
message: { type: "browser.history.record.request", workspaceId, url, title },
|
|
5476
|
+
});
|
|
5477
|
+
if (result.error)
|
|
5478
|
+
throw new Error(result.error);
|
|
5479
|
+
}
|
|
5480
|
+
async clearBrowserHistory(projectId) {
|
|
5481
|
+
const result = await this.sendNamespacedCorrelatedSessionRequest({
|
|
5482
|
+
message: { type: "browser.history.clear.request", projectId },
|
|
5483
|
+
});
|
|
5484
|
+
if (result.error)
|
|
5485
|
+
throw new Error(result.error);
|
|
5486
|
+
}
|
|
5442
5487
|
async getProjectIcon(projectId, requestId) {
|
|
5443
5488
|
return this.sendNamespacedCorrelatedSessionRequest({
|
|
5444
5489
|
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.9",
|
|
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.9",
|
|
44
|
+
"@otto-code/relay": "0.9.9",
|
|
45
45
|
"zod": "^4.4.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|