@otto-code/client 0.8.7 → 0.8.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 +10 -3
- package/dist/daemon-client.js +31 -5
- package/package.json +3 -3
package/dist/daemon-client.d.ts
CHANGED
|
@@ -1602,7 +1602,7 @@ export declare class DaemonClient {
|
|
|
1602
1602
|
createProjectKnowledge(input: {
|
|
1603
1603
|
workspaceId: string;
|
|
1604
1604
|
id?: string;
|
|
1605
|
-
kind: "decision" | "constraint" | "requirement" | "architecture" | "project" | "reference";
|
|
1605
|
+
kind: "decision" | "constraint" | "requirement" | "architecture" | "finding" | "project" | "reference";
|
|
1606
1606
|
title: string;
|
|
1607
1607
|
statement: string;
|
|
1608
1608
|
evidence?: string;
|
|
@@ -1786,11 +1786,12 @@ export declare class DaemonClient {
|
|
|
1786
1786
|
brainModelsScan(requestId?: string): Promise<BrainInstalledModel[]>;
|
|
1787
1787
|
brainCatalogList(requestId?: string): Promise<BrainCatalogModel[]>;
|
|
1788
1788
|
brainRuntimeList(requestId?: string): Promise<BrainRuntime[]>;
|
|
1789
|
-
brainModelsPull(model: string,
|
|
1789
|
+
brainModelsPull(model: string, componentsOrRequestId?: string[] | string, quantOrRequestId?: string): Promise<BrainJob>;
|
|
1790
1790
|
brainHfSearch(query: string, limit?: number | null, requestId?: string): Promise<BrainHfSearchResult[]>;
|
|
1791
1791
|
brainHfQuants(repo: string, requestId?: string): Promise<BrainRepoQuant[]>;
|
|
1792
|
-
brainModelsAdd(repo: string, quant: string, requestId?: string): Promise<BrainJob>;
|
|
1792
|
+
brainModelsAdd(repo: string, quant: string, components?: string[], requestId?: string): Promise<BrainJob>;
|
|
1793
1793
|
brainRuntimeInstall(build?: string | null, requestId?: string): Promise<BrainJob>;
|
|
1794
|
+
brainRuntimeRemove(name: string, requestId?: string): Promise<BrainJob>;
|
|
1794
1795
|
brainCalibrate(model: string, requestId?: string): Promise<BrainJob>;
|
|
1795
1796
|
brainSweep(model: string, requestId?: string): Promise<BrainJob>;
|
|
1796
1797
|
brainBench(model?: string | null, requestId?: string): Promise<BrainJob>;
|
|
@@ -1828,6 +1829,12 @@ export declare class DaemonClient {
|
|
|
1828
1829
|
brainModelUnload(requestId?: string): Promise<BrainHostStatus | null>;
|
|
1829
1830
|
/** Delete a model's files. The brain refuses while that model is loaded. */
|
|
1830
1831
|
brainModelDelete(modelId: string, requestId?: string): Promise<BrainModelDeleteResponse["payload"]>;
|
|
1832
|
+
brainModelComponentDelete(modelId: string, componentId: string, requestId?: string): Promise<{
|
|
1833
|
+
deleted: string[];
|
|
1834
|
+
freedBytes: number;
|
|
1835
|
+
error: string | null;
|
|
1836
|
+
requestId: string;
|
|
1837
|
+
}>;
|
|
1831
1838
|
/**
|
|
1832
1839
|
* Rename a model's display name. The brain rejects a collision with
|
|
1833
1840
|
* another model's current id/displayName.
|
package/dist/daemon-client.js
CHANGED
|
@@ -4600,10 +4600,18 @@ export class DaemonClient {
|
|
|
4600
4600
|
}
|
|
4601
4601
|
return payload.runtimes;
|
|
4602
4602
|
}
|
|
4603
|
-
async brainModelsPull(model,
|
|
4603
|
+
async brainModelsPull(model, componentsOrRequestId, quantOrRequestId) {
|
|
4604
|
+
const components = Array.isArray(componentsOrRequestId) ? componentsOrRequestId : undefined;
|
|
4605
|
+
const quant = Array.isArray(componentsOrRequestId) ? quantOrRequestId : undefined;
|
|
4606
|
+
const correlationId = typeof componentsOrRequestId === "string" ? componentsOrRequestId : undefined;
|
|
4604
4607
|
const payload = await this.sendCorrelatedSessionRequest({
|
|
4605
|
-
requestId,
|
|
4606
|
-
message: {
|
|
4608
|
+
requestId: correlationId,
|
|
4609
|
+
message: {
|
|
4610
|
+
type: "brain.models.pull.request",
|
|
4611
|
+
model,
|
|
4612
|
+
...(components ? { components } : {}),
|
|
4613
|
+
...(quant ? { quant } : {}),
|
|
4614
|
+
},
|
|
4607
4615
|
responseType: "brain.models.pull.response",
|
|
4608
4616
|
});
|
|
4609
4617
|
return unwrapBrainJob(payload);
|
|
@@ -4630,10 +4638,10 @@ export class DaemonClient {
|
|
|
4630
4638
|
}
|
|
4631
4639
|
return payload.quants;
|
|
4632
4640
|
}
|
|
4633
|
-
async brainModelsAdd(repo, quant, requestId) {
|
|
4641
|
+
async brainModelsAdd(repo, quant, components, requestId) {
|
|
4634
4642
|
const payload = await this.sendCorrelatedSessionRequest({
|
|
4635
4643
|
requestId,
|
|
4636
|
-
message: { type: "brain.models.add.request", repo, quant },
|
|
4644
|
+
message: { type: "brain.models.add.request", repo, quant, components },
|
|
4637
4645
|
responseType: "brain.models.add.response",
|
|
4638
4646
|
});
|
|
4639
4647
|
return unwrapBrainJob(payload);
|
|
@@ -4646,6 +4654,14 @@ export class DaemonClient {
|
|
|
4646
4654
|
});
|
|
4647
4655
|
return unwrapBrainJob(payload);
|
|
4648
4656
|
}
|
|
4657
|
+
async brainRuntimeRemove(name, requestId) {
|
|
4658
|
+
const payload = await this.sendCorrelatedSessionRequest({
|
|
4659
|
+
requestId,
|
|
4660
|
+
message: { type: "brain.runtime.remove.request", name },
|
|
4661
|
+
responseType: "brain.runtime.remove.response",
|
|
4662
|
+
});
|
|
4663
|
+
return unwrapBrainJob(payload);
|
|
4664
|
+
}
|
|
4649
4665
|
async brainCalibrate(model, requestId) {
|
|
4650
4666
|
const payload = await this.sendCorrelatedSessionRequest({
|
|
4651
4667
|
requestId,
|
|
@@ -4797,6 +4813,16 @@ export class DaemonClient {
|
|
|
4797
4813
|
}
|
|
4798
4814
|
return payload;
|
|
4799
4815
|
}
|
|
4816
|
+
async brainModelComponentDelete(modelId, componentId, requestId) {
|
|
4817
|
+
const payload = await this.sendCorrelatedSessionRequest({
|
|
4818
|
+
requestId,
|
|
4819
|
+
message: { type: "brain.model.component.delete.request", modelId, componentId },
|
|
4820
|
+
responseType: "brain.model.component.delete.response",
|
|
4821
|
+
});
|
|
4822
|
+
if (payload.error)
|
|
4823
|
+
throw new Error(payload.error);
|
|
4824
|
+
return payload;
|
|
4825
|
+
}
|
|
4800
4826
|
/**
|
|
4801
4827
|
* Rename a model's display name. The brain rejects a collision with
|
|
4802
4828
|
* another model's current id/displayName.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@otto-code/client",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.8",
|
|
4
4
|
"description": "Otto client SDK package",
|
|
5
5
|
"license": "AGPL-3.0-or-later",
|
|
6
6
|
"files": [
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"test": "vitest run"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@otto-code/protocol": "0.8.
|
|
40
|
-
"@otto-code/relay": "0.8.
|
|
39
|
+
"@otto-code/protocol": "0.8.8",
|
|
40
|
+
"@otto-code/relay": "0.8.8",
|
|
41
41
|
"zod": "^4.4.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|