@dejima/sdk 0.8.57 → 0.8.59
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/client.d.ts +17 -0
- package/dist/client.js +32 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -85,6 +85,11 @@ export declare class Client {
|
|
|
85
85
|
updateAgent(name: string, agentId: string, label: string): Promise<any>;
|
|
86
86
|
/** Remove a non-primary agent (kills its session, prunes its worktree). */
|
|
87
87
|
removeAgent(name: string, agentId: string): Promise<void>;
|
|
88
|
+
/** Relaunch an agent in place so it picks up a changed environment (e.g. a new
|
|
89
|
+
* secret). `resume` continues its previous conversation where supported. */
|
|
90
|
+
restartAgent(name: string, agentId: string, opts?: {
|
|
91
|
+
resume?: boolean;
|
|
92
|
+
}): Promise<any>;
|
|
88
93
|
/** Set an agent's LLM provider/model (key-requiring frameworks only). */
|
|
89
94
|
configureAgent(name: string, agentId: string, opts: {
|
|
90
95
|
provider?: string;
|
|
@@ -157,6 +162,18 @@ export declare class Client {
|
|
|
157
162
|
default?: boolean;
|
|
158
163
|
}): Promise<any>;
|
|
159
164
|
deleteProvider(provider: string): Promise<any>;
|
|
165
|
+
/** Managed local-model backend status (backend, endpoint, pulled models, host RAM + recommendation). */
|
|
166
|
+
localStatus(): Promise<any>;
|
|
167
|
+
/** Pulled local models plus the host-aware recommendation. */
|
|
168
|
+
listLocalModels(): Promise<any>;
|
|
169
|
+
/** Install the inference backend on the daemon host; resolves to the progress text. */
|
|
170
|
+
localInstall(): Promise<string>;
|
|
171
|
+
/** Pull a model — a curated alias (e.g. "qwen-coder") or a raw backend ref; resolves to progress text. */
|
|
172
|
+
pullLocalModel(name: string): Promise<string>;
|
|
173
|
+
/** Remove a pulled model. */
|
|
174
|
+
removeLocalModel(name: string): Promise<void>;
|
|
175
|
+
/** Deregister the `local` provider (the backend + pulled models stay). */
|
|
176
|
+
localOff(): Promise<void>;
|
|
160
177
|
listTokens(): Promise<any>;
|
|
161
178
|
/**
|
|
162
179
|
* Mint an operator bearer token. `role` is `owner`/`operator`/`viewer`;
|
package/dist/client.js
CHANGED
|
@@ -174,6 +174,13 @@ export class Client {
|
|
|
174
174
|
async removeAgent(name, agentId) {
|
|
175
175
|
await this.request("DELETE", `${this.island(name)}/agents/${this.seg(agentId)}`);
|
|
176
176
|
}
|
|
177
|
+
/** Relaunch an agent in place so it picks up a changed environment (e.g. a new
|
|
178
|
+
* secret). `resume` continues its previous conversation where supported. */
|
|
179
|
+
restartAgent(name, agentId, opts = {}) {
|
|
180
|
+
return this.json("POST", `${this.island(name)}/agents/${this.seg(agentId)}/restart`, {
|
|
181
|
+
json: { resume: opts.resume || false },
|
|
182
|
+
});
|
|
183
|
+
}
|
|
177
184
|
/** Set an agent's LLM provider/model (key-requiring frameworks only). */
|
|
178
185
|
configureAgent(name, agentId, opts) {
|
|
179
186
|
const body = {};
|
|
@@ -310,6 +317,31 @@ export class Client {
|
|
|
310
317
|
deleteProvider(provider) {
|
|
311
318
|
return this.json("DELETE", `/v1/credentials/providers/${this.seg(provider)}`);
|
|
312
319
|
}
|
|
320
|
+
// ===== local models (owner-only) ------------------------------------
|
|
321
|
+
/** Managed local-model backend status (backend, endpoint, pulled models, host RAM + recommendation). */
|
|
322
|
+
localStatus() {
|
|
323
|
+
return this.json("GET", "/v1/local");
|
|
324
|
+
}
|
|
325
|
+
/** Pulled local models plus the host-aware recommendation. */
|
|
326
|
+
listLocalModels() {
|
|
327
|
+
return this.json("GET", "/v1/local/models");
|
|
328
|
+
}
|
|
329
|
+
/** Install the inference backend on the daemon host; resolves to the progress text. */
|
|
330
|
+
async localInstall() {
|
|
331
|
+
return (await this.request("POST", "/v1/local/install")).text();
|
|
332
|
+
}
|
|
333
|
+
/** Pull a model — a curated alias (e.g. "qwen-coder") or a raw backend ref; resolves to progress text. */
|
|
334
|
+
async pullLocalModel(name) {
|
|
335
|
+
return (await this.request("POST", `/v1/local/models/${this.seg(name)}/pull`)).text();
|
|
336
|
+
}
|
|
337
|
+
/** Remove a pulled model. */
|
|
338
|
+
async removeLocalModel(name) {
|
|
339
|
+
await this.request("DELETE", `/v1/local/models/${this.seg(name)}`);
|
|
340
|
+
}
|
|
341
|
+
/** Deregister the `local` provider (the backend + pulled models stay). */
|
|
342
|
+
async localOff() {
|
|
343
|
+
await this.request("POST", "/v1/local/off");
|
|
344
|
+
}
|
|
313
345
|
// ===== operator tokens (owner-only) ----------------------------------
|
|
314
346
|
listTokens() {
|
|
315
347
|
return this.json("GET", "/v1/tokens");
|
package/dist/index.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ export type { ClientOptions } from "./client.js";
|
|
|
16
16
|
export { Session } from "./session.js";
|
|
17
17
|
export type { SessionEnvelope, WebSocketLike } from "./session.js";
|
|
18
18
|
export { DejimaError } from "./errors.js";
|
|
19
|
-
export declare const VERSION = "0.8.
|
|
19
|
+
export declare const VERSION = "0.8.59";
|
package/dist/index.js
CHANGED
package/package.json
CHANGED